mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-03 08:13:43 +01:00
Merge pull request 'Add bookshelves and anvils as structure constructed nodes' (#3133) from structure_construct_nodes into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3133 Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
commit
45c85841e8
@ -17,6 +17,7 @@ mcl_structures.register_structure("pillager_outpost",{
|
||||
y_max = mcl_vars.mg_overworld_max,
|
||||
y_min = 1,
|
||||
biomes = { "Desert", "Plains", "Savanna", "IcePlains", "Taiga" },
|
||||
construct_nodes = {"mcl_anvils:anvil_damage_2"},
|
||||
filenames = {
|
||||
modpath.."/schematics/mcl_structures_pillager_outpost.mts",
|
||||
modpath.."/schematics/mcl_structures_pillager_outpost_2.mts"
|
||||
@ -67,7 +68,12 @@ mcl_structures.register_structure("pillager_outpost",{
|
||||
mcl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5)
|
||||
mcl_structures.spawn_mobs("mobs_mc:parrot",{"mesecons_pressureplates:pressure_plate_stone_off"},p1,p2,pr,3)
|
||||
mcl_structures.spawn_mobs("mobs_mc:iron_golem",{"mesecons_button:button_stone_off"},p1,p2,pr,1)
|
||||
mcl_structures.construct_nodes(p1,p2,{"group:wall"})
|
||||
for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do
|
||||
local def = minetest.registered_nodes[minetest.get_node(n).name:gsub("_%d+$","")]
|
||||
if def and def.on_construct then
|
||||
def.on_construct(n)
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
|
Binary file not shown.
@ -20,7 +20,7 @@ mcl_structures.register_structure("woodland_cabin",{
|
||||
modpath.."/schematics/mcl_structures_woodland_cabin.mts",
|
||||
modpath.."/schematics/mcl_structures_woodland_outpost.mts",
|
||||
},
|
||||
construct_nodes = {"mcl_barrels:barrel_closed"},
|
||||
construct_nodes = {"mcl_barrels:barrel_closed","mcl_books:bookshelf"},
|
||||
after_place = function(p,def,pr)
|
||||
local p1=vector.offset(p,-def.sidelen,-1,-def.sidelen)
|
||||
local p2=vector.offset(p,def.sidelen,def.sidelen,def.sidelen)
|
||||
|
Loading…
Reference in New Issue
Block a user