mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-11-10 12:10:18 +01:00
Add setting for disabling manual item pickups by mouse
This commit is contained in:
parent
726b5f4872
commit
8e89c148be
|
@ -31,6 +31,8 @@ developed by [PilzAdam](https://github.com/PilzAdam/item_drop).
|
|||
items between these radii are flying to the player for
|
||||
`item_drop.magnet_time` seconds, after this time, they're picked or stop
|
||||
flying.
|
||||
* Enable manual item pickups by mouse only if `item_drop.mouse_pickup` is
|
||||
`true` (true by default)
|
||||
* Plays a sound when the items are picked up with the gain level set to
|
||||
`item_drop.pickup_sound_gain` (default 0.2)
|
||||
* Requires a key to be pressed in order to pick items if
|
||||
|
|
5
init.lua
5
init.lua
|
@ -54,6 +54,11 @@ minetest.settings:get_bool("enable_item_pickup") ~= false then
|
|||
pickup_age = math.min(pickup_age, 0)
|
||||
end
|
||||
end
|
||||
local mouse_pickup = minetest.settings:get_bool(
|
||||
"item_drop.mouse_pickup") ~= false
|
||||
if not mouse_pickup then
|
||||
minetest.registered_entities["__builtin:item"].pointable = false
|
||||
end
|
||||
|
||||
local magnet_mode = magnet_radius > pickup_radius
|
||||
local zero_velocity_mode = pickup_age == -1
|
||||
|
|
|
@ -33,3 +33,6 @@ 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
|
||||
|
||||
#Enable manual item pickups by mouse
|
||||
item_drop.mouse_pickup (Mouse pickup) bool true
|
||||
|
|
Loading…
Reference in New Issue
Block a user