WIP on Pregnancy Precept

This commit is contained in:
Vegapnk 2022-05-17 22:10:42 +02:00
parent fd61548f84
commit a8dc448202
5 changed files with 21 additions and 19 deletions

View file

@ -8,19 +8,19 @@ 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 /// 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 /// Shamelessly taken from: https://github.com/Tachyonite/Pawnmorpher/blob/master/Source/Pawnmorphs/Esoteria/Thoughts/ThoughtWorker_EtherHediff.cs
/// </summary> /// </summary>
public class ThoughtWorker_Precept_NonPregnant : ThoughtWorker public class ThoughtWorker_Precept_NonPregnant : ThoughtWorker_Precept
{ {
/// <summary>Gets the current thought state of the given pawn.</summary> /// <summary>Gets the current thought state of the given pawn.</summary>
/// <param name="p">The pawn for whom the thoughts are generated.</param> /// <param name="p">The pawn for whom the thoughts are generated.</param>
/// <returns></returns> /// <returns></returns>
protected override ThoughtState CurrentStateInternal(Pawn p) protected override ThoughtState ShouldHaveThought(Pawn p)
{ {
var pregnancy = rjw.PregnancyHelper.GetPregnancy(p); var pregnancy = rjw.PregnancyHelper.GetPregnancy(p);
if (pregnancy == null) if (pregnancy == null)
{ {
return false; return ThoughtState.Inactive;
} }
return ThoughtState.ActiveAtStage(0); return ThoughtState.ActiveAtStage(0);

View file

@ -8,19 +8,19 @@ 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 /// 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 /// Shamelessly taken from: https://github.com/Tachyonite/Pawnmorpher/blob/master/Source/Pawnmorphs/Esoteria/Thoughts/ThoughtWorker_EtherHediff.cs
/// </summary> /// </summary>
public class ThoughtWorker_Precept_NonPregnant_Social : ThoughtWorker public class ThoughtWorker_Precept_NonPregnant_Social : ThoughtWorker_Precept
{ {
/// <summary>Gets the current thought state of the given pawn.</summary> /// <summary>Gets the current thought state of the given pawn.</summary>
/// <param name="p">The pawn for whom the thoughts are generated.</param> /// <param name="p">The pawn for whom the thoughts are generated.</param>
/// <returns></returns> /// <returns></returns>
protected override ThoughtState CurrentStateInternal(Pawn p) protected override ThoughtState ShouldHaveThought(Pawn p)
{ {
var pregnancy = rjw.PregnancyHelper.GetPregnancy(p); var pregnancy = rjw.PregnancyHelper.GetPregnancy(p);
if (pregnancy != null) //ignoring the hediff's stage, the thought's stage is dependent on only the ether state of the pawn c if (pregnancy != null)
{ {
return false; return ThoughtState.Inactive;
} else } else
return ThoughtState.ActiveAtStage(0); return ThoughtState.ActiveAtStage(0);
} }

View file

@ -9,19 +9,19 @@ 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 /// 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 /// Shamelessly taken from: https://github.com/Tachyonite/Pawnmorpher/blob/master/Source/Pawnmorphs/Esoteria/Thoughts/ThoughtWorker_EtherHediff.cs
/// </summary> /// </summary>
public class ThoughtWorker_Precept_Pregnant : ThoughtWorker public class ThoughtWorker_Precept_Pregnant : ThoughtWorker_Precept
{ {
/// <summary>Gets the current thought state of the given pawn.</summary> /// <summary>Gets the current thought state of the given pawn.</summary>
/// <param name="p">The pawn for whom the thoughts are generated.</param> /// <param name="p">The pawn for whom the thoughts are generated.</param>
/// <returns></returns> /// <returns></returns>
protected override ThoughtState CurrentStateInternal(Pawn p) protected override ThoughtState ShouldHaveThought(Pawn p)
{ {
var pregnancy = rjw.PregnancyHelper.GetPregnancy(p); var pregnancy = rjw.PregnancyHelper.GetPregnancy(p);
if (pregnancy == null) //ignoring the hediff's stage, the thought's stage is dependent on only the ether state of the pawn c if (pregnancy == null)
{ {
return false; return ThoughtState.Inactive;
} }
return ThoughtState.ActiveAtStage(0); return ThoughtState.ActiveAtStage(0);

View file

@ -8,19 +8,19 @@ 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 /// 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 /// Shamelessly taken from: https://github.com/Tachyonite/Pawnmorpher/blob/master/Source/Pawnmorphs/Esoteria/Thoughts/ThoughtWorker_EtherHediff.cs
/// </summary> /// </summary>
public class ThoughtWorker_Precept_Pregnant_Social : ThoughtWorker public class ThoughtWorker_Precept_Pregnant_Social : ThoughtWorker_Precept
{ {
/// <summary>Gets the current thought state of the given pawn.</summary> /// <summary>Gets the current thought state of the given pawn.</summary>
/// <param name="p">The pawn for whom the thoughts are generated.</param> /// <param name="p">The pawn for whom the thoughts are generated.</param>
/// <returns></returns> /// <returns></returns>
protected override ThoughtState CurrentStateInternal(Pawn p) protected override ThoughtState ShouldHaveThought(Pawn p)
{ {
var pregnancy = rjw.PregnancyHelper.GetPregnancy(p); var pregnancy = rjw.PregnancyHelper.GetPregnancy(p);
if (pregnancy == null) //ignoring the hediff's stage, the thought's stage is dependent on only the ether state of the pawn c if (pregnancy == null)
{ {
return false; return ThoughtState.Inactive;
} }
return ThoughtState.ActiveAtStage(0); return ThoughtState.ActiveAtStage(0);

View file

@ -36,12 +36,10 @@
<Private>False</Private> <Private>False</Private>
</Reference> </Reference>
<Reference Include="Assembly-CSharp"> <Reference Include="Assembly-CSharp">
<HintPath>D:\Games\SteamLibrary\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath> <HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="RJW"> <Reference Include="RJW">
<HintPath>..\..\..\rjw\1.3\Assemblies\RJW.dll</HintPath> <HintPath>..\..\..\rjw-vegapnk\1.3\Assemblies\RJW.dll</HintPath>
<Private>False</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@ -62,6 +60,10 @@
<Compile Include="Harmony.cs" /> <Compile Include="Harmony.cs" />
<Compile Include="Ideology\Keyed.cs" /> <Compile Include="Ideology\Keyed.cs" />
<Compile Include="Ideology\PreceptDef_RequirementExtended.cs" /> <Compile Include="Ideology\PreceptDef_RequirementExtended.cs" />
<Compile Include="Ideology\Precept_Workers\ThoughtWorker_Precept_NonPregnant.cs" />
<Compile Include="Ideology\Precept_Workers\ThoughtWorker_Precept_NonPregnant_Social.cs" />
<Compile Include="Ideology\Precept_Workers\ThoughtWorker_Precept_Pregnant.cs" />
<Compile Include="Ideology\Precept_Workers\ThoughtWorker_Precept_Pregnant_Social.cs" />
<Compile Include="Ideology\Rituals\JobGiver_GangbangConsensual.cs" /> <Compile Include="Ideology\Rituals\JobGiver_GangbangConsensual.cs" />
<Compile Include="Ideology\Rituals\LordJob_Rituals.cs" /> <Compile Include="Ideology\Rituals\LordJob_Rituals.cs" />
<Compile Include="Ideology\RJW_Patch_Ideo.cs" /> <Compile Include="Ideology\RJW_Patch_Ideo.cs" />