Fix default item callbacks to work with nil users (#5819)
authorraymoo <raymoo@users.noreply.github.com>
Sat, 28 Oct 2017 08:30:50 +0000 (01:30 -0700)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Sat, 28 Oct 2017 08:30:50 +0000 (10:30 +0200)
commita5d5728f241fec8644ba65cb3b98c7dd1be2eee3
treedae56e378a51682f5ae9790cb3346e63fbed764a
parent2efccb353625de9c25babd0387be23f9d4829871
Fix default item callbacks to work with nil users (#5819)

* Fix default item callbacks to work with nil users

* item.lua: Handle node drops for invalid players

The if-condition for the dropping loop is the same as `inv`, which means that the 2nd possible definition of `give_item` is never used.
Remove redundant `local _, dropped_item`
builtin/game/chatcommands.lua
builtin/game/item.lua
doc/lua_api.txt
games/minimal/mods/default/init.lua