From 40a681a68587be3fdfe83dfeeeac65d421b78bc8 Mon Sep 17 00:00:00 2001 From: c0ffee Date: Thu, 11 Aug 2022 09:14:57 -0700 Subject: [PATCH] filters and vanilla cooking expanded --- .../1.3/Assemblies/CRIALactation.dll | Bin 26112 -> 27136 bytes CRIALactation/CRIALactation.csproj | 3 ++ .../HarmonyPatch_FoodUtility.cs | 2 +- .../SpecialThingFilterWorker_Milk.cs | 17 +++++++ .../SpecialThingFilterWorker_MilkBase.cs | 42 ++++++++++++++++++ .../SpecialThingFilterWorker_NoMilk.cs | 17 +++++++ 6 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_Milk.cs create mode 100644 CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_MilkBase.cs create mode 100644 CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_NoMilk.cs diff --git a/CRIALactation/1.3/Assemblies/CRIALactation.dll b/CRIALactation/1.3/Assemblies/CRIALactation.dll index 72bb0ff3334c00d118852bf818e6ae154daa0f68..07e2c1d0492c9633f03dcc95f83372ac94eb96f9 100644 GIT binary patch delta 10930 zcmaJ{3t$x0x&F_Y+1dAI-} zaK7xy<#SMWOeAuxxJlBoeVaSdtY^D51&Wp^o_GDx#6sc)|P6roNep$bBZ8OXl?KOEE(rvHI zC0X*fuJW<7jIJmwV#(>I&oN9)H|rb~>FKbUb#3`obQDdK$w6R~i0z{Cg)(_96C{uN zdR3j*L89_2M}8QA{Ip~fo5|!%oRR}^fuiSx%c%7AieQRMTV5iQv)GVh<@7p?WP^P* z{$^*a;(FM|Qa1oyvST(*=z)?&!dh|;cy|TaRk6+HIA>XUE=1fqokk-yWQ^3T0m_Lx zD3Z-EX^-JbW<7RbQn*r>dbkRSdoLjh$CC4uo6j(oV|L63bS(gs>?yKc7ELW=wUiwp zG}1EZx)GvSau7GNsgvcZKg*B=s{98@m_FB%(HE-wYGOuZj*(gfS6!`ubD}~-J&wu% zX30(9CP=i)% z#I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git a/CRIALactation/CRIALactation.csproj b/CRIALactation/CRIALactation.csproj index 4105640..084d84b 100644 --- a/CRIALactation/CRIALactation.csproj +++ b/CRIALactation/CRIALactation.csproj @@ -92,6 +92,9 @@ + + + diff --git a/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs b/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs index dbcc083..ed1fc1c 100644 --- a/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs +++ b/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs @@ -58,7 +58,7 @@ namespace CRIALactation if (ingester.Ideo != null) { - if (ingredient == ThingDefOf_Milk.HumanoidMilk || ingredient == ThingDefOf_Milk.HumanMilk) + if (ingredient == ThingDefOf_Milk.HumanoidMilk || ingredient == ThingDefOf_Milk.HumanMilk || ingredient.defName == "VCE_HumanoidCheese") { AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankMilkMeal, ingester, ingredient, meatSourceCategory); } diff --git a/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_Milk.cs b/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_Milk.cs new file mode 100644 index 0000000..3e7260c --- /dev/null +++ b/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_Milk.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Verse; + +namespace CRIALactation.Source.ThingFilters +{ + class SpecialThingFilterWorker_Milk : SpecialThingFilterWorker_MilkBase + { + public override bool Matches(Thing t) + { + return IsHumanMilk(t) || IsFoodWithMilk(t); + } + } +} diff --git a/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_MilkBase.cs b/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_MilkBase.cs new file mode 100644 index 0000000..958688d --- /dev/null +++ b/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_MilkBase.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using RimWorld; +using Verse; +using Milk; + +namespace CRIALactation +{ + public abstract class SpecialThingFilterWorker_MilkBase : SpecialThingFilterWorker + { + + protected bool IsHumanMilk(ThingDef t) => t == ThingDefOf_Milk.HumanMilk || t == ThingDefOf_Milk.HumanoidMilk; + + protected bool IsHumanMilk(Thing t) => IsHumanMilk(t.def); + + public override bool CanEverMatch(ThingDef def) + { + return def.IsIngestible && def.IsProcessedFood; + } + + protected bool IsFoodWithMilk(Thing food) + { + CompIngredients compIngredients = food.TryGetComp(); + + if (compIngredients == null) + return false; + + foreach (ThingDef ingredient in compIngredients.ingredients) + { + if (IsHumanMilk(ingredient)) + return true; + } + + return false; + } + + + } +} diff --git a/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_NoMilk.cs b/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_NoMilk.cs new file mode 100644 index 0000000..637a20a --- /dev/null +++ b/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_NoMilk.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Verse; + +namespace CRIALactation +{ + class SpecialThingFilterWorker_NoMilk : SpecialThingFilterWorker_MilkBase + { + public override bool Matches(Thing t) + { + return !(IsHumanMilk(t) || IsFoodWithMilk(t)); + } + } +}