public static void Deinit(Map map) { try { MapDeiniter.PassPawnsToWorld(map); } catch (Exception arg) { Log.Error("Error while deiniting map: could not pass pawns to world: " + arg); } try { MapDeiniter.NotifyFactions(map); } catch (Exception arg2) { Log.Error("Error while deiniting map: could not notify factions: " + arg2); } try { map.weatherManager.EndAllSustainers(); } catch (Exception arg3) { Log.Error("Error while deiniting map: could not end all weather sustainers: " + arg3); } try { Find.SoundRoot.sustainerManager.EndAllInMap(map); } catch (Exception arg4) { Log.Error("Error while deiniting map: could not end all effect sustainers: " + arg4); } try { map.areaManager.Notify_MapRemoved(); } catch (Exception arg5) { Log.Error("Error while deiniting map: could not remove areas: " + arg5); } try { Find.TickManager.RemoveAllFromMap(map); } catch (Exception arg6) { Log.Error("Error while deiniting map: could not remove things from the tick manager: " + arg6); } try { MapDeiniter.NotifyEverythingWhichUsesMapReference(map); } catch (Exception arg7) { Log.Error("Error while deiniting map: could not notify things/regions/rooms/etc: " + arg7); } }
public static void Deinit(Map map) { try { MapDeiniter.PassPawnsToWorld(map); } catch (Exception arg) { Log.Error("Error while deiniting map: could not pass pawns to world: " + arg, false); } try { MapDeiniter.NotifyFactions(map); } catch (Exception arg2) { Log.Error("Error while deiniting map: could not notify factions: " + arg2, false); } try { map.weatherManager.EndAllSustainers(); } catch (Exception arg3) { Log.Error("Error while deiniting map: could not end all weather sustainers: " + arg3, false); } try { Find.SoundRoot.sustainerManager.EndAllInMap(map); } catch (Exception arg4) { Log.Error("Error while deiniting map: could not end all effect sustainers: " + arg4, false); } try { map.areaManager.Notify_MapRemoved(); } catch (Exception arg5) { Log.Error("Error while deiniting map: could not remove areas: " + arg5, false); } try { Find.TickManager.RemoveAllFromMap(map); } catch (Exception arg6) { Log.Error("Error while deiniting map: could not remove things from the tick manager: " + arg6, false); } try { MapDeiniter.NotifyEverythingWhichUsesMapReference(map); } catch (Exception arg7) { Log.Error("Error while deiniting map: could not notify things/regions/rooms/etc: " + arg7, false); } try { map.listerThings.Clear(); map.spawnedThings.Clear(); } catch (Exception arg8) { Log.Error("Error while deiniting map: could not remove things from thing listers: " + arg8, false); } try { Find.Archive.Notify_MapRemoved(map); } catch (Exception arg9) { Log.Error("Error while deiniting map: could not remove look targets: " + arg9, false); } try { Find.Storyteller.incidentQueue.Notify_MapRemoved(map); } catch (Exception arg10) { Log.Error("Error while deiniting map: could not remove queued incidents: " + arg10, false); } }