add support for inventory_enhanced

This commit is contained in:
leroux raphael 2015-04-25 18:45:59 +02:00
parent 1d1534b416
commit ebe159ac2c

@ -80,6 +80,8 @@ elseif minetest.get_modpath("unified_inventory") then
return {formspec=formspec} return {formspec=formspec}
end, end,
}) })
elseif minetest.get_modpath("inventory_enhanced") then
inv_mod = "inventory_enhanced"
end end
if minetest.get_modpath("skins") then if minetest.get_modpath("skins") then
@ -277,7 +279,7 @@ end
armor.update_inventory = function(self, player) armor.update_inventory = function(self, player)
local name = armor:get_valid_player(player, "[set_player_armor]") local name = armor:get_valid_player(player, "[set_player_armor]")
if not name then if not name or inv_mod == "inventory_enhanced" then
return return
end end
if inv_mod == "unified_inventory" then 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) minetest.register_on_player_receive_fields(function(player, formname, fields)
local name = armor:get_valid_player(player, "[on_player_receive_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 return
end end
if inv_mod == "inventory_plus" and fields.armor then if inv_mod == "inventory_plus" and fields.armor then