コード例 #1
0
        public void reset(int seed)
        {
            WorldGen._lastSeed = seed;
            _generator         = new WorldGenerator(seed);
            Main.rand          = new UnifiedRandom(seed);
            MicroBiome.ResetAll();
            WorldGen.worldSurfaceLow = 0.0;
            copper      = 7;
            iron        = 6;
            silver      = 9;
            gold        = 8;
            dungeonSide = 0;
            jungleHut   = (ushort)WorldGen.genRand.Next(5);
            howFar      = 0;
            PyrX        = null;
            PyrY        = null;
            numPyr      = 0;
            snowMinX    = new int[Main.maxTilesY];
            snowMaxX    = new int[Main.maxTilesY];
            snowTop     = 0;
            snowBottom  = 0;
            dub2        = 0f;

            worldSurface     = 0.0;
            rockLayer        = 0.0;
            worldSurfaceHigh = 0.0;
            rockLayerLow     = 0.0;
            rockLayerHigh    = 0.0;

            WorldHooks.PreWorldGen();
        }
コード例 #2
0
        private void final(GenerationProgress customProgressObject)
        {
            float weight = GetTotalLoadWeight(_generator);

            WorldHooks.ModifyWorldGenTasks(GetPasses(_generator), ref weight);
            SetTotalLoadWeight(_generator, weight);
            Main.menuMode = 888;
            _generator.GenerateWorld(customProgressObject);
            WorldHooks.PostWorldGen();
            Main.WorldFileMetadata = FileMetadata.FromCurrentSettings(FileType.World);
        }
コード例 #3
0
ファイル: Rendering.cs プロジェクト: jack-javana/Terraria3D
 public static void PostDrawTiles()
 {
     using (_sb.End())
         WorldHooks.PostDrawTiles();
 }