25062 {
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25082 double num = (double)Main.maxTilesX / 4200.0;
25083 int num2 =
genRand.Next((
int)(num * 10.0), (
int)(num * 16.0));
25085 {
25087 }
25089 {
25091 }
25093 {
25095 }
25098 {
25100 }
25108 for (
int i = 0;
i <
num2;
i++)
25109 {
25114 bool flag = true;
25119 while (flag)
25120 {
25126 {
25128 }
25130 {
25134 {
25136 }
25140 }
25142 {
25146 }
25147 else
25148 {
25151 }
25152 flag = false;
25154 for (
int j = 0;
j <
i;
j++)
25155 {
25157 {
25158 flag = true;
25159 }
25161 {
25163 }
25164 }
25165 }
25167 {
25170 }
25175 }
25176 for (
int k = 0;
k <
num2;
k++)
25177 {
25178 for (
int l = 0;
l < 2;
l++)
25179 {
25180 for (
int m = 0;
m <
num2;
m++)
25181 {
25182 for (
int n = 0;
n < 2;
n++)
25183 {
25186 {
25188 }
25193 {
25195 }
25199 {
25201 {
25203 }
25205 {
25207 }
25209 {
25211 }
25213 {
25215 }
25217 {
25219 }
25221 {
25223 }
25226 {
25232 }
25233 }
25234 }
25235 }
25236 }
25237 }
25239 {
25240 if (false)
25241 {
25242 continue;
25243 }
25245 {
25247 {
25253 }
25254 }
25270 {
25272 {
25274 {
25276 }
25278 {
25280 }
25282 {
25284 }
25286 {
25288 }
25290 {
25292 }
25294 {
25296 }
25298 {
25300 }
25302 {
25304 }
25306 {
25308 }
25310 {
25312 }
25314 {
25316 }
25318 {
25320 }
25322 {
25325 }
25326 }
25327 }
25329 {
25331 {
25333 {
25335 }
25337 {
25339 }
25341 {
25343 }
25345 {
25347 }
25349 {
25351 }
25353 {
25355 }
25357 {
25359 }
25361 {
25363 }
25365 {
25367 }
25369 {
25371 }
25373 {
25375 }
25377 {
25379 }
25381 {
25384 }
25385 }
25386 }
25387 }
25391 {
25393 rectangle2.X += 8;
25394 rectangle2.Y += 8;
25395 rectangle2.Width -= 16;
25396 rectangle2.Height -= 16;
25399 {
25403 {
25404 num40 = rectangle2.X + rectangle2.Width / 2 +
genRand.Next(-10, 10);
25405 num41 = rectangle2.Y + rectangle2.Height / 2 +
genRand.Next(-10, 10);
25406 }
25408 if (val.X == (
double)
num40 && val.Y == (
double)
num41)
25409 {
25411 }
25412 }
25414 {
25415 continue;
25416 }
25418 {
25421 {
25424 {
25426 {
25427 rectangle2.X += (int)((
double)
array[
num42].Width * 0.8);
25428 }
25429 else
25430 {
25431 rectangle2.X += (int)((
double)
array[
num42].Width * 0.2);
25432 }
25433 }
25435 {
25436 rectangle2.X += (int)((
double)
array[
num42].Width * 0.2);
25437 }
25438 else
25439 {
25440 rectangle2.X += (int)((
double)
array[
num42].Width * 0.8);
25441 }
25443 }
25444 else
25445 {
25448 }
25453 {
25457 if (val.X == (
double)
num43 && val.Y == (
double)
num44)
25458 {
25460 }
25461 }
25462 continue;
25463 }
25469 {
25473 if (val.X == (
double)
num48 && val.Y == (
double)
num49)
25474 {
25476 }
25477 }
25478 }
25479 int num50 = Main.maxTilesX - 20;
25481 int num52 = Main.maxTilesY - 20;
25484 {
25486 {
25488 }
25490 {
25492 }
25494 {
25496 }
25498 {
25500 }
25501 }
25507 {
25509 {
25511 }
25512 }
25514 {
25516 {
25518 }
25519 }
25521 {
25523 {
25525 }
25526 }
25528 {
25530 {
25532 }
25533 }
25543 {
25546 {
25548 val2.Y -= 1.0;
25549 }
25554 {
25556 {
25558 }
25560 {
25562 {
25564 }
25567 }
25568 }
25569 }
25574 {
25577 {
25582 break;
25583 }
25584 }
25588 {
25590 }
25593 {
25595 {
25601 }
25602 }
25604 {
25606 {
25609 }
25610 }
25612 {
25614 {
25620 }
25621 }
25623 {
25625 {
25627 {
25630 }
25631 }
25632 }
25635 {
25637 {
25639 }
25640 }
25642 {
25644 {
25646 }
25647 }
25649 {
25651 {
25654 {
25656 {
25658 {
25660 break;
25661 }
25662 }
25663 }
25665 {
25667 }
25668 }
25669 }
25672 int num89 = rectangle3.Width / 2;
25673 int num90 = rectangle3.Height / 2;
25674 while (true)
25675 {
25681 {
25684 break;
25685 }
25687 {
25688 continue;
25689 }
25694 {
25695 }
25711 {
25713 {
25716 Main.tile[x, y].active(active:
false);
25717 }
25718 }
25719 GenVars.lAltarX =
num91;
25720 GenVars.lAltarY =
num92;
25722 {
25724 {
25727 Main.tile[x, y].active(active:
true);
25728 Main.tile[x, y].type = 237;
25729 Main.tile[x, y].frameX = (
short)(
num95 * 18);
25730 Main.tile[x, y].frameY = (
short)(
num96 * 18);
25731 }
25732 }
25734 {
25736 {
25740 }
25741 }
25742 break;
25743 }
25747 {
25749 }
25751 while (
num99 > 0.0)
25752 {
25758 {
25759 bool flag5 =
false;
25761 {
25764 {
25766 }
25768 {
25769 }
25775 {
25777 {
25779 {
25781 break;
25782 }
25783 }
25784 }
25786 {
25788 {
25790 {
25792 {
25793 continue;
25794 }
25798 {
25802 {
25805 }
25806 }
25807 else
25808 {
25812 {
25815 }
25816 }
25819 {
25821 }
25822 }
25823 }
25824 }
25826 {
25829 }
25830 }
25831 else
25832 {
25835 {
25837 }
25839 {
25840 }
25846 {
25848 {
25850 {
25852 break;
25853 }
25854 }
25855 }
25857 {
25859 {
25861 {
25863 {
25864 continue;
25865 }
25869 {
25873 {
25876 }
25877 }
25878 else
25879 {
25883 {
25886 }
25887 }
25890 {
25892 }
25893 }
25894 }
25895 }
25897 {
25900 }
25901 }
25902 }
25904 {
25907 }
25908 }
25909 GenVars.tLeft =
num50;
25910 GenVars.tRight =
num51;
25911 GenVars.tTop =
num52;
25912 GenVars.tBottom =
num53;
25913 GenVars.tRooms =
num2;
25914 }
static void templeCleaner(int x, int y)
static bool remixWorldGen
static Vector2D templePather(Vector2D templePath, int destX, int destY)
static bool PlaceTile(int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
static UnifiedRandom genRand
static void outerTempled(int x, int y)
static bool drunkWorldGen
static void SquareTileFrame(int i, int j, bool resetFrame=true)
static bool getGoodWorldGen