From ebe159ac2cb9e8fb423854f04f0418fc5d1ede49 Mon Sep 17 00:00:00 2001 From: leroux raphael Date: Sat, 25 Apr 2015 18:45:59 +0200 Subject: [PATCH] add support for inventory_enhanced --- 3d_armor/armor.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/3d_armor/armor.lua b/3d_armor/armor.lua index b230d00..9474b05 100644 --- a/3d_armor/armor.lua +++ b/3d_armor/armor.lua @@ -80,6 +80,8 @@ elseif minetest.get_modpath("unified_inventory") then return {formspec=formspec} end, }) +elseif minetest.get_modpath("inventory_enhanced") then + inv_mod = "inventory_enhanced" end if minetest.get_modpath("skins") then @@ -277,7 +279,7 @@ end armor.update_inventory = function(self, player) local name = armor:get_valid_player(player, "[set_player_armor]") - if not name then + if not name or inv_mod == "inventory_enhanced" then return end if inv_mod == "unified_inventory" then @@ -348,7 +350,7 @@ default.player_register_model("3d_armor_character.b3d", { minetest.register_on_player_receive_fields(function(player, formname, fields) local name = armor:get_valid_player(player, "[on_player_receive_fields]") - if not name then + if not name or inv_mod == "inventory_enhanced" then return end if inv_mod == "inventory_plus" and fields.armor then