1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-23 07:10:19 +01:00

Creative: Make handle_node_drops override work for non-player diggers

This commit is contained in:
raymoo 2017-10-01 18:20:50 -07:00 committed by sfan5
parent 7d07c52d09
commit ca38bb2390

View File

@ -46,10 +46,8 @@ end)
-- Don't pick up if the item is already in the inventory -- Don't pick up if the item is already in the inventory
local old_handle_node_drops = minetest.handle_node_drops local old_handle_node_drops = minetest.handle_node_drops
function minetest.handle_node_drops(pos, drops, digger) function minetest.handle_node_drops(pos, drops, digger)
if not digger or not digger:is_player() then if not digger or not digger:is_player() or
return not creative.is_enabled_for(digger:get_player_name()) then
end
if not creative.is_enabled_for(digger:get_player_name()) then
return old_handle_node_drops(pos, drops, digger) return old_handle_node_drops(pos, drops, digger)
end end
local inv = digger:get_inventory() local inv = digger:get_inventory()