//in Terraria.WorldGen.KillTile inside if (!effectOnly && !WorldGen.stopDrops) for playing sounds // add if(!TileLoader.KillSound(i, j, tile.type)) { } to beginning of if/else chain and turn first if into else if public static bool KillSound(int i, int j, int type) { foreach (var hook in HookKillSound) { if (!hook(i, j, type)) { return(false); } } ModTile modTile = GetTile(type); if (modTile != null) { if (!modTile.KillSound(i, j)) { return(false); } Main.PlaySound(modTile.soundType, i * 16, j * 16, modTile.soundStyle); return(false); } return(true); }
//in Terraria.WorldGen.KillTile inside if (!effectOnly && !WorldGen.stopDrops) for playing sounds // add if(!TileLoader.KillSound(i, j, tile.type)) { } to beginning of if/else chain and turn first if into else if public static bool KillSound(int i, int j, int type) { foreach (GlobalTile globalTile in globalTiles) { if (!globalTile.KillSound(i, j, type)) { return(false); } } ModTile modTile = GetTile(type); if (modTile != null) { if (!modTile.KillSound(i, j)) { return(false); } Main.PlaySound(modTile.soundType, i * 16, j * 16, modTile.soundStyle); return(false); } return(true); }