diff --git a/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_NonPregnant.cs b/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_NonPregnant.cs new file mode 100644 index 0000000..118d2bd --- /dev/null +++ b/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_NonPregnant.cs @@ -0,0 +1,29 @@ +using RimWorld; +using Verse; +using rjw; + +namespace RJWSexperience.Ideology.Ideology.Precept_Workers +{ + /// + /// thought worker for a thought that is active when a certain hediff is present, and who's stage depends on the ether state of the pawn + /// Shamelessly taken from: https://github.com/Tachyonite/Pawnmorpher/blob/master/Source/Pawnmorphs/Esoteria/Thoughts/ThoughtWorker_EtherHediff.cs + /// + public class ThoughtWorker_Precept_NonPregnant : ThoughtWorker_Precept + { + /// Gets the current thought state of the given pawn. + /// The pawn for whom the thoughts are generated. + /// + protected override ThoughtState ShouldHaveThought(Pawn p) + { + + var pregnancy = rjw.PregnancyHelper.GetPregnancy(p); + + if (pregnancy == null) + { + return ThoughtState.Inactive; + } + + return ThoughtState.ActiveAtStage(0); + } + } +} diff --git a/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_NonPregnant_Social.cs b/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_NonPregnant_Social.cs new file mode 100644 index 0000000..68ed70b --- /dev/null +++ b/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_NonPregnant_Social.cs @@ -0,0 +1,28 @@ +using RimWorld; +using Verse; +using rjw; + +namespace RJWSexperience.Ideology.Ideology.Precept_Workers +{ + /// + /// thought worker for a thought that is active when a certain hediff is present, and who's stage depends on the ether state of the pawn + /// Shamelessly taken from: https://github.com/Tachyonite/Pawnmorpher/blob/master/Source/Pawnmorphs/Esoteria/Thoughts/ThoughtWorker_EtherHediff.cs + /// + public class ThoughtWorker_Precept_NonPregnant_Social : ThoughtWorker_Precept + { + /// Gets the current thought state of the given pawn. + /// The pawn for whom the thoughts are generated. + /// + protected override ThoughtState ShouldHaveThought(Pawn p) + { + + var pregnancy = rjw.PregnancyHelper.GetPregnancy(p); + + if (pregnancy != null) + { + return ThoughtState.Inactive; + } else + return ThoughtState.ActiveAtStage(0); + } + } +} diff --git a/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_Pregnant.cs b/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_Pregnant.cs new file mode 100644 index 0000000..fab5f90 --- /dev/null +++ b/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_Pregnant.cs @@ -0,0 +1,30 @@ + +using RimWorld; +using Verse; +using rjw; + +namespace RJWSexperience.Ideology.Ideology.Precept_Workers +{ + /// + /// thought worker for a thought that is active when a certain hediff is present, and who's stage depends on the ether state of the pawn + /// Shamelessly taken from: https://github.com/Tachyonite/Pawnmorpher/blob/master/Source/Pawnmorphs/Esoteria/Thoughts/ThoughtWorker_EtherHediff.cs + /// + public class ThoughtWorker_Precept_Pregnant : ThoughtWorker_Precept + { + /// Gets the current thought state of the given pawn. + /// The pawn for whom the thoughts are generated. + /// + protected override ThoughtState ShouldHaveThought(Pawn p) + { + + var pregnancy = rjw.PregnancyHelper.GetPregnancy(p); + + if (pregnancy == null) + { + return ThoughtState.Inactive; + } + + return ThoughtState.ActiveAtStage(0); + } + } +} diff --git a/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_Pregnant_Social.cs b/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_Pregnant_Social.cs new file mode 100644 index 0000000..b1cdaa0 --- /dev/null +++ b/RJWSexperience/IdeologyAddon/Ideology/Precept_Workers/ThoughtWorker_Precept_Pregnant_Social.cs @@ -0,0 +1,29 @@ +using RimWorld; +using Verse; +using rjw; + +namespace RJWSexperience.Ideology.Ideology.Precept_Workers +{ + /// + /// thought worker for a thought that is active when a certain hediff is present, and who's stage depends on the ether state of the pawn + /// Shamelessly taken from: https://github.com/Tachyonite/Pawnmorpher/blob/master/Source/Pawnmorphs/Esoteria/Thoughts/ThoughtWorker_EtherHediff.cs + /// + public class ThoughtWorker_Precept_Pregnant_Social : ThoughtWorker_Precept + { + /// Gets the current thought state of the given pawn. + /// The pawn for whom the thoughts are generated. + /// + protected override ThoughtState ShouldHaveThought(Pawn p) + { + + var pregnancy = rjw.PregnancyHelper.GetPregnancy(p); + + if (pregnancy == null) + { + return ThoughtState.Inactive; + } + + return ThoughtState.ActiveAtStage(0); + } + } +} diff --git a/RJWSexperience/IdeologyAddon/IdeologyAddon.csproj b/RJWSexperience/IdeologyAddon/IdeologyAddon.csproj index 27d0584..224a507 100644 --- a/RJWSexperience/IdeologyAddon/IdeologyAddon.csproj +++ b/RJWSexperience/IdeologyAddon/IdeologyAddon.csproj @@ -31,10 +31,16 @@ 4 - - ..\..\..\rjw\1.3\Assemblies\RJW.dll + + ..\packages\Lib.Harmony.2.2.0\lib\net472\0Harmony.dll False + + ..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll + + + ..\..\..\rjw-vegapnk\1.3\Assemblies\RJW.dll + @@ -47,6 +53,11 @@ + + + + + @@ -81,4 +92,4 @@ - \ No newline at end of file + diff --git a/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Pregnancy.xml b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Pregnancy.xml new file mode 100644 index 0000000..4b1e67a --- /dev/null +++ b/RJWSexperience_Ideology/Defs/PreceptDefs/Precepts_Pregnancy.xml @@ -0,0 +1,205 @@ + + + + + + + + + Pregnancy + + UI/Issues/Birth + + + + + Pregnancy_Holy + Pregnancy + + To be pregnant is a duty worthy of respect. Women carry our society into the next generation. + Medium + 10 + +
  • + Pregnancy_Respected_Pregnant +
  • +
  • + Pregnancy_Respected_Pregnant_Social +
  • +
    +
    + + + Pregnancy_Elevated + Pregnancy + + Being pregnant is considered noble. + Low + 20 + +
  • + Pregnancy_Elevated_Pregnant +
  • +
  • + Pregnancy_Elevated_Pregnant_Social +
  • +
    +
    + + + Pregnancy_NoRules + Pregnancy + + There are no thoughts about pregnancy. + Low + 30 + + + + + + Pregnancy_Required + Pregnancy + High + 40 + + Women should be pregnant - those who are not, are seen unworthy. + +
  • + Pregnancy_Respected_Pregnant +
  • +
  • + Pregnancy_Respected_Pregnant_Social +
  • +
  • + Pregnancy_Horrible_NonPregnant +
  • +
  • + Pregnancy_Horrible_NonPregnant_Social +
  • +
    +
    + + + Pregnancy_Horrible + Pregnancy + Low + 50 + + Being Pregnant is unclean. Take care and stay pure. + +
  • + Pregnancy_Horrible_Pregnant +
  • +
  • + Pregnancy_Horrible_Pregnant_Social +
  • + + +
    + + + + + Pregnancy_Respected_Pregnant + RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant + Thought_Situational + +
  • + + I am pregnant. This makes me a pillar of society. + 5 +
  • +
    +
    + + + Pregnancy_Elevated_Pregnant + RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant + Thought_Situational + +
  • + + I am soon making our colony stronger. + 10 +
  • +
    +
    + + + Pregnancy_Respected_Pregnant_Social + RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant_Social + Thought_SituationalSocial + +
  • + + 10 +
  • +
    +
    + + + Pregnancy_Elevated_Pregnant_Social + RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant_Social + Thought_SituationalSocial + +
  • + + 20 +
  • +
    +
    + + + Pregnancy_Horrible_Pregnant_Social + RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant_Social + Thought_SituationalSocial + +
  • + + -20 +
  • +
    +
    + + + Pregnancy_Horrible_Pregnant + RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant + Thought_Situational + +
  • + + How did I end up like this? I never wanted to be pregnant! + -10 +
  • +
    +
    + + + + Pregnancy_Horrible_NonPregnant + RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_NonPregnant_Social + Thought_Situational + true + +
  • + + I wish to be pregnant. + -6 +
  • +
    +
    + + + Pregnancy_Horrible_NonPregnant_Social + RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_NonPregnant_Social + Thought_SituationalSocial + +
  • + + -5 +
  • +
    +
    + +