mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
Pig Latin Mutation (#61184)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user