mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
34 lines
895 B
C#
34 lines
895 B
C#
|
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_QueenPresent_Mood : ThoughtWorker
|
|||
|
{
|
|||
|
|
|||
|
protected override ThoughtState CurrentStateInternal(Pawn p)
|
|||
|
{
|
|||
|
// Error Handling and Check for Pawn being on Map
|
|||
|
if (p == null || !p.Spawned)
|
|||
|
return (ThoughtState) false;
|
|||
|
// Queens cannot have loyalty thoughts
|
|||
|
if (GeneUtility.HasGeneNullCheck(p, GeneDefOf.rjw_genes_queen))
|
|||
|
return (ThoughtState)false;
|
|||
|
|
|||
|
if (GeneUtility.HasGeneNullCheck(p, GeneDefOf.rjw_genes_zealous_loyalty) && HiveUtility.QueensOnMap() == 1)
|
|||
|
{
|
|||
|
return (ThoughtState)true;
|
|||
|
}
|
|||
|
|
|||
|
return (ThoughtState) false;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|