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

◆ PaintTheLivingTrees()

static void Terraria.WorldGen.PaintTheLivingTrees ( byte livingTreePaintColor,
byte livingTreeWallPaintColor )
inlinestaticprivate

Definition at line 18213 of file WorldGen.cs.

18214 {
18215 for (int i = 0; i < Main.maxTilesX; i++)
18216 {
18217 for (int j = 0; j < Main.maxTilesY; j++)
18218 {
18219 Tile tile = Main.tile[i, j];
18220 if (tile.active())
18221 {
18222 if (tile.wall == 244)
18223 {
18224 tile.color(livingTreePaintColor);
18225 }
18226 else if (tile.type == 192 || tile.type == 191)
18227 {
18228 tile.color(livingTreePaintColor);
18229 }
18230 else if (tile.type == 52 || tile.type == 382)
18231 {
18232 int x = i;
18233 int y = j;
18234 GetVineTop(i, j, out x, out y);
18235 if (Main.tile[x, y].type == 192)
18236 {
18237 tile.color(livingTreePaintColor);
18238 }
18239 }
18240 else if (tile.type == 187)
18241 {
18242 Tile tile2 = tile;
18243 int num = 0;
18244 while (tile2.type == 187)
18245 {
18246 num++;
18247 tile2 = Main.tile[i, j + num];
18248 }
18249 if (tile2.type == 192)
18250 {
18251 tile.color(livingTreePaintColor);
18252 }
18253 }
18254 }
18255 if (tile.wall == 244)
18256 {
18257 tile.wallColor(livingTreeWallPaintColor);
18258 }
18259 }
18260 }
18261 }
static void GetVineTop(int i, int j, out int x, out int y)

References Terraria.Tile.active(), Terraria.Tile.color(), Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.tile, Terraria.Tile.type, Terraria.Tile.wall, and Terraria.Tile.wallColor().

+ Here is the call graph for this function: