mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-20 23:03:01 +00:00
20 lines
561 B
Plaintext
20 lines
561 B
Plaintext
//For small players and such
|
|
/datum/element/smalltalk
|
|
element_flags = ELEMENT_DETACH
|
|
|
|
/datum/element/smalltalk/Attach(datum/target, force = FALSE)
|
|
. = ..()
|
|
if(!(isliving(target) || (force && istype(target, /atom/movable))))
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
RegisterSignal(target, COMSIG_MOB_SAY, .proc/handle_speech)
|
|
|
|
/datum/element/smalltalk/Detach(datum/source, force)
|
|
. = ..()
|
|
UnregisterSignal(source, COMSIG_MOB_SAY)
|
|
|
|
/datum/element/smalltalk/proc/handle_speech(datum/source, list/speech_args)
|
|
SIGNAL_HANDLER
|
|
|
|
speech_args[SPEECH_SPANS] |= SPAN_SMALL
|