Ejemplo n.º 1
0
        public override bool Place(Point origin, StructureMap structures)
        {
            //this handles generating the actual tiles, but you still need to add things like treegen etc. I know next to nothing about treegen so you're on your own there, lol.

            Mod mod         = SauceMod.instance;
            int biomeRadius = 300;

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>();

            colorToTile[new Color(0, 255, 0)] = -2;
            colorToTile[Color.Black]          = -1; //don't touch when genning


            Texture2D Infection = mod.GetTexture("WorldGen/SauceWorld_Tiles");

            TexGen gen       = BaseWorldGenTex.GetTexGenerator(Infection, colorToTile);
            Point  newOrigin = new Point(origin.X, origin.Y);                                       //biomeRadius);

            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //remove all fluids in sphere...
            {
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new Actions.SetLiquid(0, 0)
            }));
            WorldUtils.Gen(new Point(origin.X - (gen.width / 2), origin.Y - 20), new Shapes.Rectangle(gen.width, gen.height), Actions.Chain(new GenAction[] //remove all fluids in the volcano...
            {
                new Actions.SetLiquid(0, 0)
            }));
            gen.Generate(origin.X - (gen.width / 2), origin.Y, true, true);

            return(true);
        }
Ejemplo n.º 2
0
        public override bool Place(Point origin, StructureMap structures)
        {
            Mod mod = DBTMod.Instance;

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>
            {
                [new Color(54, 50, 255)] = TileID.Titanstone,
                [Color.Black]            = -1
            };

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>
            {
                [new Color(255, 229, 0)]  = WallID.DiamondGemspark,
                [new Color(255, 97, 0)]   = WallID.DiamondGemsparkOff,
                [new Color(242, 0, 255)]  = WallID.SapphireGemsparkOff,
                [new Color(148, 255, 48)] = WallID.Cloud,
                [Color.Black]             = -1
            };

            TexGen gen = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("Generation/GravChamberTiles"), colorToTile, mod.GetTexture("Generation/GravChamberWalls"), colorToWall, null, mod.GetTexture("Generation/GravChamberSlopes"));

            gen.Generate(origin.X, origin.Y, true, true);

            return(true);
        }
Ejemplo n.º 3
0
        public override bool Place(Point origin, StructureMap structures)
        {
            Mod mod = CSkies.inst;

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>
            {
                [new Color(255, 0, 0)]     = ModContent.TileType <HeatEngineBrickUnsafe>(),
                [new Color(255, 255, 0)]   = ModContent.TileType <HeatGlass>(),
                [new Color(255, 0, 255)]   = ModContent.TileType <CoreValve>(),
                [new Color(0, 0, 255)]     = ModContent.TileType <ScrapHeap>(),
                [new Color(255, 255, 255)] = -1,
                [Color.Black] = -2
            };

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>
            {
                [new Color(0, 255, 0)] = ModContent.WallType <HeatEngineWallUnsafe>(),
                [new Color(255, 0, 0)] = ModContent.WallType <HeatCircuitWall>(),
                [Color.Black]          = -1
            };

            TexGen gen = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("Worldgen/MagmaCore"), colorToTile, mod.GetTexture("Worldgen/MagmaCoreWalls"), colorToWall, mod.GetTexture("Worldgen/MagmaCore_Lava"), mod.GetTexture("Worldgen/MagmaCore_Slope"));

            gen.Generate(origin.X, origin.Y, true, true);

            return(true);
        }
Ejemplo n.º 4
0
        public override bool Place(Point origin, StructureMap structures)
        {
            //this handles generating the actual tiles, but you still need to add things like treegen etc. I know next to nothing about treegen so you're on your own there, lol.

            Mod mod = JetshiftMod.instance;

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>();

            colorToTile[new Color(51, 51, 51)]    = -2;
            colorToTile[new Color(120, 120, 120)] = -2;
            colorToTile[new Color(150, 150, 150)] = -2;
            colorToTile[Color.Black] = -1;

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>();

            colorToWall[new Color(150, 150, 150)] = -1;
            colorToWall[Color.Black] = -1; //don't touch when genning

            TexGen gen       = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("Worldgen/GreatDarkness"), colorToTile);
            Point  newOrigin = new Point(origin.X, origin.Y - 30);
            int    genX      = origin.X - (gen.width / 3);
            int    genY      = origin.Y - 25;

            gen.Generate(genX, genY, true, true);

            return(true);
        }
