Files
Bubberstation/code/datums/elements/ELEMENT_TEMPLATE.md
SkyratBot 876357d6a5 [MIRROR] Revenants no longer make noise walking into gibs (#26500)
* Revenants no longer make noise walking into gibs (#81420)

## About The Pull Request

Turns the hardcoded sound that plays when you walk into some gibs into
an Element and adds a check for flying to avoid playing the sound,
fixing Revenants, Holoparasites, and other mobs that fly from making
noise when "walking" into a pool of blood.

## Why It's Good For The Game

I was observing a revenant and heard them making noise from walking over
blood, thought it was kinda f*cked up

## Changelog

🆑
fix: Revenants (and other flying mobs) will not make noise when walking
into pools of gibs,
/🆑

---------

Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>

* Revenants no longer make noise walking into gibs

---------

Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
2024-02-14 06:26:40 -05:00

825 B

Template file for your new element

See _element.dm for detailed explanations

/datum/element/myelement
	element_flags = ELEMENT_BESPOKE | ELEMENT_COMPLEX_DETACH | ELEMENT_DETACH_ON_HOST_DESTROY | ELEMENT_NOTAREALFLAG // code/__DEFINES/dcs/flags.dm
	//argument_hash_start_idx = 2  // Use with ELEMENT_BESPOKE
	var/list/myvar = list()

/datum/element/myelement/Attach(datum/target)
	if(!ismovable(target))
		return COMPONENT_INCOMPATIBLE
	RegisterSignal(target, COMSIG_MOVABLE_MOVED, myproc)
	to_chat(target, "Hey, you're in your element.")

/datum/element/myelement/Detach(datum/source)
	UnregisterSignal(source, COMSIG_MOVABLE_MOVED)
	to_chat(source, "You feel way out of your element.")

/datum/element/myelement/proc/myproc(datum/source)
	SIGNAL_HANDLER
	playsound(source, 'sound/effects/gong.ogg', 50, TRUE)