summaryrefslogtreecommitdiff
path: root/bags.lua
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2013-12-04 10:43:49 -0500
committerShadowNinja <shadowninja@minetest.net>2013-12-04 10:43:49 -0500
commitd5f60ed136848e20f5ff620afe2901e246231e0b (patch)
tree1ed0f15ee36088af8b398a6bb5f0bdfa28c1142f /bags.lua
parent3db5f629f2e2d524971b7d3d6da9a75c3f853194 (diff)
Check formname in on_receive_fields
Diffstat (limited to 'bags.lua')
-rw-r--r--bags.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/bags.lua b/bags.lua
index 497a9f8..2a21d5d 100644
--- a/bags.lua
+++ b/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)