diff --git a/api.lua b/api.lua index d24135b..81dd8f3 100644 --- a/api.lua +++ b/api.lua @@ -188,7 +188,9 @@ function unified_inventory.go_home(player) local pos = unified_inventory.home_pos[player:get_player_name()] if pos then player:set_pos(pos) + return true end + return false end -- register_craft diff --git a/depends.txt b/depends.txt deleted file mode 100644 index cb3d2b4..0000000 --- a/depends.txt +++ /dev/null @@ -1,5 +0,0 @@ -default -creative? -sfinv? -datastorage? -farming? diff --git a/description.txt b/description.txt deleted file mode 100644 index b541fdf..0000000 --- a/description.txt +++ /dev/null @@ -1 +0,0 @@ -Unified Inventory replaces the default survival and creative inventory. It adds a nicer interface and a number of features, such as a crafting guide. diff --git a/internal.lua b/internal.lua index 65225e1..5828fcb 100644 --- a/internal.lua +++ b/internal.lua @@ -295,10 +295,14 @@ function unified_inventory.apply_filter(player, filter, search_dir) return true end else + local lang = minetest.get_player_information(player_name).lang_code ffilter = function(name, def) local lname = string.lower(name) local ldesc = string.lower(def.description) + local llocaldesc = minetest.get_translated_string + and string.lower(minetest.get_translated_string(lang, def.description)) return string.find(lname, lfilter, 1, true) or string.find(ldesc, lfilter, 1, true) + or llocaldesc and string.find(llocaldesc, lfilter, 1, true) end end unified_inventory.filtered_items_list[player_name]={} diff --git a/mod.conf b/mod.conf index 4fe3375..bca70ca 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,7 @@ name = unified_inventory depends = default optional_depends = creative, sfinv, datastorage, farming -description = Unified Inventory replaces the default survival and creative inventory. It adds a nicer interface and a number of features, such as a crafting guide. +description = """ +Unified Inventory replaces the default survival and creative inventory. +It adds a nicer interface and a number of features, such as a crafting guide. +"""