Skip to content

Commit

Permalink
psychic speech colours
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Aug 22, 2024
1 parent a7c3482 commit 94fcae8
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 8 deletions.
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/powers/human_powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
var/whisper = strip_html(input("Message:", "Psychic Whisper") as text|null)
if(whisper)
log_say("PsychicWhisper: [key_name(src)]->[target_mob.key] : [whisper] (AREA: [get_area_name(loc)])")
to_chat(target_mob, SPAN_XENOWARNING(" You hear a strange, alien voice in your head... <i>[whisper]</i>"))
to_chat(target_mob, SPAN_XENOWARNING(" You hear a strange, alien voice in your head... <i>[SPAN_PSYTALK(whisper)]</i>"))
to_chat(src, SPAN_XENOWARNING(" You said: \"[whisper]\" to [target_mob]"))
for (var/mob/dead/observer/ghost as anything in GLOB.observer_list)
if(!ghost.client || isnewplayer(ghost))
Expand All @@ -195,7 +195,7 @@
var/rendered_message
var/human_track = "(<a href='byond://?src=\ref[ghost];track=\ref[src]'>F</a>)"
var/target_track = "(<a href='byond://?src=\ref[ghost];track=\ref[target_mob]'>F</a>)"
rendered_message = SPAN_XENOLEADER("PsychicWhisper: [real_name][human_track] to [target_mob.real_name][target_track], <span class='normal'>'[whisper]'</span>")
rendered_message = SPAN_XENOLEADER("PsychicWhisper: [real_name][human_track] to [target_mob.real_name][target_track], <span class='normal'>'[SPAN_PSYTALK(whisper)]'</span>")
ghost.show_message(rendered_message, SHOW_MESSAGE_AUDIBLE)
return

Expand Down
12 changes: 6 additions & 6 deletions code/modules/mob/living/carbon/xenomorph/Abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@
if(whisper)
log_say("PsychicWhisper: [key_name(xeno_player)]->[target_mob.key] : [whisper] (AREA: [get_area_name(target_mob)])")
if(!istype(target_mob, /mob/living/carbon/xenomorph))
to_chat(target_mob, SPAN_XENOQUEEN("You hear a strange, alien voice in your head. \"[whisper]\""))
to_chat(target_mob, SPAN_XENOQUEEN("You hear a strange, alien voice in your head. \"[SPAN_PSYTALK(whisper)]\""))
else
to_chat(target_mob, SPAN_XENOQUEEN("You hear the voice of [xeno_player] resonate in your head. \"[whisper]\""))
to_chat(target_mob, SPAN_XENOQUEEN("You hear the voice of [xeno_player] resonate in your head. \"[SPAN_PSYTALK(whisper)]\""))
to_chat(xeno_player, SPAN_XENONOTICE("You said: \"[whisper]\" to [target_mob]"))

for(var/mob/dead/observer/ghost as anything in GLOB.observer_list)
Expand All @@ -222,7 +222,7 @@
var/rendered_message
var/xeno_track = "(<a href='byond://?src=\ref[ghost];track=\ref[xeno_player]'>F</a>)"
var/target_track = "(<a href='byond://?src=\ref[ghost];track=\ref[target_mob]'>F</a>)"
rendered_message = SPAN_XENOLEADER("PsychicWhisper: [xeno_player.real_name][xeno_track] to [target_mob.real_name][target_track], <span class='normal'>'[whisper]'</span>")
rendered_message = SPAN_XENOLEADER("PsychicWhisper: [xeno_player.real_name][xeno_track] to [target_mob.real_name][target_track], <span class='normal'>'[SPAN_PSYTALK(whisper)]'</span>")
ghost.show_message(rendered_message, SHOW_MESSAGE_AUDIBLE)

