Footstep Sound Overhaul (#15628)

* Footstep Sound Overhaul

* remove these

* tweaks
This commit is contained in:
Fox McCloud
2021-03-02 05:01:57 -05:00
committed by GitHub
parent 983d39925f
commit 7be1416ef0
128 changed files with 476 additions and 169 deletions
@@ -47,6 +47,10 @@
icon_state = "desert"
mouse_opacity = MOUSE_OPACITY_ICON
baseturf = /turf/simulated/floor/beach/away/sand
footstep = FOOTSTEP_SAND
barefootstep = FOOTSTEP_SAND
clawfootstep = FOOTSTEP_SAND
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
/turf/simulated/floor/beach/away/sand/Initialize(mapload)
. = ..() //adds some aesthetic randomness to the beach sand
@@ -63,6 +67,10 @@
icon_state = "beach"
water_overlay_image = "water_coast"
baseturf = /turf/simulated/floor/beach/away/coastline
footstep = FOOTSTEP_WATER
barefootstep = FOOTSTEP_WATER
clawfootstep = FOOTSTEP_WATER
heavyfootstep = FOOTSTEP_WATER
/turf/simulated/floor/beach/away/coastline/dense //for boundary "walls"
density = TRUE
@@ -74,6 +82,10 @@
water_overlay_image = "water_shallow"
var/obj/machinery/poolcontroller/linkedcontroller = null
baseturf = /turf/simulated/floor/beach/away/water
footstep = FOOTSTEP_WATER
barefootstep = FOOTSTEP_WATER
clawfootstep = FOOTSTEP_WATER
heavyfootstep = FOOTSTEP_WATER
/turf/simulated/floor/beach/away/water/Entered(atom/movable/AM, atom/OldLoc)
. = ..()
-23
View File
@@ -442,9 +442,6 @@ BLIND // can't see anything
body_parts_covered = FEET
slot_flags = SLOT_FEET
var/silence_steps = 0
var/shoe_sound_footstep = 1
var/shoe_sound = null
var/blood_state = BLOOD_STATE_NOT_BLOODY
var/list/bloody_shoes = list(BLOOD_STATE_HUMAN = 0, BLOOD_STATE_XENO = 0, BLOOD_STATE_NOT_BLOODY = 0)
@@ -484,26 +481,6 @@ BLIND // can't see anything
else
return ..()
/obj/item/clothing/shoes/proc/step_action(var/mob/living/carbon/human/H) //squeek squeek
SEND_SIGNAL(src, COMSIG_SHOES_STEP_ACTION)
if(shoe_sound)
var/turf/T = get_turf(H)
if(!istype(H) || !istype(T))
return 0
if(H.m_intent == MOVE_INTENT_RUN)
if(shoe_sound_footstep >= 2)
if(T.shoe_running_volume)
playsound(src, shoe_sound, T.shoe_running_volume, 1)
shoe_sound_footstep = 0
else
shoe_sound_footstep++
else if(T.shoe_walking_volume)
playsound(src, shoe_sound, T.shoe_walking_volume, 1)
return 1
/obj/item/proc/negates_gravity()
return 0
+4 -2
View File
@@ -78,11 +78,13 @@
slowdown_passive = SHOES_SLOWDOWN+1
magpulse_name = "honk-powered traction system"
item_color = "clown"
silence_steps = 1
shoe_sound = "clownstep"
origin_tech = "magnets=4;syndicate=2"
var/enabled_waddle = TRUE
/obj/item/clothing/shoes/magboots/clown/Initialize(mapload)
. = ..()
AddComponent(/datum/component/squeak, list('sound/effects/clownstep1.ogg' = 1, 'sound/effects/clownstep2.ogg' = 1), 50, falloff_exponent = 20) //die off quick please
/obj/item/clothing/shoes/magboots/clown/equipped(mob/user, slot)
. = ..()
if(slot == slot_shoes && enabled_waddle)
+19 -18
View File
@@ -57,7 +57,13 @@
desc = "A pair of purple rubber boots, designed to prevent slipping on wet surfaces while also drying them."
icon_state = "galoshes_dry"
/obj/item/clothing/shoes/galoshes/dry/step_action()
/obj/item/clothing/shoes/galoshes/dry/Initialize(mapload)
. = ..()
RegisterSignal(src, COMSIG_SHOES_STEP_ACTION, .proc/on_step)
/obj/item/clothing/shoes/galoshes/dry/proc/on_step()
SIGNAL_HANDLER
var/turf/simulated/t_loc = get_turf(src)
if(istype(t_loc) && t_loc.wet)
t_loc.MakeDry(TURF_WET_WATER)
@@ -69,10 +75,12 @@
item_state = "clown_shoes"
slowdown = SHOES_SLOWDOWN+1
item_color = "clown"
var/footstep = 1 //used for squeeks whilst walking
shoe_sound = "clownstep"
var/enabled_waddle = TRUE
/obj/item/clothing/shoes/clown_shoes/Initialize(mapload)
. = ..()
AddComponent(/datum/component/squeak, list('sound/effects/clownstep1.ogg' = 1, 'sound/effects/clownstep2.ogg' = 1), 50, falloff_exponent = 20) //die off quick please
/obj/item/clothing/shoes/clown_shoes/equipped(mob/user, slot)
. = ..()
if(slot == slot_shoes && enabled_waddle)
@@ -113,8 +121,6 @@
strip_delay = 50
put_on_delay = 50
resistance_flags = NONE
var/footstep = 1
shoe_sound = "jackboot"
/obj/item/clothing/shoes/jackboots/jacksandals
name = "jacksandals"
@@ -208,16 +214,6 @@
item_color = "noble_boot"
item_state = "noble_boot"
/obj/item/clothing/shoes/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/stack/tape_roll) && !silence_steps)
var/obj/item/stack/tape_roll/TR = I
if((!silence_steps || shoe_sound) && TR.use(4))
silence_steps = TRUE
shoe_sound = null
to_chat(user, "You tape the soles of [src] to silence your footsteps.")
else
return ..()
/obj/item/clothing/shoes/sandal/white
name = "White Sandals"
desc = "Medical sandals that nerds wear."
@@ -241,7 +237,10 @@
righthand_file = 'icons/goonstation/mob/inhands/clothing_righthand.dmi'
resistance_flags = LAVA_PROOF | FIRE_PROOF | ACID_PROOF
flags = NODROP
shoe_sound = "clownstep"
/obj/item/clothing/shoes/cursedclown/Initialize(mapload)
. = ..()
AddComponent(/datum/component/squeak, list('sound/effects/clownstep1.ogg' = 1, 'sound/effects/clownstep2.ogg' = 1), 50, falloff_exponent = 20) //die off quick please
/obj/item/clothing/shoes/singery
name = "yellow performer's boots"
@@ -311,7 +310,6 @@
icon_state = "clothwrap"
item_state = "clothwrap"
force = 0
silence_steps = TRUE
w_class = WEIGHT_CLASS_SMALL
/obj/item/clothing/shoes/bhop
@@ -351,4 +349,7 @@
desc = "These shoes are made for quacking, and thats just what they'll do."
icon_state = "ducky"
item_state = "ducky"
shoe_sound = "sound/items/squeaktoy.ogg"
/obj/item/clothing/shoes/ducky/Initialize(mapload)
. = ..()
AddComponent(/datum/component/squeak, list('sound/items/squeaktoy.ogg' = 1), 50, falloff_exponent = 20) //die off quick please
@@ -226,33 +226,6 @@ Des: Removes all infected images from the alien.
/mob/living/carbon/alien/can_use_vents()
return
/mob/living/carbon/alien/handle_footstep(turf/T)
if(..())
if(T.footstep_sounds && T.footstep_sounds["xeno"])
var/S = pick(T.footstep_sounds["xeno"])
if(S)
if(m_intent == MOVE_INTENT_RUN)
if(!(step_count % 2)) //every other turf makes a sound
return 0
var/range = -(world.view - 2)
range -= 0.666 //-(7 - 2) = (-5) = -5 | -5 - (0.666) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
var/volume = 5
if(m_intent == MOVE_INTENT_WALK)
return 0 //silent when walking
if(buckled || lying || throwing)
return 0 //people flying, lying down or sitting do not step
if(!has_gravity(src))
if(step_count % 3) //this basically says, every three moves make a noise
return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0
playsound(T, S, volume, 1, range)
return 1
return 0
/mob/living/carbon/alien/getTrail()
if(getBruteLoss() < 200)
return pick("xltrails_1", "xltrails_2")
@@ -23,6 +23,7 @@
add_language("Xenomorph")
add_language("Hivemind")
..()
AddComponent(/datum/component/footstep, FOOTSTEP_MOB_CLAW, 0.5, -11)
/mob/living/carbon/alien/humanoid/Process_Spacemove(var/check_drift = 0)
if(..())
@@ -40,6 +40,8 @@
physiology = new()
AddComponent(/datum/component/footstep, FOOTSTEP_MOB_HUMAN, 1, -6)
UpdateAppearance()
GLOB.human_list += src
@@ -42,6 +42,9 @@
var/obj/item/clothing/shoes/S = shoes
if(S && !lying && loc == NewLoc)
SEND_SIGNAL(S, COMSIG_SHOES_STEP_ACTION)
//Bloody footprints
var/turf/T = get_turf(src)
var/obj/item/organ/external/l_foot = get_organ("l_foot")
@@ -69,59 +72,3 @@
if(bloody_feet[blood_state] > BLOOD_LOSS_IN_SPREAD)
createFootprintsFrom(src, dir, T)
update_inv_shoes()
//End bloody footprints
if(S)
S.step_action(src)
/mob/living/carbon/human/handle_footstep(turf/T)
if(..())
if(T.footstep_sounds && T.footstep_sounds["human"])
var/S = pick(T.footstep_sounds["human"])
if(S)
if(m_intent == MOVE_INTENT_RUN)
if(!(step_count % 2)) //every other turf makes a sound
return 0
if(istype(shoes, /obj/item/clothing/shoes))
var/obj/item/clothing/shoes/shooess = shoes
if(shooess.silence_steps)
return 0 //silent
if(shooess.shoe_sound)
return //Handle it on the shoe
var/range = -(world.view - 2)
if(m_intent == MOVE_INTENT_WALK)
range -= 0.333
if(!shoes)
range -= 0.333
//shoes + running
//-(7 - 2) = -(5) = -5 | -5 - 0 = -5 | (7 + -5) = 2 | 2 * 3 = 6 | range(6) = range(6)
//running OR shoes
//-(7 - 2) = (-5) = -5 | -5 - 0.333 = -5.333 | (7 + -5.333) = 1.667 | 1.667 * 3 = 5.001 | range(5.001) = range(5)
//walking AND no shoes
//-(7 - 2) = (-5) = -5 | -5 - (0.333 * 2) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
var/volume = 13
if(m_intent == MOVE_INTENT_WALK)
volume -= 4
if(!shoes)
volume -= 4
if(!has_organ("l_foot") && !has_organ("r_foot"))
return 0 //no feet no footsteps
if(buckled || lying || throwing)
return 0 //people flying, lying down or sitting do not step
if(!has_gravity(src))
if(step_count % 3) //this basically says, every three moves make a noise
return 0 //1st - none, 1%3==1, 2nd - none, 2%3==2, 3rd - noise, 3%3==0
if(dna.species.silent_steps)
return 0 //species is silent
playsound(T, S, volume, 1, range)
return 1
return 0
@@ -17,7 +17,6 @@
var/tail // Name of tail image in species effects icon file.
var/datum/unarmed_attack/unarmed //For empty hand harm-intent attack
var/unarmed_type = /datum/unarmed_attack
var/silent_steps = 0 // Stops step noises
var/cold_level_1 = 260 // Cold damage level 1 below this point.
var/cold_level_2 = 200 // Cold damage level 2 below this point.
@@ -62,6 +61,9 @@
var/ventcrawler = VENTCRAWLER_NONE //Determines if the mob can go through the vents.
var/has_fine_manipulation = 1 // Can use small items.
///Sounds to override barefeet walking
var/list/special_step_sounds
var/list/allowed_consumed_mobs = list() //If a species can consume mobs, put the type of mobs it can consume here.
var/list/species_traits = list()
@@ -13,7 +13,6 @@
burn_mod = 1.5 //1.5x burn damage, 2x is excessive
heatmod = 1.5
silent_steps = 1
grant_vision_toggle = 0
has_organ = list(
@@ -28,8 +28,6 @@
dietflags = DIET_OMNI
bodyflags = HAS_ICON_SKIN_TONE | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_BODY_MARKINGS | HAS_TAIL_MARKINGS
silent_steps = TRUE
blood_color = "#2299FC"
flesh_color = "#808D11"
//Default styles for created mobs.
-7
View File
@@ -554,7 +554,6 @@
var/turf/T = loc
. = ..()
if(.)
handle_footstep(loc)
step_count++
if(pulling && pulling == pullee) // we were pulling a thing and didn't lose it during our move.
@@ -578,12 +577,6 @@
if(s_active && !(s_active in contents) && get_turf(s_active) != get_turf(src)) //check !( s_active in contents ) first so we hopefully don't have to call get_turf() so much.
s_active.close(src)
/mob/living/proc/handle_footstep(turf/T)
if(istype(T))
return 1
return 0
/mob/living/proc/makeTrail(turf/T)
if(!has_gravity(src))
return
@@ -27,6 +27,7 @@
var/turns_since_scan = 0
var/mob/living/simple_animal/mouse/movement_target
var/eats_mice = 1
footstep_type = FOOTSTEP_MOB_CLAW
//RUNTIME IS ALIVE! SQUEEEEEEEE~
/mob/living/simple_animal/pet/cat/Runtime
@@ -20,6 +20,7 @@
var/bark_sound = list('sound/creatures/dog_bark1.ogg','sound/creatures/dog_bark2.ogg') //Used in emote.
var/yelp_sound = 'sound/creatures/dog_yelp.ogg' //Used on death.
var/last_eaten = 0
footstep_type = FOOTSTEP_MOB_CLAW
/mob/living/simple_animal/pet/dog/verb/chasetail()
set name = "Chase your tail"
@@ -29,6 +29,7 @@
can_collar = 1
blood_volume = BLOOD_VOLUME_NORMAL
var/obj/item/udder/udder = null
footstep_type = FOOTSTEP_MOB_SHOE
/mob/living/simple_animal/hostile/retaliate/goat/New()
udder = new()
@@ -134,6 +135,7 @@
var/obj/item/udder/udder = null
gender = FEMALE
mob_biotypes = MOB_ORGANIC | MOB_BEAST
footstep_type = FOOTSTEP_MOB_SHOE
/mob/living/simple_animal/cow/Initialize()
udder = new()
@@ -202,6 +204,7 @@
can_hide = 1
can_collar = 1
gold_core_spawnable = FRIENDLY_SPAWN
footstep_type = FOOTSTEP_MOB_CLAW
/mob/living/simple_animal/chick/New()
..()
@@ -258,6 +261,7 @@ GLOBAL_VAR_INIT(chicken_count, 0)
var/list/layMessage = EGG_LAYING_MESSAGES
var/list/validColors = list("brown","black","white")
gold_core_spawnable = FRIENDLY_SPAWN
footstep_type = FOOTSTEP_MOB_CLAW
/mob/living/simple_animal/chicken/New()
..()
@@ -340,6 +344,7 @@ GLOBAL_VAR_INIT(chicken_count, 0)
mob_biotypes = MOB_ORGANIC | MOB_BEAST
gold_core_spawnable = FRIENDLY_SPAWN
blood_volume = BLOOD_VOLUME_NORMAL
footstep_type = FOOTSTEP_MOB_SHOE
/mob/living/simple_animal/turkey
name = "turkey"
@@ -364,6 +369,7 @@ GLOBAL_VAR_INIT(chicken_count, 0)
can_collar = 1
mob_biotypes = MOB_ORGANIC | MOB_BEAST
gold_core_spawnable = FRIENDLY_SPAWN
footstep_type = FOOTSTEP_MOB_CLAW
/mob/living/simple_animal/goose
name = "goose"
@@ -388,6 +394,7 @@ GLOBAL_VAR_INIT(chicken_count, 0)
can_collar = 1
mob_biotypes = MOB_ORGANIC | MOB_BEAST
gold_core_spawnable = FRIENDLY_SPAWN
footstep_type = FOOTSTEP_MOB_CLAW
/mob/living/simple_animal/seal
name = "seal"
@@ -15,6 +15,7 @@
speak_chance = 1
turns_per_move = 10
icon = 'icons/mob/penguins.dmi'
footstep_type = FOOTSTEP_MOB_BAREFOOT
/mob/living/simple_animal/pet/penguin/Initialize(mapload)
. = ..()
@@ -22,6 +22,7 @@
health = 50
maxHealth = 50
speed = 2
footstep_type = FOOTSTEP_MOB_CLAW
//Cargo Sloth
@@ -34,7 +34,7 @@
gold_core_spawnable = HOSTILE_SPAWN
death_sound = 'sound/voice/hiss6.ogg'
deathmessage = "lets out a waning guttural screech, green blood bubbling from its maw..."
footstep_type = FOOTSTEP_MOB_CLAW
/mob/living/simple_animal/hostile/alien/drone
name = "alien drone"
@@ -34,6 +34,7 @@
faction = list("russian")
gold_core_spawnable = HOSTILE_SPAWN
footstep_type = FOOTSTEP_MOB_CLAW
//SPACE BEARS! SQUEEEEEEEE~ OW! FUCK! IT BIT MY HAND OFF!!
/mob/living/simple_animal/hostile/bear/Hudson
@@ -28,6 +28,7 @@
faction = list("faithless")
gold_core_spawnable = HOSTILE_SPAWN
footstep_type = FOOTSTEP_MOB_SHOE
/mob/living/simple_animal/hostile/faithless/Process_Spacemove(var/movement_dir = 0)
return 1
@@ -19,6 +19,7 @@
turns_per_move = 5
see_in_dark = 8
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
footstep_type = FOOTSTEP_MOB_CLAW
butcher_results = list(/obj/item/reagent_containers/food/snacks/monstermeat/spidermeat= 2, /obj/item/reagent_containers/food/snacks/monstermeat/spiderleg= 8)
response_help = "pets"
response_disarm = "gently pushes aside"
@@ -34,6 +34,7 @@
var/smoke_lastuse = 0
var/smoke_freq = 300 // 30 seconds
var/datum/action/innate/demon/whisper/whisper_action
footstep_type = FOOTSTEP_MOB_CLAW
/mob/living/simple_animal/hostile/hellhound/New()
. = ..()
@@ -28,6 +28,7 @@
deathmessage = "blows apart!"
bubble_icon = "machine"
del_on_death = 1
footstep_type = FOOTSTEP_MOB_CLAW
/mob/living/simple_animal/hostile/hivebot/range
name = "Hivebot"
@@ -54,6 +54,7 @@ Difficulty: Medium
var/transform_stop_attack = FALSE // stops the blood drunk miner from attacking after transforming his weapon until the next attack chain
deathmessage = "falls to the ground, decaying into glowing particles."
death_sound = "bodyfall"
footstep_type = FOOTSTEP_MOB_HEAVY
attack_action_types = list(/datum/action/innate/megafauna_attack/dash,
/datum/action/innate/megafauna_attack/kinetic_accelerator,
/datum/action/innate/megafauna_attack/transform_weapon)
@@ -60,6 +60,7 @@ Difficulty: Medium
score_type = DRAKE_SCORE
deathmessage = "collapses into a pile of bones, its flesh sloughing away."
death_sound = 'sound/misc/demon_dies.ogg'
footstep_type = FOOTSTEP_MOB_HEAVY
attack_action_types = list(/datum/action/innate/megafauna_attack/fire_cone,
/datum/action/innate/megafauna_attack/fire_cone_meteors,
/datum/action/innate/megafauna_attack/mass_fire,
@@ -34,6 +34,7 @@
var/pre_attack = FALSE
var/pre_attack_icon = "Goliath_preattack"
loot = list(/obj/item/stack/sheet/animalhide/goliath_hide)
footstep_type = FOOTSTEP_MOB_HEAVY
/mob/living/simple_animal/hostile/asteroid/goliath/Life()
. = ..()
@@ -30,6 +30,7 @@
del_on_death = 1
faction = list("pirate")
sentience_type = SENTIENCE_OTHER
footstep_type = FOOTSTEP_MOB_SHOE
/mob/living/simple_animal/hostile/pirate/ranged
name = "Pirate Gunner"
@@ -31,7 +31,7 @@
heat_damage_per_tick = 15 //amount of damage applied if animal's body temperature is higher than maxbodytemp
cold_damage_per_tick = 10 //same as heat_damage_per_tick, only if the bodytemperature it's lower than minbodytemp
unsuitable_atmos_damage = 10
footstep_type = FOOTSTEP_MOB_SHOE
/mob/living/simple_animal/hostile/retaliate/clown/goblin
icon = 'icons/mob/animal.dmi'
@@ -23,6 +23,7 @@
speed = -1 // '-1' converts to 1.5 total move delay, or 6.6 tiles/sec movespeed
var/attack_cycles = 0
var/attack_cycles_max = 3
footstep_type = FOOTSTEP_MOB_SHOE
/mob/living/simple_animal/hostile/retaliate/kangaroo/New()
. = ..()
@@ -92,6 +92,7 @@
faction = list("undead")
loot = list(/obj/effect/decal/remains/human)
del_on_death = 1
footstep_type = FOOTSTEP_MOB_SHOE
/mob/living/simple_animal/hostile/retaliate/zombie
name = "zombie"
@@ -28,6 +28,7 @@
/obj/item/kitchen/knife)
del_on_death = 1
sentience_type = SENTIENCE_OTHER
footstep_type = FOOTSTEP_MOB_SHOE
/mob/living/simple_animal/hostile/russian/ranged
icon_state = "russianranged"
@@ -28,6 +28,7 @@
loot = list(/obj/effect/mob_spawn/human/corpse/syndicatesoldier)
del_on_death = 1
sentience_type = SENTIENCE_OTHER
footstep_type = FOOTSTEP_MOB_SHOE
///////////////Sword and shield////////////
@@ -160,7 +160,7 @@ GLOBAL_LIST_EMPTY(ts_spiderling_list)
// DEBUG OPTIONS & COMMANDS
var/spider_growinstantly = FALSE // DEBUG OPTION, DO NOT ENABLE THIS ON LIVE. IT IS USED TO TEST NEST GROWTH/SETUP AI.
var/spider_debug = FALSE
footstep_type = FOOTSTEP_MOB_CLAW
// --------------------------------------------------------------------------------
// --------------------- TERROR SPIDERS: SHARED ATTACK CODE -----------------------
@@ -104,6 +104,8 @@
var/tame = 0
var/my_z // I don't want to confuse this with client registered_z
///What kind of footstep this mob should have. Null if it shouldn't have any.
var/footstep_type
/mob/living/simple_animal/Initialize(mapload)
. = ..()
@@ -120,6 +122,8 @@
if(pcollar)
pcollar = new(src)
regenerate_icons()
if(footstep_type)
AddComponent(/datum/component/footstep, footstep_type)
/mob/living/simple_animal/Destroy()
QDEL_NULL(pcollar)
@@ -32,6 +32,8 @@
// for the sake of cleanliness, though, here they are.
status_flags = CANPARALYSE | CANPUSH
footstep_type = FOOTSTEP_MOB_SLIME
var/cores = 1 // the number of /obj/item/slime_extract's the slime has left inside
var/mutation_chance = 30 // Chance of mutating, should be between 25 and 35