static void RunRaceCompCheck([NotNull] Pawn __instance) { var mTracker = __instance.GetComp <MorphTrackingComp>(); if (mTracker?.needsRaceCompCheck == true) { RaceShiftUtilities.AddRemoveDynamicRaceComps(__instance, __instance.def); mTracker.needsRaceCompCheck = false; } }
static void RunRaceCompCheck([NotNull] Pawn __instance) { //only check every so often if (!__instance.IsHashIntervalTick(60)) { return; } var mTracker = __instance.GetComp <MorphTrackingComp>(); if (mTracker?.needsRaceCompCheck == true) { RaceShiftUtilities.AddRemoveDynamicRaceComps(__instance, __instance.def); mTracker.needsRaceCompCheck = false; } }