예제 #1
0
        public static Danger NormalMaxDanger(this Pawn p)
        {
            Danger result;

            if (p.CurJob != null && p.CurJob.playerForced)
            {
                result = Danger.Deadly;
            }
            else if (FloatMenuMakerMap.makingFor == p)
            {
                result = Danger.Deadly;
            }
            else if (p.Faction == Faction.OfPlayer)
            {
                if (p.health.hediffSet.HasTemperatureInjury(TemperatureInjuryStage.Minor))
                {
                    if (GenTemperature.FactionOwnsPassableRoomInTemperatureRange(p.Faction, p.SafeTemperatureRange(), p.MapHeld))
                    {
                        return(Danger.None);
                    }
                }
                result = Danger.Some;
            }
            else
            {
                result = Danger.Some;
            }
            return(result);
        }