mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
More steppy sounds + 'ignore shoes' pref (#19092)
* initial commit * swap to better mech step sounds * switch to tgprefs * move that over, --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
4055b8d042
commit
23e34de16e
@@ -25,10 +25,12 @@
|
||||
#define FOOTSTEP_MOB_TESHARI "footstep_lightclaw"
|
||||
#define FOOTSTEP_MOB_BAREFOOT "footstep_barefoot"
|
||||
#define FOOTSTEP_MOB_HEAVY "footstep_heavy"
|
||||
#define FOOTSTEP_MOB_HEAVY_ALT "footstep_heavy_alt"
|
||||
#define FOOTSTEP_MOB_SHOE "footstep_shoe"
|
||||
#define FOOTSTEP_MOB_HUMAN "footstep_human"
|
||||
#define FOOTSTEP_MOB_SLIME "footstep_slime"
|
||||
#define FOOTSTEP_MOB_SLITHER "footstep_slither"
|
||||
#define FOOTSTEP_MOB_MECHY "footstep_mechy"
|
||||
#define FOOTSTEP_OBJ_MACHINE "footstep_machine"
|
||||
#define FOOTSTEP_OBJ_ROBOT "footstep_robot"
|
||||
|
||||
@@ -250,3 +252,103 @@ GLOBAL_LIST_INIT(heavyfootstep, list(
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
))
|
||||
|
||||
//heavy alt footsteps list
|
||||
GLOBAL_LIST_INIT(heavyaltfootstep, list(
|
||||
FOOTSTEP_WOOD_BAREFOOT = list(list(
|
||||
'sound/mob/footstep_large.ogg',
|
||||
'sound/mob/footstep_large2.ogg'), 90, 1),
|
||||
FOOTSTEP_HARD_BAREFOOT = list(list(
|
||||
'sound/mob/footstep_large.ogg',
|
||||
'sound/mob/footstep_large2.ogg'), 90, 1),
|
||||
FOOTSTEP_CARPET_BAREFOOT = list(list(
|
||||
'sound/mob/footstep_large.ogg',
|
||||
'sound/mob/footstep_large2.ogg'), 75, -2),
|
||||
FOOTSTEP_GRASS = list(list(
|
||||
'sound/mob/footstep_large.ogg',
|
||||
'sound/mob/footstep_large2.ogg'), 75, 0),
|
||||
FOOTSTEP_WATER = list(list(
|
||||
'sound/effects/footstep/water1.ogg',
|
||||
'sound/effects/footstep/water2.ogg',
|
||||
'sound/effects/footstep/water3.ogg',
|
||||
'sound/effects/footstep/water4.ogg'), 100, 1),
|
||||
FOOTSTEP_LAVA = list(list(
|
||||
'sound/effects/footstep/lava1.ogg',
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
))
|
||||
|
||||
//heavy alt footsteps list
|
||||
GLOBAL_LIST_INIT(mechfootstep, list(
|
||||
FOOTSTEP_WOOD_BAREFOOT = list(list(
|
||||
'sound/mecha/mechstep1.ogg',
|
||||
'sound/mecha/mechstep2.ogg'), 90, 1),
|
||||
FOOTSTEP_HARD_BAREFOOT = list(list(
|
||||
'sound/mecha/mechstep1.ogg',
|
||||
'sound/mecha/mechstep2.ogg'), 90, 1),
|
||||
FOOTSTEP_CARPET_BAREFOOT = list(list(
|
||||
'sound/mecha/mechstep1.ogg',
|
||||
'sound/mecha/mechstep2.ogg'), 75, -2),
|
||||
FOOTSTEP_GRASS = list(list(
|
||||
'sound/mecha/mechstep1.ogg',
|
||||
'sound/mecha/mechstep2.ogg'), 75, 0),
|
||||
FOOTSTEP_WATER = list(list(
|
||||
'sound/effects/footstep/water1.ogg',
|
||||
'sound/effects/footstep/water2.ogg',
|
||||
'sound/effects/footstep/water3.ogg',
|
||||
'sound/effects/footstep/water4.ogg'), 100, 1),
|
||||
FOOTSTEP_LAVA = list(list(
|
||||
'sound/effects/footstep/lava1.ogg',
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
))
|
||||
|
||||
//slime footsteps list
|
||||
GLOBAL_LIST_INIT(slimefootstep, list(
|
||||
FOOTSTEP_WOOD_BAREFOOT = list(list(
|
||||
'sound/effects/footstep/slime1.ogg'), 90, 1),
|
||||
FOOTSTEP_HARD_BAREFOOT = list(list(
|
||||
'sound/effects/footstep/slime1.ogg'), 90, 1),
|
||||
FOOTSTEP_CARPET_BAREFOOT = list(list(
|
||||
'sound/effects/footstep/slime1.ogg'), 75, -2),
|
||||
FOOTSTEP_GRASS = list(list(
|
||||
'sound/effects/footstep/slime1.ogg'), 75, 0),
|
||||
FOOTSTEP_WATER = list(list(
|
||||
'sound/effects/footstep/water1.ogg',
|
||||
'sound/effects/footstep/water2.ogg',
|
||||
'sound/effects/footstep/water3.ogg',
|
||||
'sound/effects/footstep/water4.ogg'), 100, 1),
|
||||
FOOTSTEP_LAVA = list(list(
|
||||
'sound/effects/footstep/lava1.ogg',
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
))
|
||||
|
||||
//slither footsteps list
|
||||
GLOBAL_LIST_INIT(slitherfootstep, list(
|
||||
FOOTSTEP_WOOD_BAREFOOT = list(list(
|
||||
'sound/effects/footstep/crawl1.ogg'), 90, 1),
|
||||
FOOTSTEP_HARD_BAREFOOT = list(list(
|
||||
'sound/effects/footstep/crawl1.ogg'), 90, 1),
|
||||
FOOTSTEP_CARPET_BAREFOOT = list(list(
|
||||
'sound/effects/footstep/crawl1.ogg'), 75, -2),
|
||||
FOOTSTEP_GRASS = list(list(
|
||||
'sound/effects/footstep/crawl1.ogg'), 75, 0),
|
||||
FOOTSTEP_WATER = list(list(
|
||||
'sound/effects/footstep/water1.ogg',
|
||||
'sound/effects/footstep/water2.ogg',
|
||||
'sound/effects/footstep/water3.ogg',
|
||||
'sound/effects/footstep/water4.ogg'), 100, 1),
|
||||
FOOTSTEP_LAVA = list(list(
|
||||
'sound/effects/footstep/lava1.ogg',
|
||||
'sound/effects/footstep/lava2.ogg',
|
||||
'sound/effects/footstep/lava3.ogg'), 100, 0),
|
||||
FOOTSTEP_MEAT = list(list(
|
||||
'sound/effects/meatslap.ogg'), 100, 0),
|
||||
))
|
||||
|
||||
@@ -359,6 +359,8 @@ GLOBAL_LIST_INIT(selectable_footstep, list(
|
||||
"Claw" = FOOTSTEP_MOB_CLAW,
|
||||
"Light Claw" = FOOTSTEP_MOB_TESHARI,
|
||||
"Slither" = FOOTSTEP_MOB_SLITHER,
|
||||
"Mech" = FOOTSTEP_MOB_MECHY,
|
||||
"Heavy" = FOOTSTEP_MOB_HEAVY_ALT
|
||||
))
|
||||
|
||||
// Put any artifact effects that are duplicates, unique, or otherwise unwated in here! This prevents them from spawning via RNG.
|
||||
|
||||
@@ -48,9 +48,13 @@
|
||||
if(FOOTSTEP_MOB_SHOE)
|
||||
footstep_ret = GLOB.footstep
|
||||
if(FOOTSTEP_MOB_SLIME)
|
||||
footstep_ret = 'sound/effects/footstep/slime1.ogg'
|
||||
footstep_ret = GLOB.slimefootstep
|
||||
if(FOOTSTEP_MOB_SLITHER)
|
||||
footstep_ret = 'sound/effects/footstep/crawl1.ogg'
|
||||
footstep_ret = GLOB.slitherfootstep
|
||||
if(FOOTSTEP_MOB_HEAVY_ALT)
|
||||
footstep_ret = GLOB.heavyaltfootstep
|
||||
if(FOOTSTEP_MOB_MECHY)
|
||||
footstep_ret = GLOB.mechfootstep
|
||||
else
|
||||
footstep_ret = GLOB.barefootstep
|
||||
return footstep_ret
|
||||
@@ -134,10 +138,6 @@
|
||||
/datum/element/footstep/proc/play_humanstep(mob/living/carbon/human/source, atom/oldloc, direction, forced, list/old_locs, momentum_change)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if (source.custom_footstep == FOOTSTEP_MOB_SLITHER)
|
||||
playsound(source.loc, 'sound/effects/footstep/crawl1.ogg', 15 * volume, falloff = 1, vary = sound_vary)
|
||||
return
|
||||
|
||||
var/volume_multiplier = 0.3
|
||||
var/range_adjustment = 0
|
||||
|
||||
@@ -145,6 +145,10 @@
|
||||
if(isnull(prepared_steps))
|
||||
return
|
||||
|
||||
if (source.client?.prefs?.read_preference(/datum/preference/toggle/human/ignore_shoes))
|
||||
play_barefoot_sound(source, prepared_steps, volume_multiplier, range_adjustment)
|
||||
return
|
||||
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/footstep_sounds = GLOB.footstep
|
||||
|
||||
@@ -161,8 +165,6 @@
|
||||
footstep_sounds[shoestep_type][3] + e_range + range_adjustment, falloff = 1, vary = sound_vary)
|
||||
return
|
||||
|
||||
play_barefoot_sound(source, prepared_steps, volume_multiplier, range_adjustment)
|
||||
return
|
||||
// we are barefoot
|
||||
play_barefoot_sound(source, prepared_steps, volume_multiplier, range_adjustment)
|
||||
|
||||
@@ -172,10 +174,6 @@
|
||||
playsound(source.loc, pick(source.species.special_step_sounds), volume, TRUE, falloff = 1, vary = sound_vary)
|
||||
return
|
||||
|
||||
if (istype(source.species, /datum/species/shapeshifter/promethean))
|
||||
playsound(source.loc, 'sound/effects/footstep/slime1.ogg', volume, TRUE, falloff = 1, vary = sound_vary)
|
||||
return
|
||||
|
||||
var/barefoot_type = prepared_steps[FOOTSTEP_MOB_BAREFOOT]
|
||||
var/bare_footstep_sounds
|
||||
if(source.custom_footstep != FOOTSTEP_MOB_HUMAN)
|
||||
|
||||
@@ -154,6 +154,8 @@
|
||||
data["auto_backup_implant"] = pref.auto_backup_implant
|
||||
data["borg_petting"] = pref.borg_petting
|
||||
|
||||
data["ignore_shoes"] = pref.read_preference(/datum/preference/toggle/human/ignore_shoes)
|
||||
|
||||
data["resleeve_lock"] = pref.resleeve_lock
|
||||
data["resleeve_scan"] = pref.resleeve_scan
|
||||
data["mind_scan"] = pref.mind_scan
|
||||
@@ -214,6 +216,9 @@
|
||||
if("toggle_capture_crystal")
|
||||
pref.capture_crystal = pref.capture_crystal ? 0 : 1;
|
||||
return TOPIC_REFRESH
|
||||
if("toggle_ignore_shoes")
|
||||
pref.update_preference_by_type(/datum/preference/toggle/human/ignore_shoes, !pref.read_preference(/datum/preference/toggle/human/ignore_shoes))
|
||||
return TOPIC_REFRESH
|
||||
if("toggle_implant")
|
||||
pref.auto_backup_implant = pref.auto_backup_implant ? 0 : 1;
|
||||
return TOPIC_REFRESH
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
/datum/preference/toggle/human/ignore_shoes
|
||||
category = PREFERENCE_CATEGORY_NON_CONTEXTUAL
|
||||
savefile_key = "ignore_shoes"
|
||||
default_value = FALSE
|
||||
savefile_identifier = PREFERENCE_CHARACTER
|
||||
can_randomize = FALSE
|
||||
|
||||
/datum/preference/toggle/human/ignore_shoes/apply_to_human(mob/living/carbon/human/target, value)
|
||||
return
|
||||
@@ -55,6 +55,7 @@ export const SubtabSettings = (props: {
|
||||
syndicate_ban,
|
||||
special_roles,
|
||||
custom_footstep,
|
||||
ignore_shoes,
|
||||
custom_species_sound,
|
||||
custom_speech_bubble,
|
||||
persistence_settings,
|
||||
@@ -138,6 +139,15 @@ export const SubtabSettings = (props: {
|
||||
{custom_footstep}
|
||||
</Button>
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Ignore Shoes">
|
||||
<Button
|
||||
onClick={() => act('toggle_ignore_shoes')}
|
||||
selected={ignore_shoes}
|
||||
tooltip="Allow footstep sounds to pass through shoes."
|
||||
>
|
||||
{ignore_shoes ? 'Yes' : 'No'}
|
||||
</Button>
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Custom Species Sounds">
|
||||
<Button onClick={() => act('customize_species_sounds')}>
|
||||
{custom_species_sound}
|
||||
@@ -281,8 +291,8 @@ export const SubtabSettings = (props: {
|
||||
{role.banned
|
||||
? 'BANNED'
|
||||
: role.selected
|
||||
? 'Yes'
|
||||
: 'No'}
|
||||
? 'Yes'
|
||||
: 'No'}
|
||||
</Button>
|
||||
</LabeledList.Item>
|
||||
))}
|
||||
|
||||
@@ -284,6 +284,7 @@ export type MiscData = {
|
||||
nif: BooleanLike;
|
||||
|
||||
custom_species: string;
|
||||
ignore_shoes: BooleanLike;
|
||||
pos_traits: string[] | Record<string, Record<string, any> | null>;
|
||||
neu_traits: string[] | Record<string, Record<string, any> | null>;
|
||||
neg_traits: string[] | Record<string, Record<string, any> | null>;
|
||||
|
||||
@@ -2475,6 +2475,7 @@
|
||||
#include "code\modules\client\preferences\types\character\general\01_basic.dm"
|
||||
#include "code\modules\client\preferences\types\character\general\03_body.dm"
|
||||
#include "code\modules\client\preferences\types\character\general\06_special.dm"
|
||||
#include "code\modules\client\preferences\types\character\general\11_misc.dm"
|
||||
#include "code\modules\client\preferences\types\game\admin.dm"
|
||||
#include "code\modules\client\preferences\types\game\adult.dm"
|
||||
#include "code\modules\client\preferences\types\game\auto_fit_viewport.dm"
|
||||
|
||||
Reference in New Issue
Block a user