From: raymoo Date: Mon, 2 Oct 2017 01:20:50 +0000 (-0700) Subject: Creative: Make handle_node_drops override work for non-player diggers X-Git-Tag: 0.4.17.1~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ca38bb2390a0bc7d7e24ba1a6f5b9bd1dc014cf1;p=oweals%2Fminetest_game.git Creative: Make handle_node_drops override work for non-player diggers --- diff --git a/mods/creative/init.lua b/mods/creative/init.lua index 51d6f792..a33475dd 100644 --- a/mods/creative/init.lua +++ b/mods/creative/init.lua @@ -46,10 +46,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()