Skip to content

Commit

Permalink
Adds a 5 seconds cooldown to the audio cue
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicacrov committed Mar 4, 2024
1 parent fc70062 commit 2cfd499
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions code/__DEFINES/cooldowns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define COOLDOWN_HIJACK_GROUND_CHECK "gamemode_ground_check"
#define COOLDOWN_ITEM_HOOD_SOUND "item_hood_sound"
#define COOLDOWN_LIGHT "cooldown_light"
#define COOLDOWN_SHIPWIDE_EXECUTION_ALERT "shipwide_execution_alert"

//Define for ship alt
#define COOLDOWN_ALTITUDE_CHANGE "altitude_change"
Expand Down
3 changes: 2 additions & 1 deletion code/datums/ammo/bullet/bullet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@

if(fired_from.flags_gun_features & GUN_SILENCED)
playsound(user, fired_from.fire_sound, 25, FALSE)
else if(is_mainship_level(user.z))
else if(is_mainship_level(user.z) && !TIMER_COOLDOWN_CHECK(user, COOLDOWN_SHIPWIDE_EXECUTION_ALERT))
playsound_z(SSmapping.levels_by_any_trait(list(ZTRAIT_MARINE_MAIN_SHIP)), fired_from.fire_sound, volume = fired_from.firesound_volume)
TIMER_COOLDOWN_START(user, COOLDOWN_SHIPWIDE_EXECUTION_ALERT, 5 SECONDS)
else
playsound(user, fired_from.fire_sound, fired_from.firesound_volume, FALSE)

Expand Down

0 comments on commit 2cfd499

Please sign in to comment.