rjw-std/1.4/Source/Mod/STDs/Syphilis/ThoughtWorker_SyphiliticTho...

21 lines
496 B
C#

using RimWorld;
using Verse;
namespace rjwstd
{
public class ThoughtWorker_SyphiliticThoughts : ThoughtWorker
{
protected override ThoughtState CurrentStateInternal(Pawn p)
{
var syp = p.health.hediffSet.GetFirstHediffOfDef(std_Syphilis.syphilis.hediff_def);
if (syp != null)
{
if (syp.Severity >= 0.80f)
return ThoughtState.ActiveAtStage(1);
else if (syp.Severity >= 0.50f)
return ThoughtState.ActiveAtStage(0);
}
return ThoughtState.Inactive;
}
}
}