Ejemplo n.º 5
0
        public override bool Place(Point origin, StructureMap structures)
        {
            Mod mod = CSkies.inst;

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>
            {
                [new Color(0, 0, 255)]     = ModContent.TileType <AbyssBricks>(),
                [new Color(0, 255, 0)]     = ModContent.TileType <AbyssDoor>(),
                [new Color(255, 0, 0)]     = ModContent.TileType <AbyssStone>(),
                [new Color(255, 0, 255)]   = ModContent.TileType <AbyssGrass>(),
                [new Color(255, 255, 255)] = -2,
                [Color.Black] = -1
            };

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>
            {
                [new Color(0, 0, 255)] = ModContent.WallType <AbyssWall>(),
                [Color.Black]          = -1
            };

            TexGen gen = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("Worldgen/AbyssVaultPlanet"), colorToTile, mod.GetTexture("Worldgen/AbyssVaultPlanetWall"), colorToWall, null, mod.GetTexture("Worldgen/AbyssVaultPlanetSlopes"));

            gen.Generate(origin.X, origin.Y, true, true);

            CUtils.ObectPlace(origin.X + 32, origin.Y + 34, mod.TileType("HeartAltar1"));

            return(true);
        }
Ejemplo n.º 6
0
        public override bool Place(Point origin, StructureMap structures)
        {
            //this handles generating the actual tiles, but you still need to add things like treegen etc. I know next to nothing about treegen so you're on your own there, lol.

            Mod mod         = CelestialMod.instance;
            int worldSize   = GetWorldSize();
            int biomeRadius = worldSize == 3 ? 400 : worldSize == 2 ? 300 : 200;

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>();

            colorToTile[new Color(0, 0, 255)]     = mod.TileType("VoidicGrass");
            colorToTile[new Color(0, 255, 0)]     = mod.TileType("VoidicStone");
            colorToTile[new Color(0, 125, 0)]     = mod.TileType("VoidicMud");
            colorToTile[new Color(0, 191, 255)]   = mod.TileType("CelestialRemnantsTempleTile");
            colorToTile[new Color(127, 0, 55)]    = mod.TileType("GloomWoodPlatform");
            colorToTile[new Color(128, 128, 128)] = TileID.Spikes;
            colorToTile[new Color(255, 0, 0)]     = -2; //turn into air
            colorToTile[Color.Black] = -1;              //don't touch when genning

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>();

            colorToWall[new Color(0, 0, 255)]   = mod.WallType("VoidicSoilWall");
            colorToWall[new Color(255, 0, 110)] = mod.WallType("CelestialRemnantsTempleWall");

            colorToWall[new Color(255, 0, 0)] = -2;
            colorToWall[Color.Black]          = -1; //don't touch when genning


            Texture2D yeet1 = mod.GetTexture("WorldGeneration/CrimsonSeptetteFiles/CrimsonSeptette");
            Texture2D yeet2 = mod.GetTexture("WorldGeneration/CrimsonSeptetteFiles/CrimsonSeptetteWall");

            if (CrimsonSeptetteBegin == null)
            {
                CrimsonSeptetteBegin = yeet1;

                CrimsonSeptetteWalls = yeet2;
            }

            TexGen gen       = BaseWorldGenTex.GetTexGenerator(CrimsonSeptetteBegin, colorToTile, CrimsonSeptetteWalls, colorToWall);
            Point  newOrigin = new Point(origin.X, origin.Y);                                       //biomeRadius);

            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //remove all fluids in sphere...
            {
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new Actions.SetLiquid(0, 0)
            }));
            WorldUtils.Gen(new Point(origin.X, origin.Y - 60), new Shapes.Rectangle(gen.width, gen.height), Actions.Chain(new GenAction[] //remove all fluids in the volcano...
            {
                new Actions.SetLiquid(0, 0)
            }));

            int genX = origin.X;
            int genY = origin.Y - 60;

            gen.Generate(genX, genY, true, true);

            return(true);
        }
