Gene in Colony Mood Toggle Precept - KonradHeinser/EBSGFramework GitHub Wiki
This thought precept acts mostly the same as the full colony mood thought, but only has one stage. If anyone in the colony meets the criteria, the stage is active.
This extension is checked for the list of genes to check for. Pawns only ever need to have one of the genes on the list. When checkNotPresent (Default False) is set to True, then it checks to make sure none of the genes are present:
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<relatedGenes>
<li>DefNameHere</li>
</relatedGenes>
<checkNotPresent>False</checkNotPresent>
</li>
</modExtensions>
The thought and worker classes in question:
<thoughtClass>Thought_Situational</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_Precept_RelatedGenePresent</workerClass>
This is a mutated example from superhero genes that gives mood while someone in the colony has the superhero base gene
<ThoughtDef>
<defName>SHG_SuperColonist_Loved</defName>
<thoughtClass>Thought_Situational</thoughtClass>
<workerClass>EBSGFramework.ThoughtWorker_Precept_RelatedGenePresent</workerClass>
<nullifiedIfNotColonist>true</nullifiedIfNotColonist>
<stages>
<li>
<label>super among us</label>
<description>There is a super in our group. Things are looking up for us!</description>
<baseMoodEffect>2</baseMoodEffect>
</li>
</stages>
<modExtensions>
<li Class="EBSGFramework.EBSGThoughtExtension">
<relatedGenes>
<li>SuperHeroBase</li>
</relatedGenes>
</li>
</modExtensions>
</ThoughtDef>