mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
Custom Footstep Sounds Port (Nova Sector) (#5114)
## About The Pull Request First PR. All I know is that it works. Anyway, this PR ports customisable (barefoot) footstep sounds from Nova Sector. It incorporates the update PRs to the best of my very limited ability thanks to Artur. Various high heel footwear items are also updated with the additional footstep noises for the hell of it, going from 2 possible sounds to 4, reducing the looping effect. _Footstep options include:_ - Default - Shoes (shoe SFX while barefoot) - Highheels - Claws (Ian/similar mob SFX) - Hooves (New SFX added by PR) Files are distributed a little haphazardly. Some in the modular Zubbers folder, some in the old skyrat modular folder. I am lazy. Original PRs code was taken from (credit to https://github.com/Neocloudy for the first PR on Nova): 1. [https://github.com/NovaSector/NovaSector/pull/3404](url) 2. [https://github.com/NovaSector/NovaSector/pull/4475](url) 3. [https://github.com/NovaSector/NovaSector/pull/6035](url) ## Why It's Good For The Game I forgor to fill this out. Uhm. Customisation good I guess. Also stops SLAPPY SLAP HUMAN FLESH FEET NOISES despite being a robot etc. ## Proof Of Testing https://github.com/user-attachments/assets/aa1227fa-aea5-43f4-87a8-d52f65c752ce video WAS longer but had to cut significantly <details> <summary>Screenshots/Videos</summary> </details> ## Changelog 🆑 add: Ability to customise barefoot footstep sounds in character preference menu. /🆑 --------- Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
/datum/preference/choiced/footstep_sound
|
||||
category = PREFERENCE_CATEGORY_SECONDARY_FEATURES
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
savefile_key = "footstep_sound"
|
||||
|
||||
/datum/preference/choiced/footstep_sound/init_possible_values()
|
||||
return list("Default", "Shoes", "Highheels", "Claws", "Hooves")
|
||||
|
||||
/datum/preference/choiced/footstep_sound/create_default_value()
|
||||
return "Default"
|
||||
|
||||
/datum/preference/choiced/footstep_sound/apply_to_human(mob/living/carbon/human/target, value)
|
||||
if(value == "Default")
|
||||
return
|
||||
|
||||
/// Either use the TG footstep_type here, or specify a special_footstep_sounds list.
|
||||
/// special_footstep_sounds list formatting must be: list(list(sounds, go, here), volume, range modifier)
|
||||
/// Note: special_footstep_sounds will play the same effect on all turfs, but TG footstep sounds are very hardcoded
|
||||
/// so if you want a new custom set of sounds that's the least-painful method of adding them, with the caveat of not being able to
|
||||
/// support turf-based sounds.
|
||||
var/static/list/value_to_define = list(
|
||||
"Shoes" = FOOTSTEP_MOB_SHOE,
|
||||
"Claws" = FOOTSTEP_MOB_CLAW,
|
||||
"Highheels" = list(list(
|
||||
'modular_zubbers/sound/effects/footstep/highheel1.ogg',
|
||||
'modular_zubbers/sound/effects/footstep/highheel2.ogg',
|
||||
'modular_zubbers/sound/effects/footstep/highheel3.ogg',
|
||||
'modular_zubbers/sound/effects/footstep/highheel4.ogg'), 70, 1),
|
||||
"Hooves" = list(list(
|
||||
'modular_zubbers/sound/effects/footstep/hardhoof1.ogg',
|
||||
'modular_zubbers/sound/effects/footstep/hardhoof2.ogg',
|
||||
'modular_zubbers/sound/effects/footstep/hardhoof3.ogg',
|
||||
'modular_zubbers/sound/effects/footstep/hardhoof4.ogg'), 35, 1),
|
||||
)
|
||||
var/footstep_type = value_to_define[value]
|
||||
|
||||
var/obj/item/bodypart/leg/left_leg = target.get_bodypart(BODY_ZONE_L_LEG)
|
||||
var/obj/item/bodypart/leg/right_leg = target.get_bodypart(BODY_ZONE_R_LEG)
|
||||
if(islist(footstep_type))
|
||||
left_leg?.special_footstep_sounds = footstep_type
|
||||
right_leg?.special_footstep_sounds = footstep_type
|
||||
else
|
||||
left_leg?.footstep_type = footstep_type
|
||||
right_leg?.footstep_type = footstep_type
|
||||
|
||||
target.footstep_type = footstep_type // We are most likely going to have our legs get replaced during char creation immediately, so this is necessary to apply to any subsequent legs that get added.
|
||||
Reference in New Issue
Block a user