Merge branch 'master' into master
This commit is contained in:
@@ -32,16 +32,18 @@
|
||||
//Called when given to a mob
|
||||
/datum/brain_trauma/proc/on_gain()
|
||||
to_chat(owner, gain_text)
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
//Called when removed from a mob
|
||||
/datum/brain_trauma/proc/on_lose(silent)
|
||||
if(!silent)
|
||||
to_chat(owner, lose_text)
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
//Called when hearing a spoken message
|
||||
/datum/brain_trauma/proc/on_hear(message, speaker, message_language, raw_message, radio_freq)
|
||||
return message
|
||||
|
||||
//Called when speaking
|
||||
/datum/brain_trauma/proc/on_say(message)
|
||||
return message
|
||||
/datum/brain_trauma/proc/handle_speech(datum/source, list/speech_args)
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
@@ -68,18 +68,12 @@
|
||||
lose_text = ""
|
||||
|
||||
/datum/brain_trauma/mild/speech_impediment/on_gain()
|
||||
owner.dna.add_mutation(UNINTELLIGIBLE)
|
||||
..()
|
||||
|
||||
//no fiddling with genetics to get out of this one
|
||||
/datum/brain_trauma/mild/speech_impediment/on_life()
|
||||
if(!(GLOB.mutations_list[UNINTELLIGIBLE] in owner.dna.mutations))
|
||||
on_gain()
|
||||
..()
|
||||
ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
|
||||
. = ..()
|
||||
|
||||
/datum/brain_trauma/mild/speech_impediment/on_lose()
|
||||
owner.dna.remove_mutation(UNINTELLIGIBLE)
|
||||
..()
|
||||
REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, TRAUMA_TRAIT)
|
||||
. = ..()
|
||||
|
||||
/datum/brain_trauma/mild/concussion
|
||||
name = "Concussion"
|
||||
|
||||
@@ -82,16 +82,15 @@
|
||||
break
|
||||
return message
|
||||
|
||||
/datum/brain_trauma/mild/phobia/on_say(message)
|
||||
if(HAS_TRAIT(owner, TRAIT_FEARLESS))
|
||||
/datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args)
|
||||
if(HAS_TRAIT(owner, TRAIT_FEARLESS))
|
||||
return message
|
||||
for(var/word in trigger_words)
|
||||
var/reg = regex("(\\b|\\A)[REGEX_QUOTE(word)]'?s*(\\b|\\Z)", "i")
|
||||
|
||||
if(findtext(message, reg))
|
||||
if(findtext(speech_args[SPEECH_MESSAGE], reg))
|
||||
to_chat(owner, "<span class='warning'>You can't bring yourself to say the word \"[word]\"!</span>")
|
||||
return ""
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
|
||||
/datum/brain_trauma/mild/phobia/proc/freak_out(atom/reason, trigger_word)
|
||||
next_scare = world.time + 120
|
||||
|
||||
@@ -199,10 +199,9 @@
|
||||
addtimer(CALLBACK(src, /datum/brain_trauma/severe/split_personality.proc/switch_personalities), 10)
|
||||
return message
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/on_say(message)
|
||||
if(findtext(message, codeword))
|
||||
return "" //oh hey did you want to tell people about the secret word to bring you back?
|
||||
return message
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/handle_speech(datum/source, list/speech_args)
|
||||
if(findtext(speech_args[SPEECH_MESSAGE], codeword))
|
||||
speech_args[SPEECH_MESSAGE] = "" //oh hey did you want to tell people about the secret word to bring you back?
|
||||
|
||||
/mob/living/split_personality/traitor
|
||||
name = "split personality"
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/datum/component/bouncy
|
||||
dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS
|
||||
var/bouncy_mod = 1
|
||||
var/list/bounce_signals = list(COMSIG_MOVABLE_IMPACT, COMSIG_ITEM_HIT_REACT, COMSIG_ITEM_ATTACK)
|
||||
|
||||
/datum/component/bouncy/Initialize(_bouncy_mod, list/_bounce_signals)
|
||||
if(!ismovableatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
if(_bouncy_mod)
|
||||
bouncy_mod = _bouncy_mod
|
||||
if(_bounce_signals)
|
||||
bounce_signals = _bounce_signals
|
||||
|
||||
/datum/component/bouncy/InheritComponent(datum/component/bouncy/B, original, _bouncy_mod, list/_bounce_signals)
|
||||
if(_bouncy_mod)
|
||||
bouncy_mod = max(bouncy_mod, _bouncy_mod)
|
||||
if(_bounce_signals)
|
||||
var/list/diff_bounces = difflist(bounce_signals, _bounce_signals, TRUE)
|
||||
for(var/bounce in diff_bounces)
|
||||
bounce_signals += bounce
|
||||
RegisterSignal(parent, bounce, .proc/bounce_up)
|
||||
|
||||
/datum/component/bouncy/RegisterWithParent()
|
||||
RegisterSignal(parent, bounce_signals, .proc/bounce_up)
|
||||
|
||||
/datum/component/bouncy/UnregisterFromParent()
|
||||
UnregisterSignal(parent, bounce_signals)
|
||||
|
||||
/datum/component/bouncy/proc/bounce_up(datum/source)
|
||||
var/atom/movable/A = parent
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
A.do_jiggle(45 + rand(-10, 10) * bouncy_mod, 14)
|
||||
if(2)
|
||||
var/min_b = 0.6/bouncy_mod
|
||||
var/max_b = 1.2 * bouncy_mod
|
||||
A.do_squish(rand(min_b, max_b), rand(min_b, max_b), 14)
|
||||
if(3)
|
||||
var/pixelshift = 8 * bouncy_mod
|
||||
A.Shake(pixelshift, pixelshift, duration = 15)
|
||||
@@ -26,3 +26,30 @@
|
||||
if(4)
|
||||
if(prob(5))
|
||||
affected_mob.say( pick( list("HONK!", "Honk!", "Honk.", "Honk?", "Honk!!", "Honk?!", "Honk...") ) , forced = "pierrot's throat")
|
||||
|
||||
/datum/disease/pierrot_throat/after_add()
|
||||
RegisterSignal(affected_mob, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/disease/pierrot_throat/proc/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
var/list/split_message = splittext(message, " ") //List each word in the message
|
||||
var/applied = 0
|
||||
for (var/i in 1 to length(split_message))
|
||||
if(prob(3 * stage)) //Stage 1: 3% Stage 2: 6% Stage 3: 9% Stage 4: 12%
|
||||
if(findtext(split_message[i], "*") || findtext(split_message[i], ";") || findtext(split_message[i], ":"))
|
||||
continue
|
||||
split_message[i] = "HONK"
|
||||
if (applied++ > stage)
|
||||
break
|
||||
if (applied)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_CLOWN // a little bonus
|
||||
message = jointext(split_message, " ")
|
||||
speech_args[SPEECH_MESSAGE] = message
|
||||
|
||||
/datum/disease/pierrot_throat/Destroy()
|
||||
UnregisterSignal(affected_mob, COMSIG_MOB_SAY)
|
||||
return ..()
|
||||
|
||||
/datum/disease/pierrot_throat/remove_disease()
|
||||
UnregisterSignal(affected_mob, COMSIG_MOB_SAY)
|
||||
return ..()
|
||||
@@ -185,25 +185,6 @@
|
||||
if(DNA_TAUR_BLOCK)
|
||||
construct_block(GLOB.taur_list.Find(features["taur"]), GLOB.taur_list.len)
|
||||
|
||||
/datum/dna/proc/mutations_say_mods(message)
|
||||
if(message)
|
||||
for(var/datum/mutation/human/M in mutations)
|
||||
message = M.say_mod(message)
|
||||
return message
|
||||
|
||||
/datum/dna/proc/mutations_get_spans()
|
||||
var/list/spans = list()
|
||||
for(var/datum/mutation/human/M in mutations)
|
||||
spans |= M.get_spans()
|
||||
return spans
|
||||
|
||||
/datum/dna/proc/species_get_spans()
|
||||
var/list/spans = list()
|
||||
if(species)
|
||||
spans |= species.get_spans()
|
||||
return spans
|
||||
|
||||
|
||||
/datum/dna/proc/is_same_as(datum/dna/D)
|
||||
if(uni_identity == D.uni_identity && struc_enzymes == D.struc_enzymes && real_name == D.real_name && nameless == D.nameless && custom_species == D.custom_species)
|
||||
if(species.type == D.species.type && features == D.features && blood_type == D.blood_type)
|
||||
|
||||
@@ -105,13 +105,6 @@ GLOBAL_LIST_EMPTY(mutations_list)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/mutation/human/proc/say_mod(message)
|
||||
if(message)
|
||||
return message
|
||||
|
||||
/datum/mutation/human/proc/get_spans()
|
||||
return list()
|
||||
|
||||
/mob/living/carbon/proc/update_mutations_overlay()
|
||||
return
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
ADD_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK)
|
||||
owner.update_body_parts()
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "hulk", /datum/mood_event/hulk)
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner, atom/target, proximity)
|
||||
if(proximity) //no telekinetic hulk attack
|
||||
@@ -32,8 +33,11 @@
|
||||
REMOVE_TRAIT(owner, TRAIT_PUSHIMMUNE, TRAIT_HULK)
|
||||
owner.update_body_parts()
|
||||
SEND_SIGNAL(owner, COMSIG_CLEAR_MOOD_EVENT, "hulk")
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/hulk/say_mod(message)
|
||||
/datum/mutation/human/hulk/proc/handle_speech(original_message, wrapped_message)
|
||||
var/message = wrapped_message[1]
|
||||
if(message)
|
||||
message = "[uppertext(replacetext(message, ".", "!"))]!!"
|
||||
return message
|
||||
message = "[replacetext(message, ".", "!")]!!"
|
||||
wrapped_message[1] = message
|
||||
return COMPONENT_UPPERCASE_SPEECH
|
||||
|
||||
@@ -17,9 +17,20 @@
|
||||
text_gain_indication = "<span class='sans'>You feel an off sensation in your voicebox.</span>"
|
||||
text_lose_indication = "<span class='notice'>The off sensation passes.</span>"
|
||||
|
||||
/datum/mutation/human/wacky/get_spans()
|
||||
return list(SPAN_SANS)
|
||||
/datum/mutation/human/wacky/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/wacky/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/wacky/proc/handle_speech(datum/source, list/speech_args)
|
||||
speech_args[SPEECH_SPANS] |= SPAN_SANS
|
||||
|
||||
/datum/mutation/human/mute
|
||||
name = "Mute"
|
||||
@@ -28,12 +39,14 @@
|
||||
text_lose_indication = "<span class='danger'>You feel able to speak freely again.</span>"
|
||||
|
||||
/datum/mutation/human/mute/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION)
|
||||
|
||||
/datum/mutation/human/mute/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
REMOVE_TRAIT(owner, TRAIT_MUTE, GENETIC_MUTATION)
|
||||
|
||||
@@ -45,7 +58,20 @@
|
||||
text_gain_indication = "<span class='notice'>You feel so happy. Nothing can be wrong with anything. :)</span>"
|
||||
text_lose_indication = "<span class='notice'>Everything is terrible again. :(</span>"
|
||||
|
||||
/datum/mutation/human/smile/say_mod(message)
|
||||
/datum/mutation/human/smile/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/smile/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/smile/proc/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message)
|
||||
message = " [message] "
|
||||
//Time for a friendly game of SS13
|
||||
@@ -92,7 +118,7 @@
|
||||
message = replacetext(message," cunt "," privates ")
|
||||
message = replacetext(message," dick "," jerk ")
|
||||
message = replacetext(message," vagina "," privates ")
|
||||
return trim(message)
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
|
||||
/datum/mutation/human/unintelligible
|
||||
@@ -102,30 +128,17 @@
|
||||
text_gain_indication = "<span class='danger'>You can't seem to form any coherent thoughts!</span>"
|
||||
text_lose_indication = "<span class='danger'>Your mind feels more clear.</span>"
|
||||
|
||||
/datum/mutation/human/unintelligible/say_mod(message)
|
||||
if(message)
|
||||
var/prefix=copytext(message,1,2)
|
||||
if(prefix == ";")
|
||||
message = copytext(message,2)
|
||||
else if(prefix in list(":","#"))
|
||||
prefix += copytext(message,2,3)
|
||||
message = copytext(message,3)
|
||||
else
|
||||
prefix=""
|
||||
/datum/mutation/human/unintelligible/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
ADD_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, GENETIC_MUTATION)
|
||||
|
||||
var/list/words = splittext(message," ")
|
||||
var/list/rearranged = list()
|
||||
for(var/i=1;i<=words.len;i++)
|
||||
var/cword = pick(words)
|
||||
words.Remove(cword)
|
||||
var/suffix = copytext(cword,length(cword)-1,length(cword))
|
||||
while(length(cword)>0 && suffix in list(".",",",";","!",":","?"))
|
||||
cword = copytext(cword,1 ,length(cword)-1)
|
||||
suffix = copytext(cword,length(cword)-1,length(cword) )
|
||||
if(length(cword))
|
||||
rearranged += cword
|
||||
message ="[prefix][jointext(rearranged," ")]"
|
||||
return message
|
||||
/datum/mutation/human/unintelligible/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
REMOVE_TRAIT(owner, TRAIT_UNINTELLIGIBLE_SPEECH, GENETIC_MUTATION)
|
||||
|
||||
|
||||
/datum/mutation/human/swedish
|
||||
@@ -135,7 +148,20 @@
|
||||
text_gain_indication = "<span class='notice'>You feel Swedish, however that works.</span>"
|
||||
text_lose_indication = "<span class='notice'>The feeling of Swedishness passes.</span>"
|
||||
|
||||
/datum/mutation/human/swedish/say_mod(message)
|
||||
/datum/mutation/human/swedish/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/swedish/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/swedish/proc/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message)
|
||||
message = replacetext(message,"w","v")
|
||||
message = replacetext(message,"j","y")
|
||||
@@ -144,7 +170,7 @@
|
||||
message = replacetext(message,"o",pick("�","�","o"))
|
||||
if(prob(30))
|
||||
message += " Bork[pick("",", bork",", bork, bork")]!"
|
||||
return message
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
|
||||
/datum/mutation/human/chav
|
||||
@@ -154,7 +180,20 @@
|
||||
text_gain_indication = "<span class='notice'>Ye feel like a reet prat like, innit?</span>"
|
||||
text_lose_indication = "<span class='notice'>You no longer feel like being rude and sassy.</span>"
|
||||
|
||||
/datum/mutation/human/chav/say_mod(message)
|
||||
/datum/mutation/human/chav/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/chav/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/chav/proc/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message)
|
||||
message = " [message] "
|
||||
message = replacetext(message," looking at "," gawpin' at ")
|
||||
@@ -178,7 +217,7 @@
|
||||
message = replacetext(message," break "," do ")
|
||||
message = replacetext(message," your "," yer ")
|
||||
message = replacetext(message," security "," coppers ")
|
||||
return trim(message)
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
|
||||
/datum/mutation/human/elvis
|
||||
@@ -199,7 +238,20 @@
|
||||
if(prob(15))
|
||||
owner.visible_message("<b>[owner]</b> [pick("jiggles their hips", "rotates their hips", "gyrates their hips", "taps their foot", "dances to an imaginary song", "jiggles their legs", "snaps their fingers")]!")
|
||||
|
||||
/datum/mutation/human/elvis/say_mod(message)
|
||||
/datum/mutation/human/elvis/on_acquiring(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
RegisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
|
||||
/datum/mutation/human/elvis/on_losing(mob/living/carbon/human/owner)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY)
|
||||
|
||||
/datum/mutation/human/elvis/proc/handle_speech(datum/source, list/speech_args)
|
||||
var/message = speech_args[SPEECH_MESSAGE]
|
||||
if(message)
|
||||
message = " [message] "
|
||||
message = replacetext(message," i'm not "," I aint ")
|
||||
@@ -211,7 +263,7 @@
|
||||
message = replacetext(message," yes ",pick(" sure", "yea "))
|
||||
message = replacetext(message," faggot "," square ")
|
||||
message = replacetext(message," muh valids "," getting my kicks ")
|
||||
return trim(message)
|
||||
speech_args[SPEECH_MESSAGE] = trim(message)
|
||||
|
||||
|
||||
/datum/mutation/human/stoner
|
||||
|
||||
Reference in New Issue
Block a user