diff --git a/1.3/Assemblies/C0ffee's RJW Ideology Addons.dll b/1.3/Assemblies/C0ffee's RJW Ideology Addons.dll index 375c4df..c711fe9 100644 Binary files a/1.3/Assemblies/C0ffee's RJW Ideology Addons.dll and b/1.3/Assemblies/C0ffee's RJW Ideology Addons.dll differ diff --git a/CRIALactation/1.3/Assemblies/CRIALactation.dll b/CRIALactation/1.3/Assemblies/CRIALactation.dll index 4a7c55e..862e04e 100644 Binary files a/CRIALactation/1.3/Assemblies/CRIALactation.dll and b/CRIALactation/1.3/Assemblies/CRIALactation.dll differ diff --git a/CRIALactation/CRIALactation.csproj b/CRIALactation/CRIALactation.csproj index 64f9e79..05c1d6c 100644 --- a/CRIALactation/CRIALactation.csproj +++ b/CRIALactation/CRIALactation.csproj @@ -77,6 +77,8 @@ + + diff --git a/CRIALactation/Defs/MemeDefs/Memes_Hucow.xml b/CRIALactation/Defs/MemeDefs/Memes_Hucow.xml index 9749d3a..946089a 100644 --- a/CRIALactation/Defs/MemeDefs/Memes_Hucow.xml +++ b/CRIALactation/Defs/MemeDefs/Memes_Hucow.xml @@ -1,30 +1,34 @@  + Hucow Breast milk should be produced for and consumed by all. UI/Memes/PrimacyHuman - Sexuality + Misc 3 50
  • Lactating_Essential
  • +
  • +
  • IdeoRole_Hucow
  • +
  • memeAdjective->ranch
  • memeAdjective->bovine
  • memeHyphenPrefix->lacto
  • -
  • memeConcept->human lactation
  • +
  • memeConcept->milk expression
  • memeLeaderNoun->rancher
  • memeLeaderNoun->hand
  • memeLeaderNoun->herder
  • diff --git a/CRIALactation/Defs/PreceptDefs/Precepts_Lactating.xml b/CRIALactation/Defs/PreceptDefs/Precepts_Lactating.xml index ccbd74c..42c35c8 100644 --- a/CRIALactation/Defs/PreceptDefs/Precepts_Lactating.xml +++ b/CRIALactation/Defs/PreceptDefs/Precepts_Lactating.xml @@ -37,26 +37,26 @@
  • - Expressing milk for fills me with maternal pride. - 6 + Expressing milk fills me with maternal pride. + 3
  • - We live in such difficult times. I wish I could be producing milk right now. - -6 + We live in such difficult times. It's wishful thinking, but I'd like to be producing milk right now. + -2
  • I'm as useless as a dry well. A healthy supply of my milk can benefit the colony, but I'm failing to deliver. - -10 + -5
  • Producing milk is a basic responsibility. I'm embarrassed and ashamed to be dry. - -16 + -8
  • diff --git a/CRIALactation/Defs/PreceptDefs/Precepts_Lactating_Role.xml b/CRIALactation/Defs/PreceptDefs/Precepts_Lactating_Role.xml index 6bf8b39..2844836 100644 --- a/CRIALactation/Defs/PreceptDefs/Precepts_Lactating_Role.xml +++ b/CRIALactation/Defs/PreceptDefs/Precepts_Lactating_Role.xml @@ -3,13 +3,24 @@ IdeoRole_Hucow - A special ideoligious status focusing on the production of breast milk. This specialized role gives greatly increased breast milk production speed and yield, at the cost of decreased global work speed. + A special ideoligious status focusing on the production of breast milk. This specialized role can only be given to lactating pawns and gives greatly increased breast milk production yield, at the cost of decreased work speed and movement speed. UI/Roles/SpecialistMelee NamerRoleMoralist + +
  • + + +
  • Hucow
  • + +
  • WorkSpeedGlobal - 1.5 + -0.5 +
  • +
  • + MoveSpeed + -0.35
  • 2 diff --git a/CRIALactation/Source/HarmonyPatches/RJW/HarmonyPatch_Milk_HumanCompHasGatherableBodyResource.cs b/CRIALactation/Source/HarmonyPatches/RJW/HarmonyPatch_Milk_HumanCompHasGatherableBodyResource.cs index 407c29b..3de411b 100644 --- a/CRIALactation/Source/HarmonyPatches/RJW/HarmonyPatch_Milk_HumanCompHasGatherableBodyResource.cs +++ b/CRIALactation/Source/HarmonyPatches/RJW/HarmonyPatch_Milk_HumanCompHasGatherableBodyResource.cs @@ -17,6 +17,36 @@ namespace CRIALactation public static class HarmonyPatch_Milk_HumanCompHasGatherableBodyResource { + public static void Prefix(HumanCompHasGatherableBodyResource __instance) + { + if (!__instance.parent.IsHashIntervalTick(100)) + { + return; + } + if (!(__instance.parent is Pawn)) return; + + Pawn p = __instance.parent as Pawn; + if (p?.health?.hediffSet == null) return; + + if (p.Ideo?.GetRole(p) != null && p.Ideo.GetRole(p).def == PreceptDefOf_Lactation.IdeoRole_Hucow) + { + + if(p.health.hediffSet.HasHediff(HediffDef.Named("Lactating_Natural"), false)) + { + p.health.RemoveHediff(p.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("Lactating_Natural"), false)); + } + if (p.health.hediffSet.HasHediff(HediffDef.Named("Lactating_Drug"), false)) + { + p.health.RemoveHediff(p.health.hediffSet.GetFirstHediffOfDef(HediffDef.Named("Lactating_Drug"), false)); + } + if(!(p.health.hediffSet.HasHediff(HediffDef.Named("Lactating_Permanent"), false) || + p.health.hediffSet.HasHediff(HediffDef.Named("Heavy_Lactating_Permanent"), false))) + { + p.health.AddHediff(HediffDef.Named("Lactating_Permanent")); + } + } + } + public static IEnumerable Transpiler(IEnumerable codeInstructions) { @@ -52,7 +82,9 @@ namespace CRIALactation Pawn pawn = __instance.parent as Pawn; if(pawn.Ideo.HasPrecept(PreceptDefOf_Lactation.Lactating_Essential)) { - return resourcesIntervalDays * 0.666f; //1.5x normal rate + + + return resourcesIntervalDays * 0.666f * ((pawn?.Ideo?.GetRole(pawn) != null && pawn.Ideo.GetRole(pawn).def == PreceptDefOf_Lactation.IdeoRole_Hucow) ? 0.5f : 1f); //1.5x normal rate } return resourcesIntervalDays; @@ -60,4 +92,30 @@ namespace CRIALactation } } + + [HarmonyPatch(typeof(CompHyperMilkableHuman), "ResourceAmount", MethodType.Getter)] + public static class HarmonyPatch_IncreaseYieldForHucowHyperMilkable + { + public static void Postfix(CompHyperMilkableHuman __instance, ref float __result) + { + Pawn p = __instance.parent as Pawn; + if (p.Ideo.GetRole(p).def == PreceptDefOf_Lactation.IdeoRole_Hucow) + { + __result = 65; + } + } + } + + [HarmonyPatch(typeof(CompMilkableHuman), "ResourceAmount", MethodType.Getter)] + public static class HarmonyPatch_IncreaseYieldForHucowMilkable + { + public static void Postfix(CompHyperMilkableHuman __instance, ref float __result) + { + Pawn p = __instance.parent as Pawn; + if (p?.Ideo?.GetRole(p) != null && p.Ideo.GetRole(p).def == PreceptDefOf_Lactation.IdeoRole_Hucow) + { + __result = 45; + } + } + } } diff --git a/CRIALactation/Source/PreceptDefOf/PreceptDefOf_Lactation.cs b/CRIALactation/Source/PreceptDefOf/PreceptDefOf_Lactation.cs index 53a570c..9fd0b93 100644 --- a/CRIALactation/Source/PreceptDefOf/PreceptDefOf_Lactation.cs +++ b/CRIALactation/Source/PreceptDefOf/PreceptDefOf_Lactation.cs @@ -17,6 +17,7 @@ namespace CRIALactation } public static PreceptDef Lactating_Essential; + public static PreceptDef IdeoRole_Hucow; } } \ No newline at end of file diff --git a/CRIALactation/Source/RoleEffects/RoleEffect_Hucow.cs b/CRIALactation/Source/RoleEffects/RoleEffect_Hucow.cs new file mode 100644 index 0000000..85a43c4 --- /dev/null +++ b/CRIALactation/Source/RoleEffects/RoleEffect_Hucow.cs @@ -0,0 +1,25 @@ +using Milk; +using RimWorld; +using rjw; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Verse; + +namespace CRIALactation +{ + public class RoleEffect_Hucow : RoleEffect + { + public override string Label(Pawn pawn, Precept_Role role) + { + return "Greatly increased milk yield, permenant lactation, slower speed"; + } + + public RoleEffect_Hucow() + { + + } + } +} diff --git a/CRIALactation/Source/RoleRequirements/RoleRequirement_Lactating.cs b/CRIALactation/Source/RoleRequirements/RoleRequirement_Lactating.cs new file mode 100644 index 0000000..4a6d64f --- /dev/null +++ b/CRIALactation/Source/RoleRequirements/RoleRequirement_Lactating.cs @@ -0,0 +1,30 @@ +using Milk; +using RimWorld; +using rjw; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Verse; + +namespace CRIALactation +{ + public class RoleRequirement_Lactating : RoleRequirement + { + + public override string GetLabel(Precept_Role role) + { + return "must be lactating"; + } + + public override bool Met(Pawn p, Precept_Role role) + { + if(LactationUtility.IsLactating(p)) + { + return true; + } + return false; + } + } +} diff --git a/CRIAOrgy/Assemblies/CRIAOrgy.dll b/CRIAOrgy/Assemblies/CRIAOrgy.dll index 5a30257..82e6d3f 100644 Binary files a/CRIAOrgy/Assemblies/CRIAOrgy.dll and b/CRIAOrgy/Assemblies/CRIAOrgy.dll differ