Add auto inventory detect

master
BrunoMine 2019-02-21 23:15:30 -03:00
parent 98665f0c1c
commit 41a9b2fece
2 changed files with 7 additions and 3 deletions

View File

@ -23,10 +23,10 @@ xpro.show_inventory_formspec = function(player)
end end
-- Metodos de acesso pelo inventario -- Metodos de acesso pelo inventario
xpro.var.inv_mode = minetest.settings:get("xpro_inventory") xpro.var.inv_mode = minetest.settings:get("xpro_inventory") or "auto"
-- Tenta identificar mod -- Tenta identificar mod
if xpro.var.inv_mode == nil then if xpro.var.inv_mode == "auto" then
if minetest.get_modpath("unified_inventory") then if minetest.get_modpath("unified_inventory") then
xpro.var.inv_mode = "unified_inventory" xpro.var.inv_mode = "unified_inventory"

View File

@ -7,9 +7,13 @@
# #
# Diponiveis|Available: # Diponiveis|Available:
# #
# * auto
# - Tenta identificar automaticamente
# - Try to auto-identify
#
# * sfinv # * sfinv
# - Depends: sfinv # - Depends: sfinv
# #
# * unified_inventory # * unified_inventory
# - Depends: unified_inventory # - Depends: unified_inventory
xpro_inventory (Inventario | Inventory) enum sfinv sfinv,unified_inventory xpro_inventory (Inventario | Inventory) enum auto auto,sfinv,unified_inventory