mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2024-12-27 19:20:27 +01:00
Check formname in on_receive_fields
This commit is contained in:
parent
3db5f629f2
commit
d5f60ed136
3
bags.lua
3
bags.lua
@ -48,6 +48,9 @@ for i = 1, 4 do
|
||||
end
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "" then
|
||||
return
|
||||
end
|
||||
for i = 1, 4 do
|
||||
if fields["bag"..i] then
|
||||
local stack = player:get_inventory():get_stack("bag"..i, 1)
|
||||
|
@ -49,6 +49,9 @@ minetest.register_on_joinplayer(function(player)
|
||||
end)
|
||||
|
||||
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
if formname ~= "" then
|
||||
return
|
||||
end
|
||||
local player_name = player:get_player_name()
|
||||
|
||||
for i, def in pairs(unified_inventory.buttons) do
|
||||
|
Loading…
Reference in New Issue
Block a user