From f651e407f70b542ece7bcf874a722b97d1c6fedf Mon Sep 17 00:00:00 2001 From: Kindaglia Date: Fri, 25 Apr 2025 10:12:45 +0200 Subject: [PATCH] fix naming --- tools/jetpack.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/jetpack.lua b/tools/jetpack.lua index bdce50a..2c84a00 100644 --- a/tools/jetpack.lua +++ b/tools/jetpack.lua @@ -19,14 +19,14 @@ industrialtest.JetpackBase=table.copy(industrialtest.GearTool) industrialtest.internal.unpackTableInto(industrialtest.JetpackBase,{ part="torso" }) -local sound_handles = {} +local soundHandles = {} function industrialtest.JetpackBase.update(self, player, inv, itemstack, dtime) local playerName = player:get_player_name() local control = player:get_player_control() if control.jump and self:tryFly(itemstack) then self.addYVelocityClamped(player,1,10) - if not sound_handles[playerName] then + if not soundHandles[playerName] then local pos = player:get_pos() local handle = minetest.sound_play("industrialtest_jetpack_loop", { pos = pos, @@ -35,13 +35,13 @@ function industrialtest.JetpackBase.update(self, player, inv, itemstack, dtime) object = player, -- Attach the sound to the player loop = true, -- The sound is played in a loop }) - sound_handles[playerName] = handle + soundHandles[playerName] = handle end return true else - if sound_handles[playerName] then - minetest.sound_stop(sound_handles[playerName]) - sound_handles[playerName] = nil + if soundHandles[playerName] then + minetest.sound_stop(soundHandles[playerName]) + soundHandles[playerName] = nil end end return false