initial support the default mod is optional. Auto-resize the players workbench to 3x3 like MineClone2 does
This commit is contained in:
parent
c353e8a27a
commit
d7686594d7
@ -1,4 +1,4 @@
|
||||
default
|
||||
default?
|
||||
creative?
|
||||
sfinv?
|
||||
3d_armor?
|
||||
|
@ -128,6 +128,8 @@ function maininv.get(playername)
|
||||
local self = setmetatable({}, maininvClass)
|
||||
self.playername = playername
|
||||
self.inventory = minetest.get_player_by_name(playername):get_inventory()
|
||||
self.inventory:set_width("craft", 3)
|
||||
self.inventory:set_size("craft", 9)
|
||||
return self
|
||||
end
|
||||
|
||||
|
@ -1,14 +1,19 @@
|
||||
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))
|
||||
smartfs.get("smart_inventory:main"):show(player:get_player_name())
|
||||
end
|
||||
|
||||
local sound = nil
|
||||
if minetest.global_exists("default") then
|
||||
sound = default.node_sound_wood_defaults()
|
||||
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(),
|
||||
sounds = sound,
|
||||
tiles = {
|
||||
"smart_inventory_workbench_top.png",
|
||||
"smart_inventory_workbench_top.png",
|
||||
|
Loading…
x
Reference in New Issue
Block a user