Add doors and trapdoors to decoration blocks

This commit is contained in:
Wuzzy 2019-02-06 11:40:51 +01:00
parent 069f3591e2
commit 3976c7c4b9
2 changed files with 3 additions and 1 deletions
mods/ITEMS/mcl_doors

View file

@ -90,7 +90,7 @@ function mcl_doors:register_door(name, def)
_doc_items_usagehelp = usagehelp, _doc_items_usagehelp = usagehelp,
inventory_image = def.inventory_image, inventory_image = def.inventory_image,
stack_max = 64, stack_max = 64,
groups = { mesecon_conductor_craftable = 1 }, groups = { mesecon_conductor_craftable = 1, deco_block = 1 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing.type == "node" or not placer or not placer:is_player() then if not pointed_thing.type == "node" or not placer or not placer:is_player() then
return itemstack return itemstack

View file

@ -89,6 +89,7 @@ function mcl_doors:register_trapdoor(name, def)
local groups_closed = groups local groups_closed = groups
groups_closed.trapdoor = 1 groups_closed.trapdoor = 1
groups_closed.deco_block = 1
minetest.register_node(name, { minetest.register_node(name, {
description = def.description, description = def.description,
_doc_items_longdesc = longdesc, _doc_items_longdesc = longdesc,
@ -158,6 +159,7 @@ function mcl_doors:register_trapdoor(name, def)
} }
groups_open.trapdoor = 2 groups_open.trapdoor = 2
groups_open.not_in_creative_inventory = 1
minetest.register_node(name.."_open", { minetest.register_node(name.."_open", {
drawtype = "nodebox", drawtype = "nodebox",
tiles = tiles_open, tiles = tiles_open,