Skip to content

Commit

Permalink
don't remove air above building platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeb187 committed Jul 15, 2018
1 parent 7194b3c commit fe4225f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions const.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--
-- switch for debugging
--
settlements.debug = false
settlements.debug = true
--
-- material to replace cobblestone with
--
Expand All @@ -26,13 +26,13 @@ schem_path = settlements.modpath.."/schematics/"
--
schematic_table = {
{name = "townhall", mts = schem_path.."townhall.mts", hsize = 15, max_num = 0, rplc = "n"},
{name = "well", mts = schem_path.."well.mts", hsize = 11, max_num = 0.055, rplc = "n"},
{name = "well", mts = schem_path.."well.mts", hsize = 11, max_num = 0.045, rplc = "n"},
{name = "hut", mts = schem_path.."hut.mts", hsize = 11, max_num = 0.9, rplc = "y"},
{name = "garden", mts = schem_path.."garden.mts", hsize = 11, max_num = 0.1, rplc = "n"},
{name = "lamp", mts = schem_path.."lamp.mts", hsize = 10, max_num = 0.1, rplc = "n"},
{name = "tower", mts = schem_path.."tower.mts", hsize = 11, max_num = 0.055, rplc = "n"},
{name = "church", mts = schem_path.."church.mts", hsize = 17, max_num = 0.050, rplc = "n"},
{name = "blacksmith", mts = schem_path.."blacksmith.mts", hsize = 11, max_num = 0.055, rplc = "n"},
{name = "blacksmith", mts = schem_path.."blacksmith.mts", hsize = 11, max_num = 0.050, rplc = "n"},
}
--
-- baseplate material, to replace dirt with grass and where buildings can be built
Expand Down
6 changes: 4 additions & 2 deletions foundation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ function settlements.foundation(pos, width, depth, height, rotation)
minetest.after(1,settlements.ground,p)--(p)
else
-- minetest.remove_node({x=p5.x+xi, y=p5.y+yi, z=p5.z+zi})
minetest.swap_node({x=p5.x+xi, y=p5.y+yi, z=p5.z+zi},
{name="air"})
if minetest.get_node_or_nil({x=p5.x+xi, y=p5.y+yi, z=p5.z+zi}).name ~= "air"
then
minetest.swap_node({x=p5.x+xi, y=p5.y+yi, z=p5.z+zi},{name="air"})
end
end
end
end
Expand Down

0 comments on commit fe4225f

Please sign in to comment.