Example #1
0
 public static void RestorePartAndSpawnAllPreviousParts(Pawn pawn, BodyPartRecord part, IntVec3 pos, Map map)
 {
     TM_MedicalRecipesUtility.SpawnNaturalPartIfClean(pawn, part, pos, map);
     TM_MedicalRecipesUtility.SpawnThingsFromHediffs(pawn, part, pos, map);
     if (part.def.defName == "Rib")
     {
         for (int i = 0; i < part.parent.parts.Count; i++)
         {
             if (part.parent.parts[i].def.defName == "Rib")
             {
                 pawn.health.RestorePart(part.parent.parts[i], null, true);
             }
         }
     }
     else
     {
         pawn.health.RestorePart(part, null, true);
     }
 }
 public static void RestorePartAndSpawnAllPreviousParts(Pawn pawn, BodyPartRecord part, IntVec3 pos, Map map)
 {
     TM_MedicalRecipesUtility.SpawnNaturalPartIfClean(pawn, part, pos, map);
     TM_MedicalRecipesUtility.SpawnThingsFromHediffs(pawn, part, pos, map);
     pawn.health.RestorePart(part, null, true);
 }