7814 {
7820 Main.afterPartyOfDoom = false;
7822 {
7825 Main.drunkWorld = true;
7827 seed = Main.rand.Next(999999999);
7828 if (!Main.dayTime)
7829 {
7830 Main.time = 0.0;
7831 }
7832 }
7833 else if (
seed == 5162021 ||
seed == 5162011)
7834 {
7836 }
7839 {
7841 seed = Main.rand.Next(999999999);
7842 }
7845 {
7847 seed = Main.rand.Next(999999999);
7848 }
7850 {
7851 Main.getGoodWorld = true;
7853 seed = Main.rand.Next(999999999);
7854 }
7855 else
7856 {
7857 Main.getGoodWorld = false;
7858 }
7861 {
7863 seed = Main.rand.Next(999999999);
7864 }
7867 {
7869 seed = Main.rand.Next(999999999);
7870 }
7873 {
7875 seed = Main.rand.Next(999999999);
7876 }
7878 Utils.LogAndConsoleInfoMessageFormat(
"Creating world - Seed: {0}, Width: {1}, Height: {2}, Evil: {3}, IsExpert: {4}",
seed, Main.maxTilesX, Main.maxTilesY,
WorldGenParam_Evil, Main.expertMode);
7879 Main.lockMenuBGChange = true;
7882 Logging.
Terraria.InfoFormat(
"Generating World: {0}", (
object)Main.ActiveWorldFileData.Name);
7888 GenVars.desertHiveHigh = Main.maxTilesY;
7889 GenVars.desertHiveLow = 0;
7890 GenVars.desertHiveLeft = Main.maxTilesX;
7891 GenVars.desertHiveRight = 0;
7892 GenVars.worldSurfaceLow = 0.0;
7893 GenVars.worldSurface = 0.0;
7894 GenVars.worldSurfaceHigh = 0.0;
7895 GenVars.rockLayerLow = 0.0;
7896 GenVars.rockLayer = 0.0;
7897 GenVars.rockLayerHigh = 0.0;
7898 GenVars.copper = 7;
7899 GenVars.iron = 6;
7900 GenVars.silver = 9;
7901 GenVars.gold = 8;
7902 GenVars.dungeonSide = 0;
7903 GenVars.jungleHut = (ushort)
genRand.Next(5);
7904 GenVars.shellStartXLeft = 0;
7905 GenVars.shellStartYLeft = 0;
7906 GenVars.shellStartXRight = 0;
7907 GenVars.shellStartYRight = 0;
7908 GenVars.PyrX = null;
7909 GenVars.PyrY = null;
7910 GenVars.numPyr = 0;
7911 GenVars.jungleMinX = -1;
7912 GenVars.jungleMaxX = -1;
7913 GenVars.snowMinX = new int[Main.maxTilesY];
7914 GenVars.snowMaxX = new int[Main.maxTilesY];
7915 GenVars.snowTop = 0;
7916 GenVars.snowBottom = 0;
7917 GenVars.skyLakes = 1;
7918 if (Main.maxTilesX > 8000)
7919 {
7921 }
7922 if (Main.maxTilesX > 6000)
7923 {
7925 }
7926 GenVars.beachBordersWidth = 275;
7927 GenVars.beachSandRandomCenter = GenVars.beachBordersWidth + 5 + 40;
7928 GenVars.beachSandRandomWidthRange = 20;
7929 GenVars.beachSandDungeonExtraWidth = 40;
7930 GenVars.beachSandJungleExtraWidth = 20;
7931 GenVars.oceanWaterStartRandomMin = 220;
7932 GenVars.oceanWaterStartRandomMax = GenVars.oceanWaterStartRandomMin + 40;
7933 GenVars.oceanWaterForcedJungleLength = 275;
7934 GenVars.leftBeachEnd = 0;
7935 GenVars.rightBeachStart = 0;
7936 GenVars.evilBiomeBeachAvoidance = GenVars.beachSandRandomCenter + 60;
7937 GenVars.evilBiomeAvoidanceMidFixer = 50;
7938 GenVars.lakesBeachAvoidance = GenVars.beachSandRandomCenter + 20;
7939 GenVars.smallHolesBeachAvoidance = GenVars.beachSandRandomCenter + 20;
7940 GenVars.surfaceCavesBeachAvoidance = GenVars.beachSandRandomCenter + 20;
7941 GenVars.surfaceCavesBeachAvoidance2 = GenVars.beachSandRandomCenter + 20;
7942 GenVars.jungleOriginX = 0;
7943 GenVars.snowOriginLeft = 0;
7944 GenVars.snowOriginRight = 0;
7945 GenVars.logX = -1;
7946 GenVars.logY = -1;
7947 GenVars.dungeonLocation = 0;
7950 {
7951 Main.starGame = true;
7952 }
7955 }
static void PreWorldGen()
This is where all T:Terraria.ModLoader.ModSystem hooks are gathered and called.
static WorldGenConfiguration configuration
static WorldGenConfiguration FromEmbeddedPath(string path)
static bool tempRemixWorldGen
static int WorldGenParam_Evil
static bool remixWorldGen
static void AddGenPassesFromLoadTime()
static bool everythingWorldGen
static bool noTrapsWorldGen
static bool tenthAnniversaryWorldGen
static UnifiedRandom genRand
static bool tempTenthAnniversaryWorldGen
static bool dontStarveWorldGen
static bool drunkWorldGenText
static void GenerateWorld_RunTasksAndFinish(int seed, Stopwatch generationStopwatch, GenerationProgress customProgressObject)
static UnifiedRandom _genRand
static WorldGenerator _generator
static bool drunkWorldGen
static bool getGoodWorldGen