mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Custom Footstep sounds (#8695)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
#define FOOTSTEP_MOB_SHOE "footstep_shoe"
|
||||
#define FOOTSTEP_MOB_HUMAN "footstep_human" //Warning: Only works on /mob/living/carbon/human
|
||||
#define FOOTSTEP_MOB_SLIME "footstep_slime"
|
||||
#define FOOTSTEP_MOB_SLITHER "footstep_slither"
|
||||
#define FOOTSTEP_OBJ_MACHINE "footstep_machine"
|
||||
#define FOOTSTEP_OBJ_ROBOT "footstep_robot"
|
||||
|
||||
|
||||
@@ -196,3 +196,10 @@ var/global/list/vr_mob_spawner_options = list(
|
||||
"Neaera" = /mob/living/carbon/human/neaera,
|
||||
"Stok" = /mob/living/carbon/human/stok
|
||||
)
|
||||
|
||||
var/global/list/selectable_footstep = list(
|
||||
"Default" = FOOTSTEP_MOB_HUMAN,
|
||||
"Claw" = FOOTSTEP_MOB_CLAW,
|
||||
"Light Claw" = FOOTSTEP_MOB_TESHARI,
|
||||
"Slither" = FOOTSTEP_MOB_SLITHER,
|
||||
)
|
||||
|
||||
@@ -16,6 +16,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/custom_footstep = "Default" // CHOMPAdd
|
||||
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
|
||||
@@ -33,6 +34,7 @@
|
||||
S["voice_freq"] >> pref.voice_freq
|
||||
S["voice_sound"] >> pref.voice_sound
|
||||
S["custom_speech_bubble"] >> pref.custom_speech_bubble
|
||||
S["custom_footstep"] >> pref.custom_footstep // CHOMPEdit
|
||||
S["species_sound"] >> pref.species_sound // CHOMPEdit
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/save_character(var/savefile/S)
|
||||
@@ -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["custom_footstep"] << pref.custom_footstep // CHOMPEdit
|
||||
S["species_sound"] << pref.species_sound // CHOMPEdit
|
||||
|
||||
|
||||
@@ -60,6 +63,8 @@
|
||||
pref.size_multiplier = initial(pref.size_multiplier)
|
||||
if(!(pref.custom_speech_bubble in selectable_speech_bubbles))
|
||||
pref.custom_speech_bubble = "default"
|
||||
if(!(pref.custom_footstep)) // CHOMPAdd
|
||||
pref.custom_footstep = "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
|
||||
@@ -112,6 +117,7 @@
|
||||
character.voice_sounds_list = goon_speak_skelly_sound
|
||||
*/ //CHOMPEDIT Global voice lookup
|
||||
character.custom_speech_bubble = pref.custom_speech_bubble
|
||||
character.custom_footstep = pref.custom_footstep
|
||||
|
||||
/datum/category_item/player_setup_item/vore/size/content(var/mob/user)
|
||||
. += "<br>"
|
||||
@@ -125,6 +131,7 @@
|
||||
. += "<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>"
|
||||
. += "<b>Custom Footstep Sounds:</b><a href='?src=\ref[src];customize_footsteps=1'>[pref.custom_footstep]</a><br>"
|
||||
// CHOMPEdit Start: Pain/Scream/Death Custom Sounds
|
||||
// var/datum/species/selected_species = GLOB.all_species[pref.species]
|
||||
// if(selected_species.selects_bodytype)
|
||||
@@ -237,6 +244,14 @@
|
||||
else
|
||||
pref.voice_sound = choice
|
||||
return TOPIC_REFRESH
|
||||
// CHOMPAdd Start
|
||||
else if(href_list["customize_footsteps"])
|
||||
var/list/footstep_choice = selectable_footstep
|
||||
var/choice = tgui_input_list(user, "What footstep sounds would your character make?", "Custom Foostep Sounds", footstep_choice)
|
||||
if(choice)
|
||||
pref.custom_footstep = footstep_choice[choice]
|
||||
return TOPIC_REFRESH
|
||||
// CHOMPAdd End
|
||||
else if(href_list["customize_speech_bubble"])
|
||||
var/choice = tgui_input_list(user, "What speech bubble style do you want to use? (default for automatic selection)", "Custom Speech Bubble", selectable_speech_bubbles)
|
||||
if(!choice)
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
if (!default_language && species_language)
|
||||
default_language = GLOB.all_languages[species_language]
|
||||
|
||||
AddElement(/datum/element/footstep, custom_footstep, 1, -6) // CHOMPAdd
|
||||
|
||||
/mob/living/carbon/Life()
|
||||
..()
|
||||
|
||||
|
||||
@@ -1400,10 +1400,3 @@
|
||||
to_chat(src, SPAN_NOTICE("You are [toggled_sleeping ? "now sleeping. Use the Sleep verb again to wake up" : "no longer sleeping"]."))
|
||||
if(toggled_sleeping)
|
||||
Sleeping(1)
|
||||
|
||||
// CHOMPAdd - Everyone starts as a human, augh.
|
||||
/mob/living/proc/set_footsteps(footstep_sounds = FOOTSTEP_MOB_HUMAN)
|
||||
AddElement(/datum/element/footstep, footstep_sounds, 1, -6)
|
||||
|
||||
/mob/living/proc/set_slosh()
|
||||
AddElement(/datum/element/slosh)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
init_id()
|
||||
init_subsystems()
|
||||
|
||||
set_slosh() // CHOMPAdd - Slosh element, for VORE
|
||||
AddElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 1, -6) // CHOMPAdd
|
||||
|
||||
/mob/living/silicon/Destroy()
|
||||
silicon_mob_list -= src
|
||||
|
||||
@@ -208,6 +208,7 @@
|
||||
if(CONFIG_GET(flag/allow_simple_mob_recolor)) //CHOMPEdit
|
||||
add_verb(src,/mob/living/simple_mob/proc/ColorMate) //CHOMPEdit TGPanel
|
||||
|
||||
AddElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 1, -6) // CHOMPEdit - Giving them all shoe footsteps FOR NOW until I go through all of them and give appropiate ones
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -230,6 +230,8 @@
|
||||
if(!vore_active || no_vore || !voremob_loaded) //CHOMPedit: On-demand belly loading.
|
||||
return
|
||||
|
||||
AddElement(/datum/element/slosh) // Sloshy element
|
||||
|
||||
//CHOMPAdd Start
|
||||
if(!soulgem)
|
||||
soulgem = new(src)
|
||||
|
||||
@@ -240,3 +240,5 @@
|
||||
var/list/progressbars = null //VOREStation Edit
|
||||
|
||||
var/datum/focus //What receives our keyboard inputs. src by default
|
||||
|
||||
var/custom_footstep = FOOTSTEP_MOB_SHOE // CHOMPEdit
|
||||
|
||||
@@ -761,9 +761,6 @@
|
||||
new_character.update_icons_body()
|
||||
new_character.update_transform() //VOREStation Edit
|
||||
|
||||
new_character.set_footsteps(chosen_species.footstep) // CHOMPEdit
|
||||
new_character.set_slosh() //CHOMPEdit
|
||||
|
||||
new_character.key = key //Manually transfer the key to log them in
|
||||
|
||||
return new_character
|
||||
|
||||
@@ -179,11 +179,6 @@
|
||||
new_character.default_language = def_lang
|
||||
// VOREStation Add End
|
||||
|
||||
// CHOMPAdd Start - Elements for footstep and slosh
|
||||
new_character.set_footsteps(chosen_species.footstep)
|
||||
new_character.set_slosh()
|
||||
// CHOMPAdd End
|
||||
|
||||
//If desired, apply equipment.
|
||||
if(equip_body)
|
||||
if(charjob)
|
||||
|
||||
@@ -136,11 +136,6 @@
|
||||
if(current_project.speciesname)
|
||||
H.custom_species = current_project.speciesname
|
||||
|
||||
// CHOMPAdd Start - Elements for footstep and slosh
|
||||
H.set_footsteps(H.species.footstep)
|
||||
H.set_slosh()
|
||||
// CHOMPAdd End
|
||||
|
||||
//Suiciding var
|
||||
H.suiciding = 0
|
||||
|
||||
@@ -369,11 +364,6 @@
|
||||
if(current_project.speciesname)
|
||||
H.custom_species = current_project.speciesname
|
||||
|
||||
// CHOMPAdd Start - Elements for footstep and slosh
|
||||
H.set_footsteps(H.species.footstep)
|
||||
H.set_slosh()
|
||||
// CHOMPAdd End
|
||||
|
||||
//Suiciding var
|
||||
H.suiciding = 0
|
||||
|
||||
|
||||
@@ -173,11 +173,6 @@ Please do not abuse this ability.
|
||||
new_character.default_language = def_lang
|
||||
// VOREStation Add End
|
||||
|
||||
// CHOMPAdd Start - Elements for footstep and slosh
|
||||
new_character.set_footsteps(new_character.species.footstep)
|
||||
new_character.set_slosh()
|
||||
// CHOMPAdd End
|
||||
|
||||
new_character.regenerate_icons()
|
||||
|
||||
new_character.update_transform()
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
|
||||
/mob/proc/init_vore()
|
||||
//Something else made organs, meanwhile.
|
||||
AddElement(/datum/element/slosh) // CHOMPEdit - Sloshy element
|
||||
if(LAZYLEN(vore_organs))
|
||||
//CHOMPAdd Start
|
||||
if(!soulgem)
|
||||
|
||||
@@ -51,6 +51,8 @@
|
||||
footstep_ret = GLOB.footstep
|
||||
if(FOOTSTEP_MOB_SLIME)
|
||||
footstep_ret = 'modular_chomp/sound/effects/footstep/slime1.ogg'
|
||||
if(FOOTSTEP_MOB_SLITHER)
|
||||
footstep_ret = 'modular_chomp/sound/effects/footstep/crawl1.ogg'
|
||||
return footstep_ret
|
||||
|
||||
/datum/element/footstep/Detach(atom/movable/source)
|
||||
@@ -94,7 +96,14 @@
|
||||
if(steps != 0 && !has_gravity(source)) // don't need to step as often when you hop around
|
||||
return
|
||||
|
||||
. = list(FOOTSTEP_MOB_SHOE = turf.footstep, FOOTSTEP_MOB_BAREFOOT = turf.barefootstep, FOOTSTEP_MOB_HEAVY = turf.heavyfootstep, FOOTSTEP_MOB_CLAW = turf.clawfootstep, STEP_SOUND_PRIORITY = STEP_SOUND_NO_PRIORITY)
|
||||
. = list(
|
||||
FOOTSTEP_MOB_SHOE = turf.footstep,
|
||||
FOOTSTEP_MOB_BAREFOOT = turf.barefootstep,
|
||||
FOOTSTEP_MOB_HEAVY = turf.heavyfootstep,
|
||||
FOOTSTEP_MOB_CLAW = turf.clawfootstep,
|
||||
STEP_SOUND_PRIORITY = STEP_SOUND_NO_PRIORITY
|
||||
)
|
||||
|
||||
var/overriden = SEND_SIGNAL(turf, COMSIG_TURF_PREPARE_STEP_SOUND, .) & FOOTSTEP_OVERRIDEN
|
||||
//The turf has no footstep sound (e.g. open space) and none of the objects on that turf (e.g. catwalks) overrides it
|
||||
if(!overriden && isnull(turf.footstep))
|
||||
@@ -104,6 +113,8 @@
|
||||
/datum/element/footstep/proc/play_simplestep(mob/living/source, atom/oldloc, direction, forced, list/old_locs, momentum_change)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/volume_multiplier = 0.3
|
||||
|
||||
if(!isturf(source.loc))
|
||||
return
|
||||
|
||||
@@ -112,7 +123,7 @@
|
||||
return
|
||||
|
||||
if(isfile(footstep_sounds) || istext(footstep_sounds))
|
||||
playsound(source.loc, footstep_sounds, volume, falloff = 1, vary = sound_vary)
|
||||
playsound(source.loc, footstep_sounds, volume * volume_multiplier, falloff = 1, vary = sound_vary)
|
||||
return
|
||||
|
||||
var/turf_footstep = prepared_steps[footstep_type]
|
||||
@@ -123,7 +134,7 @@
|
||||
/datum/element/footstep/proc/play_humanstep(mob/living/carbon/human/source, atom/oldloc, direction, forced, list/old_locs, momentum_change)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
var/volume_multiplier = 0.5
|
||||
var/volume_multiplier = 0.3
|
||||
var/range_adjustment = 0
|
||||
|
||||
var/list/prepared_steps = prepare_step(source)
|
||||
@@ -149,11 +160,13 @@
|
||||
playsound(source.loc, pick(source.species.special_step_sounds), volume, TRUE, falloff = 1, vary = sound_vary)
|
||||
else if (istype(source.species, /datum/species/shapeshifter/promethean))
|
||||
playsound(source.loc, 'modular_chomp/sound/effects/footstep/slime1.ogg', volume, TRUE, falloff = 1)
|
||||
else if (source.custom_footstep == FOOTSTEP_MOB_SLITHER)
|
||||
playsound(source.loc, 'modular_chomp/sound/effects/footstep/crawl1.ogg', 15 * volume, falloff = 1, vary = sound_vary)
|
||||
else
|
||||
var/barefoot_type = prepared_steps[FOOTSTEP_MOB_BAREFOOT]
|
||||
var/bare_footstep_sounds
|
||||
if(source.species.footstep != FOOTSTEP_MOB_HUMAN)
|
||||
bare_footstep_sounds = check_footstep_type(source.species.footstep)
|
||||
if(source.custom_footstep != FOOTSTEP_MOB_HUMAN)
|
||||
bare_footstep_sounds = check_footstep_type(source.custom_footstep)
|
||||
else
|
||||
bare_footstep_sounds = GLOB.barefootstep
|
||||
if(!isnull(barefoot_type) && bare_footstep_sounds[barefoot_type]) // barefoot_type can be null
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
if(!isliving(target))
|
||||
return ELEMENT_INCOMPATIBLE
|
||||
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(handle_footstep))
|
||||
RegisterSignal(target, COMSIG_MOVABLE_MOVED, PROC_REF(handle_sloshstep), override = TRUE)
|
||||
step_count = 0
|
||||
vore_organs_reagents = list()
|
||||
vore_footstep_volume = 0
|
||||
@@ -21,7 +21,7 @@
|
||||
UnregisterSignal(source, COMSIG_MOVABLE_MOVED)
|
||||
return ..()
|
||||
|
||||
/datum/element/slosh/proc/handle_footstep(mob/living/source)
|
||||
/datum/element/slosh/proc/handle_sloshstep(mob/living/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(ishuman(source))
|
||||
|
||||
Reference in New Issue
Block a user