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

◆ GetCactusType()

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

Definition at line 38962 of file WorldGen.cs.

38963 {
38964 evil = false;
38965 good = false;
38966 crimson = false;
38967 int num = tileX;
38968 if (frameX == 36)
38969 {
38970 num--;
38971 }
38972 if (frameX == 54)
38973 {
38974 num++;
38975 }
38976 if (frameX == 108)
38977 {
38978 num = ((frameY != 18) ? (num + 1) : (num - 1));
38979 }
38980 int num2 = tileY;
38981 bool flag = false;
38982 Tile tile = Main.tile[num, num2];
38983 if (tile == null)
38984 {
38985 return;
38986 }
38987 if (tile.type == 80 && tile.active())
38988 {
38989 flag = true;
38990 }
38991 while (tile != null && (!tile.active() || !Main.tileSolid[tile.type] || !flag))
38992 {
38993 if (tile.type == 80 && tile.active())
38994 {
38995 flag = true;
38996 }
38997 num2++;
38998 if (num2 > tileY + 20)
38999 {
39000 break;
39001 }
39002 tile = Main.tile[num, num2];
39003 }
39004 if (tile.type == 112)
39005 {
39006 evil = true;
39007 }
39008 if (tile.type == 116)
39009 {
39010 good = true;
39011 }
39012 if (tile.type == 234)
39013 {
39014 crimson = true;
39015 }
39016 }
static bool crimson
Definition WorldGen.cs:932

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

Referenced by Terraria.GameContent.Drawing.TileDrawing.DrawSingleTile(), Terraria.Map.MapHelper.GetTileBaseOption(), and Terraria.GameContent.Drawing.TileDrawing.GetTileDrawData().