Merge branch 'master' of yunohost.local:minetest-mods/unified_inventory into nalc-1.2-dev

This commit is contained in:
2019-12-22 15:57:28 +01:00
82 changed files with 1138 additions and 3114 deletions

View File

@ -1,4 +1,4 @@
local S = unified_inventory.gettext
local S = minetest.get_translator("unified_inventory")
local F = minetest.formspec_escape
-- This pair of encoding functions is used where variable text must go in
@ -259,7 +259,7 @@ function unified_inventory.get_formspec(player, page)
end
end
formspec[n] = "label[8.2,"..ui_peruser.form_header_y..";"..F(S("Page")) .. ": "
.. S("%s of %s"):format(page,pagemax).."]"
.. S("@1 of @2",page,pagemax).."]"
end
n= n+1
@ -302,15 +302,13 @@ function unified_inventory.apply_filter(player, filter, search_dir)
return string.find(lname, lfilter, 1, true) or string.find(ldesc, lfilter, 1, true)
end
end
local is_creative = unified_inventory.is_creative(player_name)
unified_inventory.filtered_items_list[player_name]={}
for name, def in pairs(minetest.registered_items) do
if (not def.groups.not_in_creative_inventory
or def.groups.not_in_creative_inventory == 0)
and def.description
and def.description ~= ""
and ffilter(name, def)
and (is_creative or unified_inventory.crafts_for.recipe[def.name]) then
and ffilter(name, def) then
table.insert(unified_inventory.filtered_items_list[player_name], name)
end
end