forked from minetest-mods/item_drop
		
	Disable item pickup age if the player has to hold a key for taking items
This commit is contained in:
		
							
								
								
									
										4
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								init.lua
									
									
									
									
									
								
							| @@ -19,6 +19,10 @@ if minetest.settings:get_bool("item_drop.enable_item_pickup") ~= false then | |||||||
| 	local keytype | 	local keytype | ||||||
| 	if key_triggered then | 	if key_triggered then | ||||||
| 		keytype = minetest.settings:get("item_drop.pickup_keytype") or "Use" | 		keytype = minetest.settings:get("item_drop.pickup_keytype") or "Use" | ||||||
|  | 		-- disable pickup age if picking is explicitly enabled by the player | ||||||
|  | 		if not key_invert then | ||||||
|  | 			pickup_age = math.min(pickup_age, 0) | ||||||
|  | 		end | ||||||
| 	end | 	end | ||||||
|  |  | ||||||
| 	local magnet_mode = magnet_radius > pickup_radius | 	local magnet_mode = magnet_radius > pickup_radius | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user