DCS Update + Footstep element (#17076)

* DCS Update + Footstep element

* Steppy

* Revert "Steppy"

This reverts commit fab0590fb7.

* Reapply "Steppy"

This reverts commit 1f7ad8f8f7.

* Ough

* Oops! Wrong map.

* lil stuff

* Update

* Only loud

* Missed one

* NO MORE SILENT

* ...parenthesis.
This commit is contained in:
Guti
2025-02-08 18:19:59 -05:00
committed by GitHub
parent d1b65c3635
commit a081d48590
79 changed files with 1695 additions and 579 deletions
+2 -1
View File
@@ -224,7 +224,8 @@
/mob/living/bot/secbot/resetTarget()
..()
UnregisterSignal(target, COMSIG_OBSERVER_MOVED)
if(target)
UnregisterSignal(target, COMSIG_OBSERVER_MOVED)
awaiting_surrender = 0
attacked = FALSE
walk_to(src, 0)
+2
View File
@@ -8,6 +8,8 @@
if (!default_language && species_language)
default_language = GLOB.all_languages[species_language]
AddElement(/datum/element/footstep, custom_footstep, 1, -6)
/mob/living/carbon/Life()
..()
@@ -294,49 +294,9 @@
// Handle footstep sounds
/mob/living/carbon/human/handle_footstep(var/turf/T)
if(!istype(T))
return
if(is_incorporeal())
return
if(!CONFIG_GET(number/footstep_volume) || !T.footstep_sounds || !T.footstep_sounds.len)
return
// Future Upgrades - Multi species support
var/list/footstep_sounds = T.footstep_sounds["human"]
if(!footstep_sounds)
return
var/S = pick(footstep_sounds)
GLOB.step_taken_shift_roundstat++
if(!S) return
// Play every 20 steps while walking, for the sneak
if(m_intent == I_WALK && step_count++ % 20 != 0)
return
// Play every other step while running
if(m_intent == I_RUN && step_count++ % 2 != 0)
return
var/volume = CONFIG_GET(number/footstep_volume)
// Reduce volume while walking or barefoot
if(!shoes || m_intent == I_WALK)
volume *= 0.5
else if(shoes)
var/obj/item/clothing/shoes/feet = shoes
if(istype(feet))
volume *= feet.step_volume_mod
if(!has_organ(BP_L_FOOT) && !has_organ(BP_R_FOOT))
return // no feet = no footsteps
if(buckled || lying || throwing)
return // people flying, lying down or sitting do not step
if(!get_gravity(src) && prob(75))
return // Far less likely to make noise in no gravity
playsound(T, S, volume, FALSE)
if(shoes && loc == T && get_gravity(loc) && !flying)
if(SEND_SIGNAL(shoes, COMSIG_SHOES_STEP_ACTION, m_intent))
return
return
/mob/living/carbon/human/set_dir(var/new_dir)
@@ -88,6 +88,9 @@
var/male_sneeze_sound = 'sound/effects/mob_effects/sneeze.ogg'
var/female_sneeze_sound = 'sound/effects/mob_effects/f_sneeze.ogg'
var/footstep = FOOTSTEP_MOB_HUMAN
var/list/special_step_sounds = null
// Combat/health/chem/etc. vars.
var/total_health = 100 // How much damage the mob can take before entering crit.
var/list/unarmed_types = list( // Possible unarmed attacks that the mob will use in combat,
@@ -332,6 +335,9 @@
update_sort_hint()
/datum/species/proc/get_footsep_sounds()
return footstep
/datum/species/proc/update_sort_hint()
if(spawn_flags & SPECIES_IS_RESTRICTED)
sort_hint = SPECIES_SORT_RESTRICTED
@@ -133,6 +133,8 @@ var/datum/species/shapeshifter/promethean/prometheans
/decl/emote/visible/vibrate
)
footstep = FOOTSTEP_MOB_SLIME
/datum/species/shapeshifter/promethean/New()
..()
prometheans = src
@@ -173,6 +173,8 @@
/decl/emote/human/stopsway
)
footstep = FOOTSTEP_MOB_CLAW
/datum/species/unathi/equip_survival_gear(var/mob/living/carbon/human/H)
..()
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H),slot_shoes)
@@ -160,6 +160,8 @@
/decl/emote/audible/teshtrill
)
footstep = FOOTSTEP_MOB_TESHARI
/datum/species/teshari/equip_survival_gear(var/mob/living/carbon/human/H)
..()
if(!(H.client?.prefs?.shoe_hater))
@@ -37,6 +37,8 @@
init_id()
init_subsystems()
AddElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 0.75, -6)
/mob/living/silicon/Destroy()
silicon_mob_list -= src
for(var/datum/alarm_handler/AH in SSalarm.all_handlers)
@@ -205,6 +205,7 @@
if(CONFIG_GET(flag/allow_simple_mob_recolor))
add_verb(src, /mob/living/simple_mob/proc/ColorMate)
AddElement(/datum/element/footstep, FOOTSTEP_MOB_SHOE, 0.5, -6) // Need to go through all of the mobs to give them proper footsteps...
return ..()
+2
View File
@@ -241,3 +241,5 @@
var/list/viruses
var/list/resistances
var/custom_footstep = FOOTSTEP_MOB_SHOE