Ejemplo n.º 7
0
        public override bool Place(Point origin, StructureMap structures)
        {
            //this handles generating the actual tiles, but you still need to add things like treegen etc. I know next to nothing about treegen so you're on your own there, lol.

            Mod mod         = CelestialMod.instance;
            int worldSize   = GetWorldSize();
            int biomeRadius = worldSize == 3 ? 400 : worldSize == 2 ? 300 : 200;

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>();

            colorToTile[new Color(0, 0, 255)] = -2;
            colorToTile[Color.Black]          = -1; //don't touch when genning


            Texture2D yeet = mod.GetTexture("WorldGeneration/FloweringNightsFiles/FloweringNightsDelete");

            if (FloweringNightsBegin == null)
            {
                FloweringNightsBegin = yeet;
            }

            TexGen gen       = BaseWorldGenTex.GetTexGenerator(yeet, colorToTile);
            Point  newOrigin = new Point(origin.X, origin.Y);                                       //biomeRadius);

            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //remove all fluids in sphere...
            {
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new Actions.SetLiquid(0, 0)
            }));
            WorldUtils.Gen(new Point(origin.X, origin.Y - 60), new Shapes.Rectangle(gen.width, gen.height), Actions.Chain(new GenAction[] //remove all fluids in the volcano...
            {
                new Actions.SetLiquid(0, 0)
            }));

            int genX = origin.X;
            int genY = origin.Y - 60;

            gen.Generate(genX, genY, true, true);

            return(true);
        }
Ejemplo n.º 8
0
        public static void ChineseTeaHouse()
        {
            Mod mod = CelestialMod.instance;
            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>();

            colorToTile[new Color(0, 0, 255)] = mod.TileType("VoidicGrass");
            colorToTile[new Color(0, 255, 0)] = mod.TileType("VoidicStone");
            colorToTile[new Color(0, 125, 0)] = mod.TileType("VoidicMud");
            colorToTile[new Color(255, 0, 0)] = -2;            //turn into air
            colorToTile[Color.Black]          = -1;            //don't touch when genning

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>();

            colorToWall[new Color(0, 0, 255)] = mod.WallType("VoidicSoilWall");
            colorToWall[new Color(255, 0, 0)] = -2;
            colorToWall[Color.Black]          = -1;            //don't touch when genning

            TexGen gen = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("WorldGeneration/ChineseTeaHouseFiles/ChineseTeaHouse"), colorToTile, mod.GetTexture("WorldGeneration/ChineseTeaHouseFiles/ChineseTeaHouseWalls"), colorToWall, mod.GetTexture("WorldGeneration/ChineseTeaHouseFiles/ChineseTeaHouseLiquids"), mod.GetTexture("WorldGeneration/ChineseTeaHouseFiles/ChineseTeaHouseSlopes"));

            gen.Generate(0, 0, true, true);
        }
Ejemplo n.º 9
0
        public override bool UseItem(Player player)
        {
            Mod mod = AAMod.instance;
            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>();

            colorToTile[new Color(255, 0, 0)]     = mod.TileType("Torchstone");
            colorToTile[new Color(0, 0, 255)]     = mod.TileType("Torchstone");
            colorToTile[new Color(150, 150, 150)] = -2; //turn into air
            colorToTile[Color.Black] = -1;              //don't touch when genning

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>();

            colorToWall[new Color(255, 0, 0)] = mod.WallType("TorchstoneWall");
            colorToWall[Color.Black]          = -1; //don't touch when genning

            TexGen gen    = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("Worldgeneration/Volcano"), colorToTile, mod.GetTexture("Worldgeneration/VolcanoWalls"), colorToWall, mod.GetTexture("Worldgeneration/VolcanoLava"));
            Point  origin = new Point((int)(player.Center.X / 16f), (int)(player.Center.Y / 16f));

            origin.Y = BaseWorldGen.GetFirstTileFloor(origin.X, origin.Y, true);
            gen.Generate(origin.X, origin.Y - 40, true, true);
            return(true);
        }
