Added removespecial command
This commit is contained in:
parent
44afc6d8dd
commit
5a6b59cbad
1 changed files with 40 additions and 0 deletions
|
|
@ -215,6 +215,7 @@ namespace TShockAPI
|
||||||
add(Permissions.cfg, WorldInfo, "world");
|
add(Permissions.cfg, WorldInfo, "world");
|
||||||
add(Permissions.converthardmode, ConvertCorruption, "convertcorruption");
|
add(Permissions.converthardmode, ConvertCorruption, "convertcorruption");
|
||||||
add(Permissions.converthardmode, ConvertHallow, "converthallow");
|
add(Permissions.converthardmode, ConvertHallow, "converthallow");
|
||||||
|
add(Permissions.converthardmode, RemoveSpecial, "removespecial");
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool HandleCommand(TSPlayer player, string text)
|
public static bool HandleCommand(TSPlayer player, string text)
|
||||||
|
|
@ -1488,6 +1489,45 @@ namespace TShockAPI
|
||||||
TShock.Utils.Broadcast("Hallow conversion done.");
|
TShock.Utils.Broadcast("Hallow conversion done.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void RemoveSpecial(CommandArgs args)
|
||||||
|
{
|
||||||
|
TShock.Utils.Broadcast("Server may lag for a moment.", Color.Red);
|
||||||
|
for (int x = 0; x < Main.maxTilesX; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < Main.maxTilesY; y++)
|
||||||
|
{
|
||||||
|
switch (Main.tile[x, y].type)
|
||||||
|
{
|
||||||
|
case 22:
|
||||||
|
case 117:
|
||||||
|
case 25:
|
||||||
|
Main.tile[x, y].type = 1;
|
||||||
|
break;
|
||||||
|
case 109:
|
||||||
|
case 23:
|
||||||
|
Main.tile[x, y].type = 2;
|
||||||
|
break;
|
||||||
|
case 32:
|
||||||
|
Main.tile[x, y].type = 0;
|
||||||
|
Main.tile[x, y].active = false;
|
||||||
|
break;
|
||||||
|
case 24:
|
||||||
|
Main.tile[x, y].type = 3;
|
||||||
|
break;
|
||||||
|
case 112:
|
||||||
|
case 116:
|
||||||
|
Main.tile[x, y].type = 169;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
WorldGen.CountTiles(0);
|
||||||
|
TSPlayer.All.SendData(PacketTypes.UpdateGoodEvil);
|
||||||
|
Netplay.ResetSections();
|
||||||
|
TShock.Utils.Broadcast("Special tile conversion done.");
|
||||||
|
}
|
||||||
#endregion Cause Events and Spawn Monsters Commands
|
#endregion Cause Events and Spawn Monsters Commands
|
||||||
|
|
||||||
#region Teleport Commands
|
#region Teleport Commands
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue