mirror of
https://github.com/minetest-mods/item_drop.git
synced 2025-07-16 12:50:22 +02:00
Compare commits
5 Commits
soundpitch
...
c6a80bd4fa
Author | SHA1 | Date | |
---|---|---|---|
c6a80bd4fa | |||
fadfbf7e05 | |||
c1637b1975 | |||
e10486d2aa | |||
2730deca16 |
10
init.lua
10
init.lua
@ -373,7 +373,13 @@ and not minetest.settings:get_bool("creative_mode") then
|
||||
end
|
||||
end
|
||||
|
||||
function minetest.handle_node_drops(pos, drops)
|
||||
local old_handle_node_drops = minetest.handle_node_drops
|
||||
function minetest.handle_node_drops(pos, drops, player)
|
||||
if player.is_fake_player then
|
||||
-- Node Breaker or similar machines should receive items in the
|
||||
-- inventory
|
||||
return old_handle_node_drops(pos, drops, player)
|
||||
end
|
||||
for i = 1,#drops do
|
||||
local item = drops[i]
|
||||
if type(item) == "string" then
|
||||
@ -411,5 +417,5 @@ local msg = "[item_drop] loaded after ca. " .. time .. " seconds."
|
||||
if time > 0.01 then
|
||||
print(msg)
|
||||
else
|
||||
minetest.log("info", msg)
|
||||
minetest.log("action", msg)
|
||||
end
|
||||
|
Reference in New Issue
Block a user