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

◆ Place6x4Wall()

static void Terraria.WorldGen.Place6x4Wall ( int x,
int y,
ushort type,
int style )
inlinestatic

Definition at line 36021 of file WorldGen.cs.

36022 {
36023 int num = x - 2;
36024 int num2 = y - 2;
36025 bool flag = true;
36026 for (int i = num; i < num + 6; i++)
36027 {
36028 for (int j = num2; j < num2 + 4; j++)
36029 {
36030 if (Main.tile[i, j].active() || Main.tile[i, j].wall == 0)
36031 {
36032 flag = false;
36033 break;
36034 }
36035 }
36036 }
36037 if (!flag)
36038 {
36039 return;
36040 }
36041 int num3 = 27;
36042 int num4 = style / num3 * 108;
36043 int num5 = style % num3 * 72;
36044 for (int k = num; k < num + 6; k++)
36045 {
36046 for (int l = num2; l < num2 + 4; l++)
36047 {
36048 Main.tile[k, l].active(active: true);
36049 Main.tile[k, l].type = type;
36050 Main.tile[k, l].frameX = (short)(num4 + 18 * (k - num));
36051 Main.tile[k, l].frameY = (short)(num5 + 18 * (l - num2));
36052 }
36053 }
36054 }

References Terraria.Main.tile, and System.type.