forked from minetest/minetest_game
Creative: Make handle_node_drops override work for non-player diggers
This commit is contained in:
parent
d4e1bd053e
commit
319b9eeeaf
|
@ -53,10 +53,8 @@ end)
|
|||
-- Don't pick up if the item is already in the inventory
|
||||
local old_handle_node_drops = minetest.handle_node_drops
|
||||
function minetest.handle_node_drops(pos, drops, digger)
|
||||
if not digger or not digger:is_player() then
|
||||
return
|
||||
end
|
||||
if not creative.is_enabled_for(digger:get_player_name()) then
|
||||
if not digger or not digger:is_player() or
|
||||
not creative.is_enabled_for(digger:get_player_name()) then
|
||||
return old_handle_node_drops(pos, drops, digger)
|
||||
end
|
||||
local inv = digger:get_inventory()
|
||||
|
|
Loading…
Reference in New Issue
Block a user