mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-08-19 04:24:11 +02:00
add smart_inventory support
This commit is contained in:
parent
81ffdaa6a7
commit
4d3b219e7d
@ -105,6 +105,8 @@ elseif minetest.get_modpath("unified_inventory") then
|
||||
})
|
||||
elseif minetest.get_modpath("inventory_enhanced") then
|
||||
inv_mod = "inventory_enhanced"
|
||||
elseif minetest.get_modpath("smart_inventory") then
|
||||
inv_mod = "smart_inventory"
|
||||
end
|
||||
|
||||
if minetest.get_modpath("skins") then
|
||||
@ -277,6 +279,16 @@ armor.update_inventory = function(self, player)
|
||||
if not name or inv_mod == "inventory_enhanced" then
|
||||
return
|
||||
end
|
||||
if inv_mod == "smart_inventory" then
|
||||
local state = smart_inventory.smartfs.inv[name]
|
||||
if state then
|
||||
local button = state:get("player_button")
|
||||
if button then
|
||||
button:submit()
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
if inv_mod == "unified_inventory" then
|
||||
if unified_inventory.current_page[name] == "armor" then
|
||||
unified_inventory.set_inventory_formspec(player, "armor")
|
||||
|
Loading…
Reference in New Issue
Block a user