diff --git a/3d_armor/armor.lua b/3d_armor/armor.lua index 5d620d9..ea35cbd 100644 --- a/3d_armor/armor.lua +++ b/3d_armor/armor.lua @@ -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")