From 444d5e19b37bedd1be00bef6135d0f56ca3b52bc Mon Sep 17 00:00:00 2001 From: SECBATON GRIFFON <87321915+SECBATON-GRIFFON@users.noreply.github.com> Date: Wed, 1 Jan 2025 03:38:45 +0000 Subject: [PATCH] no sound spam if no move was successful --- code/game/mecha/combat/roswell.dm | 11 ++++++++--- .../xenoarchaeology/artifact/artifact_hoverpod.dm | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/code/game/mecha/combat/roswell.dm b/code/game/mecha/combat/roswell.dm index 05a04b9b3a41..cc14bb0c9ff7 100644 --- a/code/game/mecha/combat/roswell.dm +++ b/code/game/mecha/combat/roswell.dm @@ -22,11 +22,16 @@ return 1 /obj/mecha/combat/roswell/mechstep(direction) - playsound(loc, 'sound/mecha/ufo.ogg', 100) - return step(src,direction) + var/result = step(src,direction) + if(result) + playsound(loc, 'sound/mecha/ufo.ogg', 100) + return result /obj/mecha/combat/roswell/mechsteprand() - return step_rand(src) + var/result = step_rand(src) + if(result) + playsound(loc, 'sound/mecha/ufo.ogg', 100) + return result /obj/mecha/combat/roswell/can_apply_inertia() //invaders from outer spaaace if(has_charge(step_energy_drain)) diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_hoverpod.dm b/code/modules/research/xenoarchaeology/artifact/artifact_hoverpod.dm index d2a15c426b3e..362ee22aaa28 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_hoverpod.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact_hoverpod.dm @@ -37,7 +37,6 @@ playsound(src,'sound/machines/hiss.ogg',40,1) return result - /obj/mecha/working/hoverpod/mechsteprand() var/result = step_rand(src) if(result)