public void Notify_Resurrected() { healthState = PawnHealthState.Mobile; hediffSet.hediffs.RemoveAll((Hediff x) => x.def.everCurableByItem && x.TryGetComp <HediffComp_Immunizable>() != null); hediffSet.hediffs.RemoveAll((Hediff x) => x.def.everCurableByItem && x is Hediff_Injury && !x.IsPermanent()); hediffSet.hediffs.RemoveAll((Hediff x) => x.def.everCurableByItem && (x.def.lethalSeverity >= 0f || (x.def.stages != null && x.def.stages.Any((HediffStage y) => y.lifeThreatening)))); hediffSet.hediffs.RemoveAll((Hediff x) => x.def.everCurableByItem && x is Hediff_Injury && x.IsPermanent() && hediffSet.GetPartHealth(x.Part) <= 0f); while (true) { Hediff_MissingPart hediff_MissingPart = (from x in hediffSet.GetMissingPartsCommonAncestors() where !hediffSet.PartOrAnyAncestorHasDirectlyAddedParts(x.Part) select x).FirstOrDefault(); if (hediff_MissingPart == null) { break; } RestorePart(hediff_MissingPart.Part, null, checkStateChange: false); } hediffSet.DirtyCache(); if (ShouldBeDead()) { hediffSet.hediffs.Clear(); } Notify_HediffChanged(null); }