public static void DeleteTile(int x, int y) { Main.tile[x, y].active = false; Main.tile[x, y].skipLiquid = true; Main.tile[x, y].liquid = 0; QTools.UpdateTile(x, y); }
public static void WallEdit(int x, int y, string wall) { byte type; if (QTools.GetTileTypeFromName(wall, out type)) { if (type < 255) { Main.tile[x, y].wall = (byte)type; } QTools.UpdateTile(x, y); } else { throw new Exception("Invalid Wall Name"); } }
public static void TileEdit(int x, int y, string tile) { byte type; if (QTools.GetTileTypeFromName(tile, out type)) { if (type < 253) { Main.tile[x, y].type = (byte)type; Main.tile[x, y].active = true; Main.tile[x, y].liquid = 0; Main.tile[x, y].skipLiquid = true; Main.tile[x, y].frameNumber = 0; Main.tile[x, y].frameX = -1; Main.tile[x, y].frameY = -1; } else if (type == 253) { Main.tile[x, y].active = false; Main.tile[x, y].skipLiquid = false; Main.tile[x, y].lava = false; Main.tile[x, y].liquid = 255; Main.tile[x, y].checkingLiquid = false; } else if (type == 254) { Main.tile[x, y].active = false; Main.tile[x, y].skipLiquid = false; Main.tile[x, y].lava = true; Main.tile[x, y].liquid = 255; Main.tile[x, y].checkingLiquid = false; } if ((Main.tile[x, y].type == 53) || (Main.tile[x, y].type == 253) || (Main.tile[x, y].type == 254)) { WorldGen.SquareTileFrame(x, y, false); } QTools.UpdateTile(x, y); } else { throw new Exception("Invalid Tile Name"); } }
public static void DeleteWall(int x, int y) { Main.tile[x, y].wall = 0; QTools.UpdateTile(x, y); }