Ejemplo n.º 10
0
        public override bool Place(Point origin, StructureMap structures)
        {
            Mod mod = DBTMod.Instance;

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>
            {
                [new Color(152, 74, 0)]    = ModContent.TileType <HardenedRock>(),
                [new Color(255, 181, 81)]  = ModContent.TileType <CoarseRock>(),
                [new Color(255, 212, 171)] = -2,
                [Color.Black] = -1
            };

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>
            {
                [new Color(103, 50, 0)] = ModContent.WallType <CoarseRockWall>(),
                [Color.Black]           = -2
            };

            TexGen gen = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("Generation/SaibaNestTiles"), colorToTile, mod.GetTexture("Generation/SaibaNestWalls"), colorToWall, null, mod.GetTexture("Generation/SaibaNestSlopes"));

            gen.Generate(origin.X, origin.Y, true, true);

            return(true);
        }
Ejemplo n.º 11
0
        private static void GenTiles(int x, int y)
        {
            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>
            {
                //color to tile, these are all the color coded tiles, you can replace these with your own custom tiles of course
                [new Color(166, 215, 222)] = ModContent.TileType <BarrenDirtTile>(),
                [new Color(91, 124, 143)]  = ModContent.TileType <BarrenStoneTile>(),
                [new Color(255, 255, 255)] = -1, //leaving something white will not be affected during gen
                [Color.Black] = -2               //turn into air
            };

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>
            {
                //color to wall, same thing as above but for walls, and change these to what you want
                // [new Color(47, 0, 93)] = ModContent.WallType<BarrenWall>(),
                [Color.Black] = -2, //turn into air
            };

            TexGen gen = BaseWorldGenTex.GetTexGenerator(GetTexture("Depth/BarrenBiome/BarrenBiome"), colorToTile, GetTexture("Depth/BarrenBiome/BarrenBiomeWalls"), colorToWall);

            gen.Generate(x - (gen.width / 2), y - (gen.height / 2), true, true);

            //WorldGen.PlaceChest(x - 2, y + 202, (ushort)ModContent.TileType<Backpack>()); ///this code places a chest at a certain coordinate in the shadow biome, just ignore this lmao
        }
Ejemplo n.º 12
0
        public override bool Place(Point origin, StructureMap structures)
        {
            Mod  mod = AAMod.instance;
            bool DEV = true;
            //--- Initial variable creation
            ushort tileGrass = (ushort)mod.TileType("MireGrass"), tileDirt = TileID.Mud, tileStone = (ushort)mod.TileType("Depthstone"),
                   tileIce = (ushort)mod.TileType("Depthice"), tileSand = (ushort)mod.TileType("Depthsand"), tileSandHardened = (ushort)mod.TileType("DepthsandHardened"), tileSandstone = (ushort)mod.TileType("Depthsandstone");

            int worldSize = GetWorldSize();
            int biomeRadius = (worldSize == 3 ? 180 : worldSize == 2 ? 150 : 120), biomeRadiusHalf = biomeRadius / 2;             //how deep the biome is (scaled by world size)

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>();

            colorToTile[new Color(0, 0, 255)]     = mod.TileType("Depthstone");
            colorToTile[new Color(255, 128, 0)]   = TileID.Mud;
            colorToTile[new Color(0, 255, 0)]     = mod.TileType("MireGrass");
            colorToTile[new Color(150, 150, 150)] = -2; //turn into air
            colorToTile[Color.Black] = -1;              //don't touch when genning

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>();

            colorToWall[new Color(0, 0, 255)] = mod.WallType("DepthstoneWall");
            colorToWall[Color.Black]          = -1; //don't touch when genning

            TexGen gen       = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("Worldgeneration/Lake"), colorToTile, mod.GetTexture("Worldgeneration/LakeWalls"), colorToWall, mod.GetTexture("Worldgeneration/LakeWater"));
            Point  newOrigin = new Point(origin.X, origin.Y - 10);                                                                  //biomeRadius);

            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[]                                 //gen grass...
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.Grass, TileID.JungleGrass, TileID.CorruptGrass, TileID.FleshGrass }), //ensure we only replace the intended tile (in this case, grass)
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),                                                           //this provides the 'blending' on the edges (except the top)
                new BaseMod.SetModTile(tileGrass, true, true)                                                                       //actually place the tile
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[]                                 //dirt...
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.Dirt }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileDirt, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[]             //stone...
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.Stone }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileStone, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //ice...
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.IceBlock, TileID.CorruptIce, TileID.FleshIce }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileIce, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //sand...
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.Sand, TileID.Ebonsand, TileID.Crimsand }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileSand, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //hardened sand...
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.HardenedSand, TileID.CorruptHardenedSand, TileID.CrimsonHardenedSand }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileSandHardened, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[]             //...and sandstone.
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.Sandstone, TileID.CorruptSandstone, TileID.CrimsonSandstone }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileSandstone, true, true)
            }));
            gen.Generate(origin.X - (gen.width / 2), origin.Y - 20, true, true);

            return(true);
        }
