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

◆ GetCactusType() [2/3]

static void Terraria.WorldGen.GetCactusType ( int tileX,
int tileY,
int frameX,
int frameY,
out bool evil,
out bool good,
out bool crimson,
out int type )
inlinestatic

Definition at line 40773 of file WorldGen.cs.

40774 {
40775 type = 0;
40776 evil = false;
40777 good = false;
40778 crimson = false;
40779 int num = tileX;
40780 if (frameX == 36)
40781 {
40782 num--;
40783 }
40784 if (frameX == 54)
40785 {
40786 num++;
40787 }
40788 if (frameX == 108)
40789 {
40790 num = ((frameY != 18) ? (num + 1) : (num - 1));
40791 }
40792 int num2 = tileY;
40793 bool flag = false;
40794 Tile tile = Main.tile[num, num2];
40795 if (tile == null)
40796 {
40797 return;
40798 }
40799 if (tile.type == 80 && tile.active())
40800 {
40801 flag = true;
40802 }
40803 while (tile != null && (!tile.active() || !Main.tileSolid[tile.type] || !flag))
40804 {
40805 if (tile.type == 80 && tile.active())
40806 {
40807 flag = true;
40808 }
40809 num2++;
40810 if (num2 > tileY + 20)
40811 {
40812 break;
40813 }
40814 tile = Main.tile[num, num2];
40815 }
40816 type = tile.type;
40817 if (tile.type == 112)
40818 {
40819 evil = true;
40820 }
40821 if (tile.type == 116)
40822 {
40823 good = true;
40824 }
40825 if (tile.type == 234)
40826 {
40827 crimson = true;
40828 }
40829 }
static bool crimson
Definition WorldGen.cs:1170

References Terraria.Tile.active(), Terraria.Main.tile, Terraria.Main.tileSolid, and Terraria.Tile.type.

+ Here is the call graph for this function: