23421 {
23424 if (Main.rand == null)
23425 {
23427 }
23428 double num = (double)
genRand.Next(300, 400) * 0.001;
23429 double num2 = (double)
genRand.Next(200, 300) * 0.001;
23430 int num3 = (int)((
double)Main.maxTilesX * num);
23431 int num4 = (int)((
double)Main.maxTilesX * (1.0 - num));
23434 {
23435 num4 = (int)((
double)Main.maxTilesX * num);
23436 num3 = (int)((
double)Main.maxTilesX * (1.0 - num));
23438 }
23441 {
23443 }
23445 {
23447 {
23448 num4 = (int)((
double)Main.maxTilesX *
num2);
23449 }
23450 else
23451 {
23452 num3 = (int)((
double)Main.maxTilesX *
num2);
23453 }
23454 }
23456 {
23457 num4 = (int)((
double)Main.maxTilesX * (1.0 -
num2));
23458 }
23459 else
23460 {
23461 num3 = (int)((
double)Main.maxTilesX * (1.0 -
num2));
23462 }
23463 if (Main.remixWorld)
23464 {
23465 int num7 = Main.maxTilesX / 7;
23466 int num8 = Main.maxTilesX / 14;
23467 if (Main.dungeonX < Main.maxTilesX / 2)
23468 {
23469 for (
int i = Main.maxTilesX -
num7 -
num8;
i < Main.maxTilesX;
i++)
23470 {
23471 for (
int j = (
int)Main.worldSurface +
genRand.Next(-1, 2);
j < Main.maxTilesY - 10;
j++)
23472 {
23473 if (i > Main.maxTilesX -
num7)
23474 {
23476 }
23478 {
23480 }
23481 }
23482 }
23483 }
23484 else
23485 {
23487 {
23488 for (
int l = (
int)Main.worldSurface +
genRand.Next(-1, 2);
l < Main.maxTilesY - 10;
l++)
23489 {
23491 {
23493 }
23495 {
23497 }
23498 }
23499 }
23500 }
23501 }
23502 else
23503 {
23506 }
23507 double num9 = (double)Main.maxTilesX / 4200.0;
23512 {
23513 if (++
num11 % 15000 == 0)
23514 {
23516 }
23518 Tile tile = Main.tile[point.
X, point.
Y];
23519 Tile tile2 = Main.tile[point.
X, point.Y - 1];
23522 {
23524 }
23526 {
23528 }
23530 {
23532 }
23533 if (tile.active() &&
num12 != 0 && !
tile2.active())
23534 {
23535 bool flag =
WorldUtils.
Gen(
new Point(point.
X, point.
Y - 1),
new ShapeFloodFill(1000),
Actions.
Chain(
new Modifiers.
IsNotSolid(),
new Modifiers.
OnlyWalls(0, 54, 55, 56, 57, 58, 59, 61, 185, 212, 213, 214, 215, 2, 196, 197, 198, 199, 15, 40, 71, 64, 204, 205, 206, 207, 208, 209, 210, 211, 71),
new Actions.
Blank().
Output(
shapeData)));
23537 {
23540 }
23542 }
23543 }
23544 if (Main.netMode == 0)
23545 {
23546 Main.NewText(Lang.misc[15].Value, 50, byte.MaxValue, 130);
23547 }
23548 else if (Main.netMode == 2)
23549 {
23551 }
23553 if (Main.netMode == 2)
23554 {
23555 Netplay.ResetSections();
23556 }
23559 }
static void BroadcastChatMessage(NetworkText text, Color color, int excludedPlayer=-1)
static void NotifyProgressionEvent(int eventID)
static NetworkText FromKey(string key, params object[] substitutions)
static GenAction Chain(params GenAction[] actions)
GenAction Output(ShapeData data)
static bool Gen(Point origin, GenShape shape, GenAction action)
static void TryProtectingSpawnedItems()
static void UndoSpawnedItemProtection()
static UnifiedRandom genRand
static void GERunner(int i, int j, double speedX=0.0, double speedY=0.0, bool good=true)
static void Convert(int i, int j, int conversionType, int size=4)
static void PlaceWall(int i, int j, int type, bool mute=false)
static Point RandomWorldPoint(int padding)
static bool IsGeneratingHardMode