Showroom: Add Inner Walls
parent
150a497359
commit
aeec20e592
|
@ -1,6 +1,7 @@
|
|||
local schems = {}
|
||||
schems.floor = schematic.new({x=16,y=1,z=16}, "showroom:floor")
|
||||
local place_opening = util.every_n_mapblocks(4)
|
||||
local wall_height = 10
|
||||
|
||||
-- Corner North/South East/West Top/Bottom
|
||||
local corner_swb = {x=0,y=0,z=0}
|
||||
|
@ -8,10 +9,19 @@ local corner_seb = {x=15,y=0,z=0}
|
|||
local corner_nwb = {x=0,y=0,z=15}
|
||||
local corner_neb = {x=15,y=0,z=15}
|
||||
|
||||
local corner_swt = {x=0,y=10,z=0}
|
||||
local corner_set = {x=15,y=10,z=0}
|
||||
local corner_nwt = {x=0,y=10,z=15}
|
||||
local corner_net = {x=15,y=10,z=15}
|
||||
local corner_swt = {x=0,y=wall_height,z=0}
|
||||
local corner_set = {x=15,y=wall_height,z=0}
|
||||
local corner_nwt = {x=0,y=wall_height,z=15}
|
||||
local corner_net = {x=15,y=wall_height,z=15}
|
||||
|
||||
local function add_walls(Perlin, schem, x, z)
|
||||
if (util.bound_perlin(Perlin, 10, x, 5, z) > 3) and not place_opening(x) then
|
||||
schematic.fill_area(schem, "showroom:wall", {x=0,y=0,z=0}, {x=0,y=wall_height,z=15})
|
||||
end
|
||||
if (util.bound_perlin(Perlin, 10, x, 6, z) > 7) and not place_opening(z) then
|
||||
schematic.fill_area(schem, "showroom:wall", {x=0,y=0,z=0}, {x=15,y=wall_height,z=0})
|
||||
end
|
||||
end
|
||||
|
||||
function schems.get_outer(Perlin, edges, x, z)
|
||||
local schem = schematic.new({x=16,y=16,z=16}, "air")
|
||||
|
@ -75,6 +85,7 @@ function schems.get_outer(Perlin, edges, x, z)
|
|||
end
|
||||
end
|
||||
|
||||
add_walls(Perlin, schem, x, z)
|
||||
schematic.fill_area(schem, "showroom:floor", corner_swb, corner_neb)
|
||||
return schem
|
||||
end
|
||||
|
@ -108,7 +119,6 @@ function schems.get_inner(Perlin, x, z)
|
|||
local room_name = rooms[util.bound_perlin(Perlin, #rooms, x, 0, z)]
|
||||
local applicable_displays = table.search(display_tables, {includes = {rooms = {room_name}}})
|
||||
local schem = schematic.new({x = 16, y = 16, z = 16, "air"})
|
||||
schematic.fill_area(schem, "showroom:floor", {x = 0, y = 0, z = 0}, {x = 15, y = 0, z = 15})
|
||||
|
||||
for x2 = 0, 15, 4 do
|
||||
for z2 = 0, 15, 4 do
|
||||
|
@ -123,6 +133,9 @@ function schems.get_inner(Perlin, x, z)
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
add_walls(Perlin, schem, x, z)
|
||||
schematic.fill_area(schem, "showroom:floor", {x = 0, y = 0, z = 0}, {x = 15, y = 0, z = 15})
|
||||
return schem
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue