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

◆ PaintTheMushrooms()

static void Terraria.WorldGen.PaintTheMushrooms ( )
inlinestaticprivate

Definition at line 16893 of file WorldGen.cs.

16894 {
16895 int num = Main.maxTilesY - 20;
16896 byte b = (byte)genRand.Next(1, 13);
16897 if (remixWorldGen)
16898 {
16899 b = 2;
16900 num = Main.maxTilesY - 500;
16901 int num2 = genRand.Next(5, 31);
16902 if (genRand.Next(2) == 0)
16903 {
16904 num2 = genRand.Next(5, 16);
16905 }
16906 for (int i = 20; i < Main.maxTilesX - 20; i++)
16907 {
16908 if (i % num2 == 0)
16909 {
16910 b++;
16911 if (b > 12)
16912 {
16913 b = 1;
16914 }
16915 }
16916 for (int j = Main.maxTilesY - 450; j < Main.maxTilesY - 20; j++)
16917 {
16918 Tile tile = Main.tile[i, j];
16919 if (tile.active() && (tile.type == 70 || tile.type == 578 || tile.type == 190 || tile.type == 71 || tile.type == 528 || (tile.type == 519 && tile.frameY == 90)))
16920 {
16921 tile.color(b);
16922 }
16923 if (tile.wall == 80 || tile.wall == 74)
16924 {
16925 tile.wallColor(b);
16926 }
16927 }
16928 }
16929 }
16930 b = (byte)genRand.Next(1, 13);
16931 int num3 = 0;
16932 for (int k = 20; k < Main.maxTilesX - 20; k++)
16933 {
16934 for (int l = 20; l < num; l++)
16935 {
16936 Tile tile2 = Main.tile[k, l];
16937 if (tile2.active() && (tile2.type == 70 || tile2.type == 578 || tile2.type == 190 || tile2.type == 71 || tile2.type == 528 || (tile2.type == 519 && tile2.frameY == 90)))
16938 {
16939 tile2.color(b);
16940 num3 = 10;
16941 }
16942 if (tile2.wall == 80 || tile2.wall == 74)
16943 {
16944 tile2.wallColor(b);
16945 num3 = 10;
16946 }
16947 }
16948 num3--;
16949 if (num3 == 0)
16950 {
16951 b += (byte)genRand.Next(1, 3);
16952 if (b > 12)
16953 {
16954 b = 1;
16955 }
16956 }
16957 }
16958 }
static bool remixWorldGen
Definition WorldGen.cs:1148
static UnifiedRandom genRand
Definition WorldGen.cs:1215

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