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

◆ PlaceBanner()

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

Definition at line 38831 of file WorldGen.cs.

38832 {
38833 int num = style * 18;
38834 int num2 = 0;
38835 if (style >= 90)
38836 {
38837 num -= 1620;
38838 num2 += 54;
38839 }
38840 if (Main.tile[x, y - 1] == null)
38841 {
38842 Main.tile[x, y - 1] = default(Tile);
38843 }
38844 if (Main.tile[x, y] == null)
38845 {
38846 Main.tile[x, y] = default(Tile);
38847 }
38848 if (Main.tile[x, y + 1] == null)
38849 {
38850 Main.tile[x, y + 1] = default(Tile);
38851 }
38852 if (Main.tile[x, y + 2] == null)
38853 {
38854 Main.tile[x, y + 2] = default(Tile);
38855 }
38856 if (Main.tile[x, y - 1].nactive() && Main.tileSolid[Main.tile[x, y - 1].type] && !Main.tileSolidTop[Main.tile[x, y - 1].type] && !Main.tile[x, y].active() && !Main.tile[x, y + 1].active() && !Main.tile[x, y + 2].active())
38857 {
38858 Main.tile[x, y].active(active: true);
38859 Main.tile[x, y].frameY = (short)num2;
38860 Main.tile[x, y].frameX = (short)num;
38861 Main.tile[x, y].type = type;
38862 Main.tile[x, y + 1].active(active: true);
38863 Main.tile[x, y + 1].frameY = (short)(num2 + 18);
38864 Main.tile[x, y + 1].frameX = (short)num;
38865 Main.tile[x, y + 1].type = type;
38866 Main.tile[x, y + 2].active(active: true);
38867 Main.tile[x, y + 2].frameY = (short)(num2 + 36);
38868 Main.tile[x, y + 2].frameX = (short)num;
38869 Main.tile[x, y + 2].type = type;
38870 }
38871 }

References Terraria.Main.tile, Terraria.Main.tileSolid, and Terraria.Main.tileSolidTop.