using Verse;
using RimWorld;

namespace SCE
{
	public class ThoughtWorker_Precept_GroinAndBreastsCovered : ThoughtWorker_Precept
	{
 		protected override ThoughtState ShouldHaveThought(Pawn p)
		{
            // stage == 1 => Legs covered
            // stage == 2 => Torso covered
            // stage == 1 | 2 => Both covered
            int stage = 0;
			if (p.HasCoveredPart(BodyPartGroupDefOf.Legs))
            {
                stage++;
            }
            if (p.HasCoveredPart(BodyPartGroupDefOf.Torso))
            {
                stage += 2;
            }
            
            if (stage > 0)
            {
                return ThoughtState.ActiveAtStage(stage - 1);
            }
            return ThoughtState.Inactive;
		}
	}
}
