Ports RIG footstep sounds from Hestia. (#13387)

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2022-03-30 13:56:24 -03:00
committed by GitHub
co-authored by Matt Atlas
parent 1eccb9ebbd
commit 573bc177c4
5 changed files with 60 additions and 0 deletions
+14
View File
@@ -802,6 +802,8 @@
var/silent = 0
var/last_trip = 0
var/footstep_sound_override
/obj/item/clothing/shoes/proc/draw_knife()
set name = "Draw Boot Knife"
set desc = "Pull out your boot knife."
@@ -910,6 +912,18 @@
. = ..()
track_footprint = 0
/obj/item/clothing/shoes/proc/do_special_footsteps(var/running)
if(!footstep_sound_override)
return FALSE
if(ishuman(loc))
var/mob/living/carbon/human/wearer = loc
if(running)
playsound(wearer, footstep_sound_override, 70, 1, required_asfx_toggles = ASFX_FOOTSTEPS)
else
footstep++
if (footstep % 2)
playsound(wearer, footstep_sound_override, 40, 1, required_asfx_toggles = ASFX_FOOTSTEPS)
return TRUE
///////////////////////////////////////////////////////////////////////
//Suit
/obj/item/clothing/suit
@@ -30,6 +30,7 @@
species_restricted = null
gender = PLURAL
icon_base = null
footstep_sound_override = 'sound/machines/rig/rigstep.ogg'
/obj/item/clothing/suit/space/rig
name = "chestpiece"
@@ -146,6 +146,10 @@
return
last_x = x
last_y = y
if(shoes)
var/obj/item/clothing/shoes/S = shoes
if(S.do_special_footsteps(m_intent))
return
if (m_intent == M_RUN)
playsound(src, is_noisy ? footsound : species.footsound, 70, 1, required_asfx_toggles = ASFX_FOOTSTEPS)
else