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

◆ templeCleaner()

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

Definition at line 26458 of file WorldGen.cs.

26459 {
26460 int num = 0;
26461 if (Main.tile[x + 1, y].active() && Main.tile[x + 1, y].type == 226)
26462 {
26463 num++;
26464 }
26465 if (Main.tile[x - 1, y].active() && Main.tile[x - 1, y].type == 226)
26466 {
26467 num++;
26468 }
26469 if (Main.tile[x, y + 1].active() && Main.tile[x, y + 1].type == 226)
26470 {
26471 num++;
26472 }
26473 if (Main.tile[x, y - 1].active() && Main.tile[x, y - 1].type == 226)
26474 {
26475 num++;
26476 }
26477 if (Main.tile[x, y].active() && Main.tile[x, y].type == 226)
26478 {
26479 if (num <= 1)
26480 {
26481 Main.tile[x, y].active(active: false);
26482 Main.tile[x, y].wall = 87;
26483 }
26484 }
26485 else if (!Main.tile[x, y].active() && num == 3)
26486 {
26487 Main.tile[x, y].active(active: true);
26488 Main.tile[x, y].type = 226;
26489 Main.tile[x, y].liquid = 0;
26490 Main.tile[x, y].slope(0);
26491 Main.tile[x, y].halfBrick(halfBrick: false);
26492 }
26493 }

References Terraria.Main.tile.