예제 #1
0
        // Token: 0x060000BB RID: 187 RVA: 0x0000935C File Offset: 0x0000755C
        public static bool BandagesValid(Pawn pawn)
        {
            HediffSet hediffSet;

            if (pawn == null)
            {
                hediffSet = null;
            }
            else
            {
                Pawn_HealthTracker health = pawn.health;
                hediffSet = (health?.hediffSet);
            }
            HediffSet hedset = hediffSet;

            if (hedset != null)
            {
                List <Hediff> injuries = hedset.GetHediffsTendable().ToList();
                if (injuries != null && injuries.Count > 0)
                {
                    foreach (Hediff injury in injuries)
                    {
                        if (!(injury is Hediff_Injury) && !HealthAIUtility_FindBestMedicine_PostPatch.Inclusions().Contains(injury.def.defName))
                        {
                            return(false);
                        }
                        if (injury is Hediff_Injury && injury.Part.depth == BodyPartDepth.Inside)
                        {
                            return(false);
                        }
                    }
                    return(true);
                }
            }
            return(false);
        }