return ..()
Expand Down Expand Up @@ -254,9 +254,9 @@
continue
target_list += possible_target
if(!istype(possible_target, /mob/living/carbon/xenomorph))
to_chat(possible_target, SPAN_XENOQUEEN("You hear a strange, alien voice in your head. \"[whisper]\""))
to_chat(possible_target, SPAN_XENOQUEEN("You hear a strange, alien voice in your head. \"[SPAN_PSYTALK(whisper)]\""))
else
to_chat(possible_target, SPAN_XENOQUEEN("You hear the voice of [xeno_player] resonate in your head. \"[whisper]\""))
to_chat(possible_target, SPAN_XENOQUEEN("You hear the voice of [xeno_player] resonate in your head. \"[SPAN_PSYTALK(whisper)]\""))
FOR_DVIEW_END
if(!length(target_list))
return
Expand All @@ -269,7 +269,7 @@
if(ghost.client.prefs.toggles_chat & CHAT_GHOSTHIVEMIND)
var/rendered_message
var/xeno_track = "(<a href='byond://?src=\ref[ghost];track=\ref[xeno_player]'>F</a>)"
rendered_message = SPAN_XENOLEADER("PsychicRadiance: [xeno_player.real_name][xeno_track] to [targetstring], <span class='normal'>'[whisper]'</span>")
rendered_message = SPAN_XENOLEADER("PsychicRadiance: [xeno_player.real_name][xeno_track] to [targetstring], <span class='normal'>'[SPAN_PSYTALK(whisper)]'</span>")
ghost.show_message(rendered_message, SHOW_MESSAGE_AUDIBLE)
return ..()

Expand Down
2 changes: 2 additions & 0 deletions code/span_macros.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#define SPAN_XENOWARNING(X) "<span class='xenowarning'>[X]</span>"
#define SPAN_XENOMINORWARNING(X) "<span class='xenominorwarning'>[X]</span>"

#define SPAN_PSYTALK(X) "<span class='psy_talk'>[X]</span>"

// Yautja related
#define SPAN_YAUTJABOLD(X) "<span class='yautjabold'>[X]</span>"
#define SPAN_YAUTJABOLDBIG(X) "<span class='yautjaboldbig'>[X]</span>"
Expand Down
2 changes: 2 additions & 0 deletions code/stylesheet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ h1.alert, h2.alert {color: #000000;}
.xeno {color: #900090; font-style: italic;}
.xenoleader {color: #730d73; font-style: italic; font-size: 3;}
.xenoqueen {color: #730d73; font-style: italic; font-weight: bold; font-size: 3;}
.psy_talk {color: #a70090; font-style: italic; font-weight: bold; font-size: 3;}

.newscaster {color: #800000;}

.role_header {color: #db0000 text-align: center; font-weight: bold; font-family: trebuchet-ms; font-size: 2;}
Expand Down
30 changes: 30 additions & 0 deletions tgui/packages/tgui-panel/styles/goon/chat-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,14 @@ em {
animation: glitch 0.5s infinite;
}

.psy_talk {
color: #c400aa;
font-weight: bold;

/*Animation*/
animation: psy_glitch 0.5s infinite;
}

/*Keyframes*/

@keyframes glitch {
Expand All @@ -1473,6 +1481,28 @@ em {
}
}

@keyframes psy_glitch {
25% {
color: #c400aa;
transform: translate(-2px, -1px);
}

50% {
color: #91007d;
transform: translate(1px, -2px);
}

75% {
color: #750066;
transform: translate(-1px, 2px);
}

100% {
color: #7c016c;
transform: translate(1px, 1px);
}
}

.examine_block {
background: #1b1c1e;
border: 1px solid #a4bad6;
Expand Down
30 changes: 30 additions & 0 deletions tgui/packages/tgui-panel/styles/goon/chat-light.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,14 @@ h2.alert {
animation: glitch 0.5s infinite;
}

.psy_talk {
color: #a70090;
font-weight: bold;

/*Animation*/
animation: psy_glitch 0.5s infinite;
}

/*Keyframes*/

@keyframes glitch {
Expand All @@ -1495,6 +1503,28 @@ h2.alert {
}
}

@keyframes psy_glitch {
25% {
color: #a70090;
transform: translate(-2px, -1px);
}

50% {
color: #91007d;
transform: translate(1px, -2px);
}

75% {
color: #750066;
transform: translate(-1px, 2px);
}

100% {
color: #7c016c;
transform: translate(1px, 1px);
}
}

.examine_block {
background: #f2f7fa;
border: 1px solid #111a27;
Expand Down

0 comments on commit 94fcae8

Please sign in to comment.