public static void NotifyNuzzled(JobDriver_Nuzzle __instance) { CompDieUnlessReset comp = __instance.pawn.TryGetComp <CompDieUnlessReset>(); if (comp != null && __instance.pawn.def == InternalDefOf.GR_Fleshling) { comp.ResetTimer(); } }
public override void Notify_PawnDied() { Map map = this.parent.pawn.Corpse.Map; if (map != null) { foreach (Thing thing in GenRadial.RadialDistinctThingsAround(this.parent.pawn.Corpse.Position, this.parent.pawn.Corpse.Map, 10, true)) { Pawn pawn = thing as Pawn; if (pawn != null && pawn.def == InternalDefOf.GR_FleshMonstrosity) { CompDieUnlessReset comp = pawn.TryGetComp <CompDieUnlessReset>(); if (comp != null) { comp.ResetTimer(); } } } } }
public override void Tick() { base.Tick(); if (this.IsHashIntervalTick(checkingPeriod)) { maxMechs = GeneticRim_Mod.settings.GR_HybridsPerAntenna; foreach (Pawn pawn in assignedMechs) { if (pawn.Dead || pawn.health?.hediffSet?.GetFirstHediffOfDef(InternalDefOf.GR_GreaterScaria) != null) { RemoveMechFromList(pawn); } CompDieUnlessReset comp = pawn.TryGetComp <CompDieUnlessReset>(); if (comp != null) { comp.ResetTimer(); } } } }