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

◆ templeCleaner()

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

Definition at line 24958 of file WorldGen.cs.

24959 {
24960 int num = 0;
24961 if (Main.tile[x + 1, y].active() && Main.tile[x + 1, y].type == 226)
24962 {
24963 num++;
24964 }
24965 if (Main.tile[x - 1, y].active() && Main.tile[x - 1, y].type == 226)
24966 {
24967 num++;
24968 }
24969 if (Main.tile[x, y + 1].active() && Main.tile[x, y + 1].type == 226)
24970 {
24971 num++;
24972 }
24973 if (Main.tile[x, y - 1].active() && Main.tile[x, y - 1].type == 226)
24974 {
24975 num++;
24976 }
24977 if (Main.tile[x, y].active() && Main.tile[x, y].type == 226)
24978 {
24979 if (num <= 1)
24980 {
24981 Main.tile[x, y].active(active: false);
24982 Main.tile[x, y].wall = 87;
24983 }
24984 }
24985 else if (!Main.tile[x, y].active() && num == 3)
24986 {
24987 Main.tile[x, y].active(active: true);
24988 Main.tile[x, y].type = 226;
24989 Main.tile[x, y].liquid = 0;
24990 Main.tile[x, y].slope(0);
24991 Main.tile[x, y].halfBrick(halfBrick: false);
24992 }
24993 }

References Terraria.Main.tile.