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

@ -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);
}
}
}