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

◆ PlaceLogicTiles()

static void Terraria.WorldGen.PlaceLogicTiles ( int x,
int y,
int type,
int style = 0 )
inlinestatic

Definition at line 36338 of file WorldGen.cs.

36339 {
36340 Tile tile = Main.tile[x, y];
36341 if (Main.tile[x, y] == null)
36342 {
36343 tile = new Tile();
36344 Main.tile[x, y] = tile;
36345 }
36346 if (Main.tile[x, y + 1] == null)
36347 {
36348 Main.tile[x, y + 1] = new Tile();
36349 }
36350 if (type == 419)
36351 {
36352 if (Main.tile[x, y + 1].active() && (Main.tile[x, y + 1].type == 419 || Main.tile[x, y + 1].type == 420))
36353 {
36354 tile.active(active: true);
36355 tile.type = (ushort)type;
36356 tile.frameX = (short)(style * 18);
36357 tile.frameY = 0;
36358 }
36359 }
36360 else if (!tile.active())
36361 {
36362 tile.active(active: true);
36363 tile.type = (ushort)type;
36364 tile.frameX = 0;
36365 tile.frameY = (short)(18 * style);
36366 }
36367 }

References Terraria.Tile.active(), Terraria.DataStructures.Tile, Terraria.Main.tile, and System.type.