smart_inventory-cd2025/workbench.lua
Alexander Weber d4353eca3f framework: Add setting smart_inventory_workbench_mode
to allow usage of smart_inventory as workbench in parallel to other inventory mods
2017-07-01 00:30:02 +02:00

30 lines
944 B
Lua

local smartfs = smart_inventory.smartfs
local function on_rightclick(pos, node, player, itemstack, pointed_thing)
smartfs.get("smart_inventory:main"):show(player:get_player_name(name))
end
-- Return smart inventory workbench definition if enabled
minetest.register_node("smart_inventory:workbench", {
description = "Smart inventory workbench",
groups = {cracky=2, choppy=2, oddly_breakable_by_hand=1},
sounds = default.node_sound_wood_defaults(),
tiles = {
"smart_inventory_workbench_top.png",
"smart_inventory_workbench_top.png",
"smart_inventory_workbench_sides.png",
"smart_inventory_workbench_sides.png",
"smart_inventory_workbench_front.png",
"smart_inventory_workbench_front.png"
},
on_rightclick = on_rightclick
})
minetest.register_craft({
output = "smart_inventory:workbench",
recipe = {
{"default:coral_skeleton", "default:coral_skeleton"},
{"default:coral_skeleton", "default:coral_skeleton"}
}
})