mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 07:38:05 +01:00
Refactors most spans into span procs (#59645)
Converts most spans into span procs. Mostly used regex for this and sorted out any compile time errors afterwards so there could be some bugs. Was initially going to do defines, but ninja said to make it into a proc, and if there's any overhead, they can easily be changed to defines. Makes it easier to control the formatting and prevents typos when creating spans as it'll runtime if you misspell instead of silently failing. Reduces the code you need to write when writing spans, as you don't need to close the span as that's automatically handled by the proc. (Note from Lemon: This should be converted to defines once we update the minimum version to 514. Didn't do it now because byond pain and such)
This commit is contained in:
@@ -96,11 +96,11 @@
|
||||
owner.dizziness += 10
|
||||
fail = TRUE
|
||||
if(3)
|
||||
to_chat(owner, "<span class='userdanger'>You feel your heart lurching in your chest...</span>")
|
||||
to_chat(owner, span_userdanger("You feel your heart lurching in your chest..."))
|
||||
owner.Stun(20)
|
||||
shake_camera(owner, 15, 1)
|
||||
if(4)
|
||||
to_chat(owner, "<span class='warning'>You faint.</span>")
|
||||
to_chat(owner, span_warning("You faint."))
|
||||
owner.Unconscious(80)
|
||||
fail = TRUE
|
||||
return fail
|
||||
@@ -112,7 +112,7 @@
|
||||
if(examining_mob != owner || !triggering_examiner || prob(50))
|
||||
return
|
||||
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, obsession, "<span class='warning'>You catch [examining_mob] staring at you...</span>", 3))
|
||||
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, obsession, span_warning("You catch [examining_mob] staring at you..."), 3))
|
||||
return COMSIG_BLOCK_EYECONTACT
|
||||
|
||||
/datum/brain_trauma/special/obsessed/proc/find_obsession()
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
message_admins("[ADMIN_LOOKUPFLW(owner)] is no longer hypnotized with the phrase '[hypnotic_phrase]'.")
|
||||
owner.log_message("is no longer hypnotized with the phrase '[hypnotic_phrase]'.", LOG_ATTACK)
|
||||
log_game("[key_name(owner)] is no longer hypnotized with the phrase '[hypnotic_phrase]'.")
|
||||
to_chat(owner, "<span class='userdanger'>You suddenly snap out of your hypnosis. The phrase '[hypnotic_phrase]' no longer feels important to you.</span>")
|
||||
to_chat(owner, span_userdanger("You suddenly snap out of your hypnosis. The phrase '[hypnotic_phrase]' no longer feels important to you."))
|
||||
owner.clear_alert("hypnosis")
|
||||
..()
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
if(DT_PROB(1, delta_time))
|
||||
switch(rand(1,2))
|
||||
if(1)
|
||||
to_chat(owner, "<span class='hypnophrase'><i>...[lowertext(hypnotic_phrase)]...</i></span>")
|
||||
to_chat(owner, span_hypnophrase("<i>...[lowertext(hypnotic_phrase)]...</i>"))
|
||||
if(2)
|
||||
new /datum/hallucination/chat(owner, TRUE, FALSE, "<span class='hypnophrase'>[hypnotic_phrase]</span>")
|
||||
new /datum/hallucination/chat(owner, TRUE, FALSE, span_hypnophrase("[hypnotic_phrase]"))
|
||||
|
||||
/datum/brain_trauma/hypnosis/handle_hearing(datum/source, list/hearing_args)
|
||||
hearing_args[HEARING_RAW_MESSAGE] = target_phrase.Replace(hearing_args[HEARING_RAW_MESSAGE], "<span class='hypnophrase'>$1</span>")
|
||||
hearing_args[HEARING_RAW_MESSAGE] = target_phrase.Replace(hearing_args[HEARING_RAW_MESSAGE], span_hypnophrase("$1"))
|
||||
|
||||
@@ -84,9 +84,9 @@
|
||||
Show()
|
||||
|
||||
/mob/camera/imaginary_friend/proc/greet()
|
||||
to_chat(src, "<span class='notice'><b>You are the imaginary friend of [owner]!</b></span>")
|
||||
to_chat(src, "<span class='notice'>You are absolutely loyal to your friend, no matter what.</span>")
|
||||
to_chat(src, "<span class='notice'>You cannot directly influence the world around you, but you can see what [owner] cannot.</span>")
|
||||
to_chat(src, span_notice("<b>You are the imaginary friend of [owner]!</b>"))
|
||||
to_chat(src, span_notice("You are absolutely loyal to your friend, no matter what."))
|
||||
to_chat(src, span_notice("You cannot directly influence the world around you, but you can see what [owner] cannot."))
|
||||
|
||||
/mob/camera/imaginary_friend/Initialize(mapload, _trauma)
|
||||
. = ..()
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
if (src.client)
|
||||
if(client.prefs.muted & MUTE_IC)
|
||||
to_chat(src, "<span class='boldwarning'>You cannot send IC messages (muted).</span>")
|
||||
to_chat(src, span_boldwarning("You cannot send IC messages (muted)."))
|
||||
return
|
||||
if (!(ignore_spam || forced) && src.client.handle_spam_prevention(message,MUTE_IC))
|
||||
return
|
||||
@@ -163,8 +163,8 @@
|
||||
|
||||
src.log_talk(message, LOG_SAY, tag="imaginary friend")
|
||||
|
||||
var/rendered = "<span class='game say'><span class='name'>[name]</span> <span class='message'>[say_quote(message)]</span></span>"
|
||||
var/dead_rendered = "<span class='game say'><span class='name'>[name] (Imaginary friend of [owner])</span> <span class='message'>[say_quote(message)]</span></span>"
|
||||
var/rendered = "<span class='game say'>[span_name("[name]")] <span class='message'>[say_quote(message)]</span></span>"
|
||||
var/dead_rendered = "<span class='game say'>[span_name("[name] (Imaginary friend of [owner])")] <span class='message'>[say_quote(message)]</span></span>"
|
||||
|
||||
to_chat(owner, "[rendered]")
|
||||
to_chat(src, "[rendered]")
|
||||
@@ -263,9 +263,9 @@
|
||||
desc = "The previous host of this body."
|
||||
|
||||
/mob/camera/imaginary_friend/trapped/greet()
|
||||
to_chat(src, "<span class='notice'><b>You have managed to hold on as a figment of the new host's imagination!</b></span>")
|
||||
to_chat(src, "<span class='notice'>All hope is lost for you, but at least you may interact with your host. You do not have to be loyal to them.</span>")
|
||||
to_chat(src, "<span class='notice'>You cannot directly influence the world around you, but you can see what the host cannot.</span>")
|
||||
to_chat(src, span_notice("<b>You have managed to hold on as a figment of the new host's imagination!</b>"))
|
||||
to_chat(src, span_notice("All hope is lost for you, but at least you may interact with your host. You do not have to be loyal to them."))
|
||||
to_chat(src, span_notice("You cannot directly influence the world around you, but you can see what the host cannot."))
|
||||
|
||||
/mob/camera/imaginary_friend/trapped/setup_friend()
|
||||
real_name = "[owner.real_name]?"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
return
|
||||
|
||||
if(COOLDOWN_FINISHED(src, damage_warning_cooldown))
|
||||
to_chat(owner, "<span class='warning'><b>The light burns you!</b></span>")
|
||||
to_chat(owner, span_warning("<b>The light burns you!</b>"))
|
||||
COOLDOWN_START(src, damage_warning_cooldown, 10 SECONDS)
|
||||
owner.take_overall_damage(0, 1.5 * delta_time)
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
if(get_dist(owner, stalker) <= 1)
|
||||
playsound(owner, 'sound/magic/demon_attack1.ogg', 50)
|
||||
owner.visible_message("<span class='warning'>[owner] is torn apart by invisible claws!</span>", "<span class='userdanger'>Ghostly claws tear your body apart!</span>")
|
||||
owner.visible_message(span_warning("[owner] is torn apart by invisible claws!"), span_userdanger("Ghostly claws tear your body apart!"))
|
||||
owner.take_bodypart_damage(rand(20, 45), wound_bonus=CANT_WOUND)
|
||||
else if(DT_PROB(30, delta_time))
|
||||
stalker.forceMove(get_step_towards(stalker, owner))
|
||||
|
||||
@@ -95,10 +95,10 @@
|
||||
if(6 to 9)
|
||||
owner.slurring += 30
|
||||
if(10)
|
||||
to_chat(owner, "<span class='notice'>You forget for a moment what you were doing.</span>")
|
||||
to_chat(owner, span_notice("You forget for a moment what you were doing."))
|
||||
owner.Stun(20)
|
||||
if(11)
|
||||
to_chat(owner, "<span class='warning'>You faint.</span>")
|
||||
to_chat(owner, span_warning("You faint."))
|
||||
owner.Unconscious(80)
|
||||
|
||||
..()
|
||||
@@ -135,7 +135,7 @@
|
||||
if(owner.m_intent == MOVE_INTENT_RUN)
|
||||
fall_chance += 2
|
||||
if(DT_PROB(0.5 * fall_chance, delta_time) && owner.body_position == STANDING_UP)
|
||||
to_chat(owner, "<span class='warning'>Your leg gives out!</span>")
|
||||
to_chat(owner, span_warning("Your leg gives out!"))
|
||||
owner.Paralyze(35)
|
||||
|
||||
else if(owner.get_active_held_item())
|
||||
@@ -143,10 +143,10 @@
|
||||
var/obj/item/I = owner.get_active_held_item()
|
||||
drop_chance += I.w_class
|
||||
if(DT_PROB(0.5 * drop_chance, delta_time) && owner.dropItemToGround(I))
|
||||
to_chat(owner, "<span class='warning'>You drop [I]!</span>")
|
||||
to_chat(owner, span_warning("You drop [I]!"))
|
||||
|
||||
else if(DT_PROB(1.5, delta_time))
|
||||
to_chat(owner, "<span class='warning'>You feel a sudden weakness in your muscles!</span>")
|
||||
to_chat(owner, span_warning("You feel a sudden weakness in your muscles!"))
|
||||
owner.adjustStaminaLoss(50)
|
||||
..()
|
||||
|
||||
|
||||
@@ -86,13 +86,13 @@
|
||||
return
|
||||
if(trigger_regex.Find(hearing_args[HEARING_RAW_MESSAGE]) != 0)
|
||||
addtimer(CALLBACK(src, .proc/freak_out, null, trigger_regex.group[2]), 10) //to react AFTER the chat message
|
||||
hearing_args[HEARING_RAW_MESSAGE] = trigger_regex.Replace(hearing_args[HEARING_RAW_MESSAGE], "<span class='phobia'>$2</span>$3")
|
||||
hearing_args[HEARING_RAW_MESSAGE] = trigger_regex.Replace(hearing_args[HEARING_RAW_MESSAGE], "[span_phobia("$2")]$3")
|
||||
|
||||
/datum/brain_trauma/mild/phobia/handle_speech(datum/source, list/speech_args)
|
||||
if(HAS_TRAIT(owner, TRAIT_FEARLESS))
|
||||
return
|
||||
if(trigger_regex.Find(speech_args[SPEECH_MESSAGE]) != 0)
|
||||
to_chat(owner, "<span class='warning'>You can't bring yourself to say the word \"<span class='phobia'>[trigger_regex.group[2]]</span>\"!</span>")
|
||||
to_chat(owner, span_warning("You can't bring yourself to say the word \"[span_phobia("[trigger_regex.group[2]]")]\"!"))
|
||||
speech_args[SPEECH_MESSAGE] = ""
|
||||
|
||||
/datum/brain_trauma/mild/phobia/proc/freak_out(atom/reason, trigger_word)
|
||||
@@ -101,15 +101,15 @@
|
||||
return
|
||||
var/message = pick("spooks you to the bone", "shakes you up", "terrifies you", "sends you into a panic", "sends chills down your spine")
|
||||
if(reason)
|
||||
to_chat(owner, "<span class='userdanger'>Seeing [reason] [message]!</span>")
|
||||
to_chat(owner, span_userdanger("Seeing [reason] [message]!"))
|
||||
else if(trigger_word)
|
||||
to_chat(owner, "<span class='userdanger'>Hearing \"[trigger_word]\" [message]!</span>")
|
||||
to_chat(owner, span_userdanger("Hearing \"[trigger_word]\" [message]!"))
|
||||
else
|
||||
to_chat(owner, "<span class='userdanger'>Something [message]!</span>")
|
||||
to_chat(owner, span_userdanger("Something [message]!"))
|
||||
var/reaction = rand(1,4)
|
||||
switch(reaction)
|
||||
if(1)
|
||||
to_chat(owner, "<span class='warning'>You are paralyzed with fear!</span>")
|
||||
to_chat(owner, span_warning("You are paralyzed with fear!"))
|
||||
owner.Stun(70)
|
||||
owner.Jitter(8)
|
||||
if(2)
|
||||
@@ -119,7 +119,7 @@
|
||||
if(reason)
|
||||
owner.pointed(reason)
|
||||
if(3)
|
||||
to_chat(owner, "<span class='warning'>You shut your eyes in terror!</span>")
|
||||
to_chat(owner, span_warning("You shut your eyes in terror!"))
|
||||
owner.Jitter(5)
|
||||
owner.blind_eyes(10)
|
||||
if(4)
|
||||
|
||||
@@ -134,10 +134,10 @@
|
||||
if(owner.drowsyness)
|
||||
sleep_chance += 3
|
||||
if(DT_PROB(0.5 * sleep_chance, delta_time))
|
||||
to_chat(owner, "<span class='warning'>You fall asleep.</span>")
|
||||
to_chat(owner, span_warning("You fall asleep."))
|
||||
owner.Sleeping(60)
|
||||
else if(!owner.drowsyness && DT_PROB(sleep_chance, delta_time))
|
||||
to_chat(owner, "<span class='warning'>You feel tired...</span>")
|
||||
to_chat(owner, span_warning("You feel tired..."))
|
||||
owner.drowsyness += 10
|
||||
|
||||
/datum/brain_trauma/severe/monophobia
|
||||
@@ -151,9 +151,9 @@
|
||||
/datum/brain_trauma/severe/monophobia/on_gain()
|
||||
..()
|
||||
if(check_alone())
|
||||
to_chat(owner, "<span class='warning'>You feel really lonely...</span>")
|
||||
to_chat(owner, span_warning("You feel really lonely..."))
|
||||
else
|
||||
to_chat(owner, "<span class='notice'>You feel safe, as long as you have people around you.</span>")
|
||||
to_chat(owner, span_notice("You feel safe, as long as you have people around you."))
|
||||
|
||||
/datum/brain_trauma/severe/monophobia/on_life(delta_time, times_fired)
|
||||
..()
|
||||
@@ -182,18 +182,18 @@
|
||||
switch(rand(1,6))
|
||||
if(1)
|
||||
if(!high_stress)
|
||||
to_chat(owner, "<span class='warning'>You feel sick...</span>")
|
||||
to_chat(owner, span_warning("You feel sick..."))
|
||||
else
|
||||
to_chat(owner, "<span class='warning'>You feel really sick at the thought of being alone!</span>")
|
||||
to_chat(owner, span_warning("You feel really sick at the thought of being alone!"))
|
||||
addtimer(CALLBACK(owner, /mob/living/carbon.proc/vomit, high_stress), 50) //blood vomit if high stress
|
||||
if(2)
|
||||
if(!high_stress)
|
||||
to_chat(owner, "<span class='warning'>You can't stop shaking...</span>")
|
||||
to_chat(owner, span_warning("You can't stop shaking..."))
|
||||
owner.dizziness += 20
|
||||
owner.add_confusion(20)
|
||||
owner.Jitter(20)
|
||||
else
|
||||
to_chat(owner, "<span class='warning'>You feel weak and scared! If only you weren't alone...</span>")
|
||||
to_chat(owner, span_warning("You feel weak and scared! If only you weren't alone..."))
|
||||
owner.dizziness += 20
|
||||
owner.add_confusion(20)
|
||||
owner.Jitter(20)
|
||||
@@ -201,22 +201,22 @@
|
||||
|
||||
if(3, 4)
|
||||
if(!high_stress)
|
||||
to_chat(owner, "<span class='warning'>You feel really lonely...</span>")
|
||||
to_chat(owner, span_warning("You feel really lonely..."))
|
||||
else
|
||||
to_chat(owner, "<span class='warning'>You're going mad with loneliness!</span>")
|
||||
to_chat(owner, span_warning("You're going mad with loneliness!"))
|
||||
owner.hallucination += 30
|
||||
|
||||
if(5)
|
||||
if(!high_stress)
|
||||
to_chat(owner, "<span class='warning'>Your heart skips a beat.</span>")
|
||||
to_chat(owner, span_warning("Your heart skips a beat."))
|
||||
owner.adjustOxyLoss(8)
|
||||
else
|
||||
if(prob(15) && ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.set_heartattack(TRUE)
|
||||
to_chat(H, "<span class='userdanger'>You feel a stabbing pain in your heart!</span>")
|
||||
to_chat(H, span_userdanger("You feel a stabbing pain in your heart!"))
|
||||
else
|
||||
to_chat(owner, "<span class='userdanger'>You feel your heart lurching in your chest...</span>")
|
||||
to_chat(owner, span_userdanger("You feel your heart lurching in your chest..."))
|
||||
owner.adjustOxyLoss(8)
|
||||
|
||||
/datum/brain_trauma/severe/discoordination
|
||||
@@ -293,8 +293,8 @@
|
||||
|
||||
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>")
|
||||
hearing_args[HEARING_RAW_MESSAGE] = reg.Replace(hearing_args[HEARING_RAW_MESSAGE], span_hypnophrase("*********"))
|
||||
|
||||
/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>")
|
||||
to_chat(owner, span_warning("The words trigger something deep within you, and you feel your consciousness slipping away..."))
|
||||
owner.apply_status_effect(/datum/status_effect/trance, rand(100,300), FALSE)
|
||||
|
||||
@@ -117,13 +117,13 @@
|
||||
"is pulled into an invisible vortex, vanishing from sight")
|
||||
var/slip_out_message = pick("silently fades in", "leaps out of thin air","appears", "walks out of an invisible doorway",\
|
||||
"slides out of a fold in spacetime")
|
||||
to_chat(user, "<span class='notice'>You try to align with the bluespace stream...</span>")
|
||||
to_chat(user, span_notice("You try to align with the bluespace stream..."))
|
||||
if(do_after(user, 20, target = src))
|
||||
new /obj/effect/temp_visual/bluespace_fissure(get_turf(src))
|
||||
new /obj/effect/temp_visual/bluespace_fissure(get_turf(linked_to))
|
||||
user.forceMove(get_turf(linked_to))
|
||||
user.visible_message("<span class='warning'>[user] [slip_in_message].</span>", null, null, null, user)
|
||||
user.visible_message("<span class='warning'>[user] [slip_out_message].</span>", "<span class='notice'>...and find your way to the other side.</span>")
|
||||
user.visible_message(span_warning("[user] [slip_in_message]."), null, null, null, user)
|
||||
user.visible_message(span_warning("[user] [slip_out_message]."), span_notice("...and find your way to the other side."))
|
||||
|
||||
/datum/brain_trauma/special/quantum_alignment
|
||||
name = "Quantum Alignment"
|
||||
@@ -180,7 +180,7 @@
|
||||
entangle(get_turf(owner))
|
||||
|
||||
/datum/brain_trauma/special/quantum_alignment/proc/entangle(atom/target)
|
||||
to_chat(owner, "<span class='notice'>You start feeling a strong sense of connection to [target].</span>")
|
||||
to_chat(owner, span_notice("You start feeling a strong sense of connection to [target]."))
|
||||
linked_target = target
|
||||
linked = TRUE
|
||||
COOLDOWN_START(src, snapback_cooldown, rand(45 SECONDS, 10 MINUTES))
|
||||
@@ -190,7 +190,7 @@
|
||||
linked_target = null
|
||||
linked = FALSE
|
||||
return
|
||||
to_chat(owner, "<span class='warning'>Your connection to [linked_target] suddenly feels extremely strong... you can feel it pulling you!</span>")
|
||||
to_chat(owner, span_warning("Your connection to [linked_target] suddenly feels extremely strong... you can feel it pulling you!"))
|
||||
owner.playsound_local(owner, 'sound/magic/lightning_chargeup.ogg', 75, FALSE)
|
||||
returning = TRUE
|
||||
addtimer(CALLBACK(src, .proc/snapback), 100)
|
||||
@@ -198,11 +198,11 @@
|
||||
/datum/brain_trauma/special/quantum_alignment/proc/snapback()
|
||||
returning = FALSE
|
||||
if(QDELETED(linked_target))
|
||||
to_chat(owner, "<span class='notice'>The connection fades abruptly, and the pull with it.</span>")
|
||||
to_chat(owner, span_notice("The connection fades abruptly, and the pull with it."))
|
||||
linked_target = null
|
||||
linked = FALSE
|
||||
return
|
||||
to_chat(owner, "<span class='warning'>You're pulled through spacetime!</span>")
|
||||
to_chat(owner, span_warning("You're pulled through spacetime!"))
|
||||
do_teleport(owner, get_turf(linked_target), null, TRUE, channel = TELEPORT_CHANNEL_QUANTUM)
|
||||
owner.playsound_local(owner, 'sound/magic/repulse.ogg', 100, FALSE)
|
||||
linked_target = null
|
||||
@@ -220,7 +220,7 @@
|
||||
..()
|
||||
psychotic_brawling = new(null)
|
||||
if(!psychotic_brawling.teach(owner, TRUE))
|
||||
to_chat(owner, "<span class='notice'>But your martial knowledge keeps you grounded.</span>")
|
||||
to_chat(owner, span_notice("But your martial knowledge keeps you grounded."))
|
||||
qdel(src)
|
||||
|
||||
/datum/brain_trauma/special/psychotic_brawling/on_lose()
|
||||
@@ -318,7 +318,7 @@
|
||||
|
||||
/datum/brain_trauma/special/existential_crisis/proc/fade_in()
|
||||
QDEL_NULL(veil)
|
||||
to_chat(owner, "<span class='notice'>You fade back into reality.</span>")
|
||||
to_chat(owner, span_notice("You fade back into reality."))
|
||||
COOLDOWN_START(src, crisis_cooldown, 1 MINUTES)
|
||||
|
||||
//base sync holder is in desynchronizer.dm
|
||||
@@ -364,7 +364,7 @@
|
||||
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.visible_message(span_warning("[owner]'s body jerks as if it was shocked."), span_userdanger("You feel the fist of the LAW."))
|
||||
owner.take_bodypart_damage(0,0,rand(40, 70))
|
||||
QDEL_NULL(beepsky)
|
||||
if(prob(20) && get_dist(owner, beepsky) <= 8)
|
||||
@@ -387,7 +387,7 @@
|
||||
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>")
|
||||
to_chat(victim, span_name("[name]</span> exclaims, \"<span class='robotic'>Level 10 infraction alert!\""))
|
||||
|
||||
/obj/effect/hallucination/simple/securitron/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess,src)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
var/mob/living/split_personality/new_backseat
|
||||
if(current_controller == STRANGER || reset_to_owner)
|
||||
current_backseat = owner_backseat
|
||||
new_backseat = stranger_backseat
|
||||
new_backseat = stranger_backseat
|
||||
else
|
||||
current_backseat = stranger_backseat
|
||||
new_backseat = owner_backseat
|
||||
@@ -75,8 +75,8 @@
|
||||
return
|
||||
|
||||
log_game("[key_name(current_backseat)] assumed control of [key_name(owner)] due to [src]. (Original owner: [current_controller == OWNER ? owner.key : current_backseat.key])")
|
||||
to_chat(owner, "<span class='userdanger'>You feel your control being taken away... your other personality is in charge now!</span>")
|
||||
to_chat(current_backseat, "<span class='userdanger'>You manage to take control of your body!</span>")
|
||||
to_chat(owner, span_userdanger("You feel your control being taken away... your other personality is in charge now!"))
|
||||
to_chat(current_backseat, span_userdanger("You manage to take control of your body!"))
|
||||
|
||||
//Body to backseat
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
if(!new_backseat.lastKnownIP)
|
||||
new_backseat.lastKnownIP = h2b_ip
|
||||
|
||||
|
||||
if(reset_to_owner && new_backseat.mind)
|
||||
new_backseat.ghostize(FALSE)
|
||||
|
||||
@@ -153,11 +153,11 @@
|
||||
. = ..()
|
||||
if(!. || !client)
|
||||
return FALSE
|
||||
to_chat(src, "<span class='notice'>As a split personality, you cannot do anything but observe. However, you will eventually gain control of your body, switching places with the current personality.</span>")
|
||||
to_chat(src, "<span class='warning'><b>Do not commit suicide or put the body in a deadly position. Behave like you care about it as much as the owner.</b></span>")
|
||||
to_chat(src, span_notice("As a split personality, you cannot do anything but observe. However, you will eventually gain control of your body, switching places with the current personality."))
|
||||
to_chat(src, span_warning("<b>Do not commit suicide or put the body in a deadly position. Behave like you care about it as much as the owner.</b>"))
|
||||
|
||||
/mob/living/split_personality/say(message, bubble_type, list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE, forced = null)
|
||||
to_chat(src, "<span class='warning'>You cannot speak, your other self is controlling your body!</span>")
|
||||
to_chat(src, span_warning("You cannot speak, your other self is controlling your body!"))
|
||||
return FALSE
|
||||
|
||||
/mob/living/split_personality/emote(act, m_type = null, message = null, intentional = FALSE, force_silence = FALSE)
|
||||
@@ -214,7 +214,7 @@
|
||||
return
|
||||
var/message = hearing_args[HEARING_RAW_MESSAGE]
|
||||
if(findtext(message, codeword))
|
||||
hearing_args[HEARING_RAW_MESSAGE] = replacetext(message, codeword, "<span class='warning'>[codeword]</span>")
|
||||
hearing_args[HEARING_RAW_MESSAGE] = replacetext(message, codeword, span_warning("[codeword]"))
|
||||
addtimer(CALLBACK(src, /datum/brain_trauma/severe/split_personality.proc/switch_personalities), 10)
|
||||
|
||||
/datum/brain_trauma/severe/split_personality/brainwashing/handle_speech(datum/source, list/speech_args)
|
||||
@@ -231,10 +231,10 @@
|
||||
. = ..()
|
||||
if(!. || !client)
|
||||
return FALSE
|
||||
to_chat(src, "<span class='notice'>As a brainwashed personality, you cannot do anything yet but observe. However, you may gain control of your body if you hear the special codeword, switching places with the current personality.</span>")
|
||||
to_chat(src, "<span class='notice'>Your activation codeword is: <b>[codeword]</b></span>")
|
||||
to_chat(src, span_notice("As a brainwashed personality, you cannot do anything yet but observe. However, you may gain control of your body if you hear the special codeword, switching places with the current personality."))
|
||||
to_chat(src, span_notice("Your activation codeword is: <b>[codeword]</b>"))
|
||||
if(objective)
|
||||
to_chat(src, "<span class='notice'>Your master left you an objective: <b>[objective]</b>. Follow it at all costs when in control.</span>")
|
||||
to_chat(src, span_notice("Your master left you an objective: <b>[objective]</b>. Follow it at all costs when in control."))
|
||||
|
||||
#undef OWNER
|
||||
#undef STRANGER
|
||||
|
||||
Reference in New Issue
Block a user