hucow required precept

This commit is contained in:
c0ffee 2021-11-17 20:15:49 -08:00
parent 6731b17940
commit 1d846d98a6
6 changed files with 165 additions and 5 deletions

View File

@ -18,6 +18,7 @@
<requireOne>
<li>
<li>Lactating_Essential</li>
<li>Lactating_MandatoryHucow</li>
</li>
<li>
<li>IdeoRole_HucowHandler</li>

View File

@ -9,6 +9,8 @@
<iconPath>UI/Issues/Lactating</iconPath>
</IssueDef>
<!--Essential-->
<PreceptDef>
<defName>Lactating_Essential</defName>
<issue>Lactating</issue>
@ -86,7 +88,7 @@
<stages>
<li>
<label>hucow</label>
<baseOpinionOffset>15</baseOpinionOffset>
<baseOpinionOffset>20</baseOpinionOffset>
</li>
<li>
<label>producing milk</label>
@ -157,4 +159,159 @@
</li>
</stages>
</ThoughtDef>
<!--mandatory hucow-->
<PreceptDef>
<defName>Lactating_MandatoryHucow</defName>
<issue>Lactating</issue>
<label>required (mandatory hucow)</label>
<impact>High</impact>
<requiredMemes>
<li>Hucow</li>
</requiredMemes>
<displayOrderInIssue>10</displayOrderInIssue>
<displayOrderInImpact>100</displayOrderInImpact>
<description>Breast milk is the most natural sustenance. For all sizeable bosoms, maximum expression and hucow conversion is a duty. To not produce or eat a meal without breast milk is unthinkable.</description>
<comps>
<li Class="PreceptComp_SituationalThought">
<thought>Lactating_MandatoryHucow</thought>
<description>Colonists with sizeable breasts must become hucows</description>
<tooltipShowMoodRange>true</tooltipShowMoodRange>
</li>
<li Class="PreceptComp_SituationalThought">
<thought>Lactating_MandatoryHucow_Social</thought>
<tooltipShowMoodRange>true</tooltipShowMoodRange>
</li>
<li Class="PreceptComp_SelfTookMemoryThought">
<eventDef>DrankNonMilkMeal</eventDef>
<thought>DrankNonMilkMeal_MandatoryHucow</thought>
</li>
<li Class="PreceptComp_SelfTookMemoryThought">
<eventDef>DrankMilkRaw</eventDef>
<thought>DrankMilkRaw_MandatoryHucow</thought>
</li>
<li Class="PreceptComp_SelfTookMemoryThought">
<eventDef>DrankMilkMeal</eventDef>
<thought>DrankMilkMeal_MandatoryHucow</thought>
</li>
</comps>
</PreceptDef>
<ThoughtDef>
<defName>Lactating_MandatoryHucow</defName>
<thoughtClass>Thought_Situational</thoughtClass>
<workerClass>CRIALactation.ThoughtWorker_Precept_Lactating_Essential</workerClass>
<stages>
<li>
<label>producing milk (hucow)</label>
<description>Watching people's satisfied faces drink what I expressed gives me a motherly sense of pride. I'm the colony's cow. Moo!</description>
<baseMoodEffect>8</baseMoodEffect>
</li>
<li>
<label>producing milk</label>
<description>I'm producing milk, but I'm not a cow yet.</description>
<baseMoodEffect>-1</baseMoodEffect>
</li>
<li>
<label>not producing milk</label>
<description>It pains me to think my breasts aren't producing milk when we need it most.</description>
<baseMoodEffect>-3</baseMoodEffect>
</li>
<li>
<label>not producing milk</label>
<description>My milk has run dry. I'm so embarrassed I don't think I can show my face in public.</description>
<baseMoodEffect>-6</baseMoodEffect>
</li>
<li>
<label>not producing milk</label>
<description>What's my purpose if I have breasts but can't express milk? I'm useless!</description>
<baseMoodEffect>-9</baseMoodEffect>
</li>
</stages>
</ThoughtDef>
<ThoughtDef>
<defName>Lactating_MandatoryHucow_Social</defName>
<thoughtClass>Thought_SituationalSocial</thoughtClass>
<workerClass>CRIALactation.ThoughtWorker_Precept_Lactating_Essential_Social</workerClass>
<stages>
<li>
<label>hucow</label>
<baseOpinionOffset>25</baseOpinionOffset>
</li>
<li>
<label>producing milk</label>
<baseOpinionOffset>-2</baseOpinionOffset>
</li>
<li>
<label>not producing milk (low expectations)</label>
<baseOpinionOffset>-5</baseOpinionOffset>
</li>
<li>
<label>not producing milk (moderate expectations)</label>
<baseOpinionOffset>-10</baseOpinionOffset>
</li>
<li>
<label>not producing milk (high expectations)</label>
<baseOpinionOffset>-15</baseOpinionOffset>
</li>
</stages>
</ThoughtDef>
<ThoughtDef>
<defName>DrankMilkRaw_MandatoryHucow</defName>
<durationDays>1</durationDays>
<stages>
<li>
<label>Drank human milk</label>
<description>So divine, so succulent. Our cows produce delicious milk.</description>
<baseMoodEffect>7</baseMoodEffect>
</li>
</stages>
</ThoughtDef>
<ThoughtDef>
<defName>DrankMilkMeal_MandatoryHucow</defName>
<durationDays>1</durationDays>
<stages>
<li>
<label>Ate meal with human milk</label>
<description>The breast milk accentuated my meal beautifully.</description>
<baseMoodEffect>3</baseMoodEffect>
</li>
</stages>
</ThoughtDef>
<ThoughtDef>
<defName>DrankNonMilkMeal_MandatoryHucow</defName>
<durationDays>1</durationDays>
<stages>
<li>
<label>Ate non-human milk food</label>
<description>Gross! I had to eat food that didn't contain breast milk. This is a disgrace to my beliefs.</description>
<baseMoodEffect>-4</baseMoodEffect>
</li>
</stages>
</ThoughtDef>
<ThoughtDef>
<defName>NoRecentHumanMilk_MandatoryHucow</defName>
<thoughtClass>Thought_Situational</thoughtClass>
<workerClass>CRIALactation.ThoughtWorker_Precept_NoRecentHumanMilk</workerClass>
<doNotApplyToQuestLodgers>True</doNotApplyToQuestLodgers>
<stages>
<li>
<label>want human milk</label>
<description>I haven't had breast milk in days. My body feels weak.</description>
<baseMoodEffect>-7</baseMoodEffect>
</li>
</stages>
</ThoughtDef>
</Defs>

