Pig Latin Mutation (#61184)

This commit is contained in:
tralezab
2021-09-06 02:35:41 -07:00
committed by GitHub
parent 22f83d415e
commit 5c933d850d
5 changed files with 88 additions and 3 deletions
+24
View File
@@ -240,3 +240,27 @@
message = "[chosen_starting] [message]"
speech_args[SPEECH_MESSAGE] = message
/datum/mutation/human/piglatin
name = "Pig Latin"
desc = "Historians say back in the 2020's humanity spoke entirely in this mystical language."
quality = MINOR_NEGATIVE
text_gain_indication = span_notice("Omethingsay eelsfay offyay.")
text_lose_indication = span_notice("The off sensation passes.")
/datum/mutation/human/piglatin/on_acquiring(mob/living/carbon/human/owner)
if(..())
return
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
/datum/mutation/human/piglatin/on_losing(mob/living/carbon/human/owner)
if(..())
return
UnregisterSignal(owner, COMSIG_MOB_SAY)
/datum/mutation/human/piglatin/proc/handle_speech(datum/source, list/speech_args)
SIGNAL_HANDLER
var/spoken_message = speech_args[SPEECH_MESSAGE]
spoken_message = piglatin_sentence(spoken_message)
speech_args[SPEECH_MESSAGE] = spoken_message