diff --git a/CRIALactation/1.3/Assemblies/CRIALactation.dll b/CRIALactation/1.3/Assemblies/CRIALactation.dll index 0bb7276..b32b2ff 100644 Binary files a/CRIALactation/1.3/Assemblies/CRIALactation.dll and b/CRIALactation/1.3/Assemblies/CRIALactation.dll differ diff --git a/CRIALactation/Defs/HistoryEventDefs/HistoryEventDefs.xml b/CRIALactation/Defs/HistoryEventDefs/HistoryEventDefs.xml index c2dffbb..b4d5d22 100644 --- a/CRIALactation/Defs/HistoryEventDefs/HistoryEventDefs.xml +++ b/CRIALactation/Defs/HistoryEventDefs/HistoryEventDefs.xml @@ -3,12 +3,17 @@ DrankMilkRaw - + DrankMilkMeal - + + + DrankNonMilkMeal + + + diff --git a/CRIALactation/Defs/PreceptDefs/Precepts_Lactating.xml b/CRIALactation/Defs/PreceptDefs/Precepts_Lactating.xml index 00c59d7..3e0fc73 100644 --- a/CRIALactation/Defs/PreceptDefs/Precepts_Lactating.xml +++ b/CRIALactation/Defs/PreceptDefs/Precepts_Lactating.xml @@ -16,7 +16,7 @@ High 20 100 - Milk from breasts is creamy and delicious. It should be produced and consumed on a regular basis. Lactating colonists will produce double the normal amount of milk. + Milk from breasts is creamy and delicious. It should be produced and consumed on a regular basis. Lactating colonists can be converted to hucow, which will produce double the normal amount of milk.
  • Lactating_Essential @@ -27,14 +27,18 @@ Lactating_Essential_Social true
  • +
  • + DrankNonMilkMeal + DrankNonMilkMeal_Essential +
  • DrankMilkRaw - DrankMilkRawReligion -
  • + DrankMilkRaw_Essential +
  • DrankMilkMeal - DrankMilkMealReligion -
  • + DrankMilkMeal_Essential +
    @@ -69,8 +73,6 @@ - - Lactating_Essential_Social Thought_SituationalSocial @@ -86,36 +88,62 @@
  • - -20 + -10
  • - -40 + -15
  • - - DrankMilkRawReligion - 1 + + DrankMilkRaw_Essential + 1
  • - - The taste of breast milk from humans is a taste of the gods! - 10 + + The taste of fresh breast milk is sweet, fulfilling, and intimate. + 6
  • -
    +
    - - DrankMilkMealReligion - 1 + + DrankMilkMeal_Essential + 1
  • - - Human breast milk with a meal is just the best! - 20 + + The breast milk accentuated my meal beautifully. + 2 +
  • +
    +
    + + + DrankNonMilkMeal_Essential + 1 + +
  • + + I had to eat food that wasn't produced from a person's breasts. My beliefs strictly forbid such things. + -2 +
  • +
    +
    + + + NoRecentHumanMilk_Essential + Thought_Situational + CRIALactation.ThoughtWorker_Precept_NoRecentHumanMilk + True + +
  • + + It's been so long since I've tasted the milk of a woman's breasts. I should have had some by now. + -6
  • diff --git a/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs b/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs index c60c105..d4c175e 100644 --- a/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs +++ b/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs @@ -23,10 +23,14 @@ namespace CRIALactation [HarmonyPatch(typeof(FoodUtility), "ThoughtsFromIngesting")] public static void Postfix(ref List __result, ref List ___ingestThoughts, Pawn ingester, Thing foodSource, ThingDef foodDef) { + /** + * checks if food has milk or not + */ if (ingester.Ideo != null) { - + + CompIngredients ingredients = foodSource.TryGetComp(); if (foodDef == ThingDefOf_Milk.HumanMilk || foodDef == ThingDefOf_Milk.HumanoidMilk) { AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankMilkRaw, ingester, foodDef, FoodUtility.GetMeatSourceCategory(foodDef)); @@ -34,6 +38,11 @@ namespace CRIALactation __result = ___ingestThoughts; } + else if (ingredients == null + || !(ingredients.ingredients.Contains(ThingDefOf_Milk.HumanMilk) || (ingredients.ingredients.Contains(ThingDefOf_Milk.HumanoidMilk)))) { + AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankNonMilkMeal, ingester, foodDef, FoodUtility.GetMeatSourceCategory(foodDef)); + __result = ___ingestThoughts; + } } @@ -57,5 +66,17 @@ namespace CRIALactation } + [HarmonyPatch(typeof(FoodUtility), "GenerateGoodIngredients")] + public static void Postfix(Thing meal, Ideo ideo) + { + CompIngredients compIngredients = meal.TryGetComp(); + + if(ideo.HasPrecept(PreceptDefOf_Lactation.Lactating_Essential)) + { + compIngredients.ingredients.Add(ThingDefOf_Milk.HumanMilk); + compIngredients.ingredients.Add(ThingDefOf_Milk.HumanoidMilk); + } + } + } } diff --git a/CRIALactation/Source/HistoryEventDefOf/HistoryEventDefOf_Milk.cs b/CRIALactation/Source/HistoryEventDefOf/HistoryEventDefOf_Milk.cs index 0e17b05..2cb99f2 100644 --- a/CRIALactation/Source/HistoryEventDefOf/HistoryEventDefOf_Milk.cs +++ b/CRIALactation/Source/HistoryEventDefOf/HistoryEventDefOf_Milk.cs @@ -18,5 +18,7 @@ namespace CRIALactation public static HistoryEventDef DrankMilkRaw; public static HistoryEventDef DrankMilkMeal; + + public static HistoryEventDef DrankNonMilkMeal; } }