Add variable interior for nether bulwark

This commit is contained in:
cora 2022-10-26 04:05:24 +02:00
parent f76e0628e4
commit 302b18833a
5 changed files with 12 additions and 6 deletions

View File

@ -36,8 +36,15 @@ mcl_structures.register_structure("nether_bulwark",{
filenames = { filenames = {
modpath.."/schematics/mcl_nether_fortresses_nether_bulwark.mts" modpath.."/schematics/mcl_nether_fortresses_nether_bulwark.mts"
}, },
daughters = { daughters = {{
[modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_1.mts"] = vector.new(5,0,5), files = {
modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_1.mts",
modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_2.mts",
modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_3.mts",
modpath.."/schematics/mcl_nether_fortresses_nether_bulwark_interior_4.mts",
},
pos = vector.new(5,0,5),
},
}, },
y_offset = 0, y_offset = 0,
construct_nodes = {"group:wall"}, construct_nodes = {"group:wall"},

View File

@ -266,16 +266,15 @@ function mcl_structures.place_structure(pos, def, pr, blockseed)
local ap = function(pos,def,pr,blockseed) end local ap = function(pos,def,pr,blockseed) end
if def.daughters then if def.daughters then
for fn,p in pairs(def.daughters) do for _,d in pairs(def.daughters) do
local p = vector.add(pp,p) local p = vector.add(pp,d.pos)
ap = function(pos,def,pr,blockseed) ap = function(pos,def,pr,blockseed)
mcl_structures.place_schematic(pos, fn, rot, nil, true, "place_center_x,place_center_z",function() mcl_structures.place_schematic(pos, d.files[pr:next(1,#d.files)], rot, nil, true, "place_center_x,place_center_z",function()
if def.loot then generate_loot(pp,def,pr,blockseed) end if def.loot then generate_loot(pp,def,pr,blockseed) end
if def.construct_nodes then construct_nodes(pp,def,pr,blockseed) end if def.construct_nodes then construct_nodes(pp,def,pr,blockseed) end
if def.after_place then if def.after_place then
def.after_place(pos,def,pr) def.after_place(pos,def,pr)
end end
--ap(pos,def,pr,blockseed)
end,pr) end,pr)
end end
end end