mirror of
https://github.com/Sokomine/cottages.git
synced 2024-11-05 01:50:20 +01:00
the table now acts as a workbench in realtest and adventuretest
This commit is contained in:
parent
050005c6cf
commit
af0787a420
|
@ -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,9 +167,28 @@ 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
|
||||
minetest.register_node("cottages:shelf", {
|
||||
|
|
Loading…
Reference in New Issue
Block a user