Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit45
This commit is contained in:
@@ -9,7 +9,8 @@
|
||||
var/obj/item/organ/brain/brain //the poor bastard's brain
|
||||
var/gain_text = "<span class='notice'>You feel traumatized.</span>"
|
||||
var/lose_text = "<span class='notice'>You no longer feel traumatized.</span>"
|
||||
var/can_gain = TRUE //can this be gained through random traumas?
|
||||
var/can_gain = TRUE
|
||||
var/random_gain = TRUE //can this be gained through random traumas?
|
||||
var/resilience = TRAUMA_RESILIENCE_BASIC //how hard is this to cure?
|
||||
|
||||
/datum/brain_trauma/Destroy()
|
||||
@@ -23,7 +24,7 @@
|
||||
//Called on life ticks
|
||||
/datum/brain_trauma/proc/on_life()
|
||||
return
|
||||
|
||||
|
||||
//Called on death
|
||||
/datum/brain_trauma/proc/on_death()
|
||||
return
|
||||
@@ -31,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"
|
||||
|
||||
@@ -78,14 +78,13 @@
|
||||
break
|
||||
return message
|
||||
|
||||
/datum/brain_trauma/mild/phobia/on_say(message)
|
||||
/datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args)
|
||||
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
|
||||
@@ -119,3 +118,7 @@
|
||||
owner.confused += 10
|
||||
owner.Jitter(10)
|
||||
owner.stuttering += 10
|
||||
|
||||
/datum/brain_trauma/mild/phobia/security
|
||||
phobia_type = "security"
|
||||
random_gain = FALSE
|
||||
|
||||
@@ -134,3 +134,71 @@
|
||||
|
||||
/datum/brain_trauma/special/psychotic_brawling/bath_salts
|
||||
name = "Chemical Violent Psychosis"
|
||||
random_gain = FALSE
|
||||
|
||||
/datum/brain_trauma/special/beepsky
|
||||
name = "Criminal"
|
||||
desc = "Patient seems to be a criminal."
|
||||
scan_desc = "criminal mind"
|
||||
gain_text = "<span class='warning'>Justice is coming for you.</span>"
|
||||
lose_text = "<span class='notice'>You were absolved for your crimes.</span>"
|
||||
random_gain = FALSE
|
||||
var/obj/effect/hallucination/simple/securitron/beepsky
|
||||
|
||||
/datum/brain_trauma/special/beepsky/on_gain()
|
||||
create_securitron()
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/special/beepsky/proc/create_securitron()
|
||||
var/turf/where = locate(owner.x + pick(-12, 12), owner.y + pick(-12, 12), owner.z)
|
||||
beepsky = new(where, owner)
|
||||
beepsky.victim = owner
|
||||
|
||||
/datum/brain_trauma/special/beepsky/on_lose()
|
||||
QDEL_NULL(beepsky)
|
||||
..()
|
||||
|
||||
/datum/brain_trauma/special/beepsky/on_life()
|
||||
if(QDELETED(beepsky) || !beepsky.loc || beepsky.z != owner.z)
|
||||
QDEL_NULL(beepsky)
|
||||
if(prob(30))
|
||||
create_securitron()
|
||||
else
|
||||
return
|
||||
if(get_dist(owner, beepsky) >= 10 && prob(20))
|
||||
QDEL_NULL(beepsky)
|
||||
create_securitron()
|
||||
if(owner.stat != CONSCIOUS)
|
||||
if(prob(20))
|
||||
owner.playsound_local(beepsky, 'sound/voice/beepsky/iamthelaw.ogg', 50)
|
||||
return
|
||||
if(get_dist(owner, beepsky) <= 1)
|
||||
owner.playsound_local(owner, 'sound/weapons/egloves.ogg', 50)
|
||||
owner.visible_message("<span class='warning'>[owner]'s body jerks as if it was shocked.</span>", "<span class='userdanger'>You feel the fist of the LAW.</span>")
|
||||
owner.take_bodypart_damage(0,0,rand(40, 70))
|
||||
QDEL_NULL(beepsky)
|
||||
if(prob(20) && get_dist(owner, beepsky) <= 8)
|
||||
owner.playsound_local(beepsky, 'sound/voice/beepsky/criminal.ogg', 40)
|
||||
..()
|
||||
|
||||
/obj/effect/hallucination/simple/securitron
|
||||
name = "Securitron"
|
||||
desc = "The LAW is coming."
|
||||
image_icon = 'icons/mob/aibots.dmi'
|
||||
image_state = "secbot-c"
|
||||
var/victim
|
||||
|
||||
/obj/effect/hallucination/simple/securitron/New()
|
||||
name = pick ( "officer Beepsky", "officer Johnson", "officer Pingsky")
|
||||
START_PROCESSING(SSfastprocess,src)
|
||||
..()
|
||||
|
||||
/obj/effect/hallucination/simple/securitron/process()
|
||||
if(prob(60))
|
||||
forceMove(get_step_towards(src, victim))
|
||||
if(prob(5))
|
||||
to_chat(victim, "<span class='name'>[name]</span> exclaims, \"<span class='robotic'>Level 10 infraction alert!\"</span>")
|
||||
|
||||
/obj/effect/hallucination/simple/securitron/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess,src)
|
||||
return ..()
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user