mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-11-13 05:20:16 +01:00
Add item flight time setting, set it to 5 seconds by default
This commit is contained in:
parent
c21158ffab
commit
c86bc605bd
4
init.lua
4
init.lua
|
@ -5,6 +5,8 @@ if minetest.settings:get_bool("item_drop.enable_item_pickup") ~= false then
|
|||
minetest.settings:get("item_drop.pickup_radius")) or 0.75
|
||||
local magnet_radius = tonumber(
|
||||
minetest.settings:get("item_drop.magnet_radius")) or -1
|
||||
local magnet_time = tonumber(
|
||||
minetest.settings:get("item_drop.magnet_time")) or 5.0
|
||||
local pickup_age = tonumber(
|
||||
minetest.settings:get("item_drop.pickup_age")) or 0.5
|
||||
local key_triggered = minetest.settings:get_bool(
|
||||
|
@ -145,7 +147,7 @@ if minetest.settings:get_bool("item_drop.enable_item_pickup") ~= false then
|
|||
physical = false
|
||||
})
|
||||
|
||||
minetest.after(1.0, afterflight, object, inv)
|
||||
minetest.after(magnet_time, afterflight, object, inv)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -24,5 +24,9 @@ item_drop.pickup_radius (Pickup radius) float 0.75
|
|||
#flying
|
||||
item_drop.magnet_radius (Magnet radius) float -1
|
||||
|
||||
#Item flight duration, items flying for more than this time are added to the
|
||||
#player's inventory
|
||||
item_drop.magnet_time (Magnet time) float 5.0
|
||||
|
||||
#Time delay in seconds after autopicking an item if it's dropped by a player
|
||||
item_drop.pickup_age (Pickup age) float 0.5
|
||||
|
|
Loading…
Reference in New Issue
Block a user