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

◆ Statue()

static bool Terraria.WorldGen.Statue ( int x,
int y,
byte paint )
inlinestatic

Definition at line 6709 of file WorldGen.cs.

6710 {
6711 int num = genRand.Next(2, GenVars.statueList.Length);
6712 int x2 = GenVars.statueList[num].X;
6713 int y2 = GenVars.statueList[num].Y;
6714 while (!Main.tile[x, y].active())
6715 {
6716 y++;
6717 if (y >= Main.maxTilesY)
6718 {
6719 break;
6720 }
6721 }
6722 if (y >= Main.maxTilesY)
6723 {
6724 return false;
6725 }
6726 y--;
6727 if (PlaceTile(x, y, x2, mute: true, forced: true, -1, y2))
6728 {
6729 for (int i = 0; i < 2; i++)
6730 {
6731 for (int j = 0; j < 3; j++)
6732 {
6733 Main.tile[x + i, y + j - 2].color(paint);
6734 }
6735 }
6736 return true;
6737 }
6738 return false;
6739 }
static Point16[] statueList
Definition GenVars.cs:304
static bool PlaceTile(int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
static UnifiedRandom genRand
Definition WorldGen.cs:1215

References Terraria.WorldGen.genRand, Terraria.Main.maxTilesY, Terraria.WorldGen.PlaceTile(), Terraria.WorldBuilding.GenVars.statueList, and Terraria.Main.tile.

Referenced by Terraria.WorldGen.MarblePileWithStatues().