public static bool CanBeStrippedByColony(Thing th) { IStrippable strippable = th as IStrippable; if (strippable == null) { return(false); } if (!strippable.AnythingToStrip()) { return(false); } Pawn pawn = th as Pawn; if (pawn == null) { return(true); } if (pawn.IsQuestLodger()) { return(false); } if (pawn.Downed) { return(true); } if (pawn.IsPrisonerOfColony && pawn.guest.PrisonerIsSecure) { return(true); } return(false); }
public static bool CanBeStrippedByColony(Thing th) { IStrippable strippable = th as IStrippable; bool result; if (strippable == null) { result = false; } else if (!strippable.AnythingToStrip()) { result = false; } else { Pawn pawn = th as Pawn; result = (pawn == null || pawn.Downed || (pawn.IsPrisonerOfColony && pawn.guest.PrisonerIsSecure)); } return(result); }