Skip to content

Commit

Permalink
no sound spam if no move was successful
Browse files Browse the repository at this point in the history
  • Loading branch information
SECBATON-GRIFFON committed Jan 1, 2025
1 parent a26469f commit 444d5e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 8 additions & 3 deletions code/game/mecha/combat/roswell.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 444d5e1

Please sign in to comment.