diff options
-rw-r--r-- | nodes_furniture.lua | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/nodes_furniture.lua b/nodes_furniture.lua index fcb5da7..2c03b10 100644 --- a/nodes_furniture.lua +++ b/nodes_furniture.lua @@ -145,7 +145,7 @@ minetest.register_node("cottages:bench", { -- a simple table; possible replacement: 3dforniture:table -minetest.register_node("cottages:table", { +local cottages_table_def = { description = S("table"), drawtype = "nodebox", -- top, bottom, side1, side2, inner, outer @@ -167,8 +167,27 @@ minetest.register_node("cottages:table", { }, }, is_ground_content = false, -}) - +} + + +-- search for the workbench in AdventureTest +local workbench = minetest.registered_nodes[ "workbench:3x3"]; +if( workbench ) then + cottages_table_def.tiles = {workbench.tiles[1], cottages_table_def.tiles[1]}; + cottages_table_def.on_rightclick = workbench.on_rightclick; +end +-- search for the workbench from RealTEst +workbench = minetest.registered_nodes[ "workbench:work_bench_birch"]; +if( workbench ) then + cottages_table_def.tiles = {workbench.tiles[1], cottages_table_def.tiles[1]}; + cottages_table_def.on_construct = workbench.on_construct; + cottages_table_def.can_dig = workbench.can_dig; + cottages_table_def.on_metadata_inventory_take = workbench.on_metadata_inventory_take; + cottages_table_def.on_metadata_inventory_move = workbench.on_metadata_inventory_move; + cottages_table_def.on_metadata_inventory_put = workbench.on_metadata_inventory_put; +end + +minetest.register_node("cottages:table", cottages_table_def ); -- looks better than two slabs impersonating a shelf; also more 3d than a bookshelf -- the infotext shows if it's empty or not |