mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-12-22 22:02:26 +01:00
Do not pick items if the player has no interact
This commit is contained in:
parent
78ef2a50f6
commit
057966141a
2
init.lua
2
init.lua
@ -121,8 +121,10 @@ if minetest.settings:get_bool("item_drop.enable_item_pickup") ~= false then
|
|||||||
return keys_pressed ~= key_invert
|
return keys_pressed ~= key_invert
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- this function is called for each player to possibly collect items
|
||||||
local function pickupfunc(player)
|
local function pickupfunc(player)
|
||||||
if not keys_pressed(player)
|
if not keys_pressed(player)
|
||||||
|
or not minetest.get_player_privs(player:get_player_name()).interact
|
||||||
or player:get_hp() <= 0 then
|
or player:get_hp() <= 0 then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user