diff --git a/code/__DEFINES/cooldowns.dm b/code/__DEFINES/cooldowns.dm index 9368caf3c6e3..262dfc4e03e1 100644 --- a/code/__DEFINES/cooldowns.dm +++ b/code/__DEFINES/cooldowns.dm @@ -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" diff --git a/code/datums/ammo/bullet/bullet.dm b/code/datums/ammo/bullet/bullet.dm index 37fa95a6ed30..4c699245b600 100644 --- a/code/datums/ammo/bullet/bullet.dm +++ b/code/datums/ammo/bullet/bullet.dm @@ -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)