Skip to content

Commit

Permalink
Dragging queen makes a grating sound (#3854)
Browse files Browse the repository at this point in the history
# About the pull request
Sound work is awful. Help.
<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
Grrraagghhaga
# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
soundadd: Added a drag sound for footstep component
/:cl:
  • Loading branch information
realforest2001 committed Jul 14, 2023
1 parent db7fbf9 commit 0401bfb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions code/datums/components/footstep.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@
var/falloff
///This can be a list OR a soundfile OR null. Determines whatever sound gets played.
var/footstep_sounds
var/drag_sounds

/datum/component/footstep/Initialize(steps_ = 2, volume_ = 50, range_ = null, falloff_ = 1, footstep_sounds_ = "alien_footstep_large")
/datum/component/footstep/Initialize(steps_ = 2, volume_ = 50, range_ = null, falloff_ = 1, footstep_sounds_ = "alien_footstep_large", drag_sounds_ = 'sound/effects/alien_dragsound_large.ogg')
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
steps = steps_
volume = volume_
range = range_
falloff = falloff_
footstep_sounds = footstep_sounds_
drag_sounds = drag_sounds_

RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED), PROC_REF(play_simplestep))

Expand All @@ -44,5 +46,8 @@
var/turf/open/T = prepare_step()
if(!T)
return
if(isfile(footstep_sounds) || istext(footstep_sounds))
var/mob/living/parent_mob = parent
if(parent_mob.lying && (isfile(drag_sounds) || istext(drag_sounds)))
playsound(T, drag_sounds, volume, rand(20000, 25000), range, falloff = falloff)
else if(isfile(footstep_sounds) || istext(footstep_sounds))
playsound(T, footstep_sounds, volume, rand(20000, 25000), range, falloff = falloff)
Binary file added sound/effects/alien_dragsound_large.ogg
Binary file not shown.

0 comments on commit 0401bfb

Please sign in to comment.