Definition at line 19107 of file WorldGen.cs.
19108 {
19109 byte color = (byte)
genRand.Next(13, 25);
19111 for (int i = 0; i < Main.maxTilesX; i++)
19112 {
19114 for (
int j = 0;
j < Main.maxTilesY;
j++)
19115 {
19116 if (!Main.tile[i,
j].active() || !Main.tileDungeon[Main.tile[i,
j].type])
19117 {
19118 continue;
19119 }
19120 if (Main.tile[i,
j].type == 44)
19121 {
19122 color = (byte)
genRand.Next(13, 15);
19124 {
19125 color = (byte)
genRand.Next(23, 25);
19126 }
19127 }
19128 if (Main.tile[i,
j].type == 43)
19129 {
19130 color = (byte)
genRand.Next(15, 19);
19131 }
19132 if (Main.tile[i,
j].type == 41)
19133 {
19134 color = (byte)
genRand.Next(19, 23);
19135 }
19136 }
19138 {
19139 break;
19140 }
19141 }
19142 for (
int k = 10;
k < Main.maxTilesX - 10;
k++)
19143 {
19144 for (
int l = 10;
l < Main.maxTilesY - 10;
l++)
19145 {
19147 {
19148 Main.tile[
k,
l].color(color);
19149 }
19150 if (Main.wallDungeon[Main.tile[
k,
l].wall])
19151 {
19152 Main.tile[
k,
l].wallColor(25);
19153 }
19154 if (Main.tile[
k,
l].active())
19155 {
19156 if (Main.tile[
k,
l].type == 60)
19157 {
19160 {
19162 {
19163 if (Main.tile[
m,
n].type == 147 || Main.tile[
m,
n].type == 161)
19164 {
19165 Main.tile[
m,
n].type = 59;
19166 }
19167 }
19168 }
19169 }
19170 bool flag2 =
false;
19171 if (Main.tile[
k,
l].type == 226)
19172 {
19174 }
19175 if (Main.tile[
k,
l].type == 137)
19176 {
19177 int num2 = Main.tile[
k,
l].frameY / 18;
19179 {
19181 }
19182 }
19184 {
19185 Main.tile[
k,
l].color(
b);
19186 }
19187 }
19188 if (Main.tile[
k,
l].wall == 87)
19189 {
19190 Main.tile[
k,
l].wallColor(
b);
19191 }
19192 }
19193 }
19195 {
19196 if (
genRand.Next(15) == 0 && Main.chest[
num3].item[1].stack != 0)
19197 {
19199 {
19200 if (Main.chest[
num3].item[
num4].stack == 0)
19201 {
19202 Main.chest[
num3].item[
num4].SetDefaults(5001);
19203 break;
19204 }
19205 }
19206 }
19207 if (
genRand.Next(30) != 0 || Main.chest[
num3].item[1].stack == 0)
19208 {
19209 continue;
19210 }
19212 {
19213 if (Main.chest[
num3].item[
num5].stack == 0)
19214 {
19215 Main.chest[
num3].item[
num5].SetDefaults(678);
19216 break;
19217 }
19218 }
19219 }
19220 }
static bool[] CrackedBricks
static UnifiedRandom genRand
References Terraria.Main.chest, Terraria.ID.TileID.Sets.CrackedBricks, Terraria.Main.maxTilesX, Terraria.Main.maxTilesY, Terraria.Main.tile, Terraria.Main.tileDungeon, and Terraria.Main.wallDungeon.