mirror of
https://gitgud.io/amevarashi/rjw-sexperience-ideology.git
synced 2024-08-15 00:43:19 +00:00
Sort out the pregnancy precepts
This commit is contained in:
parent
c00a872b81
commit
eda7261968
5 changed files with 79 additions and 107 deletions
|
@ -101,7 +101,7 @@
|
||||||
|
|
||||||
<ThoughtDef>
|
<ThoughtDef>
|
||||||
<defName>Pregnancy_Respected_Pregnant</defName>
|
<defName>Pregnancy_Respected_Pregnant</defName>
|
||||||
<workerClass>RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant</workerClass>
|
<workerClass>RJWSexperience.Ideology.PreceptWorkers.ThoughtWorker_Precept_Pregnant</workerClass>
|
||||||
<thoughtClass>Thought_Situational</thoughtClass>
|
<thoughtClass>Thought_Situational</thoughtClass>
|
||||||
<stages>
|
<stages>
|
||||||
<li>
|
<li>
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
|
|
||||||
<ThoughtDef>
|
<ThoughtDef>
|
||||||
<defName>Pregnancy_Elevated_Pregnant</defName>
|
<defName>Pregnancy_Elevated_Pregnant</defName>
|
||||||
<workerClass>RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant</workerClass>
|
<workerClass>RJWSexperience.Ideology.PreceptWorkers.ThoughtWorker_Precept_Pregnant</workerClass>
|
||||||
<thoughtClass>Thought_Situational</thoughtClass>
|
<thoughtClass>Thought_Situational</thoughtClass>
|
||||||
<stages>
|
<stages>
|
||||||
<li>
|
<li>
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
|
|
||||||
<ThoughtDef>
|
<ThoughtDef>
|
||||||
<defName>Pregnancy_Respected_Pregnant_Social</defName>
|
<defName>Pregnancy_Respected_Pregnant_Social</defName>
|
||||||
<workerClass>RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant_Social</workerClass>
|
<workerClass>RJWSexperience.Ideology.PreceptWorkers.ThoughtWorker_Precept_Pregnant_Social</workerClass>
|
||||||
<thoughtClass>Thought_SituationalSocial</thoughtClass>
|
<thoughtClass>Thought_SituationalSocial</thoughtClass>
|
||||||
<stages>
|
<stages>
|
||||||
<li>
|
<li>
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
|
|
||||||
<ThoughtDef>
|
<ThoughtDef>
|
||||||
<defName>Pregnancy_Elevated_Pregnant_Social</defName>
|
<defName>Pregnancy_Elevated_Pregnant_Social</defName>
|
||||||
<workerClass>RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant_Social</workerClass>
|
<workerClass>RJWSexperience.Ideology.PreceptWorkers.ThoughtWorker_Precept_Pregnant_Social</workerClass>
|
||||||
<thoughtClass>Thought_SituationalSocial</thoughtClass>
|
<thoughtClass>Thought_SituationalSocial</thoughtClass>
|
||||||
<stages>
|
<stages>
|
||||||
<li>
|
<li>
|
||||||
|
@ -151,7 +151,7 @@
|
||||||
|
|
||||||
<ThoughtDef>
|
<ThoughtDef>
|
||||||
<defName>Pregnancy_Horrible_Pregnant_Social</defName>
|
<defName>Pregnancy_Horrible_Pregnant_Social</defName>
|
||||||
<workerClass>RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant_Social</workerClass>
|
<workerClass>RJWSexperience.Ideology.PreceptWorkers.ThoughtWorker_Precept_Pregnant_Social</workerClass>
|
||||||
<thoughtClass>Thought_SituationalSocial</thoughtClass>
|
<thoughtClass>Thought_SituationalSocial</thoughtClass>
|
||||||
<stages>
|
<stages>
|
||||||
<li>
|
<li>
|
||||||
|
@ -163,7 +163,7 @@
|
||||||
|
|
||||||
<ThoughtDef>
|
<ThoughtDef>
|
||||||
<defName>Pregnancy_Horrible_Pregnant</defName>
|
<defName>Pregnancy_Horrible_Pregnant</defName>
|
||||||
<workerClass>RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_Pregnant</workerClass>
|
<workerClass>RJWSexperience.Ideology.PreceptWorkers.ThoughtWorker_Precept_Pregnant</workerClass>
|
||||||
<thoughtClass>Thought_Situational</thoughtClass>
|
<thoughtClass>Thought_Situational</thoughtClass>
|
||||||
<stages>
|
<stages>
|
||||||
<li>
|
<li>
|
||||||
|
@ -177,9 +177,10 @@
|
||||||
<!-- Thoughts: Not Pregnant -->
|
<!-- Thoughts: Not Pregnant -->
|
||||||
<ThoughtDef>
|
<ThoughtDef>
|
||||||
<defName>Pregnancy_Horrible_NonPregnant</defName>
|
<defName>Pregnancy_Horrible_NonPregnant</defName>
|
||||||
<workerClass>RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_NonPregnant_Social</workerClass>
|
<workerClass>RJWSexperience.Ideology.PreceptWorkers.ThoughtWorker_Precept_NonPregnant</workerClass>
|
||||||
<thoughtClass>Thought_Situational</thoughtClass>
|
<thoughtClass>Thought_Situational</thoughtClass>
|
||||||
<doNotApplyToQuestLodgers>true</doNotApplyToQuestLodgers>
|
<doNotApplyToQuestLodgers>true</doNotApplyToQuestLodgers>
|
||||||
|
<gender>Female</gender>
|
||||||
<stages>
|
<stages>
|
||||||
<li>
|
<li>
|
||||||
<label>not pregnant</label>
|
<label>not pregnant</label>
|
||||||
|
@ -191,8 +192,9 @@
|
||||||
|
|
||||||
<ThoughtDef>
|
<ThoughtDef>
|
||||||
<defName>Pregnancy_Horrible_NonPregnant_Social</defName>
|
<defName>Pregnancy_Horrible_NonPregnant_Social</defName>
|
||||||
<workerClass>RJWSexperience.Ideology.Ideology.Precept_Workers.ThoughtWorker_Precept_NonPregnant_Social</workerClass>
|
<workerClass>RJWSexperience.Ideology.PreceptWorkers.ThoughtWorker_Precept_NonPregnant_Social</workerClass>
|
||||||
<thoughtClass>Thought_SituationalSocial</thoughtClass>
|
<thoughtClass>Thought_SituationalSocial</thoughtClass>
|
||||||
|
<gender>Female</gender>
|
||||||
<stages>
|
<stages>
|
||||||
<li>
|
<li>
|
||||||
<label>unfertilized</label>
|
<label>unfertilized</label>
|
||||||
|
@ -201,4 +203,4 @@
|
||||||
</stages>
|
</stages>
|
||||||
</ThoughtDef>
|
</ThoughtDef>
|
||||||
|
|
||||||
</Defs>
|
</Defs>
|
|
@ -1,29 +1,21 @@
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
using Verse;
|
|
||||||
using rjw;
|
using rjw;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
namespace RJWSexperience.Ideology.Ideology.Precept_Workers
|
namespace RJWSexperience.Ideology.PreceptWorkers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 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_Precept
|
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 ShouldHaveThought(Pawn p)
|
protected override ThoughtState ShouldHaveThought(Pawn p)
|
||||||
{
|
{
|
||||||
|
return PregnancyHelper.GetPregnancy(p)?.Visible != true;
|
||||||
var pregnancy = rjw.PregnancyHelper.GetPregnancy(p);
|
}
|
||||||
|
}
|
||||||
if (pregnancy == null)
|
|
||||||
{
|
|
||||||
return ThoughtState.Inactive;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ThoughtState.ActiveAtStage(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,28 +1,22 @@
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
using Verse;
|
|
||||||
using rjw;
|
using rjw;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
namespace RJWSexperience.Ideology.Ideology.Precept_Workers
|
namespace RJWSexperience.Ideology.PreceptWorkers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 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_Precept
|
public class ThoughtWorker_Precept_NonPregnant_Social : ThoughtWorker_Precept_Social
|
||||||
{
|
{
|
||||||
/// <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>
|
/// <param name="otherPawn">The pawn about whom the thoughts are generated.</param>
|
||||||
protected override ThoughtState ShouldHaveThought(Pawn p)
|
/// <returns></returns>
|
||||||
{
|
protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
|
||||||
|
{
|
||||||
var pregnancy = rjw.PregnancyHelper.GetPregnancy(p);
|
return PregnancyHelper.GetPregnancy(otherPawn)?.Visible != true;
|
||||||
|
}
|
||||||
if (pregnancy != null)
|
}
|
||||||
{
|
|
||||||
return ThoughtState.Inactive;
|
|
||||||
} else
|
|
||||||
return ThoughtState.ActiveAtStage(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,30 +1,21 @@
|
||||||
|
using RimWorld;
|
||||||
using RimWorld;
|
|
||||||
using Verse;
|
|
||||||
using rjw;
|
using rjw;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
namespace RJWSexperience.Ideology.Ideology.Precept_Workers
|
namespace RJWSexperience.Ideology.PreceptWorkers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 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_Precept
|
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 ShouldHaveThought(Pawn p)
|
protected override ThoughtState ShouldHaveThought(Pawn p)
|
||||||
{
|
{
|
||||||
|
return PregnancyHelper.GetPregnancy(p)?.Visible == true;
|
||||||
var pregnancy = rjw.PregnancyHelper.GetPregnancy(p);
|
}
|
||||||
|
}
|
||||||
if (pregnancy == null)
|
|
||||||
{
|
|
||||||
return ThoughtState.Inactive;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ThoughtState.ActiveAtStage(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,29 +1,22 @@
|
||||||
using RimWorld;
|
using RimWorld;
|
||||||
using Verse;
|
|
||||||
using rjw;
|
using rjw;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
namespace RJWSexperience.Ideology.Ideology.Precept_Workers
|
namespace RJWSexperience.Ideology.PreceptWorkers
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 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_Precept
|
public class ThoughtWorker_Precept_Pregnant_Social : ThoughtWorker_Precept_Social
|
||||||
{
|
{
|
||||||
/// <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>
|
/// <param name="otherPawn">The pawn about whom the thoughts are generated.</param>
|
||||||
protected override ThoughtState ShouldHaveThought(Pawn p)
|
/// <returns></returns>
|
||||||
{
|
protected override ThoughtState ShouldHaveThought(Pawn p, Pawn otherPawn)
|
||||||
|
{
|
||||||
var pregnancy = rjw.PregnancyHelper.GetPregnancy(p);
|
return PregnancyHelper.GetPregnancy(otherPawn)?.Visible == true;
|
||||||
|
}
|
||||||
if (pregnancy == null)
|
}
|
||||||
{
|
|
||||||
return ThoughtState.Inactive;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ThoughtState.ActiveAtStage(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue