[NO GBP] Fixes catwalks over open space not making a sound when walked over. (#79738)

## About The Pull Request
See the title.

## Why It's Good For The Game
Actually fixing #78646.

## Changelog

🆑
fix: Fixed catwalks over open space not making a sound when walked over.
/🆑
This commit is contained in:
Ghom
2023-11-15 18:31:01 -07:00
committed by GitHub
parent f31ebb7403
commit 9f7f68ea6d
3 changed files with 5 additions and 2 deletions
@@ -31,5 +31,7 @@
///from /datum/element/footstep/prepare_step(): (list/steps)
#define COMSIG_TURF_PREPARE_STEP_SOUND "turf_prepare_step_sound"
//stops element/footstep/proc/prepare_step() from returning null if the turf itself has no sound
#define FOOTSTEP_OVERRIDEN (1<<0)
///from base of datum/thrownthing/finalize(): (turf/turf, atom/movable/thrownthing) when something is thrown and lands on us
#define COMSIG_TURF_MOVABLE_THROW_LANDED "turf_movable_throw_landed"
+2 -2
View File
@@ -94,9 +94,9 @@
return
. = list(FOOTSTEP_MOB_SHOE = turf.footstep, FOOTSTEP_MOB_BAREFOOT = turf.barefootstep, FOOTSTEP_MOB_HEAVY = turf.heavyfootstep, FOOTSTEP_MOB_CLAW = turf.clawfootstep, STEP_SOUND_PRIORITY = STEP_SOUND_NO_PRIORITY)
SEND_SIGNAL(turf, COMSIG_TURF_PREPARE_STEP_SOUND, .)
var/overriden = SEND_SIGNAL(turf, COMSIG_TURF_PREPARE_STEP_SOUND, .) & FOOTSTEP_OVERRIDEN
//The turf has no footstep sound (e.g. open space) and none of the objects on that turf (e.g. catwalks) overrides it
if(isnull(turf.footstep))
if(!overriden && isnull(turf.footstep))
return null
return .
@@ -78,3 +78,4 @@
steps[FOOTSTEP_MOB_HEAVY] = heavyfootstep
steps[FOOTSTEP_MOB_CLAW] = clawfootstep
steps[STEP_SOUND_PRIORITY] = priority
return FOOTSTEP_OVERRIDEN