potential fix to raw milk drink

This commit is contained in:
c0ffee 2021-11-16 22:13:27 -08:00
parent 3bcff610d5
commit 3b7637b977
3 changed files with 13 additions and 4 deletions

View file

@ -95,10 +95,13 @@
<Compile Include="Source\Thoughts\ThoughtWorker_Precept_Lactating_Essential_Social.cs" />
<Compile Include="Source\WorkGivers\WorkGiver_MassageBreasts.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Folder Include="Defs\Thingdef\" />
</ItemGroup>
<ItemGroup>
<Content Include="Defs\AbilityDefs\Abilities_Hucow.xml" />
<Content Include="Defs\HediffDefs\Hediffs_Hucow.xml" />
<Content Include="Defs\HistoryEventDefs\HistoryEventDefs.xml" />
<Content Include="Defs\JobDefs\Jobs_CRIALactation.xml" />
<Content Include="Defs\MemeDefs\Memes_Hucow.xml" />
<Content Include="Defs\PreceptDefs\Precepts_Lactating.xml" />

View file

@ -21,7 +21,7 @@ namespace CRIALactation
}
[HarmonyPatch(typeof(FoodUtility), "ThoughtsFromIngesting")]
public static void Postfix(ref List<FoodUtility.ThoughtFromIngesting> __result, Pawn ingester, Thing foodSource, ThingDef foodDef)
public static void Prefix(Pawn ingester, Thing foodSource, ThingDef foodDef)
{
if (ingester.Ideo != null)
@ -42,9 +42,15 @@ namespace CRIALactation
MeatSourceCategory meatSourceCategory = FoodUtility.GetMeatSourceCategory(ingredient);
if(ingredient == ThingDefOf_Milk.HumanoidMilk || ingredient == ThingDefOf_Milk.HumanMilk)
if (ingester.Ideo != null)
{
AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankMilkMeal, ingester, ingredient, meatSourceCategory);
if (ingredient == ThingDefOf_Milk.HumanoidMilk || ingredient == ThingDefOf_Milk.HumanMilk)
{
AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankMilkMeal, ingester, ingredient, meatSourceCategory);
}
}
}