mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-11-26 14:23:45 +01:00
add support for inventory_enhanced
This commit is contained in:
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
|
||||||
|
Loading…
Reference in New Issue
Block a user