forked from MineClone5/MineClone5
Add doors and trapdoors to decoration blocks
This commit is contained in:
parent
069f3591e2
commit
3976c7c4b9
|
@ -90,7 +90,7 @@ function mcl_doors:register_door(name, def)
|
|||
_doc_items_usagehelp = usagehelp,
|
||||
inventory_image = def.inventory_image,
|
||||
stack_max = 64,
|
||||
groups = { mesecon_conductor_craftable = 1 },
|
||||
groups = { mesecon_conductor_craftable = 1, deco_block = 1 },
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if not pointed_thing.type == "node" or not placer or not placer:is_player() then
|
||||
return itemstack
|
||||
|
|
|
@ -89,6 +89,7 @@ function mcl_doors:register_trapdoor(name, def)
|
|||
|
||||
local groups_closed = groups
|
||||
groups_closed.trapdoor = 1
|
||||
groups_closed.deco_block = 1
|
||||
minetest.register_node(name, {
|
||||
description = def.description,
|
||||
_doc_items_longdesc = longdesc,
|
||||
|
@ -158,6 +159,7 @@ function mcl_doors:register_trapdoor(name, def)
|
|||
}
|
||||
|
||||
groups_open.trapdoor = 2
|
||||
groups_open.not_in_creative_inventory = 1
|
||||
minetest.register_node(name.."_open", {
|
||||
drawtype = "nodebox",
|
||||
tiles = tiles_open,
|
||||
|
|
Loading…
Reference in New Issue