internal static void UnloadModMap()
{
tileEntries.Clear();
wallEntries.Clear();
if (Main.dedServ)
{
return;
}
nameFuncs.Clear();
entryToTile.Clear();
entryToWall.Clear();
Array.Resize(ref MapHelper.tileLookup, TileID.Count);
Array.Resize(ref MapHelper.wallLookup, WallID.Count);
Array.Resize(ref MapHelper.colorLookup, MapHelper.modPosition);
Lang.mapLegend.Resize(MapHelper.modPosition);
initialized = false;
}
//at end of Terraria.Map.MapHelper.CreateMapTile before returning call
internal static void Unload() { while (loadOrder.Count > 0) { GetMod(loadOrder.Pop()).UnloadContent(); } loadedMods.Clear(); ItemLoader.Unload(); EquipLoader.Unload(); ModDust.Unload(); TileLoader.Unload(); WallLoader.Unload(); ProjectileLoader.Unload(); NPCLoader.Unload(); NPCHeadLoader.Unload(); PlayerHooks.Unload(); BuffLoader.Unload(); MountLoader.Unload(); ModGore.Unload(); SoundLoader.Unload(); textures.Clear(); sounds.Clear(); mods.Clear(); ResizeArrays(true); MapLoader.UnloadModMap(); modHotKeys.Clear(); }