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

◆ Place4x3Wall()

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

Definition at line 35936 of file WorldGen.cs.

35937 {
35938 int num = x - 1;
35939 int num2 = y - 1;
35940 bool flag = true;
35941 for (int i = num; i < num + 4; i++)
35942 {
35943 for (int j = num2; j < num2 + 3; j++)
35944 {
35945 if (Main.tile[i, j].active() || Main.tile[i, j].wall == 0)
35946 {
35947 flag = false;
35948 break;
35949 }
35950 }
35951 }
35952 if (!flag)
35953 {
35954 return;
35955 }
35956 int num3 = 0;
35957 int num4 = style * 54;
35958 for (int k = num; k < num + 4; k++)
35959 {
35960 for (int l = num2; l < num2 + 3; l++)
35961 {
35962 Main.tile[k, l].active(active: true);
35963 Main.tile[k, l].type = type;
35964 Main.tile[k, l].frameX = (short)(num3 + 18 * (k - num));
35965 Main.tile[k, l].frameY = (short)(num4 + 18 * (l - num2));
35966 }
35967 }
35968 }

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