예제 #1
0
        public override void ModifyWorldGenTasks(List <GenPass> tasks, ref float totalWeight)
        {
            ///a
            int ShiniesIndex = tasks.FindIndex(genpass => genpass.Name.Equals("Final Cleanup"));

            if (ShiniesIndex == -1)
            {
                return;
            }
            tasks.Insert(ShiniesIndex + 1, new PassLegacy("JadeTemple", delegate(GenerationProgress progress)
            {
                progress.Message = "Sealing away spirits";

                //island gen
                int XTILE = WorldGen.genRand.Next(300, Main.maxTilesX - 1000);
                int yAxis = Main.maxTilesY / 10;
                for (int xAxis = XTILE; xAxis < XTILE + 150; xAxis++)
                {
                    int Slope2       = Math.Abs(Main.rand.Next(67, 83) - Math.Abs((xAxis - XTILE) - Main.rand.Next(67, 83))) / 3;
                    string SlopeText = Slope2.ToString();
                    //Main.NewText(SlopeText, Color.Orange.R, Color.Orange.G, Color.Orange.B);
                    for (int I = 0; I < Slope2; I++)
                    {
                        WorldMethods.TileRunner(xAxis, yAxis + I, (double)19, 1, 2, true, 0f, 0f, true, true);
                    }
                    WorldMethods.TileRunner(xAxis, yAxis, (double)19, 1, 2, true, 0f, 0f, true, true);
                    if (Main.rand.Next(30) == 0)
                    {
                        WorldMethods.TileRunner(xAxis, yAxis - 5, (double)19, 1, 2, true, 0f, 0f, true, true);
                    }
                }

                //temple gen
                progress.Message = "Sealing away spirits; Creating base";
                int center       = XTILE + 75;
                int centerY      = yAxis - 20;
                WorldMethods.TempleBasee(center, centerY, 14, 13, (ushort)30, 1, false, (ushort)2);

                //rooftop

                progress.Message = "Sealing away spirits; Building roof";
                int baseY        = yAxis - 30;
                WorldMethods.TempleRoof((int)center, (int)baseY, 55, 55, 190, 312);
            }));

            tasks.Insert(ShiniesIndex + 1, new PassLegacy("DynastyBiome", delegate(GenerationProgress progress)
            {
                progress.Message = "Generating Hidden Ninja Village... WHATAAAA";

                dynastyBiome = new DynastyBiome(mod);
                dynastyBiome.Generate();
            }));
        }
예제 #2
0
        public static void TempleRoof(int X, int Y, int width, int height, int rotation1, ushort type)
        {
            int width2 = width / 3;

            for (int rotation2 = rotation1; rotation2 < 350; rotation2++)
            {
                int DistX = (int)(0 - (Math.Sin(rotation2) * (width / 4)));
                int DistY = (int)(0 - (Math.Cos(rotation2) * (height / 4)));
                if (DistY > 5)
                {
                    WorldMethods.TileRunner(X + DistX + width2, (Y - (height / 3)) + DistY, (double)4, 1, type, true, 0f, 0f, false, true);
                    WorldMethods.TileRunner(X + (DistX - width2), (Y - (height / 3)) + DistY, (double)4, 1, type, true, 0f, 0f, false, true);
                }
            }
            //fourth on each side
            WorldMethods.TempleBasee(X, (Y - height / 2) - 5, 2, (height / 3) + 8, type, 3, true, (ushort)2);
        }
예제 #3
0
        internal void RoundHole(int X, int Y, int Xmult, int Ymult, int strength, bool initialdig, bool grassy = false)
        {
            if (initialdig)
            {
                WorldGen.digTunnel(X, Y, 0, 0, strength, strength, false);
            }

            for (int rotation2 = 0; rotation2 < 350; rotation2++)
            {
                int DistX = (int)(0 - (Math.Sin(rotation2) * Xmult));
                int DistY = (int)(0 - (Math.Cos(rotation2) * Ymult));

                WorldGen.digTunnel(X + DistX, Y + DistY, 0, 0, strength, strength, false);
            }
            for (int rotation3 = 0; rotation3 < 350; rotation3++)
            {
                int Dist2X = (int)(0 - (Math.Sin(rotation3) * Xmult));
                int Dist2Y = (int)(0 - (Math.Cos(rotation3) * Ymult));
                if (grassy && Math.Cos(rotation3) < -0.1f)
                {
                    WorldMethods.TileRunner(X + (Dist2X * 2), Y + (Dist2Y * 3) + Ymult, (strength / 2), 1, 2, true, 0f, 0f, true, true); //placeholder
                }
            }
        }