Ejemplo n.º 13
0
        public override bool Place(Point origin, StructureMap structures)
        {
            //this handles generating the actual tiles, but you still need to add things like treegen etc. I know next to nothing about treegen so you're on your own there, lol.

            Mod  mod = AAMod.instance; //replace with your own
            bool DEV = true;
            //--- Initial variable creation
            ushort tileGrass = (ushort)mod.TileType("InfernoGrass"), tileStone = (ushort)mod.TileType("Torchstone"),
                   tileIce = (ushort)mod.TileType("Torchice"), tileSand = (ushort)mod.TileType("Torchsand"), tileSandHardened = (ushort)mod.TileType("TorchsandHardened"), tileSandstone = (ushort)mod.TileType("Torchsandstone");

            int worldSize = GetWorldSize();
            int biomeRadius = (worldSize == 3 ? 180 : worldSize == 2 ? 150 : 120), biomeRadiusHalf = biomeRadius / 2; //how deep the biome is (scaled by world size)

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>();

            colorToTile[new Color(255, 0, 0)]     = mod.TileType("Torchstone");
            colorToTile[new Color(0, 0, 255)]     = mod.TileType("Torchstone");
            colorToTile[new Color(150, 150, 150)] = -2; //turn into air
            colorToTile[Color.Black] = -1;              //don't touch when genning

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>();

            colorToWall[new Color(255, 0, 0)] = mod.WallType("TorchstoneWall");
            colorToWall[Color.Black]          = -1; //don't touch when genning

            TexGen gen       = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("Worldgeneration/Volcano"), colorToTile, mod.GetTexture("Worldgeneration/VolcanoWalls"), colorToWall, mod.GetTexture("Worldgeneration/VolcanoLava"));
            Point  newOrigin = new Point(origin.X, origin.Y - 30);                                  //biomeRadius);

            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //remove all fluids in sphere...
            {
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new Actions.SetLiquid(0, 0)
            }));
            WorldUtils.Gen(new Point(origin.X - (gen.width / 2), origin.Y - 20), new Shapes.Rectangle(gen.width, gen.height), Actions.Chain(new GenAction[] //remove all fluids in the volcano...
            {
                new Actions.SetLiquid(0, 0)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[]             //gen grass...
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.Grass, TileID.CorruptGrass, TileID.FleshGrass }), //ensure we only replace the intended tile (in this case, grass)
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),                                       //this provides the 'blending' on the edges (except the top)
                new BaseMod.SetModTile(tileGrass, true, true)                                                   //actually place the tile
            }));

            /* WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //dirt...
             *           {
             *   new Modifiers.OnlyTiles(new ushort[]{ TileID.Dirt }),
             *   new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
             *   new BaseMod.SetModTile(tileDirt, true, true)
             * }));*/
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //and stone.
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.Stone }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileStone, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //ice...
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.IceBlock, TileID.CorruptIce, TileID.FleshIce }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileIce, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //sand...
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.Sand, TileID.Ebonsand, TileID.Crimsand }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileSand, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //hardened sand...
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.HardenedSand, TileID.CorruptHardenedSand, TileID.CrimsonHardenedSand }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileSandHardened, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[]             //...and sandstone.
            {
                new Modifiers.OnlyTiles(new ushort[] { TileID.Sandstone, TileID.CorruptSandstone, TileID.CrimsonSandstone }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new BaseMod.SetModTile(tileSandstone, true, true)
            }));
            gen.Generate(origin.X - (gen.width / 2), origin.Y - 20, true, true);

            return(true);
        }
