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)
committerSmallJoker <mk939@ymail.com>
Sun, 3 Jun 2018 15:32:00 +0000 (17:32 +0200)
commit7b8288d605260a92693a93a85134555a8c975bb9
tree9c14b93d6f23213f912d7e3d8f58882ba2aeeac8
parent2f969196b86a9ffd4ef3bce9b17fcfb49ec89cd2
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