public override void Destroy(DestroyMode mode = DestroyMode.Vanish) { Pawn pawn = null; if (!Bugged) { pawn = InnerPawn; NotifyColonistBar(); innerContainer.Clear(); } base.Destroy(mode); if (pawn != null) { PostCorpseDestroy(pawn); } }
public override void Destroy(DestroyMode mode = DestroyMode.Vanish) { Pawn innerPawn = null; if (!Bugged) { innerPawn = InnerPawn; // store the reference before removing him from the container so we can use it later NotifyColonistBar(); innerContainer.Clear(); } base.Destroy(mode); if (innerPawn != null) { Corpse.PostCorpseDestroy(innerPawn); } }