34 lines
817 B
C#
34 lines
817 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
using RimWorld;
|
|
using Verse;
|
|
|
|
namespace RJW_Genes
|
|
{
|
|
|
|
/// <summary>
|
|
/// Checks if there are multiple queens on the map.
|
|
/// </summary>
|
|
public class ConditionalStatAffecter_MultipleQueens : ConditionalStatAffecter
|
|
{
|
|
public override string Label => (string)"StatsReport_MultipleQueens".Translate();
|
|
|
|
public override bool Applies(StatRequest req)
|
|
{
|
|
if (req.Pawn == null || !req.Pawn.Spawned)
|
|
return false;
|
|
|
|
if (GeneUtility.HasGeneNullCheck(req.Pawn, GeneDefOf.rjw_genes_zealous_loyalty))
|
|
{
|
|
return HiveUtility.QueensOnMap() >= 2;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
}
|
|
}
|