diff --git a/1.4/Assemblies/C0ffee's RJW Ideology Addons.dll b/1.4/Assemblies/C0ffee's RJW Ideology Addons.dll index 4d92201..31b3bad 100644 Binary files a/1.4/Assemblies/C0ffee's RJW Ideology Addons.dll and b/1.4/Assemblies/C0ffee's RJW Ideology Addons.dll differ diff --git a/C0ffee's RJW Ideology Addons.csproj b/C0ffee's RJW Ideology Addons.csproj index 9adb9f6..888608e 100644 --- a/C0ffee's RJW Ideology Addons.csproj +++ b/C0ffee's RJW Ideology Addons.csproj @@ -27,7 +27,7 @@ pdbonly true - bin\Release\ + 1.4\Assemblies\ TRACE prompt 4 diff --git a/C0ffee's RJW Ideology Addons.sln b/C0ffee's RJW Ideology Addons.sln index 854a7a7..b37d2f8 100644 --- a/C0ffee's RJW Ideology Addons.sln +++ b/C0ffee's RJW Ideology Addons.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31205.134 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33103.184 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "C0ffee's RJW Ideology Addons", "C0ffee's RJW Ideology Addons.csproj", "{D46BAA34-7459-482F-B152-321C071DCE18}" EndProject @@ -15,16 +15,16 @@ Global Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D46BAA34-7459-482F-B152-321C071DCE18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D46BAA34-7459-482F-B152-321C071DCE18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D46BAA34-7459-482F-B152-321C071DCE18}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {D46BAA34-7459-482F-B152-321C071DCE18}.Debug|Any CPU.Build.0 = Release|Any CPU {D46BAA34-7459-482F-B152-321C071DCE18}.Release|Any CPU.ActiveCfg = Release|Any CPU {D46BAA34-7459-482F-B152-321C071DCE18}.Release|Any CPU.Build.0 = Release|Any CPU - {01BE0D84-9292-4F89-90FC-647B66771C61}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {01BE0D84-9292-4F89-90FC-647B66771C61}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01BE0D84-9292-4F89-90FC-647B66771C61}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {01BE0D84-9292-4F89-90FC-647B66771C61}.Debug|Any CPU.Build.0 = Release|Any CPU {01BE0D84-9292-4F89-90FC-647B66771C61}.Release|Any CPU.ActiveCfg = Release|Any CPU {01BE0D84-9292-4F89-90FC-647B66771C61}.Release|Any CPU.Build.0 = Release|Any CPU - {212ED289-C5A3-4807-B482-A53F36B31F23}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {212ED289-C5A3-4807-B482-A53F36B31F23}.Debug|Any CPU.Build.0 = Debug|Any CPU + {212ED289-C5A3-4807-B482-A53F36B31F23}.Debug|Any CPU.ActiveCfg = Release|Any CPU + {212ED289-C5A3-4807-B482-A53F36B31F23}.Debug|Any CPU.Build.0 = Release|Any CPU {212ED289-C5A3-4807-B482-A53F36B31F23}.Release|Any CPU.ActiveCfg = Release|Any CPU {212ED289-C5A3-4807-B482-A53F36B31F23}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection diff --git a/CRIALactation/1.4/Assemblies/CRIALactation.dll b/CRIALactation/1.4/Assemblies/CRIALactation.dll index df8d0f8..ad8ad17 100644 Binary files a/CRIALactation/1.4/Assemblies/CRIALactation.dll and b/CRIALactation/1.4/Assemblies/CRIALactation.dll differ diff --git a/CRIALactation/1.4/Languages/English/Keyed/CRIALaction.xml b/CRIALactation/1.4/Languages/English/Keyed/CRIALaction.xml new file mode 100644 index 0000000..237b660 --- /dev/null +++ b/CRIALactation/1.4/Languages/English/Keyed/CRIALaction.xml @@ -0,0 +1,18 @@ + + + + RJW - C0ffee's RJW Ideology Addons - Lactation + + Massage Cooldown + Default 0.3. Time between massages to stimulate lacation. 1 = A full day. Changing this number will not update existing cooldown Hediffs, it will only apply to new cooldown hediffs applied. + + Total Massages Needed + Default 20. How many massages are required before lacation starts. Progress is saved as 0->1. Each time a massage happens the amount 1/total is added. Changing this value will not reset the current progress amount. + + Hucow Breast Size Increase + Default 0.5. When turned into a hucow, this amount will get added to pawns existing breast size. + + Hucow Breast Size Minimum + Default 1.0. When turned into a hucow, this is the smallest that breasts will end up being. + + \ No newline at end of file diff --git a/CRIALactation/CRIALactation.csproj b/CRIALactation/CRIALactation.csproj index 5c849ac..b29ee35 100644 --- a/CRIALactation/CRIALactation.csproj +++ b/CRIALactation/CRIALactation.csproj @@ -26,7 +26,7 @@ pdbonly true - bin\Release\ + 1.4\Assemblies\ TRACE prompt 4 @@ -45,7 +45,7 @@ False - ..\..\rjw-mc\1.3\Assemblies\Milk.dll + ..\..\rjw-mc\1.4\Assemblies\Milk.dll False @@ -70,6 +70,7 @@ + diff --git a/CRIALactation/Defs/HediffDefs/Hediffs_Hucow.xml b/CRIALactation/Defs/HediffDefs/Hediffs_Hucow.xml index 65055c7..314e344 100644 --- a/CRIALactation/Defs/HediffDefs/Hediffs_Hucow.xml +++ b/CRIALactation/Defs/HediffDefs/Hediffs_Hucow.xml @@ -13,10 +13,10 @@
  • - 2.75 - 0.5 - 0.4 - 0.65 + 2.5 + 1.5 + 0.7 + 0.7
  • @@ -25,22 +25,38 @@ InducingLactation - This person's breasts are being encouraged to lactate. This is a long, arduous process of breast and nipple stimulation. It causes feelings of soreness and swelling that ends once milk begins expressing. + This person's breasts are being encouraged to lactate. This is a long, arduous process of breast and nipple stimulation. HediffWithComps
  • -
  • + + false + 0.01 + + + + InducingLactationCooldown + + HediffWithComps + This person's breasts are being encouraged to lactate and have been encouraged recently. This causes feelings of soreness, swelling and discomfort. + (1, 0.50, 0.50) + false + 0.3 + +
  • + -1 +
  • +
  • - 2.75 - 0.5 - 0.4 - 0.65 + 0.9 + 0.9
  • + diff --git a/CRIALactation/Source/Comps/CompAbilityEffects/CompAbilityEffect_ConvertHucow.cs b/CRIALactation/Source/Comps/CompAbilityEffects/CompAbilityEffect_ConvertHucow.cs index 65b38f7..cb7e980 100644 --- a/CRIALactation/Source/Comps/CompAbilityEffects/CompAbilityEffect_ConvertHucow.cs +++ b/CRIALactation/Source/Comps/CompAbilityEffects/CompAbilityEffect_ConvertHucow.cs @@ -30,6 +30,15 @@ namespace CRIALactation base.Apply(target, dest); Pawn pawn = target.Pawn; LactationUtility.ExtendLactationDuration(pawn); + + //let's expand the breasts too! + var breastList = pawn.GetBreastList(); + if (!breastList.NullOrEmpty()) + foreach (var breasts in breastList.Where(x => !x.TryGetComp().FluidType.NullOrEmpty())) + { + breasts.Severity += LactationSettings.hucowBreastSizeBonus; //this could make some big ones rediculous. + if (breasts.Severity < LactationSettings.hucowBreastSizeMinimum) breasts.Severity = LactationSettings.hucowBreastSizeMinimum; + } } } } diff --git a/CRIALactation/Source/Comps/CompLactation.cs b/CRIALactation/Source/Comps/CompLactation.cs index 56706c5..1af6397 100644 --- a/CRIALactation/Source/Comps/CompLactation.cs +++ b/CRIALactation/Source/Comps/CompLactation.cs @@ -22,8 +22,11 @@ namespace CRIALactation public override string CompInspectStringExtra() { - if((parent as Pawn).health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation) != null - && (parent as Pawn).health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation).TryGetComp().canMassage()) + //if ((parent as Pawn).health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation) != null + // && (parent as Pawn).health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation).TryGetComp().canMassage()) + + if ((parent as Pawn).health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation) != null + && (parent as Pawn).health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactationCooldown) == null) { return "Ready to stimulate breasts for lactation."; } diff --git a/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs b/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs index 7e98c67..b287ba3 100644 --- a/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs +++ b/CRIALactation/Source/HarmonyPatches/HarmonyPatch_FoodUtility.cs @@ -31,7 +31,7 @@ namespace CRIALactation { CompIngredients ingredients = foodSource.TryGetComp(); - if (foodDef == ThingDefOf_Milk.HumanMilk || foodDef == ThingDefOf_Milk.HumanoidMilk || foodDef.defName == "VCE_HumanoidCheese" || foodDef.defName == "cheese") + if (foodDef == ThingDefOf_Milk.HumanMilk || foodDef == ThingDefOf_Milk.HumanoidMilk || foodDef == ThingDefOf_Milk.HumanMilkBulk || foodDef == ThingDefOf_Milk.HumanoidMilkBulk || foodDef.defName == "VCE_HumanoidCheese" || foodDef.defName == "cheese") { AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankMilkRaw, ingester, foodDef, FoodUtility.GetMeatSourceCategory(foodDef)); @@ -39,7 +39,7 @@ namespace CRIALactation } else if (ingredients == null - || !(ingredients.ingredients.Contains(ThingDefOf_Milk.HumanMilk) || (ingredients.ingredients.Contains(ThingDefOf_Milk.HumanoidMilk))) + || !(ingredients.ingredients.Contains(ThingDefOf_Milk.HumanMilk) || (ingredients.ingredients.Contains(ThingDefOf_Milk.HumanoidMilk)) || (ingredients.ingredients.Contains(ThingDefOf_Milk.HumanMilkBulk)) || (ingredients.ingredients.Contains(ThingDefOf_Milk.HumanoidMilkBulk))) && !LactationUtility.IsHucow(ingester)) { AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankNonMilkMeal, ingester, foodDef, FoodUtility.GetMeatSourceCategory(foodDef)); __result = ___ingestThoughts; @@ -58,7 +58,7 @@ namespace CRIALactation if (ingester.Ideo != null) { - if (ingredient == ThingDefOf_Milk.HumanoidMilk || ingredient == ThingDefOf_Milk.HumanMilk || ingredient.defName == "VCE_HumanoidCheese" || ingredient.defName == "cheese") + if (ingredient == ThingDefOf_Milk.HumanoidMilk || ingredient == ThingDefOf_Milk.HumanMilk || ingredient == ThingDefOf_Milk.HumanoidMilkBulk || ingredient == ThingDefOf_Milk.HumanMilkBulk || ingredient.defName == "VCE_HumanoidCheese" || ingredient.defName == "cheese") { AddThoughtsFromIdeo_Patch(HistoryEventDefOf_Milk.DrankMilkMeal, ingester, ingredient, meatSourceCategory); } @@ -77,6 +77,8 @@ namespace CRIALactation { compIngredients.ingredients.Add(ThingDefOf_Milk.HumanMilk); compIngredients.ingredients.Add(ThingDefOf_Milk.HumanoidMilk); + compIngredients.ingredients.Add(ThingDefOf_Milk.HumanMilkBulk); + compIngredients.ingredients.Add(ThingDefOf_Milk.HumanoidMilkBulk); } } diff --git a/CRIALactation/Source/HarmonyPatches/HarmonyPatch_Thing.cs b/CRIALactation/Source/HarmonyPatches/HarmonyPatch_Thing.cs index 8180341..86dd42e 100644 --- a/CRIALactation/Source/HarmonyPatches/HarmonyPatch_Thing.cs +++ b/CRIALactation/Source/HarmonyPatches/HarmonyPatch_Thing.cs @@ -15,7 +15,7 @@ namespace CRIALactation public static void Prefix(Thing __instance, Pawn ingester) { - if(__instance?.def == ThingDefOf_Milk.HumanMilk || __instance?.def == ThingDefOf_Milk.HumanoidMilk) + if(__instance?.def == ThingDefOf_Milk.HumanMilk || __instance?.def == ThingDefOf_Milk.HumanoidMilk || __instance?.def == ThingDefOf_Milk.HumanMilkBulk || __instance?.def == ThingDefOf_Milk.HumanoidMilkBulk) { if (ingester.TryGetComp() == null) return; ingester.TryGetComp().lastHumanLactationIngestedTick = Find.TickManager.TicksGame; diff --git a/CRIALactation/Source/HarmonyPatches/RJW/HarmonyPatch_Milk_HumanCompHasGatherableBodyResource.cs b/CRIALactation/Source/HarmonyPatches/RJW/HarmonyPatch_Milk_HumanCompHasGatherableBodyResource.cs index 2294cf9..2335544 100644 --- a/CRIALactation/Source/HarmonyPatches/RJW/HarmonyPatch_Milk_HumanCompHasGatherableBodyResource.cs +++ b/CRIALactation/Source/HarmonyPatches/RJW/HarmonyPatch_Milk_HumanCompHasGatherableBodyResource.cs @@ -13,10 +13,11 @@ using System.Reflection.Emit; namespace CRIALactation { + /* [HarmonyPatch(typeof(HumanCompHasGatherableBodyResource), "CompTick")] public static class HarmonyPatch_Milk_HumanCompHasGatherableBodyResource { - /* + public static void Prefix(HumanCompHasGatherableBodyResource __instance) { if (!__instance.parent.IsHashIntervalTick(100)) @@ -45,8 +46,9 @@ namespace CRIALactation p.health.AddHediff(HediffDef.Named("Lactating_Permanent")); } } - }*/ + } + public static IEnumerable Transpiler(IEnumerable codeInstructions) { @@ -75,7 +77,7 @@ namespace CRIALactation } - + public static float AdjustGatherResourceDaysForPrecept(float resourcesIntervalDays, HumanCompHasGatherableBodyResource __instance) { @@ -92,7 +94,9 @@ namespace CRIALactation } } + */ + /* [HarmonyPatch(typeof(CompHyperMilkableHuman), "ResourceAmount", MethodType.Getter)] public static class HarmonyPatch_IncreaseYieldForHucowHyperMilkable { @@ -111,5 +115,5 @@ namespace CRIALactation Pawn p = __instance.parent as Pawn; __result *= p.GetStatValue(StatDefOf_Lactation.MilkProductionYield); } - } + }*/ } diff --git a/CRIALactation/Source/HediffDefOf/HediffDefOf_Milk.cs b/CRIALactation/Source/HediffDefOf/HediffDefOf_Milk.cs index 94dad92..b147fa6 100644 --- a/CRIALactation/Source/HediffDefOf/HediffDefOf_Milk.cs +++ b/CRIALactation/Source/HediffDefOf/HediffDefOf_Milk.cs @@ -23,6 +23,7 @@ namespace CRIALactation public static HediffDef InducingLactation; public static HediffDef Hucow; + public static HediffDef InducingLactationCooldown; diff --git a/CRIALactation/Source/Hediffs/HediffCompProperties_LactationInduction.cs b/CRIALactation/Source/Hediffs/HediffCompProperties_LactationInduction.cs index dc3e8b4..a16e6e5 100644 --- a/CRIALactation/Source/Hediffs/HediffCompProperties_LactationInduction.cs +++ b/CRIALactation/Source/Hediffs/HediffCompProperties_LactationInduction.cs @@ -7,6 +7,7 @@ using Verse; namespace CRIALactation { + /* public class HediffCompProperties_LactationInduction : HediffCompProperties { public HediffCompProperties_LactationInduction() @@ -14,4 +15,5 @@ namespace CRIALactation this.compClass = typeof(HediffComp_LactationInduction); } } + */ } diff --git a/CRIALactation/Source/Hediffs/HediffComp_LactationInduction.cs b/CRIALactation/Source/Hediffs/HediffComp_LactationInduction.cs index 462dd4b..c46ce03 100644 --- a/CRIALactation/Source/Hediffs/HediffComp_LactationInduction.cs +++ b/CRIALactation/Source/Hediffs/HediffComp_LactationInduction.cs @@ -7,6 +7,7 @@ using Verse; namespace CRIALactation { + /* public class HediffComp_LactationInduction : HediffComp { private readonly int OneDayInTicks = 60000; @@ -23,6 +24,9 @@ namespace CRIALactation public bool canMassage() { + + + return tickLastMassaged + OneDayInTicks / TimesMassagedADay < GenTicks.TicksGame; } @@ -35,4 +39,5 @@ namespace CRIALactation } } + */ } diff --git a/CRIALactation/Source/JobDrivers/JobDriver_MassageBreasts.cs b/CRIALactation/Source/JobDrivers/JobDriver_MassageBreasts.cs index 21c9a07..1630207 100644 --- a/CRIALactation/Source/JobDrivers/JobDriver_MassageBreasts.cs +++ b/CRIALactation/Source/JobDrivers/JobDriver_MassageBreasts.cs @@ -13,7 +13,7 @@ namespace CRIALactation { public class JobDriver_MassageBreasts : JobDriver { - private readonly float WorkTotal = 300f; + private readonly float WorkTotal = 600f; public override bool TryMakePreToilReservations(bool errorOnFailed) { @@ -47,7 +47,24 @@ namespace CRIALactation Pawn p = job.GetTarget(TargetIndex.A).Thing as Pawn; if (massageProgress >= WorkTotal) { - p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation).TryGetComp().massage(pawn); + + Hediff induce = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation); + induce.Severity += (1f / LactationSettings.totalMassagesUntilLactation); + //0.05f ; //20 times, 3 times a day = 7 days, give or take + + if (induce.Severity >= 1) + { + //p.health.AddHediff(cooldown, + LactationUtility.StartLactating(p, true); + //remove the other hediff + p.health.RemoveHediff(induce); + } + + //Add cooldown hediff. This has the pain debuff so i'm going to add it even if you're now lactating. The last one would have still hurt. + Hediff cooldown = HediffMaker.MakeHediff(HediffDefOf_Milk.InducingLactationCooldown, p, null); + cooldown.Severity = LactationSettings.massageCooldown; + p.health.AddHediff(cooldown, null, null, null); + return JobCondition.Succeeded; } diff --git a/CRIALactation/Source/LactationSettings.cs b/CRIALactation/Source/LactationSettings.cs new file mode 100644 index 0000000..57df2a3 --- /dev/null +++ b/CRIALactation/Source/LactationSettings.cs @@ -0,0 +1,93 @@ +using HugsLib.Settings; +using System; +using UnityEngine; +using Verse; + +namespace CRIALactation +{ + public class LactationSettings : ModSettings + { + + public static float massageCooldown = 0.3f; + public static int totalMassagesUntilLactation = 20; // severity += 1 / this amount + + public static float hucowBreastSizeBonus = 0f; //size increase when changed to hucow + public static float hucowBreastSizeMinimum = 0.5f; //smallest size breasts can end up. + + + private static Vector2 scrollPosition; + private static float height_modifier = 300f; + + public static void DoWindowContents(Rect inRect) + { + + //30f for top page description and bottom close button + Rect outRect = new Rect(0f, 30f, inRect.width, inRect.height - 30f); + + //-16 for slider, height_modifier - additional height for hidden options toggles + Rect viewRect = new Rect(0f, 0f, inRect.width - 16f, inRect.height + height_modifier); + + Widgets.BeginScrollView(outRect, ref scrollPosition, viewRect); // scroll + + Listing_Standard listingStandard = new Listing_Standard(); + listingStandard.maxOneColumn = true; + listingStandard.ColumnWidth = viewRect.width - 10f; // / 2.05f; + listingStandard.Begin(viewRect); + listingStandard.Gap(5f); + + listingStandard.Label("CRIALactation.massageCooldown".Translate() + ": " + Math.Round(massageCooldown, 3), -1f, "CRIALactation.massageCooldownDesc".Translate()); + massageCooldown = (float)listingStandard.Slider(massageCooldown, 0.01f, 1f); + listingStandard.Gap(5f); + + listingStandard.Label("CRIALactation.totalMassagesUntilLactation".Translate() + ": " + totalMassagesUntilLactation, -1f, "CRIALactation.totalMassagesUntilLactationDesc".Translate()); + totalMassagesUntilLactation = (int)listingStandard.Slider(totalMassagesUntilLactation, 1, 100); + listingStandard.Gap(10f); + + listingStandard.Label("CRIALactation.hucowBreastSizeBonus".Translate() + ": " + Math.Round(hucowBreastSizeBonus, 3), -1f, "CRIALactation.hucowBreastSizeBonusDesc".Translate()); + hucowBreastSizeBonus = (float)listingStandard.Slider(hucowBreastSizeBonus, 0f, 1f); + listingStandard.Gap(5f); + + listingStandard.Label("CRIALactation.hucowBreastSizeMinimum".Translate() + ": " + Math.Round(hucowBreastSizeMinimum, 3), -1f, "CRIALactation.hucowBreastSizeMinimumDesc".Translate()); + hucowBreastSizeMinimum = (float)listingStandard.Slider(hucowBreastSizeMinimum, 0.1f, 5f); + listingStandard.Gap(5f); + + listingStandard.End(); + Widgets.EndScrollView(); + + } + + public override void ExposeData() + { + base.ExposeData(); + + Scribe_Values.Look(ref massageCooldown, "massageCooldown", massageCooldown, true); + Scribe_Values.Look(ref totalMassagesUntilLactation, "totalMassagesUntilLactation", totalMassagesUntilLactation, true); + Scribe_Values.Look(ref hucowBreastSizeBonus, "hucowBreastSizeBonus", hucowBreastSizeBonus, true); + Scribe_Values.Look(ref hucowBreastSizeMinimum, "hucowBreastSizeMinimum", hucowBreastSizeMinimum, true); + + } + } +} + + +namespace CRIALactation.Settings +{ + public class LactationSettingsMain : Mod + { + public LactationSettingsMain(ModContentPack content) : base(content) + { + GetSettings(); + } + + public override string SettingsCategory() + { + return "CRIALactationSettings.settings".Translate(); + } + + public override void DoSettingsWindowContents(Rect inRect) + { + + LactationSettings.DoWindowContents(inRect); + } + } +} diff --git a/CRIALactation/Source/LactationUtility.cs b/CRIALactation/Source/LactationUtility.cs index 0071f11..bf4a85b 100644 --- a/CRIALactation/Source/LactationUtility.cs +++ b/CRIALactation/Source/LactationUtility.cs @@ -20,7 +20,6 @@ namespace CRIALactation p.health.hediffSet.HasHediff(HediffDefOf_Milk.Lactating_Drug, false) || p.health.hediffSet.HasHediff(HediffDefOf_Milk.Lactating_Permanent, false) || p.health.hediffSet.HasHediff(HediffDefOf_Milk.Heavy_Lactating_Permanent, false); - } @@ -28,7 +27,7 @@ namespace CRIALactation { if (p.TryGetComp() == null) return false; - if (Genital_Helper.has_breasts(p) && (MilkBase.flatChestGivesMilk || !Genital_Helper.has_male_breasts(p))) + if (Genital_Helper.has_breasts(p) && (MilkSettings.flatChestGivesMilk || !Genital_Helper.has_male_breasts(p))) { return true; } @@ -39,8 +38,10 @@ namespace CRIALactation public static void StartLactating(Pawn p, bool natural) { Hediff lactating = HediffMaker.MakeHediff(HediffDefOf_Milk.Lactating_Natural, p, null); - lactating.Severity = Rand.Value; - p.health.AddHediff(lactating, Genital_Helper.get_breastsBPR(p)); + lactating.Severity = 1;// Rand.Value; + p.health.AddHediff(lactating, null, null, null); + //just adding to base body, not to breasts. Just in case the target has multiple breasts so to not confuse + //p.health.AddHediff(lactating, Genital_Helper.get_breastsBPR(p)); } public static void StopBeingHucow(Pawn p) @@ -56,7 +57,9 @@ namespace CRIALactation public static bool isMassageable(Pawn p) { Hediff lactationInductionHediff = p.health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation); + Hediff lactationInductionCooldownHediff = p.health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactationCooldown); if (lactationInductionHediff == null) return false; + if (lactationInductionCooldownHediff != null) return false; return true; @@ -68,15 +71,27 @@ namespace CRIALactation var drugLact = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.Lactating_Drug); if(drugLact != null) { - drugLact.TryGetComp().ticksToDisappear = 1800000; + drugLact.Severity = 1; + //drugLact.TryGetComp().ticksToDisappear = 1800000; } var naturalLact = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.Lactating_Natural); if (naturalLact != null) { - naturalLact.TryGetComp().ticksToDisappear = 1800000; + naturalLact.Severity = 1; + //naturalLact.TryGetComp().ticksToDisappear = 1800000; } + if (ModsConfig.BiotechActive) + { + var hediffLactBT = p.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("Lactating")); + if (hediffLactBT != null) + { + hediffLactBT.Severity = 1; + } + } + + } } } diff --git a/CRIALactation/Source/ThingDefOf/ThingDefOf_Milk.cs b/CRIALactation/Source/ThingDefOf/ThingDefOf_Milk.cs index 6964b77..27a8272 100644 --- a/CRIALactation/Source/ThingDefOf/ThingDefOf_Milk.cs +++ b/CRIALactation/Source/ThingDefOf/ThingDefOf_Milk.cs @@ -20,5 +20,9 @@ namespace CRIALactation public static ThingDef HumanoidMilk; + public static ThingDef HumanMilkBulk; + + public static ThingDef HumanoidMilkBulk; + } } diff --git a/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_MilkBase.cs b/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_MilkBase.cs index 958688d..f64640d 100644 --- a/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_MilkBase.cs +++ b/CRIALactation/Source/ThingFilters/SpecialThingFilterWorker_MilkBase.cs @@ -12,7 +12,7 @@ namespace CRIALactation public abstract class SpecialThingFilterWorker_MilkBase : SpecialThingFilterWorker { - protected bool IsHumanMilk(ThingDef t) => t == ThingDefOf_Milk.HumanMilk || t == ThingDefOf_Milk.HumanoidMilk; + protected bool IsHumanMilk(ThingDef t) => t == ThingDefOf_Milk.HumanMilk || t == ThingDefOf_Milk.HumanoidMilk || t == ThingDefOf_Milk.HumanoidMilkBulk || t == ThingDefOf_Milk.HumanMilkBulk; protected bool IsHumanMilk(Thing t) => IsHumanMilk(t.def); diff --git a/CRIALactation/Source/WorkGivers/WorkGiver_MassageBreasts.cs b/CRIALactation/Source/WorkGivers/WorkGiver_MassageBreasts.cs index 6bd11c6..d7e2f89 100644 --- a/CRIALactation/Source/WorkGivers/WorkGiver_MassageBreasts.cs +++ b/CRIALactation/Source/WorkGivers/WorkGiver_MassageBreasts.cs @@ -43,8 +43,12 @@ namespace CRIALactation Hediff lactationInductionHediff = pawn2?.health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactation); if (lactationInductionHediff == null) return false; - HediffComp_LactationInduction lactInductComp = lactationInductionHediff.TryGetComp(); - return p != pawn2 && lactInductComp.canMassage() && !pawn2.Downed && !pawn2.Drafted && !pawn2.InAggroMentalState && !pawn2.IsFormingCaravan() && pawn2.CanCasuallyInteractNow(false, true, false) && p.CanReserve(pawn2, 1, -1, null, forced); + //we have the cooldown + Hediff lactationInductionCooldownHediff = pawn2?.health?.hediffSet?.GetFirstHediffOfDef(HediffDefOf_Milk.InducingLactationCooldown); + if (lactationInductionCooldownHediff != null) return false; + + //HediffComp_LactationInduction lactInductComp = lactationInductionHediff.TryGetComp(); + return p != pawn2 && !pawn2.Downed && !pawn2.Drafted && !pawn2.InAggroMentalState && !pawn2.IsFormingCaravan() && pawn2.CanCasuallyInteractNow(false, true, false) && p.CanReserve(pawn2, 1, -1, null, forced); } diff --git a/CRIAOrgy/1.4/Assemblies/CRIAOrgy.dll b/CRIAOrgy/1.4/Assemblies/CRIAOrgy.dll index f8c3265..4465abc 100644 Binary files a/CRIAOrgy/1.4/Assemblies/CRIAOrgy.dll and b/CRIAOrgy/1.4/Assemblies/CRIAOrgy.dll differ diff --git a/CRIAOrgy/CRIAOrgy.csproj b/CRIAOrgy/CRIAOrgy.csproj index 542136f..0589e04 100644 --- a/CRIAOrgy/CRIAOrgy.csproj +++ b/CRIAOrgy/CRIAOrgy.csproj @@ -27,7 +27,7 @@ pdbonly true - bin\Release\ + 1.4\Assemblies\ TRACE prompt 4