diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index c782e84b320..96177d6ed1f 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -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 diff --git a/code/modules/clothing/spacesuits/rig/rig_pieces.dm b/code/modules/clothing/spacesuits/rig/rig_pieces.dm index 88cf1f1c09e..84d6ed9d657 100644 --- a/code/modules/clothing/spacesuits/rig/rig_pieces.dm +++ b/code/modules/clothing/spacesuits/rig/rig_pieces.dm @@ -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" diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 685ee68955b..5260ffbf638 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -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 diff --git a/html/changelogs/mattatlas-rigfootsteps.yml b/html/changelogs/mattatlas-rigfootsteps.yml new file mode 100644 index 00000000000..bf8459878fd --- /dev/null +++ b/html/changelogs/mattatlas-rigfootsteps.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "RIGs now have a special footstep sound ported from Hestia." diff --git a/sound/machines/rig/rigstep.ogg b/sound/machines/rig/rigstep.ogg new file mode 100644 index 00000000000..02d3eff5125 Binary files /dev/null and b/sound/machines/rig/rigstep.ogg differ