7176 {
7181 Main.afterPartyOfDoom = false;
7183 {
7186 Main.drunkWorld = true;
7188 seed = Main.rand.Next(999999999);
7189 if (!Main.dayTime)
7190 {
7191 Main.time = 0.0;
7192 }
7193 }
7194 else if (
seed == 5162021 ||
seed == 5162011)
7195 {
7197 }
7200 {
7202 seed = Main.rand.Next(999999999);
7203 }
7206 {
7208 seed = Main.rand.Next(999999999);
7209 }
7211 {
7212 Main.getGoodWorld = true;
7214 seed = Main.rand.Next(999999999);
7215 }
7216 else
7217 {
7218 Main.getGoodWorld = false;
7219 }
7222 {
7224 seed = Main.rand.Next(999999999);
7225 }
7228 {
7230 seed = Main.rand.Next(999999999);
7231 }
7234 {
7236 seed = Main.rand.Next(999999999);
7237 }
7240 Main.lockMenuBGChange = true;
7248 GenVars.desertHiveHigh = Main.maxTilesY;
7249 GenVars.desertHiveLow = 0;
7250 GenVars.desertHiveLeft = Main.maxTilesX;
7251 GenVars.desertHiveRight = 0;
7252 GenVars.worldSurfaceLow = 0.0;
7253 GenVars.worldSurface = 0.0;
7254 GenVars.worldSurfaceHigh = 0.0;
7255 GenVars.rockLayerLow = 0.0;
7256 GenVars.rockLayer = 0.0;
7257 GenVars.rockLayerHigh = 0.0;
7258 GenVars.copper = 7;
7259 GenVars.iron = 6;
7260 GenVars.silver = 9;
7261 GenVars.gold = 8;
7262 GenVars.dungeonSide = 0;
7263 GenVars.jungleHut = (ushort)
genRand.Next(5);
7264 GenVars.shellStartXLeft = 0;
7265 GenVars.shellStartYLeft = 0;
7266 GenVars.shellStartXRight = 0;
7267 GenVars.shellStartYRight = 0;
7268 GenVars.PyrX = null;
7269 GenVars.PyrY = null;
7270 GenVars.numPyr = 0;
7271 GenVars.jungleMinX = -1;
7272 GenVars.jungleMaxX = -1;
7273 GenVars.snowMinX = new int[Main.maxTilesY];
7274 GenVars.snowMaxX = new int[Main.maxTilesY];
7275 GenVars.snowTop = 0;
7276 GenVars.snowBottom = 0;
7277 GenVars.skyLakes = 1;
7278 if (Main.maxTilesX > 8000)
7279 {
7281 }
7282 if (Main.maxTilesX > 6000)
7283 {
7285 }
7286 GenVars.beachBordersWidth = 275;
7287 GenVars.beachSandRandomCenter = GenVars.beachBordersWidth + 5 + 40;
7288 GenVars.beachSandRandomWidthRange = 20;
7289 GenVars.beachSandDungeonExtraWidth = 40;
7290 GenVars.beachSandJungleExtraWidth = 20;
7291 GenVars.oceanWaterStartRandomMin = 220;
7292 GenVars.oceanWaterStartRandomMax = GenVars.oceanWaterStartRandomMin + 40;
7293 GenVars.oceanWaterForcedJungleLength = 275;
7294 GenVars.leftBeachEnd = 0;
7295 GenVars.rightBeachStart = 0;
7296 GenVars.evilBiomeBeachAvoidance = GenVars.beachSandRandomCenter + 60;
7297 GenVars.evilBiomeAvoidanceMidFixer = 50;
7298 GenVars.lakesBeachAvoidance = GenVars.beachSandRandomCenter + 20;
7299 GenVars.smallHolesBeachAvoidance = GenVars.beachSandRandomCenter + 20;
7300 GenVars.surfaceCavesBeachAvoidance = GenVars.beachSandRandomCenter + 20;
7301 GenVars.surfaceCavesBeachAvoidance2 = GenVars.beachSandRandomCenter + 20;
7302 GenVars.jungleOriginX = 0;
7303 GenVars.snowOriginLeft = 0;
7304 GenVars.snowOriginRight = 0;
7305 GenVars.logX = -1;
7306 GenVars.logY = -1;
7307 GenVars.dungeonLocation = 0;
7309 {
7310 Main.starGame = true;
7311 }
7313 {
7315 {
7316 GenVars.crimsonLeft = false;
7317 }
7318 else
7319 {
7320 GenVars.crimsonLeft = true;
7321 }
7323 GenVars.skipDesertTileCheck = false;
7326 Liquid.ReInit();
7328 progress.Message = "";
7331 Main.cloudAlpha = 0f;
7332 Main.maxRaining = 0f;
7333 Main.raining = false;
7335 GenVars.extraBastStatueCount = 0;
7336 GenVars.extraBastStatueCountMax = 2;
7337 Main.checkXMas();
7338 Main.checkHalloween();
7342 GenVars.numLarva = 0;
7345 {
7347 }
7350 {
7355 }
7356 GenVars.hellChestItem =
list4.ToArray();
7359 Main.cloudBGActive = -
genRand.Next(8640, 86400);
7361 SavedOreTiers.Copper = 7;
7362 SavedOreTiers.Iron = 6;
7363 SavedOreTiers.Silver = 9;
7364 SavedOreTiers.Gold = 8;
7365 GenVars.copperBar = 20;
7366 GenVars.ironBar = 22;
7367 GenVars.silverBar = 21;
7368 GenVars.goldBar = 19;
7370 {
7371 GenVars.copper = 166;
7372 GenVars.copperBar = 703;
7373 SavedOreTiers.Copper = 166;
7374 }
7376 {
7377 GenVars.iron = 167;
7378 GenVars.ironBar = 704;
7379 SavedOreTiers.Iron = 167;
7380 }
7382 {
7383 GenVars.silver = 168;
7384 GenVars.silverBar = 705;
7385 SavedOreTiers.Silver = 168;
7386 }
7388 {
7389 GenVars.gold = 169;
7390 GenVars.goldBar = 706;
7391 SavedOreTiers.Gold = 169;
7392 }
7395 {
7397 }
7399 {
7401 }
7403 {
7404 GenVars.jungleHut = 119;
7405 }
7407 {
7408 GenVars.jungleHut = 120;
7409 }
7411 {
7412 GenVars.jungleHut = 158;
7413 }
7415 {
7416 GenVars.jungleHut = 175;
7417 }
7419 {
7420 GenVars.jungleHut = 45;
7421 }
7422 Main.worldID =
genRand.Next(
int.MaxValue);
7427 TreeTops.CopyExistingWorldInfoForWorldGeneration();
7428 GenVars.dungeonSide = ((
genRand.Next(2) != 0) ? 1 : (-1));
7430 {
7432 {
7434 GenVars.jungleOriginX = (int)((
double)Main.maxTilesX *
num1087);
7435 }
7436 else
7437 {
7439 GenVars.jungleOriginX = (int)((
double)Main.maxTilesX *
num1088);
7440 }
7441 }
7442 else
7443 {
7447 {
7450 }
7452 {
7454 GenVars.jungleOriginX = (int)((
double)Main.maxTilesX *
num1089);
7455 }
7456 else
7457 {
7459 GenVars.jungleOriginX = (int)((
double)Main.maxTilesX *
num1090);
7460 }
7461 }
7464 {
7465 GenVars.dungeonSide *= -1;
7466 }
7468 {
7469 while ((
double)
num1091 < (double)Main.maxTilesX * 0.6 || (
double)
num1091 > (double)Main.maxTilesX * 0.75)
7470 {
7472 }
7473 }
7474 else
7475 {
7476 while ((
double)
num1091 < (double)Main.maxTilesX * 0.25 || (
double)
num1091 > (double)Main.maxTilesX * 0.4)
7477 {
7479 }
7480 }
7482 {
7483 GenVars.dungeonSide *= -1;
7484 }
7486 double num1093 = (double)Main.maxTilesX / 4200.0;
7495 {
7497 }
7499 {
7501 }
7502 GenVars.snowOriginLeft =
num1094;
7503 GenVars.snowOriginRight =
num1095;
7506 {
7508 }
7510 {
7512 }
7513 else
7514 {
7516 }
7519 {
7521 }
7523 {
7525 }
7526 else
7527 {
7529 }
7532 {
7534 }
7535 else
7536 {
7537 GenVars.dungeonLocation =
genRand.Next((
int)((double)Main.maxTilesX * 0.8), GenVars.rightBeachStart -
num1096);
7538 }
7540 if (Main.maxTilesX >= 8400)
7541 {
7543 }
7544 else if (Main.maxTilesX >= 6400)
7545 {
7547 }
7548 GenVars.extraBastStatueCountMax = 2 +
num1097;
7549 Main.tileSolid[659] = false;
7550 });
7553 {
7554 progress.Message = Lang.gen[1].Value;
7558 {
7560 }
7561 double num1081 = (double)Main.maxTilesX / 4200.0;
7562 GenVars.PyrX =
new int[
random9 + 3];
7563 GenVars.PyrY =
new int[
random9 + 3];
7566 {
7572 {
7576 bool flag65 = origin5.X > GenVars.snowOriginLeft - 300 && origin5.X < GenVars.snowOriginRight + 300;
7578 if (
num1083 >= Main.maxTilesX)
7579 {
7581 }
7582 if (
num1083 >= Main.maxTilesX * 2)
7583 {
7585 }
7587 }
7590 {
7593 {
7595 {
7599 break;
7600 }
7601 }
7602 }
7603 }
7604 });
7606 {
7609 {
7612 while ((
double)
num1070 > (
double)Main.maxTilesX * 0.4 && (
double)
num1070 < (
double)Main.maxTilesX * 0.6)
7613 {
7615 }
7618 {
7619 double num1072 = (double)Main.maxTilesX / 4200.0;
7621 }
7623 {
7625 }
7627 {
7629 }
7633 {
7635 }
7637 {
7639 }
7642 {
7644 }
7646 {
7648 }
7650 {
7653 }
7655 {
7658 }
7660 {
7661 continue;
7662 }
7665 {
7667 {
7670 {
7672 }
7674 {
7676 }
7677 }
7679 {
7681 {
7683 {
7687 }
7690 {
7692 }
7694 {
7696 }
7699 {
7701 {
7703 }
7704 }
7705 break;
7706 }
7707 }
7708 }
7709 }
7710 });
7712 {
7713 int num1064 = (int)((
double)Main.maxTilesX * 0.013);
7715 {
7717 }
7719 {
7721 int num1067 =
genRand.Next((
int)Main.worldSurface, (
int)Main.rockLayer);
7723 {
7724 num1067 =
genRand.Next((
int)Main.rockLayer - 100, Main.maxTilesY - 350);
7725 }
7726 while ((
double)
num1066 > (
double)Main.maxTilesX * 0.46 && (
double)
num1066 < (
double)Main.maxTilesX * 0.54 && (
double)
num1067 < Main.worldSurface + 150.0)
7727 {
7729 num1067 =
genRand.Next((
int)Main.worldSurface, (
int)Main.rockLayer);
7730 }
7734 }
7735 });
7737 {
7738 int num1058 = (int)((
double)Main.maxTilesX * 0.0015);
7740 {
7742 }
7744 {
7746 {
7747 break;
7748 }
7749 int[]
array =
new int[10];
7750 int[]
array2 =
new int[10];
7753 {
7755 {
7756 num1060 =
genRand.Next((
int)((double)Main.maxTilesX * 0.2), (int)((
double)Main.maxTilesX * 0.8));
7757 }
7758 else
7759 {
7760 while ((
double)
num1060 > (double)Main.maxTilesX * 0.4 && (
double)
num1060 < (double)Main.maxTilesX * 0.6)
7761 {
7763 }
7764 }
7765 }
7768 do
7769 {
7772 {
7774 {
7775 }
7777 {
7779 }
7783 }
7784 }
7789 {
7792 }
7793 }
7794 });
7796 {
7797 GenVars.numMCaves = 0;
7798 progress.Message = Lang.gen[2].Value;
7799 int num1050 = (int)((
double)Main.maxTilesX * 0.001);
7801 {
7803 }
7805 {
7810 int num1053 =
genRand.Next((
int)((double)Main.maxTilesX * 0.25), (int)((
double)Main.maxTilesX * 0.75));
7812 {
7815 {
7816 while (
num1053 > Main.maxTilesX / 2 - 90 &&
num1053 < Main.maxTilesX / 2 + 90)
7817 {
7818 num1053 =
genRand.Next((
int)((double)Main.maxTilesX * 0.25), (int)((
double)Main.maxTilesX * 0.75));
7819 }
7820 }
7822 {
7824 {
7827 break;
7828 }
7829 }
7830 if (
num1052 >= Main.maxTilesX / 5)
7831 {
7833 break;
7834 }
7835 }
7837 {
7839 {
7841 {
7843 {
7845 {
7847 {
7849 }
7850 }
7851 }
7853 {
7858 break;
7859 }
7860 }
7861 }
7862 }
7863 }
7864 });
7866 {
7867 progress.Message = Lang.gen[3].Value;
7870 {
7877 {
7879 }
7881 {
7883 }
7885 {
7887 {
7889 }
7891 {
7893 }
7895 {
7897 }
7898 }
7899 }
7900 });
7902 {
7903 progress.Message = Lang.gen[4].Value;
7904 double num1041 = (double)(Main.maxTilesX * Main.maxTilesY) * 0.00015;
7906 {
7908 }
7910 num1041 = (double)(Main.maxTilesX * Main.maxTilesY) * 0.0002;
7912 {
7916 {
7918 }
7920 }
7922 num1041 = (double)(Main.maxTilesX * Main.maxTilesY) * 0.0045;
7924 {
7926 }
7927 });
7929 {
7930 progress.Message = Lang.gen[5].Value;
7931 double num1037 = (double)(Main.maxTilesX * Main.maxTilesY) * 0.005;
7933 {
7936 }
7938 {
7940 {
7942 {
7944 {
7946 {
7948 }
7950 {
7952 }
7953 }
7954 }
7955 }
7956 }
7957 });
7959 {
7960 progress.Message = Lang.gen[6].Value;
7962 {
7964 }
7967 {
7969 {
7971 }
7972 }
7973 else
7974 {
7976 {
7978 }
7981 {
7983 }
7984 }
7987 {
7989 {
7991 {
7993 {
7995 {
7997 }
7998 }
7999 break;
8000 }
8001 }
8002 }
8003 });
8005 {
8006 progress.Message = Lang.gen[7].Value;
8008 for (
int num1025 = 0;
num1025 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0015);
num1025++)
8009 {
8010 double value19 = (double)
num1025 / ((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0015);
8014 {
8016 }
8020 {
8022 {
8025 }
8026 }
8027 else
8028 {
8030 {
8033 }
8034 }
8038 {
8041 }
8046 {
8049 }
8053 {
8056 }
8058 }
8059 });
8061 {
8062 progress.Message = Lang.gen[8].Value;
8064 int num1019 = (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 3
E-05);
8066 {
8068 }
8070 {
8074 {
8077 {
8079 }
8083 {
8086 }
8090 {
8093 }
8095 }
8096 }
8097 });
8099 {
8100 progress.Message = Lang.gen[9].Value;
8101 int num1011 = (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.00013);
8103 {
8105 }
8107 {
8111 {
8114 {
8116 }
8120 {
8123 }
8125 }
8126 }
8128 {
8129 num1011 = (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.00013 * 0.4);
8131 {
8133 {
8136 {
8138 }
8140 int steps =
genRand.Next(50, 200);
8143 int i5 =
genRand.Next(0, Main.maxTilesX);
8147 }
8148 }
8149 }
8150 });
8152 {
8153 progress.Message = Lang.gen[10].Value;
8154 int num992 = (int)((
double)Main.maxTilesX * 0.002);
8155 int num993 = (int)((
double)Main.maxTilesX * 0.0007);
8156 int num994 = (int)((
double)Main.maxTilesX * 0.0003);
8158 {
8162 }
8164 {
8166 while (((
double)
num996 > (double)Main.maxTilesX * 0.45 && (
double)
num996 < (double)Main.maxTilesX * 0.55) ||
num996 < GenVars.leftBeachEnd + 20 ||
num996 > GenVars.rightBeachStart - 20)
8167 {
8169 }
8171 {
8173 {
8174 TileRunner(
num996,
num997,
genRand.Next(3, 6),
genRand.Next(5, 50), -1, addTile:
false, (double)
genRand.
Next(-10, 11) * 0.1, 1.0);
8175 break;
8176 }
8177 }
8178 }
8181 {
8184 {
8186 }
8188 {
8190 {
8191 TileRunner(
num999,
num1000,
genRand.Next(10, 15),
genRand.Next(50, 130), -1, addTile:
false, (double)
genRand.
Next(-10, 11) * 0.1, 2.0);
8192 break;
8193 }
8194 }
8195 }
8198 {
8201 {
8203 }
8205 {
8207 {
8208 TileRunner(
num1002,
num1003,
genRand.Next(12, 25),
genRand.Next(150, 500), -1, addTile:
false, (double)
genRand.
Next(-10, 11) * 0.1, 4.0);
8209 TileRunner(
num1002,
num1003,
genRand.Next(8, 17),
genRand.Next(60, 200), -1, addTile:
false, (double)
genRand.
Next(-10, 11) * 0.1, 2.0);
8210 TileRunner(
num1002,
num1003,
genRand.Next(5, 13),
genRand.Next(40, 170), -1, addTile:
false, (double)
genRand.
Next(-10, 11) * 0.1, 2.0);
8211 break;
8212 }
8213 }
8214 }
8217 {
8219 while (((
double)
num1005 > (
double)Main.maxTilesX * 0.4 && (
double)
num1005 < (
double)Main.maxTilesX * 0.6) ||
num1005 < GenVars.leftBeachEnd + 20 ||
num1005 > GenVars.rightBeachStart - 20)
8220 {
8222 }
8224 {
8226 {
8227 TileRunner(
num1005,
num1006,
genRand.Next(7, 12),
genRand.Next(150, 250), -1, addTile:
false, 0.0, 1.0,
noYChange:
true);
8228 break;
8229 }
8230 }
8231 }
8233 double num1007 = (double)Main.maxTilesX / 4200.0;
8235 {
8236 try
8237 {
8238 int num1009 = (int)Main.rockLayer;
8239 int num1010 = Main.maxTilesY - 400;
8241 {
8243 }
8245 }
8246 catch
8247 {
8248 }
8249 }
8250 });
8252 {
8254 {
8256 double num983 = (double)Main.maxTilesX / 4200.0;
8259 if (Main.remixWorld)
8260 {
8262 }
8266 {
8269 int num989 =
genRand.Next((
int)Main.worldSurface + 100, Main.UnderworldLayer - 100);
8272 {
8275 {
8276 break;
8277 }
8278 num989 =
genRand.Next((
int)Main.worldSurface + 100, Main.UnderworldLayer - 100);
8279 }
8283 try
8284 {
8286 }
8287 catch
8288 {
8289 }
8290 }
8291 }
8292 });
8294 {
8295 progress.Message = Lang.gen[56].Value;
8296 GenVars.snowTop = (int)Main.worldSurface;
8300 {
8301 num976 = Main.maxTilesY - 250;
8303 }
8308 {
8313 {
8316 }
8318 {
8320 {
8323 }
8324 }
8325 else if (
genRand.Next(4) == 0)
8326 {
8329 }
8333 {
8335 {
8337 {
8339 }
8341 {
8342 case 0:
8343 case 2:
8344 case 23:
8345 case 40:
8346 case 53:
8348 break;
8349 case 1:
8351 break;
8352 }
8353 }
8354 else
8355 {
8358 {
8361 {
8363 }
8364 }
8366 {
8368 }
8370 {
8372 }
8374 {
8376 {
8378 }
8380 {
8381 case 0:
8382 case 2:
8383 case 23:
8384 case 40:
8385 case 53:
8387 break;
8388 case 1:
8390 break;
8391 }
8392 }
8393 }
8394 }
8396 {
8397 GenVars.snowBottom =
num980;
8398 }
8399 }
8400 });
8402 {
8403 double num971 = (double)(Main.maxTilesX * Main.maxTilesY) * 0.002;
8405 {
8409 if (
num974 >= Main.maxTilesY)
8410 {
8411 num974 = Main.maxTilesY - 2;
8412 }
8414 {
8417 }
8420 if (
num974 >= Main.maxTilesY)
8421 {
8422 num974 = Main.maxTilesY - 2;
8423 }
8425 {
8428 }
8429 }
8430 });
8433 {
8434 progress.Message = Lang.gen[77].Value;
8437 {
8439 {
8441 {
8444 }
8445 progress.Set(0.2 * ((
double)(
num966 * Main.maxTilesY +
num967) / (
double)(Main.maxTilesX * Main.maxTilesY)));
8446 }
8447 }
8450 double num968 = Main.maxTilesX - 20;
8452 {
8456 }
8457 });
8459 {
8460 progress.Message = Lang.gen[78].Value;
8461 Main.tileSolid[484] = false;
8464 int num960 = Main.maxTilesX / 2;
8471 {
8476 if (++
num962 > Main.maxTilesX / 4)
8477 {
8482 {
8483 GenVars.skipDesertTileCheck = true;
8484 }
8485 }
8486 }
8488 {
8490 {
8492 {
8494 {
8496 {
8498 }
8499 }
8500 }
8501 }
8502 }
8503 });
8505 {
8506 GenVars.numIslandHouses = 0;
8507 GenVars.skyIslandHouseCount = 0;
8508 progress.Message = Lang.gen[12].Value;
8509 int num948 = (int)((
double)Main.maxTilesX * 0.0008);
8513 {
8515 int num952 = Main.maxTilesX;
8517 {
8519 int num953 =
genRand.Next((
int)((double)Main.maxTilesX * 0.1), (int)((
double)Main.maxTilesX * 0.9));
8520 while (
num953 > Main.maxTilesX / 2 - 150 &&
num953 < Main.maxTilesX / 2 + 150)
8521 {
8522 num953 =
genRand.Next((
int)((double)Main.maxTilesX * 0.1), (int)((
double)Main.maxTilesX * 0.9));
8523 }
8525 {
8527 {
8529 break;
8530 }
8531 }
8533 {
8537 {
8539 {
8542 break;
8543 }
8544 }
8546 {
8550 val =
Math.
Min(val, (
int)GenVars.worldSurfaceLow - 50);
8552 {
8555 }
8556 else
8557 {
8560 {
8562 {
8565 }
8566 else
8567 {
8570 }
8571 }
8572 else
8573 {
8575 {
8576 num957 = ((GenVars.crimsonLeft &&
num953 < Main.maxTilesX / 2) ? 5 : ((
GenVars.crimsonLeft ||
num953 <= Main.maxTilesX / 2) ? 4 : 5));
8577 }
8579 {
8581 }
8582 else if (Main.tenthAnniversaryWorld)
8583 {
8585 }
8587 }
8588 }
8594 }
8595 }
8596 }
8597 }
8598 });
8600 {
8601
8602
8603 progress.Message = Lang.gen[13].Value;
8605 {
8607 {
8609 {
8611 {
8613 }
8614 }
8615 }
8616 }
8617 double num929 = (double)Main.maxTilesX / 700.0;
8619 {
8621 }
8623 {
8627 {
8628 int num932 =
genRand.Next((
int)((double)Main.maxTilesX * 0.2), (int)((
double)Main.maxTilesX * 0.8));
8629 if (
num931 > Main.maxTilesX / 4)
8630 {
8631 num932 =
genRand.Next((
int)((double)Main.maxTilesX * 0.25), (int)((
double)Main.maxTilesX * 0.975));
8632 }
8638 {
8640 {
8642 {
8644 {
8646 break;
8647 }
8649 {
8651 break;
8652 }
8653 }
8654 else
8655 {
8657 }
8658 }
8659 }
8661 {
8663 {
8665 {
8667 }
8668 }
8669 }
8671 {
8674 {
8678 }
8682 }
8684 if (
num931 > Main.maxTilesX / 2)
8685 {
8686 break;
8687 }
8688 }
8689 }
8691 {
8694 {
8696 {
8699 }
8700 }
8701 }
8703 {
8705 {
8707 {
8710 {
8712 {
8714 {
8716 {
8718 }
8720 {
8722 }
8723 }
8725 {
8728 {
8730 }
8732 {
8734 }
8735 }
8737 {
8740 {
8742 }
8744 {
8746 }
8747 }
8748 }
8749 }
8751 {
8755 {
8757 }
8758 }
8759 }
8760 }
8761 }
8762 });
8764 {
8765 progress.Message = Lang.gen[80].Value;
8767 double num923 = (double)(Main.maxTilesX - 160) / (double)
num922;
8772 {
8777 {
8779 }
8780 while ((
double)
origin4.X > (
double)Main.maxTilesX * 0.45 && (
double)
origin4.X < (
double)Main.maxTilesX * 0.55)
8781 {
8783 }
8786 {
8789 }
8790 else if (
num924 > Main.maxTilesX * 10)
8791 {
8795 }
8796 }
8797 });
8799 {
8800 progress.Message = Lang.gen[81].Value;
8802 double num917 = (double)(Main.maxTilesX - 200) / (double)
num916;
8807 {
8812 {
8814 }
8815 while ((
double)
point3.X > (
double)Main.maxTilesX * 0.45 && (
double)
point3.X < (
double)Main.maxTilesX * 0.55)
8816 {
8818 }
8821 {
8824 }
8825 else if (
num918 > Main.maxTilesX * 10)
8826 {
8830 }
8831 }
8834 {
8836 }
8837 });
8839 {
8840 progress.Message = Lang.gen[14].Value;
8841 double num914 = (double)(Main.maxTilesX * Main.maxTilesY) * 0.001;
8843 {
8846 {
8847 TileRunner(
genRand.Next(0, Main.maxTilesX),
genRand.Next((
int)Main.worldSurface, (
int)
GenVars.
rockLayerLow),
genRand.Next(2, 6),
genRand.Next(2, 40), 59, addTile:
false, 0.0, 0.0,
noYChange:
false,
overRide:
true, 53);
8848 }
8849 else
8850 {
8851 TileRunner(
genRand.Next(0, Main.maxTilesX),
genRand.Next((
int)
GenVars.
rockLayerLow, Main.maxTilesY),
genRand.Next(2, 6),
genRand.Next(2, 40), 59, addTile:
false, 0.0, 0.0,
noYChange:
false,
overRide:
true, 53);
8852 }
8853 }
8854 });
8856 {
8857 progress.Message = Lang.gen[15].Value;
8858 for (
int num908 = 0;
num908 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0001);
num908++)
8859 {
8863 {
8864 num910 =
genRand.Next((
int)Main.worldSurface, (int)Main.rockLayer);
8865 }
8867 {
8869 }
8870 }
8871 for (
int num911 = 0;
num911 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0005);
num911++)
8872 {
8876 {
8877 num913 =
genRand.Next((
int)Main.worldSurface, (int)Main.rockLayer);
8878 }
8880 {
8882 }
8883 }
8884 });
8886 {
8887 progress.Message = Lang.gen[16].Value;
8889 {
8890 for (
int num878 = 0;
num878 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 6
E-05);
num878++)
8891 {
8893 {
8895 {
8896 GenVars.copper = 7;
8897 }
8898 else
8899 {
8900 GenVars.copper = 166;
8901 }
8902 }
8904 }
8905 for (
int num879 = 0;
num879 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 8
E-05);
num879++)
8906 {
8908 {
8910 {
8911 GenVars.copper = 7;
8912 }
8913 else
8914 {
8915 GenVars.copper = 166;
8916 }
8917 }
8919 }
8920 for (
int num880 = 0;
num880 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0002);
num880++)
8921 {
8923 {
8925 {
8926 GenVars.copper = 7;
8927 }
8928 else
8929 {
8930 GenVars.copper = 166;
8931 }
8932 }
8934 }
8935 for (
int num881 = 0;
num881 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 3
E-05);
num881++)
8936 {
8938 {
8940 {
8941 GenVars.iron = 6;
8942 }
8943 else
8944 {
8945 GenVars.iron = 167;
8946 }
8947 }
8949 }
8950 for (
int num882 = 0;
num882 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 8
E-05);
num882++)
8951 {
8953 {
8955 {
8956 GenVars.iron = 6;
8957 }
8958 else
8959 {
8960 GenVars.iron = 167;
8961 }
8962 }
8964 }
8965 for (
int num883 = 0;
num883 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0002);
num883++)
8966 {
8968 {
8970 {
8971 GenVars.iron = 6;
8972 }
8973 else
8974 {
8975 GenVars.iron = 167;
8976 }
8977 }
8979 }
8980 for (
int num884 = 0;
num884 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 2.6E-05);
num884++)
8981 {
8983 {
8985 {
8986 GenVars.silver = 9;
8987 }
8988 else
8989 {
8990 GenVars.silver = 168;
8991 }
8992 }
8994 }
8995 for (
int num885 = 0;
num885 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.00015);
num885++)
8996 {
8998 {
9000 {
9001 GenVars.silver = 9;
9002 }
9003 else
9004 {
9005 GenVars.silver = 168;
9006 }
9007 }
9009 }
9010 for (
int num886 = 0;
num886 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.00017);
num886++)
9011 {
9013 {
9015 {
9016 GenVars.silver = 9;
9017 }
9018 else
9019 {
9020 GenVars.silver = 168;
9021 }
9022 }
9024 }
9025 for (
int num887 = 0;
num887 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.00012);
num887++)
9026 {
9028 {
9030 {
9031 GenVars.gold = 8;
9032 }
9033 else
9034 {
9035 GenVars.gold = 169;
9036 }
9037 }
9039 }
9040 for (
int num888 = 0;
num888 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.00012);
num888++)
9041 {
9043 {
9045 {
9046 GenVars.gold = 8;
9047 }
9048 else
9049 {
9050 GenVars.gold = 169;
9051 }
9052 }
9054 }
9056 {
9057 for (
int num889 = 0;
num889 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 2.25E-05 / 2.0);
num889++)
9058 {
9060 }
9061 for (
int num890 = 0;
num890 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 2.25E-05 / 2.0);
num890++)
9062 {
9064 }
9065 }
9067 {
9068 for (
int num891 = 0;
num891 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 4.25E-05);
num891++)
9069 {
9071 }
9072 }
9073 else
9074 {
9075 for (
int num892 = 0;
num892 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 4.25E-05);
num892++)
9076 {
9078 }
9079 }
9080 }
9081 else
9082 {
9083 for (
int num893 = 0;
num893 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 6
E-05);
num893++)
9084 {
9086 {
9088 {
9089 GenVars.copper = 7;
9090 }
9091 else
9092 {
9093 GenVars.copper = 166;
9094 }
9095 }
9097 }
9098 for (
int num894 = 0;
num894 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 8
E-05);
num894++)
9099 {
9101 {
9103 {
9104 GenVars.copper = 7;
9105 }
9106 else
9107 {
9108 GenVars.copper = 166;
9109 }
9110 }
9112 }
9113 for (
int num895 = 0;
num895 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0002);
num895++)
9114 {
9116 {
9118 {
9119 GenVars.copper = 7;
9120 }
9121 else
9122 {
9123 GenVars.copper = 166;
9124 }
9125 }
9127 }
9128 for (
int num896 = 0;
num896 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 3
E-05);
num896++)
9129 {
9131 {
9133 {
9134 GenVars.iron = 6;
9135 }
9136 else
9137 {
9138 GenVars.iron = 167;
9139 }
9140 }
9142 }
9143 for (
int num897 = 0;
num897 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 8
E-05);
num897++)
9144 {
9146 {
9148 {
9149 GenVars.iron = 6;
9150 }
9151 else
9152 {
9153 GenVars.iron = 167;
9154 }
9155 }
9157 }
9158 for (
int num898 = 0;
num898 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0002);
num898++)
9159 {
9161 {
9163 {
9164 GenVars.iron = 6;
9165 }
9166 else
9167 {
9168 GenVars.iron = 167;
9169 }
9170 }
9172 }
9173 for (
int num899 = 0;
num899 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 2.6E-05);
num899++)
9174 {
9176 {
9178 {
9179 GenVars.silver = 9;
9180 }
9181 else
9182 {
9183 GenVars.silver = 168;
9184 }
9185 }
9187 }
9188 for (
int num900 = 0;
num900 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.00015);
num900++)
9189 {
9191 {
9193 {
9194 GenVars.silver = 9;
9195 }
9196 else
9197 {
9198 GenVars.silver = 168;
9199 }
9200 }
9202 }
9203 for (
int num901 = 0;
num901 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.00017);
num901++)
9204 {
9206 {
9208 {
9209 GenVars.silver = 9;
9210 }
9211 else
9212 {
9213 GenVars.silver = 168;
9214 }
9215 }
9217 }
9218 for (
int num902 = 0;
num902 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.00012);
num902++)
9219 {
9221 {
9223 {
9224 GenVars.gold = 8;
9225 }
9226 else
9227 {
9228 GenVars.gold = 169;
9229 }
9230 }
9232 }
9233 for (
int num903 = 0;
num903 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.00012);
num903++)
9234 {
9236 {
9238 {
9239 GenVars.gold = 8;
9240 }
9241 else
9242 {
9243 GenVars.gold = 169;
9244 }
9245 }
9247 }
9249 {
9250 for (
int num904 = 0;
num904 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 2.25E-05 / 2.0);
num904++)
9251 {
9253 }
9254 for (
int num905 = 0;
num905 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 2.25E-05 / 2.0);
num905++)
9255 {
9257 }
9258 }
9260 {
9261 for (
int num906 = 0;
num906 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 2.25E-05);
num906++)
9262 {
9264 }
9265 }
9266 else
9267 {
9268 for (
int num907 = 0;
num907 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 2.25E-05);
num907++)
9269 {
9271 }
9272 }
9273 }
9274 });
9276 {
9277 progress.Message = Lang.gen[17].Value;
9278 for (
int num874 = 0;
num874 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0006);
num874++)
9279 {
9283 {
9286 }
9288 {
9290 {
9292 }
9296 {
9298 }
9300 {
9301 }
9304 {
9305 TileRunner(
num875,
num876,
genRand.Next(4, 11),
genRand.Next(2, 4), 51, addTile:
true,
num877, -1.0,
noYChange:
false,
overRide:
false);
9306 }
9307 }
9308 }
9309 });
9311 {
9312 progress.Message = Lang.gen[18].Value;
9316 {
9318 if (
num838 < Main.maxTilesY - 190)
9319 {
9320 num838 = Main.maxTilesY - 190;
9321 }
9323 {
9324 num838 = Main.maxTilesY - 160;
9325 }
9327 {
9329 {
9333 }
9334 else
9335 {
9337 }
9338 }
9339 }
9342 {
9344 if (
num841 > Main.maxTilesY - 60)
9345 {
9346 num841 = Main.maxTilesY - 60;
9347 }
9348 if (
num841 < Main.maxTilesY - 100)
9349 {
9350 num841 = Main.maxTilesY - 120;
9351 }
9353 {
9355 {
9358 }
9359 }
9360 }
9362 {
9364 {
9365 int num845 = Main.maxTilesY - 65;
9367 {
9369 }
9370 TileRunner(
genRand.Next(0, Main.maxTilesX),
num845 +
genRand.Next(20, 50),
genRand.Next(15, 20), 1000, 57, addTile:
true, 0.0,
genRand.
Next(1, 3),
noYChange:
true);
9371 }
9372 }
9373 Liquid.QuickWater(-2);
9375 {
9376 double num847 = (double)
num846 / (
double)(Main.maxTilesX - 1);
9379 {
9380 int num848 = Main.maxTilesY - 65;
9382 {
9384 }
9386 {
9387 TileRunner(
num846,
num848 -
genRand.Next(2, 5),
genRand.Next(5, 30), 1000, 57, addTile:
true, 0.0,
genRand.
Next(1, 3),
noYChange:
true);
9388 }
9391 {
9393 }
9395 {
9397 {
9398 TileRunner(
num846,
num848 -
genRand.Next(2, 5), (
int)((
double)
genRand.Next(5, 15) *
num849), (
int)((
double)
genRand.Next(10, 15) *
num849), 57, addTile:
true, 1.0, 0.3);
9399 }
9401 {
9403 TileRunner(
num846,
num848 -
genRand.Next(2, 5), (
int)((
double)
genRand.Next(5, 15) *
num849), (
int)((
double)
genRand.Next(10, 15) *
num849), 57, addTile:
true, -1.0, 0.3);
9404 }
9405 }
9406 TileRunner(
num846 +
genRand.Next(-10, 10),
num848 +
genRand.Next(-10, 10),
genRand.Next(5, 15),
genRand.Next(5, 10), -2, addTile:
false,
genRand.
Next(-1, 3),
genRand.
Next(-1, 3));
9408 {
9409 TileRunner(
num846 +
genRand.Next(-10, 10),
num848 +
genRand.Next(-10, 10),
genRand.Next(10, 30),
genRand.Next(10, 20), -2, addTile:
false,
genRand.
Next(-1, 3),
genRand.
Next(-1, 3));
9410 }
9412 {
9413 TileRunner(
num846 +
genRand.Next(-15, 15),
num848 +
genRand.Next(-15, 10),
genRand.Next(15, 30),
genRand.Next(5, 20), -2, addTile:
false,
genRand.
Next(-1, 3),
genRand.
Next(-1, 3));
9414 }
9415 }
9416 }
9418 {
9420 }
9422 {
9424 {
9425 TileRunner(
genRand.Next((
int)((
double)Main.maxTilesX * 0.35), (
int)((
double)Main.maxTilesX * 0.65)),
genRand.Next(Main.maxTilesY - 180, Main.maxTilesY - 10),
genRand.Next(5, 20),
genRand.Next(5, 10), -2);
9426 }
9427 }
9429 {
9430 if (!Main.tile[
num852, Main.maxTilesY - 145].active())
9431 {
9432 Main.tile[
num852, Main.maxTilesY - 145].liquid =
byte.MaxValue;
9433 Main.tile[
num852, Main.maxTilesY - 145].lava(lava:
true);
9434 }
9435 if (!Main.tile[
num852, Main.maxTilesY - 144].active())
9436 {
9437 Main.tile[
num852, Main.maxTilesY - 144].liquid =
byte.MaxValue;
9438 Main.tile[
num852, Main.maxTilesY - 144].lava(lava:
true);
9439 }
9440 }
9441 for (
int num853 = 0;
num853 < (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0008);
num853++)
9442 {
9444 }
9446 {
9447 int num854 = (int)((
double)Main.maxTilesX * 0.38);
9448 int num855 = (int)((
double)Main.maxTilesX * 0.62);
9450 int num857 = Main.maxTilesY - 1;
9451 int num858 = Main.maxTilesY - 135;
9452 int num859 = Main.maxTilesY - 160;
9454 Liquid.QuickWater(-2);
9456 {
9458 {
9461 {
9463 }
9464 }
9466 {
9468 if (
num857 > Main.maxTilesY - 1)
9469 {
9470 num857 = Main.maxTilesY - 1;
9471 }
9472 }
9473 else
9474 {
9476 {
9478 {
9480 }
9481 else if (
genRand.Next(6) == 0)
9482 {
9484 }
9485 else if (
genRand.Next(8) == 0)
9486 {
9488 }
9489 }
9491 {
9493 }
9495 {
9497 }
9498 }
9500 {
9502 }
9504 {
9508 }
9509 }
9510 Liquid.QuickWater(-2);
9512 {
9514 {
9516 if (Main.tile[
num862,
num863].type == 57 && Main.tile[
num862,
num863].active() && (!Main.tile[
num862 - 1,
num863 - 1].active() || !Main.tile[
num862,
num863 - 1].active() || !Main.tile[
num862 + 1,
num863 - 1].active() || !Main.tile[
num862 - 1,
num863].active() || !Main.tile[
num862 + 1,
num863].active() || !Main.tile[
num862 - 1,
num863 + 1].active() || !Main.tile[
num862,
num863 + 1].active() || !Main.tile[
num862 + 1,
num863 + 1].active()))
9517 {
9519 }
9520 }
9521 }
9523 {
9525 {
9527 {
9529 }
9530 }
9531 }
9532 }
9534 {
9536 {
9537 if ((
double)
num866 < (
double)Main.maxTilesX * 0.17 || (
double)
num866 > (
double)Main.maxTilesX * 0.83)
9538 {
9540 {
9541 if (Main.tile[
num866,
num867].type == 57 && Main.tile[
num866,
num867].active() && (!Main.tile[
num866 - 1,
num867 - 1].active() || !Main.tile[
num866,
num867 - 1].active() || !Main.tile[
num866 + 1,
num867 - 1].active() || !Main.tile[
num866 - 1,
num867].active() || !Main.tile[
num866 + 1,
num867].active() || !Main.tile[
num866 - 1,
num867 + 1].active() || !Main.tile[
num866,
num867 + 1].active() || !Main.tile[
num866 + 1,
num867 + 1].active()))
9542 {
9544 }
9545 }
9546 }
9547 }
9549 {
9550 if ((
double)
num868 < (double)Main.maxTilesX * 0.17 || (
double)
num868 > (double)Main.maxTilesX * 0.83)
9551 {
9553 {
9555 {
9557 }
9558 }
9559 }
9560 }
9561 }
9564 {
9566 {
9568 {
9569 if (Main.tile[
num870,
num871].type == 57 && Main.tile[
num870,
num871].active() && (!Main.tile[
num870 - 1,
num871 - 1].active() || !Main.tile[
num870,
num871 - 1].active() || !Main.tile[
num870 + 1,
num871 - 1].active() || !Main.tile[
num870 - 1,
num871].active() || !Main.tile[
num870 + 1,
num871].active() || !Main.tile[
num870 - 1,
num871 + 1].active() || !Main.tile[
num870,
num871 + 1].active() || !Main.tile[
num870 + 1,
num871 + 1].active()))
9570 {
9572 }
9573 }
9574 }
9576 {
9578 {
9580 {
9582 }
9583 }
9584 }
9585 }
9586 });
9588 {
9589 int num778 = Main.maxTilesX;
9591 int num780 = Main.maxTilesX;
9594 {
9596 {
9598 {
9600 {
9602 {
9604 }
9606 {
9608 }
9609 }
9611 {
9613 {
9615 }
9617 {
9619 }
9620 }
9621 }
9622 }
9623 }
9632 double num787 = (double)Main.maxTilesX * 0.00045;
9634 {
9636 }
9638 {
9641 }
9643 {
9646 }
9648 {
9649 progress.Message = Lang.gen[72].Value;
9651 {
9663 {
9665 int num796 = Main.maxTilesX / 2;
9668 {
9671 }
9672 else
9673 {
9675 }
9679 {
9681 }
9683 {
9685 }
9687 {
9689 }
9691 {
9693 }
9695 {
9697 }
9699 {
9700 num794 = Main.maxTilesX - 400;
9701 }
9703 {
9705 }
9707 {
9709 {
9711 {
9713 }
9715 {
9717 }
9719 {
9721 }
9722 }
9724 {
9726 }
9728 {
9730 }
9732 {
9734 }
9736 {
9740 }
9742 {
9746 }
9747 }
9748 }
9751 {
9753 {
9755 {
9758 {
9760 {
9762 }
9763 }
9764 break;
9765 }
9766 }
9767 }
9768 double num802 = Main.worldSurface + 40.0;
9770 {
9772 if (
num802 < Main.worldSurface + 30.0)
9773 {
9774 num802 = Main.worldSurface + 30.0;
9775 }
9776 if (
num802 > Main.worldSurface + 50.0)
9777 {
9778 num802 = Main.worldSurface + 50.0;
9779 }
9782 {
9784 {
9786 {
9788 }
9789 if ((
double)
num804 < Main.worldSurface - 1.0 && !
flag51)
9790 {
9792 {
9795 }
9797 {
9800 }
9801 }
9804 {
9806 }
9808 {
9810 }
9812 {
9814 {
9816 }
9817 }
9819 {
9821 }
9823 {
9825 }
9827 {
9829 }
9831 {
9833 }
9835 {
9837 }
9838 }
9839 }
9840 }
9843 {
9848 {
9851 int num810 =
genRand.Next((
int)(Main.worldSurface - (
double)(
num808 / 2)), (
int)(Main.worldSurface + 100.0 + (
double)
num808));
9853 {
9855 num810 =
genRand.Next((
int)(Main.worldSurface - (
double)(
num808 / 2)), (
int)(Main.worldSurface + 100.0 + (
double)
num808));
9856 }
9858 {
9861 }
9863 {
9865 {
9866 }
9868 }
9869 else
9870 {
9872 {
9874 }
9875 }
9877 {
9880 {
9882 }
9883 }
9885 {
9887 }
9888 }
9889 }
9890 }
9892 }
9894 {
9896 }
9898 {
9899 progress.Message = Lang.gen[20].Value;
9901 {
9913 {
9915 int num819 = Main.maxTilesX / 2;
9921 {
9923 }
9925 {
9927 }
9929 {
9931 }
9933 {
9935 }
9937 {
9939 }
9941 {
9943 {
9945 {
9947 }
9949 {
9951 }
9953 {
9955 }
9956 }
9958 {
9960 }
9962 {
9964 }
9966 {
9968 }
9970 {
9974 }
9976 {
9980 }
9981 }
9982 }
9985 {
9987 {
9989 }
9991 {
9993 {
9995 {
9997 {
10000 }
10002 {
10006 }
10007 break;
10008 }
10009 }
10010 }
10012 {
10014 {
10017 {
10019 {
10021 }
10022 }
10023 break;
10024 }
10025 }
10026 }
10027 double num827 = Main.worldSurface + 40.0;
10029 {
10031 if (
num827 < Main.worldSurface + 30.0)
10032 {
10033 num827 = Main.worldSurface + 30.0;
10034 }
10035 if (
num827 > Main.worldSurface + 50.0)
10036 {
10037 num827 = Main.worldSurface + 50.0;
10038 }
10041 {
10043 {
10045 {
10047 }
10048 if ((
double)
num829 < Main.worldSurface - 1.0 && !
flag54)
10049 {
10051 {
10054 }
10056 {
10059 }
10060 }
10063 {
10065 }
10067 {
10069 }
10071 {
10073 {
10075 }
10076 }
10078 {
10080 }
10082 {
10084 }
10086 {
10088 }
10090 {
10092 }
10094 {
10096 }
10097 }
10098 }
10099 }
10101 {
10103 {
10105 {
10111 {
10113 {
10115 {
10117 {
10121 {
10123 }
10124 }
10126 {
10128 }
10129 }
10130 }
10131 }
10132 }
10133 }
10134 }
10135 }
10136 }
10137 });
10139 {
10140 progress.Message = Lang.gen[19].Value;
10141 double num759 = (double)Main.maxTilesX / 4200.0;
10144 {
10145 int num762 = Main.maxTilesX / 4;
10147 {
10148 break;
10149 }
10153 {
10158 {
10159 num763 =
genRand.Next((
int)((double)Main.maxTilesX * 0.15), (int)((
double)Main.maxTilesX * 0.85));
10160 }
10161 else
10162 {
10163 while ((
double)
num763 > (double)Main.maxTilesX * 0.45 && (
double)
num763 < (double)Main.maxTilesX * 0.55)
10164 {
10166 }
10167 }
10169 {
10171 {
10173 break;
10174 }
10175 }
10177 {
10179 {
10181 break;
10182 }
10183 }
10185 {
10187 {
10189 break;
10190 }
10191 }
10193 {
10196 {
10199 {
10201 break;
10202 }
10203 }
10205 {
10207 }
10209 {
10212 {
10214 {
10216 {
10218 break;
10219 }
10220 }
10221 }
10223 {
10227 {
10229 if ((
double)
num767 > Main.worldSurface - 50.0)
10230 {
10232 }
10233 }
10235 {
10238 {
10241 {
10243 }
10244 }
10246 {
10249 {
10251 {
10253 {
10255 }
10256 }
10257 }
10260 {
10264 break;
10265 }
10266 }
10267 }
10268 }
10269 }
10270 }
10271 }
10272 }
10273 });
10275 {
10278 int num755 = (int)((Main.worldSurface + Main.rockLayer) / 2.0) +
genRand.Next(-200, 200);
10279 int num756 = (int)((Main.worldSurface + Main.rockLayer) / 2.0) + 200;
10283 {
10285 {
10287 break;
10288 }
10289 }
10291 {
10293 {
10294 }
10295 }
10297 {
10298 num757 = (int)Main.worldSurface + 70;
10299 }
10301 });
10303 {
10305 {
10307 {
10309 {
10310 case 123:
10312 break;
10313 case 59:
10314 {
10318 {
10320 {
10322 {
10324 break;
10325 }
10326 }
10327 }
10329 {
10331 }
10332 break;
10333 }
10334 case 1:
10336 break;
10337 }
10338 }
10339 }
10340 });
10342 {
10343 progress.Message = Lang.gen[21].Value;
10345 {
10350 }
10351 });
10353 {
10355 progress.Message = Lang.gen[22].Value;
10359 {
10360 if (genRand.Next(2) == 0)
10361 {
10362 floridaStyle = true;
10363 }
10364 else
10365 {
10366 floridaStyle2 = true;
10367 }
10368 }
10370 {
10374 {
10378 {
10380 }
10383 {
10385 }
10390 {
10391 }
10392 GenVars.shellStartYLeft =
num738;
10395 {
10397 {
10400 }
10401 else
10402 {
10404 }
10407 {
10409 {
10412 {
10415 }
10417 {
10420 {
10421 GenVars.shellStartXLeft =
num739;
10422 }
10423 }
10424 }
10426 {
10429 }
10431 }
10432 }
10433 }
10434 else
10435 {
10437 num734 = Main.maxTilesX;
10439 {
10441 }
10444 {
10446 }
10451 {
10452 }
10453 GenVars.shellStartXRight = 0;
10454 GenVars.shellStartYRight =
num745;
10457 {
10459 {
10462 }
10463 else
10464 {
10466 }
10469 {
10471 {
10474 {
10477 }
10479 {
10482 {
10483 GenVars.shellStartXRight =
num746;
10484 }
10485 }
10486 }
10488 {
10491 }
10493 }
10494 }
10495 }
10496 }
10497 });
10499 {
10500 progress.Message = Lang.gen[23].Value;
10501 Main.tileSolid[484] = false;
10503 {
10508 {
10509 case 67:
10510 num719 = (double)Main.maxTilesX * 0.5;
10511 break;
10512 case 66:
10513 num719 = (double)Main.maxTilesX * 0.45;
10514 break;
10515 case 63:
10516 num719 = (double)Main.maxTilesX * 0.3;
10517 break;
10518 case 65:
10519 num719 = (double)Main.maxTilesX * 0.25;
10520 break;
10521 case 64:
10522 num719 = (double)Main.maxTilesX * 0.1;
10523 break;
10524 case 68:
10525 num719 = (double)Main.maxTilesX * 0.05;
10526 break;
10527 }
10530 {
10532 int num722 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY);
10534 {
10536 num722 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY);
10537 }
10539 }
10540 }
10542 {
10545 int num726 = Main.maxTilesX - 5;
10547 {
10549 num725 = Main.maxTilesX - 5;
10551 }
10553 {
10555 {
10557 {
10559 {
10564 {
10566 {
10567 }
10572 }
10573 }
10574 }
10575 }
10576 }
10577 }
10578 });
10580 {
10581 progress.Message = Lang.gen[24].Value;
10583 {
10584 double value12 = (double)
num714 / (
double)(Main.maxTilesX - 1);
10589 {
10591 {
10594 {
10596 {
10598 }
10599 }
10602 }
10603 }
10604 }
10605 });
10607 {
10610 {
10612 }
10614 {
10616 {
10617 progress.Message = Lang.gen[90].Value;
10618 int num712 = genRand.Next(55, 95);
10619 if (num711 == 1)
10620 {
10621 num712 = genRand.Next(Main.maxTilesX - 95, Main.maxTilesX - 55);
10622 }
10625 {
10626 }
10628 }
10629 }
10630 });
10632 {
10633
10634
10636 int num703 = (int)(Main.worldSurface + Main.rockLayer) / 2 +
num702;
10637 int num704 = (int)((
double)((Main.maxTilesY - 250) * 2) + Main.rockLayer) / 3;
10638 if (
num704 > Main.maxTilesY - 330 - 100 - 30)
10639 {
10640 num704 = Main.maxTilesY - 330 - 100 - 30;
10641 }
10643 {
10645 }
10647 int num706 = ((GenVars.dungeonSide < 0) ?
genRand.Next((
int)((double)Main.maxTilesX * 0.89), Main.maxTilesX - 200) :
genRand.
Next(200, (int)((double)Main.maxTilesX * 0.11)));
10648 int num707 = (int)Main.worldSurface + 150;
10649 int num708 = (int)(Main.rockLayer + Main.worldSurface + 200.0) / 2;
10651 {
10653 }
10655 {
10657 }
10660 {
10663 {
10665 num706 = ((GenVars.dungeonSide < 0) ?
genRand.Next((
int)((double)Main.maxTilesX * 0.89), Main.maxTilesX - 200) :
genRand.
Next(200, (int)((double)Main.maxTilesX * 0.11)));
10666 }
10667 else if (
num709 > 20000)
10668 {
10670 num706 = ((GenVars.dungeonSide < 0) ?
genRand.Next((
int)((double)Main.maxTilesX * 0.8), Main.maxTilesX - 200) :
genRand.
Next(200, (int)((double)Main.maxTilesX * 0.2)));
10671 }
10672 else
10673 {
10675 num706 = ((GenVars.dungeonSide < 0) ?
genRand.Next((
int)((double)Main.maxTilesX * 0.89), Main.maxTilesX - 200) :
genRand.
Next(200, (int)((double)Main.maxTilesX * 0.11)));
10676 }
10677 }
10681 });
10683 {
10684 progress.Message = Lang.gen[25].Value;
10686 {
10687 double num697 = (double)
num696 / (
double)Main.maxTilesX;
10691 {
10693 {
10695 {
10697 }
10699 {
10701 {
10703 }
10705 {
10707 }
10709 {
10711 }
10713 {
10715 }
10717 {
10719 }
10721 {
10723 }
10725 {
10727 }
10728 }
10729 }
10730 else if (Main.tile[
num696,
num698].wall == 0 && Main.tile[
num696,
num698 + 1].wall == 0 && Main.tile[
num696,
num698 + 2].wall == 0 && Main.tile[
num696,
num698 + 3].wall == 0 && Main.tile[
num696,
num698 + 4].wall == 0 && Main.tile[
num696 - 1,
num698].wall == 0 && Main.tile[
num696 + 1,
num698].wall == 0 && Main.tile[
num696 - 2,
num698].wall == 0 && Main.tile[
num696 + 2,
num698].wall == 0 && !Main.tile[
num696,
num698].active() && !Main.tile[
num696,
num698 + 1].active() && !Main.tile[
num696,
num698 + 2].active() && !Main.tile[
num696,
num698 + 3].active())
10731 {
10733 }
10734 }
10735 }
10737 {
10738 double num700 = (double)
num699 / (
double)Main.maxTilesX;
10742 {
10744 {
10746 {
10748 }
10750 {
10752 {
10754 }
10756 {
10758 }
10760 {
10762 }
10764 {
10766 }
10768 {
10770 }
10772 {
10774 }
10776 {
10778 }
10779 }
10780 }
10781 else if (Main.tile[
num699,
num701].wall == 0 && Main.tile[
num699,
num701 + 1].wall == 0 && Main.tile[
num699,
num701 + 2].wall == 0 && Main.tile[
num699,
num701 + 3].wall == 0 && Main.tile[
num699,
num701 + 4].wall == 0 && Main.tile[
num699 - 1,
num701].wall == 0 && Main.tile[
num699 + 1,
num701].wall == 0 && Main.tile[
num699 - 2,
num701].wall == 0 && Main.tile[
num699 + 2,
num701].wall == 0 && !Main.tile[
num699,
num701].active() && !Main.tile[
num699,
num701 + 1].active() && !Main.tile[
num699,
num701 + 2].active() && !Main.tile[
num699,
num701 + 3].active())
10782 {
10784 }
10785 }
10786 }
10787 });
10789 {
10791 if (Main.tenthAnniversaryWorld)
10792 {
10793 int x15 = undergroundDesertLocation.Center.X;
10794 int j4 = undergroundDesertLocation.Top - 10;
10795 Pyramid(x15, j4);
10796 }
10798 {
10802 {
10803 for (; !Main.tile[num690, num691].active() && (double)num691 < Main.worldSurface; num691++)
10804 {
10805 }
10807 {
10808 int num692 = Main.maxTilesX;
10809 for (int num693 = 0; num693 < num689; num693++)
10810 {
10811 int num694 = Math.Abs(num690 - GenVars.PyrX[num693]);
10812 if (num694 < num692)
10813 {
10814 num692 = num694;
10815 }
10816 }
10819 {
10821 }
10823 {
10826 }
10827 }
10828 }
10829 }
10830 });
10832 {
10834 {
10838 {
10840 }
10841 }
10842 });
10844 {
10846 double num670 = (double)Main.maxTilesX / 4200.0;
10849 {
10851 }
10853 {
10855 }
10856 else if (Main.tenthAnniversaryWorld)
10857 {
10859 }
10861 {
10863 }
10865 {
10869 {
10871 if (
num673 > Main.maxTilesX / 2)
10872 {
10874 }
10877 {
10878 num674 =
genRand.Next((
int)((double)Main.maxTilesX * 0.15), (int)((
float)Main.maxTilesX * 0.85f));
10879 }
10881 {
10884 {
10885 }
10887 {
10890 {
10893 {
10895 {
10897 {
10899 {
10900 case 41:
10901 case 43:
10902 case 44:
10903 case 189:
10904 case 196:
10905 case 460:
10906 case 481:
10907 case 482:
10908 case 483:
10910 break;
10911 }
10912 }
10913 }
10914 }
10916 {
10918 {
10920 break;
10921 }
10922 }
10924 {
10927 {
10929 {
10931 {
10935 {
10937 }
10939 {
10941 }
10943 {
10946 {
10949 {
10951 {
10953 }
10954 }
10955 else
10956 {
10958 {
10959 }
10961 }
10964 {
10966 {
10968 {
10970 {
10971 case 41:
10972 case 43:
10973 case 44:
10974 case 189:
10975 case 196:
10976 case 460:
10977 case 481:
10978 case 482:
10979 case 483:
10981 break;
10982 }
10983 }
10984 }
10985 }
10987 {
10989 }
10990 }
10991 }
10992 }
10993 }
10994 }
10995 }
10996 }
10997 }
10998 }
10999 }
11000 }
11001 Main.tileSolid[192] = false;
11002 });
11004 {
11006 {
11008 {
11010 {
11013 {
11015 {
11017 {
11019 }
11020 }
11021 }
11023 {
11025 }
11026 }
11027 }
11028 }
11029 });
11031 {
11032
11033
11034 Main.tileSolid[484] = false;
11035 progress.Message = Lang.gen[26].Value;
11036 int num660 = (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 3.3E-06);
11038 {
11040 }
11042 {
11045 {
11047 while ((
double)
num663 > (
double)Main.maxTilesX * 0.45 && (
double)
num663 < (
double)Main.maxTilesX * 0.55)
11048 {
11050 }
11051 int num664 =
genRand.Next((
int)(Main.worldSurface * 2.0 + Main.rockLayer) / 3, (
int)(Main.rockLayer + (
double)((Main.maxTilesY - 350) * 2)) / 3);
11053 {
11054 num664 =
genRand.Next(100, (
int)((
double)Main.maxTilesY * 0.9));
11055 }
11057 {
11059 while ((
double)
num663 > (
double)Main.maxTilesX * 0.45 && (
double)
num663 < (
double)Main.maxTilesX * 0.55)
11060 {
11062 }
11063 num664 =
genRand.Next((
int)(Main.worldSurface * 2.0 + Main.rockLayer) / 3, (
int)(Main.rockLayer + (
double)((Main.maxTilesY - 350) * 2)) / 3);
11065 {
11066 num664 =
genRand.Next(100, (
int)((
double)Main.maxTilesY * 0.9));
11067 }
11068 }
11071 {
11072 style2 = (GenVars.crimsonLeft ? ((
num663 < Main.maxTilesX / 2) ? 1 : 0) : ((
num663 >= Main.maxTilesX / 2) ? 1 : 0));
11073 }
11075 {
11077 }
11079 {
11080 break;
11081 }
11082 }
11083 }
11084 });
11086 {
11089 {
11091 {
11093 {
11095 {
11098 }
11099 break;
11100 }
11101 }
11102 }
11103 });
11105 {
11107 progress.Message = Lang.gen[70].Value;
11111 while (true)
11112 {
11113 int num651 = (int)Main.rockLayer;
11114 int num652 = Main.maxTilesY - 500;
11116 {
11118 }
11122 {
11124 {
11125 num654 = ((GenVars.dungeonSide <= 0) ?
genRand.Next((
int)((double)Main.maxTilesX * 0.6), (int)((
double)Main.maxTilesX * 0.8)) :
genRand.
Next((int)((double)Main.maxTilesX * 0.2), (int)((double)Main.maxTilesX * 0.4)));
11126 }
11127 else
11128 {
11129 num654 =
genRand.Next((
int)((
double)Main.maxTilesX * 0.2), (
int)((
double)Main.maxTilesX * 0.8));
11130 while ((
double)
num654 > (
double)Main.maxTilesX * 0.4 && (
double)
num654 < (
double)Main.maxTilesX * 0.6)
11131 {
11132 num654 =
genRand.Next((
int)((
double)Main.maxTilesX * 0.2), (
int)((
double)Main.maxTilesX * 0.8));
11133 }
11134 }
11136 {
11138 }
11141 {
11145 {
11147 {
11149 {
11151 }
11152 }
11153 }
11155 {
11159 break;
11160 }
11161 }
11162 }
11164 {
11167 break;
11168 }
11170 {
11172 {
11175 {
11176 break;
11177 }
11178 }
11181 }
11182 }
11184 {
11186 int y14 = (int)Main.rockLayer + 100;
11188 {
11189 x14 = ((!
notTheBees) ? ((
GenVars.
dungeonSide > 0) ? ((int)((
double)Main.maxTilesX * 0.4)) : ((int)((double)Main.maxTilesX * 0.6))) : ((
GenVars.dungeonSide > 0) ? ((int)((double)Main.maxTilesX * 0.3)) : ((int)((double)Main.maxTilesX * 0.7))));
11190 }
11192 }
11193 });
11195 {
11196 progress.Message = Lang.gen[71].Value;
11197 double num639 = (double)Main.maxTilesX / 4200.0;
11200 {
11202 }
11207 {
11211 {
11213 }
11215 {
11221 {
11228 {
11230 }
11231 }
11232 }
11233 }
11234 });
11236 {
11238 int num614 =
genRand.Next((
int)(Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 400);
11240 num615 *= (double)Main.maxTilesX / 4200.0;
11243 {
11246 {
11250 {
11251 num613 += Main.maxTilesX / 2;
11252 }
11253 num614 =
genRand.Next((
int)(Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 400);
11258 {
11262 {
11264 {
11266 {
11268 }
11270 {
11272 }
11273 }
11274 }
11276 {
11278 }
11279 }
11281 {
11284 {
11286 }
11288 {
11290 }
11292 {
11294 }
11296 {
11298 }
11300 {
11302 }
11304 {
11306 {
11311 }
11312 }
11314 {
11316 {
11319 }
11320 }
11324 {
11330 {
11332 }
11333 }
11335 {
11337 {
11339 }
11340 }
11342 {
11344 {
11346 }
11347 }
11349 {
11353 {
11358 }
11359 }
11363 {
11365 {
11368 }
11371 }
11377 }
11378 else if (
num616 > Main.maxTilesX * 10)
11379 {
11382 break;
11383 }
11384 }
11385 }
11386 Main.tileSolid[137] = false;
11387 });
11389 {
11390 progress.Message = Lang.gen[27].Value;
11392 {
11394 }
11396 Liquid.QuickWater(3);
11399 Liquid.quickSettle = true;
11402 {
11403 int num608 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer;
11407 while (Liquid.numLiquid > 0)
11408 {
11411 {
11412 break;
11413 }
11414 double num611 = (double)(
num608 - (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer)) / (
double)
num608;
11415 if (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer >
num608)
11416 {
11417 num608 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer;
11418 }
11420 {
11422 }
11423 else
11424 {
11426 }
11428 {
11430 }
11433 {
11435 }
11436 Liquid.UpdateLiquid();
11437 }
11440 }
11441 Liquid.quickSettle = false;
11443 Main.tileSolid[484] = false;
11444 });
11446 {
11449 {
11451 {
11453 {
11456 {
11459 {
11462 {
11463 break;
11464 }
11466 }
11467 }
11468 break;
11469 }
11470 }
11471 }
11472 Main.tileSolid[192] = true;
11473 });
11475 {
11477 {
11479 int num599 = Main.maxTilesX / 2100;
11482 {
11484 int num602 = Main.maxTilesX * 2;
11486 {
11489 int y12 =
genRand.Next(100, (
int)Main.worldSurface);
11491 {
11493 }
11494 }
11495 }
11496 }
11497 });
11499 {
11501 {
11502 int num587 = (int)(5.0 * ((
double)Main.maxTilesX / 4200.0));
11505 int num590 = Main.maxTilesX / 2;
11509 {
11512 {
11515 {
11516 continue;
11517 }
11518 }
11519 int y11 = (int)Main.worldSurface / 2;
11521 {
11524 {
11525 break;
11526 }
11527 }
11528 }
11529 }
11531 {
11534 {
11538 {
11540 {
11542 {
11543 GenVars.shellStartXLeft =
num595;
11544 GenVars.shellStartYLeft =
num596;
11545 }
11546 }
11547 }
11548 GenVars.shellStartYLeft -= 50;
11549 GenVars.shellStartXLeft -=
genRand.Next(5);
11551 {
11552 GenVars.shellStartXLeft -=
genRand.Next(10);
11553 }
11555 {
11556 GenVars.shellStartXLeft -=
genRand.Next(15);
11557 }
11559 {
11561 }
11564 {
11566 }
11568 {
11570 }
11572 {
11574 }
11576 {
11578 }
11580 {
11582 }
11583 }
11585 {
11589 {
11591 {
11593 {
11594 GenVars.shellStartXRight =
num597;
11595 GenVars.shellStartYRight =
num598;
11596 }
11597 }
11598 }
11599 GenVars.shellStartYRight -= 50;
11600 GenVars.shellStartXRight +=
genRand.Next(5);
11602 {
11603 GenVars.shellStartXLeft +=
genRand.Next(10);
11604 }
11606 {
11607 GenVars.shellStartXLeft +=
genRand.Next(15);
11608 }
11610 {
11612 }
11615 {
11617 }
11619 {
11621 }
11623 {
11625 }
11627 {
11629 }
11631 {
11633 }
11634 }
11635 }
11636 });
11638 {
11639 progress.Message = Lang.gen[60].Value;
11642 {
11646 {
11648 {
11650 {
11652 {
11654 {
11656 {
11658 {
11660 {
11662 }
11663 else
11664 {
11666 }
11667 }
11669 {
11671 {
11673 }
11674 else
11675 {
11677 }
11678 }
11680 {
11682 }
11684 {
11686 {
11688 }
11690 {
11692 }
11694 {
11696 {
11698 }
11699 else if (
genRand.Next(5) == 0)
11700 {
11702 }
11703 else
11704 {
11706 }
11707 }
11709 {
11711 {
11713 }
11714 else if (
genRand.Next(5) == 0)
11715 {
11717 }
11718 else
11719 {
11721 }
11722 }
11723 }
11724 }
11726 {
11728 }
11729 }
11730 }
11732 {
11734 {
11736 {
11738 }
11739 else
11740 {
11742 }
11744 {
11746 }
11747 else
11748 {
11750 }
11751 }
11753 {
11755 {
11757 }
11758 else
11759 {
11761 }
11763 {
11765 }
11766 else
11767 {
11769 }
11770 }
11771 }
11772 }
11774 {
11776 {
11778 }
11780 {
11782 }
11783 }
11785 {
11787 }
11788 }
11789 }
11790 }
11792 {
11794 {
11795 if (
genRand.Next(2) == 0 && !Main.tile[
num585,
num586 - 1].active() && Main.tile[
num585,
num586].type != 137 && Main.tile[
num585,
num586].type != 48 && Main.tile[
num585,
num586].type != 232 && Main.tile[
num585,
num586].type != 191 && Main.tile[
num585,
num586].type != 151 && Main.tile[
num585,
num586].type != 274 && Main.tile[
num585,
num586].type != 75 && Main.tile[
num585,
num586].type != 76 &&
SolidTile(
num585,
num586) && Main.tile[
num585 - 1,
num586].type != 137 && Main.tile[
num585 + 1,
num586].type != 137)
11796 {
11798 {
11800 }
11802 {
11804 }
11805 }
11807 {
11810 }
11812 {
11815 }
11816 }
11817 }
11818 Main.tileSolid[137] = true;
11819 Main.tileSolid[190] = false;
11820 Main.tileSolid[192] = false;
11822 });
11824 {
11825 progress.Message = Lang.gen[69].Value;
11826 Main.tileSolid[191] = false;
11828 {
11829 double num575 = (double)
num574 / (
double)Main.maxTilesX;
11832 {
11834 {
11841 {
11843 {
11845 }
11846 }
11848 {
11850 }
11852 {
11854 }
11855 }
11856 }
11857 }
11859 {
11860 double num581 = (double)
num580 / (
double)Main.maxTilesX;
11863 {
11865 {
11867 {
11869 }
11871 {
11873 }
11874 }
11875 }
11876 }
11877 Main.tileSolid[191] = true;
11878 });
11880 {
11882 {
11884 }
11887 {
11889 {
11891 {
11893 }
11894 }
11895 }
11896 Main.tileSolid[226] = false;
11897 Main.tileSolid[162] = false;
11898 });
11900 {
11901
11902
11903 progress.Message = Lang.gen[79].Value;
11904 double num568 = (double)(Main.maxTilesX * Main.maxTilesY) / 5040000.0;
11909 {
11913 {
11915 }
11919 if (
tile6.type == 60)
11920 {
11922 }
11923 else if (
tile6.type == 1 &&
tile7.wall == 0)
11924 {
11926 }
11928 {
11930 bool flag34 = ((tile6.type != 60) ?
WorldUtils.
Gen(
new Point(
point2.X,
point2.Y - 1),
new ShapeFloodFill(1000),
Actions.
Chain(
new Modifiers.
IsNotSolid(),
new Actions.
Blank().
Output(
shapeData),
new Actions.
ContinueWrapper(
Actions.
Chain(
new Modifiers.
IsTouching(
true, 60, 147, 161, 396, 397, 70, 191),
new Modifiers.
IsTouching(
true, 147, 161, 396, 397, 70, 191),
new Actions.
Custom(
delegate
11931 {
11932 foundInvalidTile = true;
11933 return true;
11934 }))))) :
WorldUtils.Gen(
new Point(
point2.
X,
point2.
Y - 1),
new ShapeFloodFill(1000),
Actions.
Chain(
new Modifiers.IsNotSolid(),
new Actions.Blank().
Output(
shapeData),
new Actions.ContinueWrapper(
Actions.
Chain(
new Modifiers.IsTouching(
true, 147, 161, 396, 397, 70, 191),
new Actions.
Custom(
delegate
11935 {
11937 return true;
11938 }))))));
11940 {
11943 }
11945 }
11946 }
11947 });
11949 {
11951 {
11952 Main.tileSolid[56] = false;
11953 }
11955 {
11957 }
11958 progress.Message = Lang.gen[28].Value;
11959 double num565 = (double)(Main.maxTilesX * Main.maxTilesY) * 2
E-05;
11961 {
11963 }
11964 if (Main.starGame)
11965 {
11966 num565 *= Main.starGameMath(0.2);
11967 }
11969 {
11970 double value10 = (double)
num566 / ((
double)(Main.maxTilesX * Main.maxTilesY) * 2
E-05);
11975 {
11976 int j3 =
genRand.Next((
int)(Main.worldSurface * 2.0 + Main.rockLayer) / 3, Main.maxTilesY - 300);
11978 {
11979 j3 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 400);
11980 }
11982 {
11984 }
11985 else
11986 {
11989 {
11991 }
11992 }
11993 }
11994 }
11995 Main.tileSolid[225] = false;
11996 });
11998 {
11999 progress.Message = Lang.gen[29].Value;
12001 double num559 = (double)Main.maxTilesX / 4200.0;
12002 int num560 = (int)((
double)(GenVars.statueList.Length * 2) *
num559);
12004 {
12007 {
12009 }
12010 }
12011 if (Main.starGame)
12012 {
12013 num560 = (int)((
double)
num560 * Main.starGameMath(0.2));
12014 }
12016 {
12018 {
12020 }
12028 {
12030 int num564 =
genRand.Next((
int)(Main.worldSurface * 2.0 + Main.rockLayer) / 3, Main.maxTilesY - 300);
12032 {
12033 genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 400);
12034 }
12036 {
12038 num564 =
genRand.Next((
int)(Main.worldSurface * 2.0 + Main.rockLayer) / 3, Main.maxTilesY - 300);
12040 {
12041 genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 400);
12042 }
12043 }
12045 {
12047 if (
num564 >= Main.maxTilesY)
12048 {
12049 break;
12050 }
12051 }
12052 if (
num564 < Main.maxTilesY)
12053 {
12056 {
12058 }
12060 {
12063 {
12065 }
12067 }
12068 else
12069 {
12072 {
12074 }
12075 }
12076 }
12077 }
12078 }
12079 });
12081 {
12082 progress.Message = Lang.gen[30].Value;
12083 Main.tileSolid[226] = true;
12084 Main.tileSolid[162] = true;
12085 Main.tileSolid[225] = true;
12091 if (Main.starGame)
12092 {
12093 num546 = (int)((
double)
num546 * Main.starGameMath(0.2));
12094 }
12098 {
12100 {
12101 break;
12102 }
12105 int num551 =
genRand.Next((
int)((GenVars.worldSurfaceHigh + 20.0 + Main.rockLayer) / 2.0), Main.maxTilesY - 230);
12107 {
12108 num551 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 400);
12109 }
12112 {
12115 }
12116 }
12119 {
12121 {
12122 break;
12123 }
12126 int num554 =
genRand.Next(Main.UnderworldLayer, Main.maxTilesY - 50);
12128 {
12131 }
12132 }
12135 {
12137 {
12138 break;
12139 }
12141 int x11 =
genRand.Next(80, Main.maxTilesX - 80);
12144 {
12145 y9 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 400);
12146 }
12148 {
12151 }
12152 }
12156 {
12158 undergroundDesertHiveLocation.Y +=
num556;
12159 undergroundDesertHiveLocation.Height -=
num556;
12160 }
12162 {
12164 {
12165 break;
12166 }
12169 {
12172 }
12173 }
12174 Main.tileSolid[226] = false;
12175 Main.tileSolid[162] = false;
12176 Main.tileSolid[225] = false;
12177 });
12179 {
12180 progress.Message = Lang.gen[31].Value;
12182 {
12183 double value8 = (double)
num536 / ((
double)Main.maxTilesX * 0.005);
12188 {
12192 {
12193 num539 =
genRand.Next(Main.maxTilesY - 400, Main.maxTilesY - 150);
12194 }
12195 else
12196 {
12198 {
12201 }
12202 }
12205 {
12207 {
12209 }
12210 }
12211 else
12212 {
12218 {
12220 {
12222 {
12227 }
12228 }
12229 }
12230 }
12232 {
12234 }
12235 else
12236 {
12239 {
12241 }
12242 }
12243 }
12244 }
12245 });
12247 {
12248 progress.Message = Lang.gen[32].Value;
12250 {
12255 {
12257 {
12259 {
12261 }
12262 }
12264 {
12266 {
12267 if (
num535 < Main.maxTilesY)
12268 {
12271 }
12272 }
12273 }
12275 }
12276 }
12277 });
12279 {
12280 progress.Message = Lang.gen[33].Value;
12282 {
12283 int contain =
genRand.NextFromList(
new short[5] { 863, 186, 277, 187, 4404 });
12287 {
12293 {
12295 }
12296 }
12297 }
12299 double num523 = (double)Main.maxTilesX / 4200.0;
12301 {
12308 {
12310 }
12312 {
12314 }
12315 else
12316 {
12318 {
12319 case 1:
12321 break;
12322 case 2:
12324 break;
12325 case 3:
12327 break;
12328 default:
12331 break;
12332 }
12333 }
12337 {
12341 {
12344 }
12348 {
12349 break;
12350 }
12351 }
12355 {
12357 int num530 =
genRand.Next((
int)Main.worldSurface, Main.UnderworldLayer);
12359 {
12361 num530 =
genRand.Next((
int)Main.worldSurface, Main.UnderworldLayer);
12362 }
12366 {
12367 break;
12368 }
12369 }
12370 }
12371 });
12373 {
12374 progress.Message = Lang.gen[64].Value;
12376 int num513 = Main.maxTilesX / 2;
12377 int num514 = (int)((
double)Main.maxTilesX * 0.005);
12379 {
12381 }
12383 {
12384 Main.tileSolid[225] = true;
12385 }
12387 {
12388 double value5 = (double)
num515 / ((
double)Main.maxTilesX * 0.005);
12391 int x10 =
genRand.Next(200, Main.maxTilesX - 200);
12392 int y8 =
genRand.Next((
int)(Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 230);
12394 {
12395 y8 =
genRand.Next((
int)Main.worldSurface, (int)Main.rockLayer);
12396 }
12399 {
12401 x10 =
genRand.Next(200, Main.maxTilesX - 200);
12402 y8 =
genRand.Next((
int)Main.rockLayer + 30, Main.maxTilesY - 230);
12404 {
12405 y8 =
genRand.Next((
int)Main.worldSurface, (
int)Main.rockLayer);
12406 }
12409 {
12411 }
12412 }
12414 {
12415 Spread.Spider(
x10,
y8);
12416 }
12417 }
12419 {
12420 Main.tileSolid[225] = false;
12421 }
12422 Main.tileSolid[162] = true;
12423 });
12425 {
12427 {
12428 progress.Message = Lang.gen[64].Value;
12430 double num509 = (double)Main.maxTilesX * 0.003;
12432 {
12434 }
12435 if (Main.starGame)
12436 {
12437 num509 *= Main.starGameMath(0.2);
12438 }
12440 {
12444 int x9 =
genRand.Next(200, Main.maxTilesX - 200);
12445 int y7 =
genRand.Next((
int)Main.rockLayer + 30, Main.maxTilesY - 230);
12447 {
12448 y7 =
genRand.Next((
int)Main.worldSurface + 30, (int)Main.rockLayer - 30);
12449 }
12452 {
12454 x9 =
genRand.Next(200, Main.maxTilesX - 200);
12455 y7 =
genRand.Next((
int)Main.rockLayer + 30, Main.maxTilesY - 230);
12457 {
12458 y7 =
genRand.Next((
int)Main.worldSurface + 30, (
int)Main.rockLayer - 30);
12459 }
12461 }
12463 {
12465 }
12466 }
12467 }
12468 });
12470 {
12471
12472
12473
12474
12475
12476
12478 {
12479 progress.Message = Lang.gen[61].Value;
12481 int num479 = Main.maxTilesX / 2100;
12483 {
12485 }
12487 {
12489 }
12493 {
12496 {
12497 num482 =
genRand.Next((
int)((double)Main.maxTilesX * 0.3), (int)((
double)Main.maxTilesX * 0.7));
12498 }
12500 {
12502 {
12504 }
12505 }
12507 {
12508 while ((
double)
num482 > (
double)Main.maxTilesX * 0.42 && (
double)
num482 < (
double)Main.maxTilesX * 0.48)
12509 {
12511 }
12512 }
12514 {
12515 while ((
double)
num482 > (
double)Main.maxTilesX * 0.38 && (
double)
num482 < (
double)Main.maxTilesX * 0.62)
12516 {
12518 }
12519 }
12524 {
12526 {
12528 {
12531 {
12533 {
12536 break;
12537 }
12538 }
12540 {
12543 break;
12544 }
12545 }
12546 }
12547 }
12549 {
12551 if (
num480 > Main.maxTilesX)
12552 {
12554 }
12555 }
12556 else
12557 {
12562 {
12563 maxY = (int)Main.rockLayer + 50;
12564 }
12566 }
12567 }
12570 {
12571 double value3 = (double)
num487 / ((
double)Main.maxTilesX * 0.01);
12577 {
12578 num490 =
genRand.Next((
int)Main.worldSurface, (int)Main.rockLayer);
12579 }
12581 {
12584 {
12587 num490 =
genRand.Next((
int)Main.rockLayer + 30, Main.maxTilesY - 230);
12589 }
12591 {
12594 }
12595 }
12596 }
12598 {
12602 {
12605 }
12606 }
12607 double num495 = (double)Main.maxTilesX * 0.05;
12609 {
12613 {
12617 }
12618 }
12619 num495 = (double)Main.maxTilesX * 0.065;
12621 {
12623 }
12625 {
12629 {
12633 {
12635 {
12637 {
12639 }
12640 }
12641 }
12643 {
12646 }
12647 else
12648 {
12650 }
12651 }
12653 }
12655 {
12657 {
12659 {
12661 {
12665 {
12667 }
12669 {
12671 }
12673 {
12675 }
12677 {
12679 }
12680 try
12681 {
12684 }
12685 catch
12686 {
12689 }
12690 }
12691 }
12692 }
12693 }
12694 }
12695 });
12697 {
12698 Main.tileSolid[162] = false;
12699 Main.tileSolid[226] = true;
12701 Main.tileSolid[232] = false;
12702 });
12704 {
12705 progress.Message = Lang.gen[63].Value;
12708 {
12709 double num464 = (double)
num463 / ((
double)Main.maxTilesX * 0.04);
12712 int x7 =
genRand.Next(200, Main.maxTilesX - 200);
12713 int y5 =
genRand.Next((
int)(Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 220);
12715 {
12716 y5 =
genRand.Next((
int)Main.worldSurface + 25, (int)Main.rockLayer);
12717 }
12720 {
12722 x7 =
genRand.Next(200, Main.maxTilesX - 200);
12723 y5 =
genRand.Next((
int)(Main.worldSurface + Main.rockLayer) / 2, Main.maxTilesY - 220);
12725 {
12726 y5 =
genRand.Next((
int)Main.worldSurface + 25, (
int)Main.rockLayer);
12727 }
12729 }
12731 {
12734 {
12736 }
12738 {
12740 {
12741 case 0:
12743 break;
12744 case 1:
12746 break;
12747 }
12748 }
12750 {
12752 }
12753 else
12754 {
12757 {
12758 case 0:
12760 break;
12761 case 1:
12763 break;
12764 case 2:
12766 break;
12767 case 3:
12769 break;
12770 }
12771 }
12773 }
12774 }
12776 {
12779 {
12780 double num469 = (double)
num468 / ((
double)Main.maxTilesX * 0.04);
12783 int x8 =
genRand.Next(200, Main.maxTilesX - 200);
12784 int y6 =
genRand.Next((
int)Main.rockLayer, Main.maxTilesY - 350);
12787 {
12789 x8 =
genRand.Next(200, Main.maxTilesX - 200);
12790 y6 =
genRand.Next((
int)Main.rockLayer, Main.maxTilesY - 350);
12792 }
12794 {
12797 }
12798 }
12799 }
12801 double num472 = (double)Main.maxTilesX * 0.02;
12803 {
12804 double num474 = (double)
num473 / ((
double)Main.maxTilesX * 0.02);
12811 {
12813 }
12815 {
12820 {
12822 }
12823 }
12825 {
12827 }
12828 }
12829 });
12831 {
12832 progress.Message = Lang.gen[83].Value;
12834 {
12836 for (
int num462 = (
int)Main.worldSurface - 1;
num462 < Main.maxTilesY - 350;
num462++)
12837 {
12839 {
12841 }
12842 }
12843 }
12844 });
12846 {
12849 {
12851 {
12852 IslandHouse(GenVars.floatingIslandHouseX[num460], GenVars.floatingIslandHouseY[num460], GenVars.floatingIslandStyle[num460]);
12853 }
12854 }
12855 });
12857 {
12860 {
12862 }
12863 Main.tileSolid[137] = false;
12864 Main.tileSolid[130] = false;
12866 {
12868 {
12870 {
12872 {
12874 }
12875 for (
int num455 =
num454 + 1;
num455 <
num454 +
genRand.Next(4, 7) && (!Main.tile[
num453,
num455].active() || (Main.tile[
num453,
num455].type != 397 && Main.tile[
num453,
num455].type != 53)) && (!Main.tile[
num453,
num455 + 1].active() || (Main.tile[
num453,
num455 + 1].type != 397 && Main.tile[
num453,
num455 + 1].type != 53 && Main.tile[
num453,
num455 + 1].type != 495)) && (!Main.tile[
num453,
num455 + 2].active() || (Main.tile[
num453,
num455 + 2].type != 397 && Main.tile[
num453,
num455 + 2].type != 53 && Main.tile[
num453,
num455 + 2].type != 495));
num455++)
12876 {
12881 }
12882 }
12884 {
12886 {
12888 }
12890 {
12892 }
12893 if ((
double)
num454 <= Main.rockLayer)
12894 {
12896 }
12898 {
12901 }
12902 }
12904 {
12908 {
12910 {
12912 {
12914 break;
12915 }
12916 }
12917 }
12919 {
12922 {
12924 }
12925 }
12926 }
12928 {
12930 {
12932 {
12934 {
12936 }
12938 {
12940 }
12941 }
12942 }
12944 {
12946 {
12948 }
12950 {
12952 }
12953 }
12954 }
12955 }
12956 }
12957 });
12959 {
12960 Main.tileSolid[137] = true;
12961 Main.tileSolid[130] = true;
12962 progress.Message = Lang.gen[35].Value;
12964 {
12965 Main.tileSolid[138] = true;
12966 int num440 = (int)((
double)(Main.maxTilesX * Main.maxTilesY) * 0.0004);
12968 {
12970 }
12972 {
12976 {
12977 }
12980 {
12984 }
12985 }
12986 Main.tileSolid[138] = false;
12987 }
12988 double num444 = (double)(Main.maxTilesX * Main.maxTilesY) * 0.0008;
12989 if (Main.starGame)
12990 {
12991 num444 *= Main.starGameMath(0.2);
12992 }
12994 {
13000 {
13003 {
13004 num448 = Main.maxTilesY - 150;
13005 }
13007 {
13009 }
13013 {
13015 {
13017 {
13019 }
13020 }
13021 else if (!((
double)
num450 < Main.worldSurface) || Main.tile[
num449,
num450].wall != 0)
13022 {
13023 int style =
genRand.Next(0, 4);
13026 if (
num450 < Main.maxTilesY - 5)
13027 {
13030 }
13032 {
13034 }
13036 {
13038 }
13040 {
13041 style =
genRand.Next(10, 13);
13042 }
13044 {
13045 style =
genRand.Next(10, 13);
13046 }
13048 {
13049 style =
genRand.Next(16, 19);
13050 }
13052 {
13053 style =
genRand.Next(22, 25);
13054 }
13056 {
13057 style =
genRand.Next(31, 34);
13058 }
13060 {
13061 style =
genRand.Next(28, 31);
13062 }
13064 {
13065 style =
genRand.Next(34, 37);
13066 }
13067 if (
num450 > Main.UnderworldLayer)
13068 {
13069 style =
genRand.Next(13, 16);
13070 }
13072 {
13074 break;
13075 }
13078 {
13080 break;
13081 }
13082 }
13083 }
13084 }
13085 }
13086 });
13088 {
13089 progress.Message = Lang.gen[36].Value;
13091 {
13092 double value2 = (double)
num436 / (
double)(Main.maxTilesX / 200);
13097 {
13099 int num439 =
genRand.Next(Main.maxTilesY - 250, Main.maxTilesY - 30);
13100 try
13101 {
13103 {
13105 {
13106 }
13110 {
13112 }
13113 else
13114 {
13117 {
13119 }
13120 }
13121 }
13122 }
13123 catch
13124 {
13127 {
13129 }
13130 }
13131 }
13132 }
13133 });
13135 {
13137 {
13138 progress.Message = Lang.gen[37].Value;
13140 {
13142 {
13144 {
13147 {
13149 {
13151 {
13153 {
13155 {
13157 }
13158 else
13159 {
13161 }
13162 }
13163 }
13164 }
13165 }
13167 {
13172 {
13174 {
13176 {
13178 {
13180 }
13182 {
13184 }
13185 }
13187 {
13189 }
13190 }
13191 }
13193 {
13195 {
13196 case 23:
13197 case 199:
13199 {
13201 }
13202 break;
13203 case 59:
13204 case 60:
13206 {
13208 }
13209 break;
13210 }
13212 }
13213 }
13214 }
13215 }
13216 }
13218 {
13221 {
13223 {
13225 {
13226 try
13227 {
13230 }
13231 catch
13232 {
13235 }
13236 }
13238 {
13239 break;
13240 }
13242 }
13244 {
13246 }
13247 }
13248 }
13250 {
13252 {
13254 {
13255 if (Main.tile[
num424,
num425].type == 0 && Main.tile[
num424,
num425].active() && (!Main.tile[
num424 - 1,
num425 - 1].active() || !Main.tile[
num424,
num425 - 1].active() || !Main.tile[
num424 + 1,
num425 - 1].active() || !Main.tile[
num424 - 1,
num425].active() || !Main.tile[
num424 + 1,
num425].active() || !Main.tile[
num424 - 1,
num425 + 1].active() || !Main.tile[
num424,
num425 + 1].active() || !Main.tile[
num424 + 1,
num425 + 1].active()))
13256 {
13258 }
13259 }
13260 }
13262 {
13264 {
13266 {
13268 }
13269 }
13270 }
13273 {
13275 }
13276 int num428 = Main.maxTilesX / 7;
13278 {
13280 {
13282 {
13284 {
13286 {
13288 {
13290 }
13291 else
13292 {
13294 }
13295 }
13296 else if (
num429 < Main.maxTilesX / 2 +
genRand.Next(-2, 3))
13297 {
13299 }
13300 else
13301 {
13303 }
13304 }
13305 else
13306 {
13308 }
13311 }
13312 }
13313 }
13315 {
13316 Main.tileSolid[225] = true;
13317 int num431 = (int)((
double)Main.maxTilesX * 0.31);
13318 int num432 = (int)((
double)Main.maxTilesX * 0.69);
13319 _ = Main.maxTilesY;
13320 int num433 = Main.maxTilesY - 135;
13321 _ = Main.maxTilesY;
13322 Liquid.QuickWater(-2);
13324 {
13326 {
13328 }
13329 }
13330 Main.tileSolid[225] = false;
13331 Main.tileSolid[484] = false;
13332 }
13333 }
13334 }
13335 });
13337 {
13339 int num405 =
genRand.Next(Main.maxTilesX * 5 / 4200, Main.maxTilesX * 10 / 4200);
13341 {
13342 int num407 = Main.maxTilesX / 420;
13344 {
13347 while ((
double)
num408 >= (
double)Main.maxTilesX * 0.48 && (
double)
num408 <= (
double)Main.maxTilesX * 0.52)
13348 {
13350 }
13354 {
13356 {
13358 }
13359 }
13361 {
13363 {
13366 }
13367 break;
13368 }
13369 }
13370 }
13373 {
13374 int num411 = Main.maxTilesX / 420;
13376 {
13379 while ((
double)
num412 >= (
double)Main.maxTilesX * 0.47 && (
double)
num412 <= (
double)Main.maxTilesX * 0.53)
13380 {
13382 }
13386 {
13388 {
13390 }
13391 }
13393 {
13394 break;
13395 }
13396 }
13397 }
13398 });
13400 {
13401 progress.Message = Lang.gen[85].Value;
13402 int num391 = Main.maxTilesX / 2100;
13405 {
13411 {
13416 {
13418 }
13421 {
13423 }
13425 {
13426 while ((
double)
num396 > (double)Main.maxTilesX * 0.4 && (
double)
num396 < (double)Main.maxTilesX * 0.6)
13427 {
13429 }
13430 }
13432 {
13435 {
13437 {
13438 }
13439 }
13440 else
13441 {
13443 {
13444 }
13445 }
13447 {
13449 }
13451 {
13454 {
13456 {
13458 {
13460 {
13463 {
13464 case 189:
13466 break;
13467 case 53:
13469 break;
13470 default:
13471 if (Main.tileDungeon[
type4])
13472 {
13474 }
13476 {
13478 }
13480 {
13482 }
13483 break;
13484 }
13485 }
13486 }
13487 }
13488 }
13490 {
13494 {
13496 {
13498 {
13500 }
13502 {
13504 }
13505 }
13506 }
13507 }
13508 }
13510 {
13514 {
13516 {
13519 }
13521 }
13522 }
13523 }
13524 }
13525 }
13526 });
13528 {
13530 {
13532 progress.Message = Lang.gen[34].Value;
13534 {
13535 progress.Message = Lang.gen[91].Value;
13536 }
13537 double num377 = (double)Main.maxTilesX * 0.05;
13539 {
13541 }
13543 {
13545 }
13546 if (Main.starGame)
13547 {
13548 num377 *= Main.starGameMath(0.2);
13549 }
13551 {
13554 {
13556 {
13560 {
13562 }
13564 {
13565 break;
13566 }
13567 }
13568 else
13569 {
13571 int num383 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 210);
13573 {
13575 num383 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 210);
13576 }
13578 {
13579 break;
13580 }
13581 }
13582 }
13583 }
13585 {
13586 num377 = Main.maxTilesX * 3;
13587 if (Main.remixWorld)
13588 {
13589 num377 = Main.maxTilesX / 3;
13590 }
13591 if (Main.starGame)
13592 {
13593 num377 *= Main.starGameMath(0.2);
13594 }
13596 {
13597 if (Main.remixWorld)
13598 {
13599 placeTNTBarrel(
genRand.Next(50, Main.maxTilesX - 50),
genRand.Next((
int)Main.worldSurface, (
int)((
double)(Main.maxTilesY - 350) + Main.rockLayer) / 2));
13600 }
13601 else
13602 {
13604 }
13605 }
13606 }
13607 num377 = (double)Main.maxTilesX * 0.003;
13609 {
13611 }
13613 {
13615 }
13617 {
13620 {
13621 int num387 =
genRand.Next((
int)((double)Main.maxTilesX * 0.15), (int)((
double)Main.maxTilesX * 0.85));
13622 int num388 =
genRand.Next((
int)Main.worldSurface + 20, Main.maxTilesY - 210);
13624 {
13625 break;
13626 }
13627 }
13628 }
13630 {
13632 {
13633 progress.Message = Lang.gen[34].Value;
13636 {
13639 }
13640 }
13641 }
13643 {
13644 Main.tileSolid[138] = true;
13645 }
13647 }
13648 });
13650 {
13651 progress.Message = Lang.gen[89].Value;
13652 Main.tileSolid[229] = false;
13653 Main.tileSolid[190] = false;
13654 Main.tileSolid[196] = false;
13655 Main.tileSolid[189] = false;
13656 Main.tileSolid[202] = false;
13657 Main.tileSolid[460] = false;
13658 Main.tileSolid[484] = false;
13660 {
13661 Main.tileSolid[138] = false;
13662 }
13664 {
13665 int num320 = Main.maxTilesX / 2;
13668 {
13671 int num322 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 300);
13673 {
13675 num322 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 300);
13676 }
13678 {
13681 {
13682 }
13685 {
13687 }
13689 {
13692 }
13694 {
13697 }
13699 {
13702 }
13704 {
13707 }
13709 {
13712 }
13714 {
13717 }
13719 {
13722 }
13724 {
13727 }
13729 {
13732 }
13734 {
13737 }
13739 {
13742 }
13744 {
13746 }
13747 else
13748 {
13750 {
13752 }
13754 {
13756 }
13758 {
13761 {
13765 {
13767 {
13768 }
13771 }
13772 }
13773 }
13774 }
13775 }
13776 }
13777 }
13779 {
13780 int num330 = Main.maxTilesX / 2;
13783 {
13786 int num332 =
genRand.Next(Main.maxTilesY - 300, Main.maxTilesY - 10);
13788 {
13791 {
13792 }
13795 {
13797 }
13799 {
13801 }
13803 {
13806 }
13808 {
13810 }
13813 {
13815 }
13817 {
13820 {
13824 {
13826 {
13827 }
13830 }
13831 }
13832 }
13833 }
13834 }
13835 }
13837 {
13838 int num340 = Main.maxTilesX / 2;
13841 {
13847 {
13850 }
13852 {
13854 {
13855 }
13858 {
13860 }
13862 {
13864 }
13866 {
13869 }
13871 {
13874 }
13876 {
13879 }
13881 {
13883 }
13885 {
13887 }
13888 }
13889 }
13890 }
13892 {
13893 int num346 = Main.maxTilesX / 2;
13896 {
13901 {
13904 {
13905 }
13908 {
13910 }
13912 {
13914 }
13916 {
13918 }
13920 {
13923 }
13925 {
13928 }
13930 {
13932 }
13934 {
13936 }
13938 {
13941 {
13945 {
13947 {
13948 }
13951 }
13952 }
13953 }
13954 }
13955 }
13956 }
13958 {
13959 int num356 = Main.maxTilesX / 2;
13962 {
13965 int num358 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 20);
13967 {
13969 num358 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 20);
13970 }
13972 {
13974 num358 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 20);
13975 }
13977 {
13979 {
13980 }
13984 {
13986 }
13988 {
13991 {
13993 }
13994 }
13995 if (
num358 > Main.maxTilesY - 300)
13996 {
13998 {
14000 }
14002 {
14004 }
14005 }
14007 {
14009 {
14011 }
14013 {
14015 }
14017 {
14019 }
14020 }
14022 {
14024 {
14026 }
14028 {
14030 }
14032 {
14034 }
14035 }
14037 {
14039 {
14041 }
14043 {
14045 }
14046 }
14048 {
14050 {
14052 }
14054 {
14056 }
14057 }
14059 {
14061 {
14063 }
14065 {
14067 }
14068 }
14070 {
14072 }
14074 {
14076 }
14078 {
14081 {
14085 {
14087 {
14088 }
14091 }
14092 }
14093 }
14094 }
14095 }
14096 }
14098 {
14099 int num366 = Main.maxTilesX / 2;
14102 {
14107 {
14110 }
14112 {
14114 {
14115 }
14119 {
14121 }
14123 {
14125 {
14127 }
14129 {
14131 }
14133 {
14135 }
14136 }
14138 {
14140 }
14142 {
14144 {
14146 }
14148 {
14150 }
14151 }
14152 if (!Main.wallDungeon[Main.tile[
num367,
num368].wall] && Main.tile[
num367,
num368 + 1].type != 30 && Main.tile[
num367,
num368 + 1].type != 19 && Main.tile[
num367,
num368 + 1].type != 41 && Main.tile[
num367,
num368 + 1].type != 43 && Main.tile[
num367,
num368 + 1].type != 44 && Main.tile[
num367,
num368 + 1].type != 481 && Main.tile[
num367,
num368 + 1].type != 482 && Main.tile[
num367,
num368 + 1].type != 483 && Main.tile[
num367,
num368 + 1].type != 45 && Main.tile[
num367,
num368 + 1].type != 46 && Main.tile[
num367,
num368 + 1].type != 47 && Main.tile[
num367,
num368 + 1].type != 175 && Main.tile[
num367,
num368 + 1].type != 176 && Main.tile[
num367,
num368 + 1].type != 177 && Main.tile[
num367,
num368 + 1].type != 53 && Main.tile[
num367,
num368 + 1].type != 25 && Main.tile[
num367,
num368 + 1].type != 203)
14153 {
14155 }
14156 }
14157 }
14158 }
14160 {
14161 int num372 = Main.maxTilesX / 2;
14164 {
14169 {
14171 {
14172 }
14176 {
14178 }
14180 {
14182 {
14184 }
14186 {
14188 }
14190 {
14192 }
14193 }
14195 {
14197 }
14199 {
14201 {
14203 }
14205 {
14207 }
14208 }
14209 if ((Main.tile[
num373,
num374].liquid !=
byte.MaxValue || Main.tile[
num373,
num374 + 1].type != 53 || Main.tile[
num373,
num374].wall != 0) && !Main.wallDungeon[Main.tile[
num373,
num374].wall] && Main.tile[
num373,
num374 + 1].type != 30 && Main.tile[
num373,
num374 + 1].type != 19 && Main.tile[
num373,
num374 + 1].type != 41 && Main.tile[
num373,
num374 + 1].type != 43 && Main.tile[
num373,
num374 + 1].type != 44 && Main.tile[
num373,
num374 + 1].type != 481 && Main.tile[
num373,
num374 + 1].type != 482 && Main.tile[
num373,
num374 + 1].type != 483 && Main.tile[
num373,
num374 + 1].type != 45 && Main.tile[
num373,
num374 + 1].type != 46 && Main.tile[
num373,
num374 + 1].type != 47 && Main.tile[
num373,
num374 + 1].type != 175 && Main.tile[
num373,
num374 + 1].type != 176 && Main.tile[
num373,
num374 + 1].type != 177 && Main.tile[
num373,
num374 + 1].type != 25 && Main.tile[
num373,
num374 + 1].type != 203)
14210 {
14212 }
14213 }
14214 }
14215 }
14216 Main.tileSolid[190] = true;
14217 Main.tileSolid[192] = true;
14218 Main.tileSolid[196] = true;
14219 Main.tileSolid[189] = true;
14220 Main.tileSolid[202] = true;
14221 Main.tileSolid[225] = true;
14222 Main.tileSolid[460] = true;
14223 Main.tileSolid[138] = true;
14224 });
14226 {
14230 int num311 = Main.maxTilesX / 2;
14232 {
14233 int num312 = GenVars.beachBordersWidth + 15;
14234 num311 = ((genRand.Next(2) != 0) ? (Main.maxTilesX - num312) : num312);
14235 }
14237 {
14240 {
14242 {
14243 Main.spawnTileX = num313;
14244 Main.spawnTileY = num314;
14245 break;
14246 }
14247 }
14250 if ((double)Main.spawnTileY > Main.worldSurface)
14251 {
14252 flag10 = true;
14253 }
14254 if (Main.tile[Main.spawnTileX, Main.spawnTileY - 1].liquid > 0)
14255 {
14256 flag10 = true;
14257 }
14258 }
14260 while ((double)Main.spawnTileY > Main.worldSurface)
14261 {
14262 int num316 = genRand.Next(num311 - num315, num311 + num315);
14263 for (int num317 = 0; num317 < Main.maxTilesY; num317++)
14264 {
14265 if (Main.tile[num316, num317].active())
14266 {
14267 Main.spawnTileX = num316;
14268 Main.spawnTileY = num317;
14269 break;
14270 }
14271 }
14273 }
14275 {
14276 int num318 = Main.maxTilesY - 10;
14278 {
14280 }
14281 Main.spawnTileY =
num318 + 1;
14282 }
14283 });
14285 {
14289 {
14291 {
14293 {
14294 bool flag8 =
false;
14298 {
14300 {
14302 {
14304 {
14306 }
14307 }
14308 }
14310 {
14312 {
14314 {
14316 {
14319 }
14320 }
14321 }
14322 }
14323 }
14325 {
14326 try
14327 {
14330 {
14332 }
14334 }
14335 catch
14336 {
14337 }
14338 }
14339 }
14340 }
14341 }
14343 {
14345 {
14347 {
14349 }
14351 {
14352 bool flag9 =
false;
14354 {
14356 {
14358 {
14360 break;
14361 }
14362 }
14363 }
14365 {
14367 }
14368 }
14369 }
14370 }
14371 });
14373 {
14375 if (Main.tenthAnniversaryWorld)
14376 {
14377 BirthdayParty.GenuineParty = true;
14378 BirthdayParty.PartyDaysOnCooldown = 5;
14379 if (getGoodWorldGen)
14380 {
14381 Main.afterPartyOfDoom = true;
14382 }
14385 {
14387 NPC.savedTaxCollector = true;
14388 }
14389 else
14390 {
14392 }
14393 Main.npc[
num292].homeTileX = Main.spawnTileX;
14394 Main.npc[
num292].homeTileY = Main.spawnTileY;
14395 Main.npc[
num292].direction = 1;
14396 Main.npc[
num292].homeless =
true;
14403 Main.npc[
num292].direction = -1;
14404 Main.npc[
num292].homeless =
true;
14411 Main.npc[
num292].direction = 1;
14412 Main.npc[
num292].homeless =
true;
14415 NPC.unlockedPrincessSpawn = true;
14420 Main.npc[
num292].direction = -1;
14421 Main.npc[
num292].homeless =
true;
14424 NPC.unlockedPartyGirlSpawn = true;
14426 if (Main.remixWorld)
14427 {
14430 NPC.unlockedSlimeRainbowSpawn = true;
14431 }
14432 else
14433 {
14435 NPC.boughtBunny = true;
14436 Main.npc[
num292].townNpcVariationIndex = 1;
14437 }
14440 Main.npc[
num292].direction = 1;
14441 Main.npc[
num292].homeless =
true;
14442 }
14444 {
14446 Main.npc[
num293].homeTileX = Main.spawnTileX;
14447 Main.npc[
num293].homeTileY = Main.spawnTileY;
14448 Main.npc[
num293].direction = 1;
14449 Main.npc[
num293].homeless =
true;
14450 NPC.savedTaxCollector = true;
14451 }
14453 {
14455 Main.npc[
num294].homeTileX = Main.spawnTileX;
14456 Main.npc[
num294].homeTileY = Main.spawnTileY;
14457 Main.npc[
num294].direction = 1;
14458 Main.npc[
num294].homeless =
true;
14459 NPC.unlockedMerchantSpawn = true;
14460 }
14462 {
14464 Main.npc[
num295].homeTileX = Main.spawnTileX;
14465 Main.npc[
num295].homeTileY = Main.spawnTileY;
14466 Main.npc[
num295].direction = 1;
14467 Main.npc[
num295].homeless =
true;
14468 NPC.unlockedPartyGirlSpawn = true;
14469 }
14471 {
14473 Main.npc[
num296].homeTileX = Main.spawnTileX;
14474 Main.npc[
num296].homeTileY = Main.spawnTileY;
14475 Main.npc[
num296].direction = 1;
14476 Main.npc[
num296].homeless =
true;
14477 NPC.unlockedDemolitionistSpawn = true;
14478 }
14479 else
14480 {
14482 Main.npc[
num297].homeTileX = Main.spawnTileX;
14483 Main.npc[
num297].homeTileY = Main.spawnTileY;
14484 Main.npc[
num297].direction = 1;
14485 Main.npc[
num297].homeless =
true;
14486 }
14487 });
14489 {
14490 progress.Message = Lang.gen[39].Value;
14491 double num283 = (double)Main.maxTilesX * 0.002;
14493 {
14497 _ = Main.maxTilesX / 2;
14502 {
14504 }
14505 if (
num286 > Main.maxTilesX - 1)
14506 {
14507 num286 = Main.maxTilesX - 1;
14508 }
14510 int num289 = (int)Main.worldSurface - 1;
14512 {
14514 {
14516 {
14518 }
14520 {
14521 break;
14522 }
14523 }
14524 }
14525 }
14526 });
14528 {
14529 progress.Message = Lang.gen[40].Value;
14531 {
14532 for (int num278 = 0; (double)num278 < (double)Main.maxTilesX * 0.003; num278++)
14533 {
14534 progress.Set((double)num278 / ((double)Main.maxTilesX * 0.003));
14535 int num279 = genRand.Next(50, Main.maxTilesX - 50);
14536 int num280 = genRand.Next(25, 50);
14537 for (int num281 = num279 - num280; num281 < num279 + num280; num281++)
14538 {
14539 for (int num282 = 20; (double)num282 < Main.worldSurface; num282++)
14540 {
14541 GrowEpicTree(num281, num282);
14542 }
14543 }
14544 }
14545 }
14547 });
14549 {
14550 double num276 = (double)Main.maxTilesX * 1.7;
14552 {
14554 }
14555 progress.Message = Lang.gen[41].Value;
14557 {
14560 }
14561 });
14563 {
14566 {
14568 }
14571 });
14573 {
14576 {
14577 int num266 = (int)Main.worldSurface;
14579 {
14581 }
14583 {
14585 {
14587 {
14589 }
14591 {
14593 }
14594 }
14596 {
14599 }
14601 {
14607 bool flag7 =
false;
14609 {
14611 {
14613 {
14615 break;
14616 }
14617 }
14618 }
14620 {
14623 }
14624 }
14625 }
14626 }
14627 });
14629 {
14630 progress.Message = Lang.gen[42].Value;
14631 if (Main.halloween)
14632 {
14633 for (int num259 = 40; num259 < Main.maxTilesX - 40; num259++)
14634 {
14635 for (int num260 = 50; (double)num260 < Main.worldSurface; num260++)
14636 {
14637 if (Main.tile[num259, num260].active() && Main.tile[num259, num260].type == 2 && genRand.Next(15) == 0)
14638 {
14639 PlacePumpkin(num259, num260 - 1);
14640 int num261 = genRand.Next(5);
14641 for (int num262 = 0; num262 < num261; num262++)
14642 {
14643 GrowPumpkin(num259, num260 - 1, 254);
14644 }
14645 }
14646 }
14647 }
14648 }
14650 {
14653 {
14655 {
14657 {
14660 }
14661 }
14663 {
14665 {
14667 }
14668 }
14670 {
14672 {
14674 }
14675 }
14677 {
14679 }
14680 }
14681 }
14682 });
14684 {
14687 {
14689 {
14691 {
14692 if (num258 >= (int)Main.worldSurface && Main.tile[num257, num258].type == 70 && !Main.tile[num257, num258 - 1].active())
14693 {
14694 GrowTree(num257, num258);
14695 if (!Main.tile[num257, num258 - 1].active())
14696 {
14697 GrowTree(num257, num258);
14698 if (!Main.tile[num257, num258 - 1].active())
14699 {
14700 GrowTree(num257, num258);
14701 if (!Main.tile[num257, num258 - 1].active())
14702 {
14703 PlaceTile(num257, num258 - 1, 71, mute: true);
14704 }
14705 }
14706 }
14707 }
14709 {
14710 PlaceTile(num257, num258 - 1, 61, mute: true);
14711 }
14712 }
14713 }
14714 }
14715 });
14717 {
14720 {
14723 {
14724 num255 += Main.maxTilesX / 2;
14725 }
14728 {
14729 }
14731 {
14735 {
14737 }
14738 }
14739 }
14740 });
14742 {
14743 progress.Message = Lang.gen[43].Value;
14745 {
14749 int num235 = (int)Main.worldSurface;
14751 {
14752 num235 = Main.maxTilesY - 200;
14753 }
14755 {
14757 {
14762 }
14763 else
14764 {
14766 }
14768 {
14771 {
14773 }
14775 {
14777 }
14779 {
14781 }
14783 {
14785 }
14786 }
14787 }
14790 {
14792 {
14796 }
14797 else
14798 {
14800 }
14802 {
14804 {
14807 {
14809 {
14811 {
14813 break;
14814 }
14816 {
14818 break;
14819 }
14820 }
14822 {
14823 break;
14824 }
14825 }
14827 {
14829 }
14831 {
14833 {
14835 {
14837 }
14838 }
14840 {
14842 {
14847 }
14848 }
14849 continue;
14850 }
14851 }
14853 {
14856 {
14858 {
14860 {
14862 break;
14863 }
14865 {
14867 break;
14868 }
14869 }
14871 {
14872 break;
14873 }
14874 }
14876 {
14878 }
14880 {
14882 {
14884 {
14886 }
14887 }
14889 {
14891 {
14896 }
14897 }
14898 continue;
14899 }
14900 }
14902 {
14904 }
14905 }
14906 }
14909 {
14911 {
14915 }
14916 else
14917 {
14919 }
14921 {
14923 }
14924 }
14927 {
14929 {
14933 }
14934 else
14935 {
14937 }
14939 {
14941 }
14942 }
14945 {
14947 {
14951 }
14952 else
14953 {
14955 }
14957 {
14959 }
14960 }
14963 {
14965 {
14969 }
14970 else
14971 {
14973 }
14975 {
14977 }
14978 }
14979 }
14980 });
14982 {
14983 progress.Message = Lang.gen[44].Value;
14984 int num220 = (int)((
double)Main.maxTilesX * 0.004);
14986 {
14988 }
14990 {
14996 {
14999 int num225 =
genRand.Next((
int)Main.rockLayer, Main.maxTilesY - 350);
15001 {
15004 GenVars.logX = -1;
15005 }
15006 int num226 =
genRand.NextFromList<
int>(21, 24, 27, 30, 33, 36, 39, 42);
15008 {
15010 {
15012 {
15014 {
15017 {
15019 }
15020 }
15021 else if (Main.tile[
num227,
num228 + 1].wall == 0 && (Main.tile[
num227,
num228 + 1].type == 2 || ((Main.tile[
num227,
num228 + 1].type == 40 || Main.tile[
num227,
num228 + 1].type == 1 ||
TileID.
Sets.
Ore[Main.tile[
num227,
num228 + 1].type]) && !Main.tile[
num227,
num228].active())) && (!Main.tile[
num227,
num228].active() || Main.tile[
num227,
num228].type == 185 || Main.tile[
num227,
num228].type == 186 || Main.tile[
num227,
num228].type == 187 || (Main.tile[
num227,
num228].type == 5 && (double)
num227 < (
double)Main.maxTilesX * 0.48) || (double)
num227 > (
double)Main.maxTilesX * 0.52))
15022 {
15024 {
15027 {
15029 }
15030 }
15033 {
15036 }
15039 {
15042 {
15044 }
15045 }
15047 {
15049 }
15050 }
15051 }
15052 }
15053 }
15054 }
15055 else
15056 {
15058 {
15060 {
15062 {
15065 GenVars.logX = -1;
15066 }
15067 int num230 =
genRand.NextFromList<
int>(21, 24, 27, 30, 33, 36, 39, 42);
15069 {
15071 {
15073 {
15075 {
15078 {
15080 }
15081 }
15082 else if (Main.tile[
num231,
num232 + 1].wall == 0 && (Main.tile[
num231,
num232 + 1].type == 2 || ((Main.tile[
num231,
num232 + 1].type == 40 || Main.tile[
num231,
num232 + 1].type == 1 ||
TileID.
Sets.
Ore[Main.tile[
num231,
num232 + 1].type]) && !Main.tile[
num231,
num232].active())) && (!Main.tile[
num231,
num232].active() || Main.tile[
num231,
num232].type == 185 || Main.tile[
num231,
num232].type == 186 || Main.tile[
num231,
num232].type == 187 || (Main.tile[
num231,
num232].type == 5 && (double)
num231 < (
double)Main.maxTilesX * 0.48) || (double)
num231 > (
double)Main.maxTilesX * 0.52))
15083 {
15085 {
15088 {
15090 }
15091 }
15094 {
15097 }
15100 {
15103 {
15105 }
15106 }
15108 {
15110 }
15111 }
15112 }
15113 }
15114 }
15115 break;
15116 }
15117 }
15118 }
15119 }
15120 });
15122 {
15123 progress.Message = Lang.gen[45].Value;
15124 int num209 = (int)((
double)Main.maxTilesX * 0.002);
15126 {
15128 }
15130 {
15136 {
15139 int num214 =
genRand.Next((
int)Main.rockLayer, Main.maxTilesY - 350);
15141 {
15143 {
15145 {
15147 {
15148 break;
15149 }
15151 {
15152 break;
15153 }
15154 if (
num215 > Main.maxTilesX - 10)
15155 {
15156 break;
15157 }
15158 if (
num216 > Main.maxTilesY - 10)
15159 {
15160 break;
15161 }
15163 {
15165 }
15167 {
15169 }
15170 }
15171 }
15172 }
15173 }
15174 else
15175 {
15177 {
15179 {
15181 {
15183 {
15185 {
15186 break;
15187 }
15189 {
15190 break;
15191 }
15192 if (
num218 > Main.maxTilesX - 10)
15193 {
15194 break;
15195 }
15196 if (
num219 > Main.maxTilesY - 10)
15197 {
15198 break;
15199 }
15201 {
15203 }
15205 {
15207 }
15208 }
15209 }
15210 break;
15211 }
15212 }
15213 }
15214 }
15215 });
15217 {
15220 {
15224 {
15233 {
15235 {
15237 {
15239 }
15240 }
15241 }
15242 }
15243 }
15244 });
15246 {
15249 {
15251 int num186 =
genRand.Next((
int)Main.rockLayer, Main.maxTilesY - 300);
15253 {
15258 }
15259 }
15261 {
15263 int num191 =
genRand.Next((
int)Main.worldSurface, Main.maxTilesY - 300);
15265 {
15271 {
15273 {
15275 {
15277 }
15278 }
15279 }
15280 }
15281 }
15282 });
15284 {
15287 {
15289 {
15291 {
15292 for (int num181 = 0; num181 < 4; num181++)
15293 {
15294 int num182 = num179;
15295 int num183 = num180;
15296 if (num181 == 0)
15297 {
15298 num182--;
15299 }
15300 if (num181 == 1)
15301 {
15302 num182++;
15303 }
15304 if (num181 == 2)
15305 {
15306 num183--;
15307 }
15308 if (num181 == 3)
15309 {
15310 num183++;
15311 }
15312 if (!Main.tile[num182, num183].active())
15313 {
15314 PlaceTile(num182, num183, 184, mute: true);
15315 }
15316 }
15317 }
15318 }
15319 }
15320 });
15322 {
15326 bool flag4 =
false;
15328 {
15330 {
15332 {
15335 break;
15336 }
15337 }
15339 {
15340 break;
15341 }
15342 }
15345 {
15347 {
15349 {
15352 break;
15353 }
15354 }
15356 {
15357 break;
15358 }
15359 }
15360 GenVars.jungleMinX =
num171;
15361 GenVars.jungleMaxX =
num172;
15363 {
15365 {
15367 {
15369 }
15370 }
15371 }
15372 });
15374 {
15375 Main.tileSolid[229] = true;
15378 {
15382 {
15384 {
15386 {
15388 }
15389 else
15390 {
15395 }
15396 }
15397 }
15399 }
15400 Main.tileSolid[232] = true;
15401 Main.tileSolid[162] = true;
15402 });
15404 {
15406 {
15407 Main.tileSolid[56] = true;
15408 }
15409 progress.Message = Lang.gen[27].Value;
15411 {
15413 }
15415 Liquid.QuickWater(3);
15418 Liquid.quickSettle = true;
15421 {
15422 int num162 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer;
15426 while (Liquid.numLiquid > 0)
15427 {
15430 {
15431 break;
15432 }
15433 double num165 = (double)(
num162 - (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer)) / (
double)
num162;
15434 if (Liquid.numLiquid + LiquidBuffer.numLiquidBuffer >
num162)
15435 {
15436 num162 = Liquid.numLiquid + LiquidBuffer.numLiquidBuffer;
15437 }
15439 {
15441 }
15442 else
15443 {
15445 }
15447 {
15449 }
15450 Liquid.UpdateLiquid();
15451 }
15454 }
15455 Liquid.quickSettle = false;
15457 Main.tileSolid[484] = false;
15458 });
15460 {
15461 progress.Message = Lang.gen[38].Value;
15464 {
15466 }
15474 {
15477 {
15479 {
15483 {
15485 {
15487 {
15489 }
15490 }
15491 }
15493 {
15495 }
15497 {
15499 {
15501 }
15503 {
15505 }
15506 }
15508 }
15509 }
15510 }
15512 {
15519 {
15520 default:
15525 break;
15526 case 1:
15531 break;
15532 case 2:
15534 num149 = Main.maxTilesX - 5;
15537 break;
15538 }
15539 double num150 = Main.worldSurface - 1.0;
15541 {
15542 num150 = Main.maxTilesY - 50;
15543 }
15545 {
15547 {
15549 {
15551 if (
tile4.active() && (tile4.type == 53 || tile4.type == 112 || tile4.type == 234))
15552 {
15554 if (!
tile5.active() && tile5.wall == 0)
15555 {
15557 {
15559 {
15560 if ((
double)
num152 > Main.worldSurface)
15561 {
15563 {
15567 {
15569 }
15570 }
15571 }
15572 else
15573 {
15576 {
15578 {
15580 }
15581 }
15583 {
15586 {
15588 }
15589 }
15590 else
15591 {
15593 }
15594 }
15595 }
15596 else
15597 {
15600 {
15602 {
15604 }
15605 }
15607 {
15610 {
15612 }
15613 }
15614 else
15615 {
15617 }
15618 }
15619 }
15620 else
15621 {
15623 {
15625 {
15627 }
15628 else
15629 {
15631 }
15632 break;
15633 }
15634 if (Main.tile[
num151,
num152 - 2].liquid == 0 && (
double)
num152 < Main.worldSurface)
15635 {
15637 break;
15638 }
15639 }
15640 }
15641 }
15642 }
15643 }
15644 else
15645 {
15647 {
15649 {
15651 {
15653 }
15655 {
15657 }
15658 }
15660 }
15661 }
15662 }
15663 }
15664 });
15666 {
15667 progress.Message = Lang.gen[84].Value;
15669 {
15670 progress.Set((
double)(
num64 - 40) / (
double)(Main.maxTilesX - 80));
15672 {
15674 {
15677 }
15679 {
15681 }
15683 {
15686 {
15688 {
15691 {
15693 }
15695 {
15697 }
15700 {
15702 {
15704 }
15709 break;
15710 }
15711 }
15712 }
15714 {
15717 {
15719 {
15722 {
15724 }
15726 {
15728 }
15731 {
15736 break;
15737 }
15738 }
15739 }
15740 }
15742 {
15745 {
15750 }
15751 }
15752 }
15754 {
15757 {
15760 {
15762 }
15764 {
15766 }
15767 }
15768 }
15770 {
15772 }
15774 {
15776 }
15778 {
15793 {
15795 {
15804 }
15805 }
15806 }
15808 {
15822 {
15824 {
15833 }
15835 {
15837 if (!Main.tileSolid[Main.tile[
num90,
num65 + 2].type] || Main.tileSolidTop[Main.tile[
num90,
num65 + 2].type])
15838 {
15840 }
15841 }
15844 }
15845 }
15847 {
15861 {
15863 {
15872 }
15874 {
15876 if (!Main.tileSolid[Main.tile[
num100,
num65 + 2].type] || Main.tileSolidTop[Main.tile[
num100,
num65 + 2].type])
15877 {
15879 }
15880 }
15883 }
15884 }
15886 {
15893 {
15895 }
15897 {
15900 }
15904 {
15905 switch (Main.chest[
num108].item[0].type)
15906 {
15907 case 1156:
15909 break;
15910 case 1571:
15912 break;
15913 case 1569:
15915 break;
15916 case 1260:
15918 break;
15919 case 1572:
15921 break;
15922 }
15923 }
15925 {
15927 {
15936 }
15938 {
15940 if (!Main.tileSolid[Main.tile[
num109,
num65 + 2].type] || Main.tileSolidTop[Main.tile[
num109,
num65 + 2].type])
15941 {
15943 }
15944 }
15947 }
15948 }
15950 {
15955 {
15958 }
15964 {
15967 }
15970 {
15972 {
15981 }
15983 {
15985 if (!Main.tileSolid[Main.tile[
num119,
num65 + 2].type] || Main.tileSolidTop[Main.tile[
num119,
num65 + 2].type])
15986 {
15988 }
15989 }
15992 }
15993 }
15995 {
16001 {
16004 }
16008 {
16010 {
16019 }
16021 {
16024 {
16026 {
16028 }
16030 {
16032 }
16033 }
16034 }
16038 {
16041 }
16042 }
16044 {
16046 {
16049 }
16051 {
16054 }
16055 }
16056 }
16058 {
16060 }
16062 {
16064 }
16065 }
16066 }
16067 });
16069 {
16072 {
16074 {
16081 }
16082 Main.tile[GenVars.lAltarX +
num58, GenVars.lAltarY + 2].active(active:
true);
16083 Main.tile[GenVars.lAltarX +
num58, GenVars.lAltarY + 2].slope(0);
16084 Main.tile[GenVars.lAltarX +
num58, GenVars.lAltarY + 2].halfBrick(halfBrick:
false);
16085 Main.tile[GenVars.lAltarX +
num58, GenVars.lAltarY + 2].type = 226;
16086 }
16088 {
16090 {
16091 int i2 = GenVars.lAltarX +
num62;
16092 int j2 = GenVars.lAltarY +
num63;
16094 }
16095 }
16096 });
16098 {
16099 progress.Message = Lang.gen[76].Value;
16100 _ = (double)(Main.maxTilesX * Main.maxTilesY) / 5040000.0;
16101 double num36 = 10.0;
16103 {
16105 }
16112 {
16115 {
16116 break;
16117 }
16123 }
16126 {
16133 {
16135 {
16138 }
16139 else
16140 {
16143 {
16146 }
16147 }
16148 }
16149 }
16156 {
16159 }
16162 {
16164 {
16166 while (
num46++ <= Main.maxTilesX)
16167 {
16170 {
16171 origin2.X =
genRand.Next(50, (
int)((double)Main.maxTilesX * 0.3));
16172 }
16173 else
16174 {
16175 origin2.X =
genRand.Next((
int)((double)Main.maxTilesX * 0.7), Main.maxTilesX - 50);
16176 }
16178 {
16179 break;
16180 }
16181 }
16182 }
16183 }
16187 {
16193 {
16196 {
16197 break;
16198 }
16200 {
16202 }
16203 }
16204 }
16207 {
16211 {
16213 }
16217 {
16220 {
16221 break;
16222 }
16224 {
16226 {
16228 }
16229 }
16231 {
16233 }
16234 }
16235 }
16243 {
16245 {
16247 }
16249 }
16256 int maxTilesX = Main.maxTilesX;
16260 {
16262 {
16265 }
16266 else
16267 {
16269 if (
num52 > maxTilesX)
16270 {
16273 }
16274 }
16275 }
16282 {
16284 {
16287 }
16288 else
16289 {
16291 if (
num52 > maxTilesX)
16292 {
16295 }
16296 }
16297 }
16300 {
16301 double num55 = (double)Main.maxTilesX * 0.02;
16303 {
16305 }
16307 {
16309 }
16311 {
16313 {
16314 int x2 =
genRand.Next(200, Main.maxTilesX - 200);
16317 {
16318 break;
16319 }
16320 }
16321 }
16322 }
16324 });
16326 {
16327 progress.Message = Lang.gen[88].Value;
16328 int num28 = (int)Main.worldSurface;
16330 {
16331 num28 = Main.maxTilesY - 200;
16332 }
16334 {
16337 {
16339 {
16341 {
16343 {
16345 }
16346 else
16347 {
16350 {
16353 {
16355 }
16357 }
16358 }
16359 }
16361 {
16364 {
16365 }
16366 }
16367 }
16368 }
16369 int num35 = Main.UnderworldLayer;
16370 while ((
double)
num35 > Main.worldSurface)
16371 {
16373 {
16375 }
16376 else if (Main.tile[
num29,
num35].type == 549)
16377 {
16379 }
16381 }
16382 }
16383 });
16385 {
16388 {
16389 for (
int num25 = (
int)Main.worldSurface;
num25 < Main.maxTilesY - 20;
num25++)
16390 {
16392 {
16396 {
16397 case 0:
16399 break;
16400 case 1:
16402 break;
16403 case 2:
16405 break;
16406 case 3:
16408 break;
16409 case 4:
16411 break;
16412 case 5:
16414 break;
16415 case 6:
16417 break;
16418 }
16420 }
16422 {
16424 {
16426 }
16428 {
16430 }
16432 }
16433 }
16435 {
16437 {
16439 {
16441 }
16443 }
16445 {
16447 {
16449 }
16451 }
16453 {
16455 {
16457 }
16459 }
16460 }
16461 }
16462 });
16464 {
16466 {
16467 progress.Message = Lang.gen[82].Value;
16471 {
16475 {
16477 {
16479 }
16480 }
16481 }
16482 }
16483 });
16485 {
16486 Main.tileSolid[484] = false;
16488 progress.Message = Lang.gen[86].Value;
16489 for (
int i = 0;
i < Main.maxTilesX;
i++)
16490 {
16491 progress.Set((
double)i / (
double)Main.maxTilesX);
16492 for (
int j = 0;
j < Main.maxTilesY;
j++)
16493 {
16494 if (Main.tile[i,
j].active() && !
SolidTile(i,
j + 1) && (Main.tile[i,
j].type == 53 || Main.tile[i,
j].type == 112 || Main.tile[i,
j].type == 234 || Main.tile[i,
j].type == 224 || Main.tile[i,
j].type == 123))
16495 {
16496 if ((
double)
j < Main.worldSurface + 10.0 && !Main.tile[i,
j + 1].active() && Main.tile[i,
j + 1].wall != 191 && !
oceanDepths(i,
j))
16497 {
16498 int num = 10;
16501 {
16502 if (Main.tile[i,
k].active() && Main.tile[i,
k].type == 314)
16503 {
16504 num = 0;
16505 break;
16506 }
16507 }
16508 while (!Main.tile[i,
num2].active() && num > 0 &&
num2 < Main.maxTilesY - 50)
16509 {
16510 Main.tile[
i,
num2 - 1].slope(0);
16511 Main.tile[
i,
num2 - 1].halfBrick(halfBrick:
false);
16512 Main.tile[
i,
num2].active(active:
true);
16513 Main.tile[
i,
num2].type = Main.tile[
i,
j].type;
16514 Main.tile[
i,
num2].slope(0);
16515 Main.tile[
i,
num2].halfBrick(halfBrick:
false);
16517 num--;
16518 }
16519 if (num == 0 && !Main.tile[i,
num2].active())
16520 {
16521 switch (Main.tile[i,
j].type)
16522 {
16523 case 53:
16524 Main.tile[
i,
num2].type = 397;
16525 Main.tile[
i,
num2].active(active:
true);
16526 break;
16527 case 112:
16528 Main.tile[
i,
num2].type = 398;
16529 Main.tile[
i,
num2].active(active:
true);
16530 break;
16531 case 234:
16532 Main.tile[
i,
num2].type = 399;
16533 Main.tile[
i,
num2].active(active:
true);
16534 break;
16535 case 224:
16536 Main.tile[
i,
num2].type = 147;
16537 Main.tile[
i,
num2].active(active:
true);
16538 break;
16539 case 123:
16540 Main.tile[
i,
num2].type = 1;
16541 Main.tile[
i,
num2].active(active:
true);
16542 break;
16543 }
16544 }
16545 else if (Main.tile[i,
num2].active() && Main.tileSolid[Main.tile[i,
num2].type] && !Main.tileSolidTop[Main.tile[i,
num2].type])
16546 {
16547 Main.tile[
i,
num2].slope(0);
16548 Main.tile[
i,
num2].halfBrick(halfBrick:
false);
16549 }
16550 }
16551 else if (Main.tileSolid[Main.tile[i,
j + 1].type] && !Main.tileSolidTop[Main.tile[i,
j + 1].type] && (Main.tile[i,
j + 1].topSlope() || Main.tile[i,
j + 1].halfBrick()))
16552 {
16553 Main.tile[
i,
j + 1].slope(0);
16554 Main.tile[
i,
j + 1].halfBrick(halfBrick:
false);
16555 }
16556 else
16557 {
16558 switch (Main.tile[i,
j].type)
16559 {
16560 case 53:
16561 Main.tile[
i,
j].type = 397;
16562 break;
16563 case 112:
16564 Main.tile[
i,
j].type = 398;
16565 break;
16566 case 234:
16567 Main.tile[
i,
j].type = 399;
16568 break;
16569 case 224:
16570 Main.tile[
i,
j].type = 147;
16571 break;
16572 case 123:
16573 Main.tile[
i,
j].type = 1;
16574 break;
16575 }
16576 }
16577 if (Main.tile[i,
j - 1].type == 323)
16578 {
16580 }
16581 }
16582 if ((Main.tile[i,
j].wall == 187 || Main.tile[i,
j].wall == 216) && Main.tile[i,
j].liquid > 0 && !
remixWorldGen)
16583 {
16584 Main.tile[
i,
j].liquid =
byte.MaxValue;
16585 Main.tile[
i,
j].lava(lava:
true);
16586 }
16587 if (Main.tile[i,
j].type == 485 || Main.tile[i,
j].type == 187 || Main.tile[i,
j].type == 165)
16588 {
16590 }
16591 if (Main.tile[i,
j].type == 28)
16592 {
16594 }
16595 if (Main.tile[i,
j].type == 10 || Main.tile[i,
j].type == 11)
16596 {
16598 }
16599 if (Main.tile[i,
j].type == 26)
16600 {
16602 }
16604 {
16606 }
16607 if (Main.tile[i,
j].type == 137)
16608 {
16609 Main.tile[
i,
j].slope(0);
16610 Main.tile[
i,
j].halfBrick(halfBrick:
false);
16611 }
16613 {
16614 int num3 = Main.tile[
i,
j].frameX / 18;
16617 int num5 = Main.tile[
i,
j].frameY / 18;
16620 bool flag = false;
16621 for (
int l = 0;
l < 2;
l++)
16622 {
16624 if (tile != null && tile.active() && tile.type == 26)
16625 {
16626 flag = true;
16627 break;
16628 }
16629 for (
int m = 0;
m < 2;
m++)
16630 {
16636 Main.tile[
num7,
num8].type = Main.tile[
i,
j].type;
16639 }
16640 }
16641 if (flag)
16642 {
16644 if (Main.tile[i,
j].type == 484)
16645 {
16647 }
16648 for (
int n = 0;
n < 2;
n++)
16649 {
16651 {
16660 }
16661 }
16662 }
16663 }
16664 if (Main.tile[i,
j].type == 323 && Main.tile[i,
j].liquid > 0)
16665 {
16667 }
16668 if (Main.wallDungeon[Main.tile[i,
j].wall])
16669 {
16670 Main.tile[
i,
j].lava(lava:
false);
16671 if (Main.tile[i,
j].active() && Main.tile[i,
j].type == 56)
16672 {
16674 Main.tile[
i,
j].lava(lava:
false);
16675 Main.tile[
i,
j].liquid =
byte.MaxValue;
16676 }
16677 }
16678 if (Main.tile[i,
j].active() && Main.tile[i,
j].type == 314)
16679 {
16684 {
16685 Main.tile[
i,
num14].liquid = 0;
16687 }
16689 {
16690 Main.tile[
i,
num14].liquid = 0;
16691 }
16692 }
16693 if (Main.tile[i,
j].active() && Main.tile[i,
j].type == 332 && !Main.tile[i,
j + 1].active())
16694 {
16695 Main.tile[
i,
j + 1].ClearEverything();
16696 Main.tile[
i,
j + 1].active(active:
true);
16697 Main.tile[
i,
j + 1].type = 332;
16698 }
16699 if (i >
beachDistance && i < Main.maxTilesX -
beachDistance && (
double)
j < Main.worldSurface && Main.tile[i,
j].liquid > 0 && Main.tile[i,
j].liquid <
byte.MaxValue && Main.tile[i - 1,
j].liquid <
byte.MaxValue && Main.tile[i + 1,
j].liquid <
byte.MaxValue && Main.tile[i,
j + 1].liquid <
byte.MaxValue && !
TileID.
Sets.
Clouds[Main.tile[i - 1,
j].type] && !
TileID.
Sets.
Clouds[Main.tile[i + 1,
j].type] && !
TileID.
Sets.
Clouds[Main.tile[i,
j + 1].type])
16700 {
16701 Main.tile[
i,
j].liquid = 0;
16702 }
16703 }
16704 }
16708 {
16709 1 => 6,
16710 2 => 9,
16712 };
16714 {
16716 }
16724 {
16727 {
16728 break;
16729 }
16734 {
16737 {
16739 }
16741 {
16745 tile2.type = 668;
16746 }
16747 }
16748 }
16750 {
16752 }
16753 if (Main.tenthAnniversaryWorld)
16754 {
16756 }
16758 {
16760 }
16762 {
16765 }
16767 {
16769 }
16771 {
16773 }
16778 Main.tileSolid[659] = true;
16780 Main.tileSolid[484] = true;
16782 Main.AnglerQuestSwap();
16784 progress.Message = Lang.gen[87].Value;
16785 });
16791 }
bool ICollection< KeyValuePair< TKey, TValue > >. Remove(KeyValuePair< TKey, TValue > keyValuePair)
bool ICollection< KeyValuePair< TKey, TValue > >. Contains(KeyValuePair< TKey, TValue > keyValuePair)
void Add(TKey key, TValue value)
static double Cos(double d)
static byte Min(byte val1, byte val2)
static double Abs(double value)
static double Sin(double a)
static void Sleep(int millisecondsTimeout)
static bool CanPlace(Point origin, StructureMap structures)
static List< int > CelebratingNPCs
static bool[] HardenedSand
static bool[] SlowlyDiesInWater
static bool[] CanBeClearedDuringGeneration
static bool[] IsATreeTrunk
static readonly ushort Count
static string GetTextValue(string key)
static GenAction Chain(params GenAction[] actions)
GenAction Output(ShapeData data)
static int beachSandRandomWidthRange
static readonly int oasisHeight
static int[] floatingIslandHouseY
static Rectangle UndergroundDesertHiveLocation
static int rightBeachStart
static int[] floatingIslandStyle
static int beachSandJungleExtraWidth
static int snowOriginLeft
static Point[] oasisPosition
static int dungeonLocation
static int shellStartYRight
static readonly int maxTunnels
static int shellStartXLeft
static int oceanWaterStartRandomMin
static double worldSurfaceHigh
static int[] floatingIslandHouseX
static WorldGenConfiguration configuration
static int numMushroomBiomes
static Point[] oceanCaveTreasure
static readonly int maxLakes
static int evilBiomeBeachAvoidance
static double rockLayerLow
static int smallHolesBeachAvoidance
static double worldSurface
static int numIslandHouses
static int lakesBeachAvoidance
static Vector2D shimmerPosition
static double worldSurfaceLow
static int oceanWaterForcedJungleLength
static Point[] mushroomBiomesPosition
static int surfaceCavesBeachAvoidance2
static int beachSandRandomCenter
static readonly int maxMushroomBiomes
static List< int > StatuesWithTraps
static int numOceanCaveTreasure
static int oceanWaterStartRandomMax
static int beachSandDungeonExtraWidth
static int shellStartYLeft
static int shellStartXRight
static StructureMap structures
static Point16[] statueList
static int evilBiomeAvoidanceMidFixer
static readonly int maxOrePatch
static Rectangle UndergroundDesertLocation
static ushort crackedType
static double rockLayerHigh
static int snowOriginRight
static WorldGenConfiguration FromEmbeddedPath(string path)
static bool Gen(Point origin, GenShape shape, GenAction action)
static bool tempRemixWorldGen
static void AddGenerationPass(string name, WorldGenLegacyMethod method)
static readonly int cactusWaterHeight
static int SmallConsecutivesEliminated
static void randMoss(bool justNeon=false)
static bool growGrassUnderground
static int WorldGenParam_Evil
static void CloudIsland(int i, int j)
static void oceanCave(int i, int j)
static void PlaceOasisPlant(int X, int Y, ushort type=530)
static void FinishTenthAnniversaryWorld()
static bool placeTNTBarrel(int x, int y)
static bool remixWorldGen
static void MakeDungeon(int x, int y)
static int CountNearBlocksTypes(int i, int j, int radius, int cap=0, params int[] tiletypes)
static Point RandomRectanglePoint(Rectangle rectangle)
static void Place3x2(int x, int y, ushort type, int style=0)
static bool PlaceSmallPile(int i, int j, int X, int Y, ushort type=185)
static bool placeLavaTrap(int x, int y)
static void FinishNotTheBees()
static void KillTile(int i, int j, bool fail=false, bool effectOnly=false, bool noItem=false)
static void PlantCactus(int i, int j)
static bool everythingWorldGen
static void FinishDrunkGen()
static void GrowCheckSeaweed(int x, int y)
static bool GrowPalmTree(int i, int y)
static void MakeWateryIceThing(int i, int j)
static readonly int cactusWaterWidth
static bool TryGrowingTreeByType(int treeTileType, int checkedX, int checkedY)
static bool noTrapsWorldGen
static bool GrowLivingTree(int i, int j, bool patch=false)
static readonly int shimmerSafetyDistance
static bool PlaceTile(int i, int j, int Type, bool mute=false, bool forced=false, int plr=-1, int style=0)
static bool tenthAnniversaryWorldGen
static bool PoundTile(int i, int j)
static void SonOfLakinater(int i, int j, double strengthMultiplier=1.0)
static int SmallConsecutivesFound
static UnifiedRandom genRand
static void RandomizeBackgrounds(UnifiedRandom random)
static TreeTopsInfo TreeTops
static bool PlaceLilyPad(int x, int j)
static void Caverer(int X, int Y)
static bool CanKillTile(int i, int j, SpecialKillTileContext context)
static void RandomizeWeather()
static void ChasmRunner(int i, int j, int steps, bool makeOrb=false)
static bool PlaceOasis(int X, int Y)
static Point PlaceCatTail(int x, int j)
static void DesertCloudIsland(int i, int j)
static int GetWorldSize()
static void FinishRemixWorld()
static bool tempTenthAnniversaryWorldGen
static void AddHellHouses()
static bool dontStarveWorldGen
static void ShimmerCleanUp()
static bool drunkWorldGenText
static void Mountinater(int i, int j)
static int RollRandomSeaShellStyle()
static void RandomizeTreeStyle()
static bool oceanDepths(int x, int y)
static void ConsumePostGenActions(StructureMap structures)
static readonly int beachDistance
static void plantDye(int i, int j, bool exoticPlant=false)
static bool AddBuriedChest(Point point, int contain=0, bool notNearOtherChests=false, int Style=-1)
static void FinishNoTraps()
static void SetupStatueList()
static void PlaceJunglePlant(int X2, int Y2, ushort type, int styleX, int styleY)
static void CaveOpenater(int i, int j)
static void templePart2()
static bool GrowMoreVines(int x, int y)
static void Convert(int i, int j, int conversionType, int size=4)
static void TileFrame(int i, int j, bool resetFrame=false, bool noBreak=false)
static bool noTileActions
static double TuneOceanDepth(int count, double depth, bool floridaStyle=false)
static bool ShimmerMakeBiome(int X, int Y)
static void neonMossBiome(int i, int j, int maxY=99999)
static bool SlopeTile(int i, int j, int slope=0, bool noEffects=false)
static void CloudLake(int i, int j)
static bool GrowSeaOat(int x, int y)
static void SnowCloudIsland(int i, int j)
static bool PlaceBamboo(int x, int y)
static bool MarblePileWithStatues(int X, int Y)
static void ScanTileColumnAndRemoveClumps(int x)
static bool ShellPile(int X, int Y)
static Point GetAdjustedFloorPosition(int x, int y)
static readonly int cactusWaterLimit
static UnifiedRandom _genRand
static void RandomizeMoonState(UnifiedRandom random, bool garenteeNewStyle=false)
static bool PlacePot(int x, int y, ushort type=28, int style=0)
static void RandomizeCaveBackgrounds()
static void MatureTheHerbPlants()
static bool PlantSeaOat(int x, int y)
static int countDirtTiles(int x, int y)
static WorldGenerator _generator
static void PlaceWall(int i, int j, int type, bool mute=false)
static void GrowGlowTulips()
static void PlaceStatueTrap(int x, int y)
static void DirtyRockRunner(int i, int j)
static void CrimStart(int i, int j)
static void SpreadGrass(int i, int j, int dirt=0, int grass=2, bool repeat=true, TileColorCache color=default(TileColorCache))
static void ResetGenerator()
static bool drunkWorldGen
static bool skipFramingDuringGen
static int GetNextJungleChestItem()
static void TileRunner(int i, int j, double strength, int steps, int type, bool addTile=false, double speedX=0.0, double speedY=0.0, bool noYChange=false, bool overRide=true, int ignoreTileType=-1)
static void GrowUndergroundTree(int i, int y)
static bool Pyramid(int i, int j)
static bool InWorld(int x, int y, int fluff=0)
static void ShroomPatch(int i, int j)
static void SquareTileFrame(int i, int j, bool resetFrame=true)
static bool OrePatch(int X, int Y)
static void gemCave(int x, int y)
static bool placeTrap(int x2, int y2, int type=-1)
static void WavyCaverer(int startX, int startY, double waveStrengthScalar, double wavePercentScalar, int steps, int type)
static bool StonePatch(int X, int Y)
static void makeTemple(int x, int y)
static bool getGoodWorldGen
static void PlaceTight(int x, int y, bool spiders=false)
static void AddTrees(bool undergroundOnly=false)
static void ClearBrokenTraps(Point startTileCoords, List< Point > pointsWeAlreadyWentOver)
static int countTiles(int x, int y, bool jungle=false, bool lavaOk=false)
static void CrimPlaceHearts()
static void GrowCatTail(int x, int j)
static Point RandomWorldPoint(int padding)
static void setMoss(int x, int y)
static bool PlaceSandTrap(int i, int j)
static void Cavinator(int i, int j, int steps)
static void FinishGetGoodWorld()
static bool AddLifeCrystal(int i, int j)
static bool SolidOrSlopedTile(Tile tile)
static bool IsTileNearby(int x, int y, int type, int distance)
static void FillWallHolesInArea(Rectangle worldCoordsArea)
static double Distance(Vector2D value1, Vector2D value2)