Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PlaceStatueTrap()

static void Terraria.WorldGen.PlaceStatueTrap ( int x,
int y )
inlinestatic

Definition at line 1287 of file WorldGen.cs.

1288 {
1289 for (int i = -10; i <= 10; i++)
1290 {
1291 for (int j = -10; j <= 10; j++)
1292 {
1293 Tile tile = Main.tile[x + i, y + j + 1];
1294 Tile tile2 = Main.tile[x + i, y + j];
1295 if (!tile2.active() && SolidTile2(tile) && tile.type != 162)
1296 {
1297 PlaceTile(x + i, y + j, 135, mute: true);
1298 if (tile2.active() && tile2.type == 135)
1299 {
1300 WorldUtils.WireLine(new Point(x, y), new Point(x + i, y + j));
1301 return;
1302 }
1303 }
1304 }
1305 }
1306 }
static void WireLine(Point start, Point end)
Definition WorldUtils.cs:81
static bool PlaceTile(int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
static bool SolidTile2(Tile testTile)

References Terraria.WorldGen.PlaceTile(), Terraria.WorldGen.SolidTile2(), Terraria.Main.tile, Terraria.Tile.type, and Terraria.WorldBuilding.WorldUtils.WireLine().

Referenced by Terraria.GameContent.Biomes.CaveHouse.HouseBuilder.FillRooms().