diff options
author | ShadowNinja <shadowninja@minetest.net> | 2013-12-04 10:43:49 -0500 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2013-12-04 10:43:49 -0500 |
commit | d5f60ed136848e20f5ff620afe2901e246231e0b (patch) | |
tree | 1ed0f15ee36088af8b398a6bb5f0bdfa28c1142f /bags.lua | |
parent | 3db5f629f2e2d524971b7d3d6da9a75c3f853194 (diff) |
Check formname in on_receive_fields
Diffstat (limited to 'bags.lua')
-rw-r--r-- | bags.lua | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |