mirror of
https://github.com/minetest-mods/technic.git
synced 2025-07-04 09:10:38 +02:00
Fix discharge of flashlight and sonic screwdriver
These two tools wouldn't discharge all the way to zero through use, unlike most chargeable items. Incidentally remove a duplicate of the check_for_flashlight() function.
This commit is contained in:
@ -30,7 +30,7 @@ minetest.register_tool("technic:sonic_screwdriver", {
|
||||
if not meta1 or not meta1.charge then
|
||||
return
|
||||
end
|
||||
if meta1.charge - 100 > 0 then
|
||||
if meta1.charge >= 100 then
|
||||
minetest.sound_play("technic_sonic_screwdriver",
|
||||
{pos = pos, gain = 0.3, max_hear_distance = 10})
|
||||
local p = node.param2
|
||||
|
Reference in New Issue
Block a user