mirror of
https://github.com/minetest-mods/item_drop.git
synced 2024-11-13 05:20:16 +01:00
Add keyinvert setting
This commit is contained in:
parent
f2e3338265
commit
9de8d39af6
4
init.lua
4
init.lua
|
@ -9,6 +9,8 @@ if minetest.settings:get_bool("item_drop.enable_item_pickup") ~= false then
|
|||
minetest.settings:get("item_drop.pickup_age")) or 0.5
|
||||
local key_triggered = minetest.settings:get_bool(
|
||||
"item_drop.enable_pickup_key") ~= false
|
||||
local key_invert = minetest.settings:get_bool(
|
||||
"item_drop.pickup_keyinvert") or false
|
||||
local keytype
|
||||
if key_triggered then
|
||||
keytype = minetest.settings:get("item_drop.pickup_keytype") or "Use"
|
||||
|
@ -104,7 +106,7 @@ if minetest.settings:get_bool("item_drop.enable_item_pickup") ~= false then
|
|||
keys_pressed = control.sneak and control.RMB
|
||||
end
|
||||
|
||||
if not keys_pressed
|
||||
if keys_pressed == key_invert
|
||||
or (damage_enabled and player:get_hp() <= 0) then
|
||||
return
|
||||
end
|
||||
|
|
|
@ -7,6 +7,9 @@ item_drop.enable_item_drop (Enable item drops) bool true
|
|||
#Use a key to pick up items
|
||||
item_drop.enable_pickup_key (Use pickup key) bool true
|
||||
|
||||
#Collect items when the key is not pressed instead of when it is pressed
|
||||
item_drop.pickup_keyinvert (Invert pickup key) bool false
|
||||
|
||||
#What keytype to use as pickup key
|
||||
item_drop.pickup_keytype (Pickup keytype) enum Use Use,Sneak,LeftAndRight,RMB,SneakAndRMB
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user