mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Added Queens disliking workers (socially)
This commit is contained in:
parent
df513f8c09
commit
1d9041a11f
4 changed files with 56 additions and 0 deletions
|
@ -30,6 +30,19 @@
|
||||||
</stages>
|
</stages>
|
||||||
</ThoughtDef>
|
</ThoughtDef>
|
||||||
|
|
||||||
|
<ThoughtDef>
|
||||||
|
<defName>rjw_genes_queen_despises_workers_social</defName>
|
||||||
|
<thoughtClass>Thought_SituationalSocial</thoughtClass>
|
||||||
|
<workerClass>RJW_Genes.ThoughtWorker_WorkerDespised_Social</workerClass>
|
||||||
|
<stages>
|
||||||
|
<li>
|
||||||
|
<label>underling</label>
|
||||||
|
<description>those workers are not even worth a glance.</description>
|
||||||
|
<baseOpinionOffset>-20</baseOpinionOffset>
|
||||||
|
</li>
|
||||||
|
</stages>
|
||||||
|
</ThoughtDef>
|
||||||
|
|
||||||
<ThoughtDef>
|
<ThoughtDef>
|
||||||
<!-- For Loyal Pawns -->
|
<!-- For Loyal Pawns -->
|
||||||
<defName>rjw_genes_multiple_queens_mood</defName>
|
<defName>rjw_genes_multiple_queens_mood</defName>
|
||||||
|
|
|
@ -12,6 +12,9 @@ namespace RJW_Genes
|
||||||
{
|
{
|
||||||
protected override ThoughtState CurrentSocialStateInternal(Pawn p, Pawn other)
|
protected override ThoughtState CurrentSocialStateInternal(Pawn p, Pawn other)
|
||||||
{
|
{
|
||||||
|
// p is the pawn `thinking`, and other is the pawn being thought about.
|
||||||
|
// here: p = loyal pawn, other = potential queen
|
||||||
|
|
||||||
if (!p.RaceProps.Humanlike)
|
if (!p.RaceProps.Humanlike)
|
||||||
return (ThoughtState) false;
|
return (ThoughtState) false;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
using RimWorld;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Verse;
|
||||||
|
|
||||||
|
namespace RJW_Genes
|
||||||
|
{
|
||||||
|
public class ThoughtWorker_WorkerDespised_Social : ThoughtWorker
|
||||||
|
{
|
||||||
|
protected override ThoughtState CurrentSocialStateInternal(Pawn p, Pawn other)
|
||||||
|
{
|
||||||
|
// p is the pawn `thinking`, and other is the pawn being thought about.
|
||||||
|
// here: p = queen, other = potential worker
|
||||||
|
|
||||||
|
if (!p.RaceProps.Humanlike)
|
||||||
|
return (ThoughtState) false;
|
||||||
|
|
||||||
|
if (!other.RaceProps.Humanlike)
|
||||||
|
return (ThoughtState) false;
|
||||||
|
|
||||||
|
if (!RelationsUtility.PawnsKnowEachOther(p, other))
|
||||||
|
return (ThoughtState) false;
|
||||||
|
|
||||||
|
// Only check if they are spawned
|
||||||
|
if (!p.Spawned || !other.Spawned)
|
||||||
|
return (ThoughtState)false;
|
||||||
|
|
||||||
|
if (GeneUtility.HasGeneNullCheck(p, GeneDefOf.rjw_genes_queen) && GeneUtility.HasGeneNullCheck(other, GeneDefOf.rjw_genes_worker))
|
||||||
|
{
|
||||||
|
return (ThoughtState)true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (ThoughtState)false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -101,6 +101,7 @@
|
||||||
<Compile Include="Genes\Hive\Thoughts\Thoughtworker_QueenAbsent_Mood.cs" />
|
<Compile Include="Genes\Hive\Thoughts\Thoughtworker_QueenAbsent_Mood.cs" />
|
||||||
<Compile Include="Genes\Hive\Thoughts\Thoughtworker_MultipleQueens_Mood.cs" />
|
<Compile Include="Genes\Hive\Thoughts\Thoughtworker_MultipleQueens_Mood.cs" />
|
||||||
<Compile Include="Genes\Hive\Thoughts\Thoughtworker_QueenPresent_Mood.cs" />
|
<Compile Include="Genes\Hive\Thoughts\Thoughtworker_QueenPresent_Mood.cs" />
|
||||||
|
<Compile Include="Genes\Hive\Thoughts\ThoughtWorker_WorkerDespised_Social.cs" />
|
||||||
<Compile Include="Genes\Hive\Thoughts\Thoughtworker_RivalQueen_Mood.cs" />
|
<Compile Include="Genes\Hive\Thoughts\Thoughtworker_RivalQueen_Mood.cs" />
|
||||||
<Compile Include="Genes\Hive\Thoughts\ThoughtWorker_QueenPresent_Social.cs" />
|
<Compile Include="Genes\Hive\Thoughts\ThoughtWorker_QueenPresent_Social.cs" />
|
||||||
<Compile Include="Genes\Hive\Thoughts\ThoughtWorker_RivalQueen_Social.cs" />
|
<Compile Include="Genes\Hive\Thoughts\ThoughtWorker_RivalQueen_Social.cs" />
|
||||||
|
|
Loading…
Reference in a new issue