Ejemplo n.º 14
0
        public override bool Place(Point origin, StructureMap structures)
        {
            Mod mod = CSkies.inst;

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>
            {
                [new Color(0, 255, 0)]     = ModContent.TileType <StarBrickUnsafe>(),
                [new Color(255, 0, 0)]     = ModContent.TileType <StarglassUnsafe>(),
                [new Color(0, 0, 255)]     = ModContent.TileType <StarCircuitUnsafe>(),
                [new Color(255, 255, 255)] = -2,
                [Color.Black] = -1
            };

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>
            {
                [new Color(0, 255, 0)] = ModContent.WallType <StarBrickWallUnsafe>(),
                [new Color(255, 0, 0)] = ModContent.WallType <StarglassWallUnsafe>(),
                [new Color(0, 0, 255)] = ModContent.WallType <StarCircuitWallUnsafe>(),
                [Color.Black]          = -1
            };

            TexGen gen = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("Worldgen/Observatory"), colorToTile, mod.GetTexture("Worldgen/ObservatoryWalls"), colorToWall, null, mod.GetTexture("Worldgen/ObservatorySlopes"));

            gen.Generate(origin.X, origin.Y, true, true);

            #region Decorations

            CUtils.ObectPlace(origin.X + 145, origin.Y + 118, mod.TileType("BrokenArtemis"));

            #region Lanterns
            CUtils.ObectPlace(origin.X + 134, origin.Y + 57, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 165, origin.Y + 57, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 54, origin.Y + 63, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 59, origin.Y + 63, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 240, origin.Y + 63, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 245, origin.Y + 63, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 41, origin.Y + 66, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 258, origin.Y + 66, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 129, origin.Y + 70, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 170, origin.Y + 70, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 40, origin.Y + 75, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 70, origin.Y + 75, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 78, origin.Y + 75, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 81, origin.Y + 75, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 218, origin.Y + 75, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 221, origin.Y + 75, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 229, origin.Y + 75, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 259, origin.Y + 75, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 89, origin.Y + 80, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 210, origin.Y + 80, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 71, origin.Y + 88, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 76, origin.Y + 88, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 223, origin.Y + 88, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 228, origin.Y + 88, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 33, origin.Y + 91, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 37, origin.Y + 91, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 44, origin.Y + 91, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 255, origin.Y + 91, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 262, origin.Y + 91, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 266, origin.Y + 91, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 34, origin.Y + 99, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 37, origin.Y + 99, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 262, origin.Y + 99, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 265, origin.Y + 99, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 67, origin.Y + 102, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 70, origin.Y + 102, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 229, origin.Y + 102, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 232, origin.Y + 102, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 37, origin.Y + 111, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 79, origin.Y + 111, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 220, origin.Y + 111, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 262, origin.Y + 111, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 93, origin.Y + 112, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 96, origin.Y + 112, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 99, origin.Y + 112, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 200, origin.Y + 112, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 203, origin.Y + 112, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 206, origin.Y + 112, mod.TileType("ObservatoryLantern"));

            CUtils.ObectPlace(origin.X + 79, origin.Y + 123, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 82, origin.Y + 123, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 85, origin.Y + 123, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 88, origin.Y + 123, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 211, origin.Y + 123, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 214, origin.Y + 123, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 217, origin.Y + 123, mod.TileType("ObservatoryLantern"));
            CUtils.ObectPlace(origin.X + 220, origin.Y + 123, mod.TileType("ObservatoryLantern"));

            #endregion

            #region Chandeliers
            CUtils.ObectPlace(origin.X + 140, origin.Y + 48, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 159, origin.Y + 48, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 31, origin.Y + 66, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 269, origin.Y + 66, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 100, origin.Y + 80, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 106, origin.Y + 80, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 112, origin.Y + 80, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 118, origin.Y + 80, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 181, origin.Y + 80, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 187, origin.Y + 80, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 193, origin.Y + 80, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 199, origin.Y + 80, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 40, origin.Y + 83, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 45, origin.Y + 83, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 254, origin.Y + 83, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 259, origin.Y + 83, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 6, origin.Y + 93, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 293, origin.Y + 93, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 103, origin.Y + 90, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 196, origin.Y + 90, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 95, origin.Y + 91, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 203, origin.Y + 91, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 49, origin.Y + 99, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 250, origin.Y + 99, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 63, origin.Y + 102, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 73, origin.Y + 102, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 225, origin.Y + 102, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 236, origin.Y + 102, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 15, origin.Y + 103, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 20, origin.Y + 103, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 278, origin.Y + 103, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 284, origin.Y + 103, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 29, origin.Y + 107, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 270, origin.Y + 107, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 44, origin.Y + 111, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 50, origin.Y + 111, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 133, origin.Y + 111, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 166, origin.Y + 111, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 249, origin.Y + 111, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 254, origin.Y + 111, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 16, origin.Y + 112, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 283, origin.Y + 112, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 128, origin.Y + 121, mod.TileType("ObservatoryChandelier"));
            CUtils.ObectPlace(origin.X + 171, origin.Y + 121, mod.TileType("ObservatoryChandelier"));
            #endregion

            #endregion

            return(true);
        }
