Porting the BEPIS research machinery. (#12277)

* Initial B.E.P.I.S port.

* All nodes but sticky tape are in. Sweet.

* Mapping the BEPIS :DDD

* ah

* deers.
This commit is contained in:
Ghom
2020-05-24 22:05:15 +02:00
committed by GitHub
parent e9068f05eb
commit ab5d65a454
82 changed files with 1620 additions and 163 deletions
+1 -1
View File
@@ -63,7 +63,7 @@
if(prob(2))
switch(rand(1,2))
if(1)
to_chat(owner, "<i>...[lowertext(hypnotic_phrase)]...</i>")
to_chat(owner, "<span class='hypnophrase'><i>...[lowertext(hypnotic_phrase)]...</i></span>")
if(2)
new /datum/hallucination/chat(owner, TRUE, FALSE, "<span class='hypnophrase'>[hypnotic_phrase]</span>")
+34
View File
@@ -265,3 +265,37 @@
..()
if(prob(1) && !owner.has_status_effect(/datum/status_effect/trance))
owner.apply_status_effect(/datum/status_effect/trance, rand(100,300), FALSE)
/datum/brain_trauma/severe/hypnotic_trigger
name = "Hypnotic Trigger"
desc = "Patient has a trigger phrase set in their subconscious that will trigger a suggestible trance-like state."
scan_desc = "oneiric feedback loop"
gain_text = "<span class='warning'>You feel odd, like you just forgot something important.</span>"
lose_text = "<span class='notice'>You feel like a weight was lifted from your mind.</span>"
random_gain = FALSE
var/trigger_phrase = "Nanotrasen"
/datum/brain_trauma/severe/hypnotic_trigger/New(phrase)
..()
if(phrase)
trigger_phrase = phrase
/datum/brain_trauma/severe/hypnotic_trigger/on_lose() //hypnosis must be cleared separately, but brain surgery should get rid of both anyway
..()
owner.remove_status_effect(/datum/status_effect/trance)
/datum/brain_trauma/severe/hypnotic_trigger/handle_hearing(datum/source, list/hearing_args)
if(!owner.can_hear())
return
if(owner == hearing_args[HEARING_SPEAKER])
return
var/regex/reg = new("(\\b[REGEX_QUOTE(trigger_phrase)]\\b)","ig")
if(findtext(hearing_args[HEARING_RAW_MESSAGE], reg))
addtimer(CALLBACK(src, .proc/hypnotrigger), 10) //to react AFTER the chat message
hearing_args[HEARING_RAW_MESSAGE] = reg.Replace(hearing_args[HEARING_RAW_MESSAGE], "<span class='hypnophrase'>*********</span>")
/datum/brain_trauma/severe/hypnotic_trigger/proc/hypnotrigger()
to_chat(owner, "<span class='warning'>The words trigger something deep within you, and you feel your consciousness slipping away...</span>")
owner.apply_status_effect(/datum/status_effect/trance, rand(100,300), FALSE)