From c81ccce028b368ae5450854454ac573211e14970 Mon Sep 17 00:00:00 2001 From: Gabriel Adamson Date: Mon, 7 Feb 2022 14:39:40 -0600 Subject: [PATCH 1/2] Changed screams to be handled by DNA for all species --- code/modules/mob/living/carbon/human/emote.dm | 13 +------------ code/modules/mob/living/carbon/human/species.dm | 5 +++++ .../living/carbon/human/species_types/felinid.dm | 5 +++++ .../mob/living/carbon/human/species_types/humans.dm | 11 +++++++++++ .../living/carbon/human/species_types/mothmen.dm | 2 ++ 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index f459b0566c42..2e9f12e98ee7 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -83,19 +83,8 @@ var/mob/living/carbon/human/H = user if(H.mind?.miming) return - if(iscatperson(H)) - return pick('sound/voice/feline/scream1.ogg', 'sound/voice/feline/scream2.ogg', 'sound/voice/feline/scream3.ogg') - else if(ishumanbasic(H)) - if(user.gender == FEMALE) - return pick('sound/voice/human/femalescream_1.ogg', 'sound/voice/human/femalescream_2.ogg', 'sound/voice/human/femalescream_3.ogg', 'sound/voice/human/femalescream_4.ogg', 'sound/voice/human/femalescream_5.ogg') - else - if(prob(1)) - return 'sound/voice/human/wilhelm_scream.ogg' - return pick('sound/voice/human/malescream_1.ogg', 'sound/voice/human/malescream_2.ogg', 'sound/voice/human/malescream_3.ogg', 'sound/voice/human/malescream_4.ogg', 'sound/voice/human/malescream_5.ogg') - else if(ismoth(H)) - return 'sound/voice/moth/scream_moth.ogg' else if(H.dna?.species?.screamsound) //yogs start: grabs scream from screamsound located in the appropriate species file. - return H.dna.species.screamsound //yogs end - current added screams: lizard, preternis. + return H.dna.species.get_scream_sound(H) //yogs end - current added screams: basic human, moth, lizard, preternis, felinid. /datum/emote/living/carbon/meow key = "meow" diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 801eabf75825..312f7042e92d 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -2120,3 +2120,8 @@ GLOBAL_LIST_EMPTY(mentor_races) . |= BIO_JUST_FLESH if(HAS_BONE in species_traits) . |= BIO_JUST_BONE + +/datum/species/proc/get_scream_sound(mob/living/carbon/human/H) + if(islist(screamsound)) + return pick(screamsound) + return screamsound diff --git a/code/modules/mob/living/carbon/human/species_types/felinid.dm b/code/modules/mob/living/carbon/human/species_types/felinid.dm index 5bf71c26daff..8bf66a3ae392 100644 --- a/code/modules/mob/living/carbon/human/species_types/felinid.dm +++ b/code/modules/mob/living/carbon/human/species_types/felinid.dm @@ -14,6 +14,8 @@ changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_PRIDE | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN | SLIME_EXTRACT species_language_holder = /datum/language_holder/felinid + screamsound = list('sound/voice/feline/scream1.ogg', 'sound/voice/feline/scream2.ogg', 'sound/voice/feline/scream3.ogg') + /datum/species/human/felinid/qualifies_for_rank(rank, list/features) return TRUE @@ -111,3 +113,6 @@ . = ..() if(H.reagents.has_reagent(/datum/reagent/consumable/ethanol/catsip)) H.adjustBruteLoss(-0.5*REAGENTS_EFFECT_MULTIPLIER,FALSE,FALSE, BODYPART_ANY) + +/datum/species/human/felinid/get_scream_sound(mob/living/carbon/human/H) + return pick(screamsound) diff --git a/code/modules/mob/living/carbon/human/species_types/humans.dm b/code/modules/mob/living/carbon/human/species_types/humans.dm index 5190927e86ad..19f04fb65c56 100644 --- a/code/modules/mob/living/carbon/human/species_types/humans.dm +++ b/code/modules/mob/living/carbon/human/species_types/humans.dm @@ -11,8 +11,19 @@ changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT species_language_holder = /datum/language_holder/english + var/list/female_screams = list('sound/voice/human/femalescream_1.ogg', 'sound/voice/human/femalescream_2.ogg', 'sound/voice/human/femalescream_3.ogg', 'sound/voice/human/femalescream_4.ogg', 'sound/voice/human/femalescream_5.ogg') + var/list/male_screams = list('sound/voice/human/malescream_1.ogg', 'sound/voice/human/malescream_2.ogg', 'sound/voice/human/malescream_3.ogg', 'sound/voice/human/malescream_4.ogg', 'sound/voice/human/malescream_5.ogg') + /datum/species/human/qualifies_for_rank(rank, list/features) return TRUE //Pure humans are always allowed in all roles. /datum/species/human/has_toes() return TRUE + +/datum/species/human/get_scream_sound(mob/living/carbon/human/H) + if(H.gender == FEMALE) + return pick(female_screams) + else + if(prob(1)) + return 'sound/voice/human/wilhelm_scream.ogg' + return pick(male_screams) diff --git a/code/modules/mob/living/carbon/human/species_types/mothmen.dm b/code/modules/mob/living/carbon/human/species_types/mothmen.dm index 08fa9e827970..4b0630746f87 100644 --- a/code/modules/mob/living/carbon/human/species_types/mothmen.dm +++ b/code/modules/mob/living/carbon/human/species_types/mothmen.dm @@ -19,6 +19,8 @@ changesource_flags = MIRROR_BADMIN | WABBAJACK | MIRROR_MAGIC | MIRROR_PRIDE | ERT_SPAWN | RACE_SWAP | SLIME_EXTRACT species_language_holder = /datum/language_holder/mothmen + screamsound = 'sound/voice/moth/scream_moth.ogg' + /datum/species/moth/regenerate_organs(mob/living/carbon/C,datum/species/old_species,replace_current=TRUE) . = ..() if(ishuman(C)) From 0e8dada1cbd7c5155ee89cad602cbc95e5cd9d56 Mon Sep 17 00:00:00 2001 From: Gabriel Adamson Date: Mon, 7 Feb 2022 14:56:36 -0600 Subject: [PATCH 2/2] Fix small oversight --- code/modules/mob/living/carbon/human/emote.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 2e9f12e98ee7..8142f2bf64dc 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -83,7 +83,7 @@ var/mob/living/carbon/human/H = user if(H.mind?.miming) return - else if(H.dna?.species?.screamsound) //yogs start: grabs scream from screamsound located in the appropriate species file. + if(H.dna?.species) //yogs start: grabs scream from screamsound located in the appropriate species file. return H.dna.species.get_scream_sound(H) //yogs end - current added screams: basic human, moth, lizard, preternis, felinid. /datum/emote/living/carbon/meow