Exemplo n.º 1
0
        internal static void AgeSnowRoom(Rectangle room)
        {
            WorldUtils.Gen(new Point(room.X, room.Y), new Shapes.Rectangle(room.Width, room.Height), Actions.Chain(new GenAction[]
            {
                new Modifiers.Dither(0.60000002384185791),
                new Modifiers.Blotches(2, 0.60000002384185791),
                new Modifiers.OnlyTiles(new ushort[]
                {
                    CaveHouseBiome.BuildData.Snow.Tile
                }),
                new Actions.SetTile(161, true, true),
                new Modifiers.Dither(0.8),
                new Actions.SetTile(147, true, true)
            }));
            WorldUtils.Gen(new Point(room.X + 1, room.Y), new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain(new GenAction[]
            {
                new Modifiers.Dither(0.5),
                new Modifiers.OnlyTiles(new ushort[]
                {
                    161
                }),
                new Modifiers.Offset(0, 1),
                new ActionStalagtite()
            }));
            WorldUtils.Gen(new Point(room.X + 1, room.Y + room.Height - 1), new Shapes.Rectangle(room.Width - 2, 1), Actions.Chain(new GenAction[]
            {
                new Modifiers.Dither(0.5),
                new Modifiers.OnlyTiles(new ushort[]
                {
                    161
                }),
                new Modifiers.Offset(0, 1),
                new ActionStalagtite()
            }));

            GenAction action;
            if ((double)room.Y > Main.worldSurface)
            {
                action = new Actions.ClearWall(true);
            }
            else
            {
                action = new Actions.PlaceWall(40, true);
            }

            WorldUtils.Gen(new Point(room.X, room.Y), new Shapes.Rectangle(room.Width, room.Height), Actions.Chain(new GenAction[]
            {
                new Modifiers.Dither(0.85000002384185791),
                new Modifiers.Blotches(2, 0.8),
                action
            }));
        }
Exemplo n.º 2
0
        internal static void AgeDefaultRoom(Rectangle room)
        {
            for (int i = 0; i < room.Width * room.Height / 16; i++)
            {
                int num = GenBase._random.Next(1, room.Width - 1) + room.X;
                int num2 = GenBase._random.Next(1, room.Height - 1) + room.Y;
                WorldUtils.Gen(new Point(num, num2), new Shapes.Rectangle(2, 2), Actions.Chain(new GenAction[]
                {
                    new Modifiers.Dither(0.5),
                    new Modifiers.Blotches(2, 2.0),
                    new Modifiers.IsEmpty(),
                    new Actions.SetTile(51, true, true)
                }));
            }

            GenAction action;
            if ((double)room.Y > Main.worldSurface)
            {
                action = new Actions.ClearWall(true);
            }
            else
            {
                action = new Actions.PlaceWall(2, true);
            }

            WorldUtils.Gen(new Point(room.X, room.Y), new Shapes.Rectangle(room.Width, room.Height), Actions.Chain(new GenAction[]
            {
                new Modifiers.Dither(0.85000002384185791),
                new Modifiers.Blotches(2, 0.3),
                new Modifiers.OnlyWalls(new byte[]
                {
                    CaveHouseBiome.BuildData.Default.Wall
                }),
                action
            }));
            WorldUtils.Gen(new Point(room.X, room.Y), new Shapes.Rectangle(room.Width, room.Height), Actions.Chain(new GenAction[]
            {
                new Modifiers.Dither(0.949999988079071),
                new Modifiers.OnlyTiles(new ushort[]
                {
                    30,
                    321,
                    158
                }),
                new Actions.ClearTile(true)
            }));
        }