View File

@ -71,13 +71,13 @@ namespace CRIALactation
var drugLact = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.Lactating_Drug);
if(drugLact != null)
{
drugLact.TryGetComp<HediffComp_Disappears>().ticksToDisappear = 600000;
drugLact.TryGetComp<HediffComp_Disappears>().ticksToDisappear = 1800000;
}
var naturalLact = p.health.hediffSet.GetFirstHediffOfDef(HediffDefOf_Milk.Lactating_Natural);
if (naturalLact != null)
{
naturalLact.TryGetComp<HediffComp_Disappears>().ticksToDisappear = 600000;
naturalLact.TryGetComp<HediffComp_Disappears>().ticksToDisappear = 1800000;
}
}

View File

@ -17,6 +17,7 @@ namespace CRIALactation
}
public static PreceptDef Lactating_Essential;
public static PreceptDef Lactating_MandatoryHucow;
//public static PreceptDef IdeoRole_Hucow;
}

View File

@ -16,8 +16,9 @@ namespace CRIALactation
public override void Notify_MemberGenerated(Pawn pawn, Precept precept)
{
if(precept.def == PreceptDefOf_Lactation.Lactating_Essential &&
LactationUtility.HasMilkableBreasts(pawn))
if((precept.def == PreceptDefOf_Lactation.Lactating_Essential
|| precept.def == PreceptDefOf_Lactation.Lactating_MandatoryHucow)
&& LactationUtility.HasMilkableBreasts(pawn))
{
if (!LactationUtility.IsLactating(pawn))