summaryrefslogtreecommitdiff
path: root/unified_inventory
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-02-25 17:21:16 -0800
committerRealBadAngel <mk@realbadangel.pl>2013-02-25 17:21:16 -0800
commit63968475613fab2e10514326a3a8ea4d348d0246 (patch)
treed7ee48de218b3b81d4b1fb42ac0607a1a5a4e5d0 /unified_inventory
parent35cf964e174e51bfcbc04280f32dc2e062db6332 (diff)
parent36b10443f6b2990e364746204786d23926b15d51 (diff)
Merge pull request #9 from khonkhortisan/master
Yet Another Nil
Diffstat (limited to 'unified_inventory')
-rw-r--r--unified_inventory/api.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/unified_inventory/api.lua b/unified_inventory/api.lua
index 4ef91bb..2eb0b3e 100644
--- a/unified_inventory/api.lua
+++ b/unified_inventory/api.lua
@@ -43,7 +43,7 @@ minetest.register_on_joinplayer(function(player)
unified_inventory.filtered_items_list[player_name] = unified_inventory.items_list
unified_inventory.filtered_items_list_size[player_name]=unified_inventory.items_list_size
unified_inventory.activefilter[player_name]=""
- unified_inventory.apply_filter(player_name, "")
+ unified_inventory.apply_filter(player, "")
unified_inventory.alternate[player_name] = 1
unified_inventory.current_item[player_name] =nil
unified_inventory.set_inventory_formspec(player,unified_inventory.get_formspec(player, unified_inventory.default))
@@ -406,7 +406,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
if fields.searchbutton then
- unified_inventory.apply_filter(player_name, fields.searchbox)
+ unified_inventory.apply_filter(player, fields.searchbox)
unified_inventory.set_inventory_formspec(player, unified_inventory.get_formspec(player,unified_inventory.current_page[player_name]))
end
@@ -476,7 +476,8 @@ unified_inventory.go_home = function(player)
end
--apply filter to the inventory list (create filtered copy of full one)
-unified_inventory.apply_filter = function(player_name,filter)
+unified_inventory.apply_filter = function(player,filter)
+ local player_name = player:get_player_name()
local size=0
local str_temp1=string.lower(filter)
local str_temp2