private void Dispose() { try { this.AllowAdds = false; foreach (LinkedList <Thing> l in this.storedThings.Values) { foreach (Thing t in l) { BuildingUtil.DropThing(t, t.stackCount, this, this.CurrentMap); } } this.storedThings.Clear(); } catch (Exception e) { Log.Error( this.GetType().Name + ".Dispose\n" + e.GetType().Name + " " + e.Message + "\n" + e.StackTrace); } WorldComp.Remove(this.CurrentMap, this); }
static void Prefix(MapParent settlement) { WorldComp.Remove(settlement.Map); }