public static void Prefix(Thing __instance, ref Container <Map>?__state) { if (Multiplayer.Client == null) { return; } __state = __instance.Map; ThingContext.Push(__instance); if (__instance.def.CanHaveFaction) { __instance.Map.PushFaction(__instance.Faction); } }
static void Prefix(Pawn_JobTracker __instance, ref Container <Map>?__state) { if (Multiplayer.Client == null) { return; } Pawn pawn = __instance.pawn; if (pawn.Faction == null || !pawn.Spawned) { return; } pawn.Map.PushFaction(pawn.Faction); ThingContext.Push(pawn); __state = pawn.Map; }