public override bool Place(Point origin, StructureMap structures)
        {
            if (!WorldGen.InWorld(origin.X, origin.Y, 10))
            {
                return(false);
            }
            int num = 25;

            for (int i = origin.X - num; i <= origin.X + num; i++)
            {
                for (int j = origin.Y - num; j <= origin.Y + num; j++)
                {
                    if (Main.tile[i, j].wire())
                    {
                        return(false);
                    }
                    if (TileID.Sets.BasicChest[Main.tile[i, j].type])
                    {
                        return(false);
                    }
                }
            }
            HouseBuilder houseBuilder = HouseUtils.CreateBuilder(origin, structures);

            if (!houseBuilder.IsValid)
            {
                return(false);
            }
            ApplyConfigurationToBuilder(houseBuilder);
            houseBuilder.Place(_builderContext, structures);
            return(true);
        }
Example #2
0
        public override bool Place(Point origin, StructureMap structures)
        {
            if (!WorldGen.InWorld(origin.X, origin.Y, 10))
            {
                return(false);
            }
            int num = 25;

            for (int index1 = origin.X - num; index1 <= origin.X + num; ++index1)
            {
                for (int index2 = origin.Y - num; index2 <= origin.Y + num; ++index2)
                {
                    if (Main.tile[index1, index2].wire() || TileID.Sets.BasicChest[(int)Main.tile[index1, index2].type])
                    {
                        return(false);
                    }
                }
            }
            HouseBuilder builder = HouseUtils.CreateBuilder(origin, structures);

            if (!builder.IsValid)
            {
                return(false);
            }
            this.ApplyConfigurationToBuilder(builder);
            builder.Place(this._builderContext, structures);
            return(true);
        }
        public override bool Place(Point origin, StructureMap structures)
        {
            HouseBuilder builder = HouseUtils.CreateBuilder(origin, structures);

            ApplyConfigurationToBuilder(builder);

            builder.Place(_builderContext, structures);
            return(true);
        }