[MIRROR] Wearing Hailer gives unique death SFX [MDB IGNORE] (#24634)

* Wearing Hailer gives unique death SFX (#79216)

## About The Pull Request

If you die with a SecHailer on, a unique sound effect will play (created
entirely by me using in-game files):

https://github.com/tgstation/tgstation/assets/42353186/042e4159-57f3-4cc1-8d96-4dc7289f194b

(Please note that the pitch is randomized)
You can give any mask's unique death sound effects now.
## Why It's Good For The Game
SecHailers can change people's voices. Why not make them sound different
when they die? It could be a humorous reference with a unique sound.
SecHailers' voice changer function is a reference, which I expanded by
also making a unique death sound effect.

Also now you can make more masks with unique death sound effects if you
want to.
## Changelog
🆑
sound: Dying with a SecHailer on your face will make a unique death
sound
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>

* Wearing Hailer gives unique death SFX

---------

Co-authored-by: DrTuxedo <42353186+DrDiasyl@users.noreply.github.com>
Co-authored-by: MrMelbert <51863163+MrMelbert@ users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-10-29 02:06:27 +02:00
committed by GitHub
parent 3b695cf65e
commit 00794171cf
4 changed files with 11 additions and 3 deletions

View File

@@ -16,6 +16,8 @@
var/voice_override
/// If set to true, activates the radio effect on TTS. Used for sec hailers, but other masks can utilize it for their own vocal effect.
var/use_radio_beeps_tts = FALSE
/// The unique sound effect of dying while wearing this
var/unique_death
/obj/item/clothing/mask/attack_self(mob/user)
if((clothing_flags & VOICEBOX_TOGGLABLE))

View File

@@ -57,6 +57,7 @@ GLOBAL_LIST_INIT(hailer_phrases, list(
visor_flags_cover = MASKCOVERSMOUTH
tint = 0
has_fov = FALSE
unique_death = 'sound/voice/sec_death.ogg'
COOLDOWN_DECLARE(hailer_cooldown)
///Decides the phrases available for use; defines used are the last index of a category of available phrases
var/aggressiveness = AGGR_BAD_COP

View File

@@ -107,9 +107,14 @@
message_animal_or_basic = custom_message
. = ..()
message_animal_or_basic = initial(message_animal_or_basic)
if(. && user.death_sound)
if(!user.can_speak() || user.oxyloss >= 50)
return //stop the sound if oxyloss too high/cant speak
if(!. && !user.can_speak() || user.getOxyLoss() >= 50)
return //stop the sound if oxyloss too high/cant speak
var/mob/living/carbon/carbon_user = user
// For masks that give unique death sounds
if(istype(carbon_user) && isclothing(carbon_user.wear_mask) && carbon_user.wear_mask.unique_death)
playsound(carbon_user, carbon_user.wear_mask.unique_death, 200, TRUE, TRUE)
return
if(user.death_sound)
playsound(user, user.death_sound, 200, TRUE, TRUE)
/datum/emote/living/drool

BIN
sound/voice/sec_death.ogg Normal file

Binary file not shown.