mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 21:27:01 +01:00
Merge pull request #5813 from Rykka-Stormheart/shep-dev-barky-noises
Sound Update: Mob Species Sounds (Gasp/Scream/Pain/Death/Cough/Sneeze)
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
var/voice_freq = 42500 //CHOMPEdit - Why was the default 0
|
||||
var/voice_sound = "goon speak 1" //CHOMPEdit - Changed the default voice to one less jarring
|
||||
var/custom_speech_bubble = "default"
|
||||
var/species_sound = "Unset" // CHOMPEdit: Use default species pain/scream sounds based off icon base if none set, override otherwise
|
||||
|
||||
// Definition of the stuff for Sizing
|
||||
/datum/category_item/player_setup_item/vore/size
|
||||
@@ -34,6 +35,7 @@
|
||||
S["voice_freq"] >> pref.voice_freq
|
||||
S["voice_sound"] >> pref.voice_sound
|
||||
S["custom_speech_bubble"] >> pref.custom_speech_bubble
|
||||
S["species_sound"] >> pref.species_sound // CHOMPEdit
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/save_character(var/savefile/S)
|
||||
S["size_multiplier"] << pref.size_multiplier
|
||||
@@ -45,6 +47,7 @@
|
||||
S["voice_freq"] << pref.voice_freq
|
||||
S["voice_sound"] << pref.voice_sound
|
||||
S["custom_speech_bubble"] << pref.custom_speech_bubble
|
||||
S["species_sound"] << pref.species_sound // CHOMPEdit
|
||||
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/sanitize_character()
|
||||
@@ -59,6 +62,9 @@
|
||||
pref.size_multiplier = initial(pref.size_multiplier)
|
||||
if(!(pref.custom_speech_bubble in selectable_speech_bubbles))
|
||||
pref.custom_speech_bubble = "default"
|
||||
// var/datum/species/selected_species = GLOB.all_species[pref.species] // CHOMPEdit
|
||||
if(!(pref.species_sound)) // CHOMPEdit // && selected_species.selects_bodytype
|
||||
pref.species_sound = "Unset" // CHOMPEdit - otherwise, we leave this as null or w/e the default is
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/copy_to_mob(var/mob/living/carbon/human/character)
|
||||
character.weight = pref.weight_vr
|
||||
@@ -114,10 +120,25 @@
|
||||
. += "<b>Scale:</b> <a href='?src=\ref[src];size_multiplier=1'>[round(pref.size_multiplier*100)]%</a><br>"
|
||||
. += "<b>Scaled Appearance:</b> <a [pref.fuzzy ? "" : ""] href='?src=\ref[src];toggle_fuzzy=1'><b>[pref.fuzzy ? "Fuzzy" : "Sharp"]</b></a><br>"
|
||||
. += "<b>Scaling Center:</b> <a [pref.offset_override ? "" : ""] href='?src=\ref[src];toggle_offset_override=1'><b>[pref.offset_override ? "Odd" : "Even"]</b></a><br>" //CHOMPEdit
|
||||
. += "<br>" // CHOMPEdit: Fancy:tm:
|
||||
. += "<b>Mob Speech/Noise Customization</b>" // CHOMPEdit: Fancy:tm:
|
||||
. += "<br>" // CHOMPEdit
|
||||
. += "<b>Voice Frequency:</b> <a href='?src=\ref[src];voice_freq=1'>[pref.voice_freq]</a><br>"
|
||||
. += "<b>Voice Sounds:</b> <a href='?src=\ref[src];voice_sounds_list=1'>[pref.voice_sound]</a><br>"
|
||||
. += "<a href='?src=\ref[src];voice_test=1'><b>Test Selected Voice</b></a><br>"
|
||||
. += "<b>Custom Speech Bubble:</b> <a href='?src=\ref[src];customize_speech_bubble=1'>[pref.custom_speech_bubble]</a><br>"
|
||||
// CHOMPEdit Start: Pain/Scream/Death Custom Sounds
|
||||
// var/datum/species/selected_species = GLOB.all_species[pref.species]
|
||||
// if(selected_species.selects_bodytype)
|
||||
. += "<br>"
|
||||
. += "<b>Species Sounds:</b> <a href='?src=\ref[src];species_sound_options=1'>[pref.species_sound]</a><br>"
|
||||
. += "<a href='?src=\ref[src];cough_test=1'><b>Test Cough Sounds</b></a><br>"
|
||||
. += "<a href='?src=\ref[src];sneeze_test=1'><b>Test Sneeze Sounds</b></a><br>"
|
||||
. += "<a href='?src=\ref[src];scream_test=1'><b>Test Scream Sounds</b></a><br>"
|
||||
. += "<a href='?src=\ref[src];pain_test=1'><b>Test Pain Sounds</b></a><br>"
|
||||
. += "<a href='?src=\ref[src];gasp_test=1'><b>Test Gasp Sounds</b></a><br>"
|
||||
. += "<a href='?src=\ref[src];death_test=1'><b>Test Death Sounds</b></a><br>"
|
||||
// CHOMPEdit End: Pain/Scream/Death Custom Sounds
|
||||
. += "<br>"
|
||||
. += "<b>Relative Weight:</b> <a href='?src=\ref[src];weight=1'>[pref.weight_vr]</a><br>"
|
||||
. += "<b>Weight Gain Rate:</b> <a href='?src=\ref[src];weight_gain=1'>[pref.weight_gain]</a><br>"
|
||||
@@ -210,8 +231,10 @@
|
||||
"goon speak roach",
|
||||
"goon speak skelly")
|
||||
var/choice = tgui_input_list(usr, "Which set of sounds would you like to use for your character's speech sounds?", "Voice Sounds", possible_voice_types)
|
||||
if(!choice)
|
||||
if(!pref.voice_sound)
|
||||
pref.voice_sound = "goon speak 1" //CHOMPEdit - Defaults voice to a less jarring sound
|
||||
else if(!choice)
|
||||
return TOPIC_REFRESH // CHOMPEdit
|
||||
else
|
||||
pref.voice_sound = choice
|
||||
return TOPIC_REFRESH
|
||||
@@ -258,5 +281,104 @@
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 50
|
||||
SEND_SOUND(user, S)
|
||||
|
||||
return ..();
|
||||
// CHOMPEdit Start: Pain/Scream/Death sounds
|
||||
else if(href_list["species_sound_options"]) // You shouldn't be able to see this option if you don't have the option to select a custom icon base, so we don't need to re-check for safety here.
|
||||
var/list/possible_species_sound_types = species_sound_map
|
||||
var/choice = tgui_input_list(usr, "Which set of sounds would you like to use for your character's species sounds? (Cough, Sneeze, Scream, Pain, Gasp, Death)", "Species Sounds", possible_species_sound_types)
|
||||
if(!choice)
|
||||
return TOPIC_REFRESH // No choice? Don't reset our selection
|
||||
else
|
||||
pref.species_sound = choice
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["cough_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["cough"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(user))["cough"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, "<span class='warning'>This set does not have cough sounds!</span>")
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["sneeze_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["sneeze"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(user))["sneeze"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, "<span class='warning'>This set does not have sneeze sounds!</span>")
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["scream_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["scream"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(user))["scream"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, "<span class='warning'>This set does not have scream sounds!</span>")
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["pain_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["pain"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(user))["pain"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, "<span class='warning'>This set does not have pain sounds!</span>")
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["gasp_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["gasp"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(user))["gasp"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, "<span class='warning'>This set does not have gasp sounds!</span>")
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
else if(href_list["death_test"])
|
||||
var/sound/S
|
||||
var/ourpref = pref.species_sound
|
||||
var/oursound = get_species_sound(ourpref)["death"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "Unset")
|
||||
oursound = get_species_sound(select_default_species_sound(user))["death"]
|
||||
S = sound(pick(oursound))
|
||||
if(pref.species_sound == "None" || oursound == null)
|
||||
to_chat(user, "<span class='warning'>This set does not have death sounds!</span>")
|
||||
return TOPIC_REFRESH
|
||||
S.frequency = pick(pref.voice_freq)
|
||||
S.volume = 20
|
||||
SEND_SOUND(user, S)
|
||||
return TOPIC_REFRESH
|
||||
// CHOMPEdit End
|
||||
return ..();
|
||||
|
||||
@@ -263,6 +263,17 @@
|
||||
//Any additional non-trait settings can be applied here
|
||||
new_S.blood_color = pref.blood_color
|
||||
|
||||
/*
|
||||
if(pref.species_sound) // CHOMPEdit: Custom Scream/Death/Gasp/Pain Sounds. Don't try to do this if it doesn't exist. // && new_S.selects_bodytype && pref.custom_base) // we aren't a custom species, and we don't have a custom base.
|
||||
new_S.copy_species_sounds(new_S, pref.species_sound, pref.custom_base) // CHOMPEdit: Custom Scream/Death/Gasp/Pain Sounds
|
||||
*/
|
||||
// CHOMPEdit: Custom Scream/Death/Gasp/Pain Sounds.
|
||||
var/species_sounds_to_copy = pref.species_sound // What sounds are we using?
|
||||
if(species_sounds_to_copy == "Unset") // Are we unset?
|
||||
species_sounds_to_copy = select_default_species_sound(pref) // This will also grab gendered versions of the sounds, if they exist.
|
||||
|
||||
new_S.species_sounds = species_sounds_to_copy // Now we send our sounds over to the mob
|
||||
|
||||
if(pref.species == SPECIES_CUSTOM)
|
||||
//Statistics for this would be nice
|
||||
var/english_traits = english_list(new_S.traits, and_text = ";", comma_text = ";")
|
||||
|
||||
Reference in New Issue
Block a user