Ejemplo n.º 15
0
        public override bool Place(Point origin, StructureMap structures)
        {
            Mod    mod = CSkies.inst;
            ushort tileGrass = (ushort)ModContent.TileType <AbyssGrass>(), tileStone = (ushort)ModContent.TileType <AbyssStone>(), tileIce = (ushort)ModContent.TileType <Abice>(),
                   tileSand = (ushort)ModContent.TileType <AbyssSand>(), tileSandHardened = (ushort)ModContent.TileType <HardenedAbyssSand>(), tileSandstone = (ushort)ModContent.TileType <AbyssSandstone>(),
                   tileMoss = (ushort)ModContent.TileType <AbyssMoss>();

            byte StoneWall = (byte)ModContent.WallType <AbyssStoneWall>(), SandstoneWall = (byte)ModContent.WallType <AbyssSandstoneWall>(), HardenedSandWall = (byte)ModContent.WallType <HardenedAbyssSandWall>(),
                 GrassWall = (byte)ModContent.WallType <AbyssLeafWall>();

            int biomeRadius = 89;

            Dictionary <Color, int> colorToTile = new Dictionary <Color, int>
            {
                [new Color(0, 0, 255)]     = mod.TileType("AbyssBricks"),
                [new Color(0, 255, 0)]     = mod.TileType("AbyssDoor"),
                [new Color(255, 255, 255)] = -2,
                [Color.Black] = -1
            };

            Dictionary <Color, int> colorToWall = new Dictionary <Color, int>
            {
                [new Color(255, 255, 255)] = mod.WallType("AbyssWall"),
                [Color.Black] = -1
            };

            TexGen gen = BaseWorldGenTex.GetTexGenerator(mod.GetTexture("Worldgen/AbyssVault"), colorToTile, mod.GetTexture("Worldgen/AbyssVaultWall"), colorToWall, null, mod.GetTexture("Worldgen/AbyssVaultSlopes"));

            Point newOrigin = new Point(origin.X, origin.Y);

            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //grass...
            {
                new InWorld(),
                new Modifiers.OnlyTiles(new ushort[] { TileID.Grass, TileID.CorruptGrass, TileID.FleshGrass, TileID.HallowedGrass }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new SetModTile(tileGrass, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //moss...
            {
                new InWorld(),
                new Modifiers.OnlyTiles(new ushort[] { TileID.BlueMoss, TileID.BrownMoss, TileID.GreenMoss, TileID.LavaMoss, TileID.LongMoss, TileID.PurpleMoss, TileID.RedMoss }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new SetModTile(tileMoss, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //stone...
            {
                new InWorld(),
                new Modifiers.OnlyTiles(new ushort[] { TileID.Stone, TileID.Ebonstone, TileID.Crimstone, TileID.Pearlstone }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new SetModTile(tileStone, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //ice...
            {
                new InWorld(),
                new Modifiers.OnlyTiles(new ushort[] { TileID.IceBlock, TileID.CorruptIce, TileID.FleshIce }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new SetModTile(tileIce, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //sand...
            {
                new InWorld(),
                new Modifiers.OnlyTiles(new ushort[] { TileID.Sand, TileID.Ebonsand, TileID.Crimsand }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new SetModTile(tileSand, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //hardened sand...
            {
                new InWorld(),
                new Modifiers.OnlyTiles(new ushort[] { TileID.HardenedSand, TileID.CorruptHardenedSand, TileID.CrimsonHardenedSand }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new SetModTile(tileSandHardened, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //...and sandstone.
            {
                new InWorld(),
                new Modifiers.OnlyTiles(new ushort[] { TileID.Sandstone, TileID.CorruptSandstone, TileID.CrimsonSandstone }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new SetModTile(tileSandstone, true, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //Walls
            {
                new InWorld(),
                new Modifiers.OnlyWalls(new byte[] { WallID.Stone, WallID.EbonstoneUnsafe, WallID.CrimstoneUnsafe }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new PlaceModWall(StoneWall, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //Walls
            {
                new InWorld(),
                new Modifiers.OnlyWalls(new byte[] { WallID.Sandstone, WallID.CorruptSandstone, WallID.CrimsonSandstone }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new PlaceModWall(SandstoneWall, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //Walls
            {
                new InWorld(),
                new Modifiers.OnlyWalls(new byte[] { WallID.HardenedSand, WallID.CorruptHardenedSand, WallID.CrimsonHardenedSand }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new PlaceModWall(HardenedSandWall, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //Walls
            {
                new InWorld(),
                new Modifiers.OnlyWalls(new byte[] { WallID.HardenedSand, WallID.CorruptHardenedSand, WallID.CrimsonHardenedSand }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new PlaceModWall(HardenedSandWall, true)
            }));
            WorldUtils.Gen(newOrigin, new Shapes.Circle(biomeRadius), Actions.Chain(new GenAction[] //Walls
            {
                new InWorld(),
                new Modifiers.OnlyWalls(new byte[] { WallID.GrassUnsafe, WallID.CorruptGrassUnsafe, WallID.CrimsonGrassUnsafe }),
                new Modifiers.RadialDither(biomeRadius - 5, biomeRadius),
                new PlaceModWall(GrassWall, true)
            }));

            int genX = origin.X - (gen.width / 2);
            int genY = origin.Y - 30;

            gen.Generate(genX, genY, true, true);

            if (CWorld.VaultCount == 0)
            {
                CUtils.ObectPlace(genX + 29, genY + 31, mod.TileType("HeartAltar2"));
            }
            else if (CWorld.VaultCount == 1)
            {
                CUtils.ObectPlace(genX + 29, genY + 31, mod.TileType("HeartAltar3"));
            }
            else if (CWorld.VaultCount == 2)
            {
                CUtils.ObectPlace(genX + 29, genY + 31, mod.TileType("HeartAltar4"));
            }

            return(true);
        }