From 94fcae8285c1011a50a94fedea181a096c6ed197 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 22 Aug 2024 01:36:24 +0100 Subject: [PATCH 1/3] psychic speech colours --- .../carbon/human/powers/human_powers.dm | 4 +-- .../mob/living/carbon/xenomorph/Abilities.dm | 12 ++++---- code/span_macros.dm | 2 ++ code/stylesheet.dm | 2 ++ .../tgui-panel/styles/goon/chat-dark.scss | 30 +++++++++++++++++++ .../tgui-panel/styles/goon/chat-light.scss | 30 +++++++++++++++++++ 6 files changed, 72 insertions(+), 8 deletions(-) diff --git a/code/modules/mob/living/carbon/human/powers/human_powers.dm b/code/modules/mob/living/carbon/human/powers/human_powers.dm index fef87c2f3263..8daf9a7488d7 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -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... [whisper]")) + to_chat(target_mob, SPAN_XENOWARNING(" You hear a strange, alien voice in your head... [SPAN_PSYTALK(whisper)]")) 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)) @@ -195,7 +195,7 @@ var/rendered_message var/human_track = "(F)" var/target_track = "(F)" - rendered_message = SPAN_XENOLEADER("PsychicWhisper: [real_name][human_track] to [target_mob.real_name][target_track], '[whisper]'") + rendered_message = SPAN_XENOLEADER("PsychicWhisper: [real_name][human_track] to [target_mob.real_name][target_track], '[SPAN_PSYTALK(whisper)]'") ghost.show_message(rendered_message, SHOW_MESSAGE_AUDIBLE) return diff --git a/code/modules/mob/living/carbon/xenomorph/Abilities.dm b/code/modules/mob/living/carbon/xenomorph/Abilities.dm index 6c220f41ad45..35b532136f90 100644 --- a/code/modules/mob/living/carbon/xenomorph/Abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/Abilities.dm @@ -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) @@ -222,7 +222,7 @@ var/rendered_message var/xeno_track = "(F)" var/target_track = "(F)" - rendered_message = SPAN_XENOLEADER("PsychicWhisper: [xeno_player.real_name][xeno_track] to [target_mob.real_name][target_track], '[whisper]'") + rendered_message = SPAN_XENOLEADER("PsychicWhisper: [xeno_player.real_name][xeno_track] to [target_mob.real_name][target_track], '[SPAN_PSYTALK(whisper)]'") ghost.show_message(rendered_message, SHOW_MESSAGE_AUDIBLE) return ..() @@ -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 @@ -269,7 +269,7 @@ if(ghost.client.prefs.toggles_chat & CHAT_GHOSTHIVEMIND) var/rendered_message var/xeno_track = "(F)" - rendered_message = SPAN_XENOLEADER("PsychicRadiance: [xeno_player.real_name][xeno_track] to [targetstring], '[whisper]'") + rendered_message = SPAN_XENOLEADER("PsychicRadiance: [xeno_player.real_name][xeno_track] to [targetstring], '[SPAN_PSYTALK(whisper)]'") ghost.show_message(rendered_message, SHOW_MESSAGE_AUDIBLE) return ..() diff --git a/code/span_macros.dm b/code/span_macros.dm index 218f333d7df9..f0d78bba617e 100644 --- a/code/span_macros.dm +++ b/code/span_macros.dm @@ -19,6 +19,8 @@ #define SPAN_XENOWARNING(X) "[X]" #define SPAN_XENOMINORWARNING(X) "[X]" +#define SPAN_PSYTALK(X) "[X]" + // Yautja related #define SPAN_YAUTJABOLD(X) "[X]" #define SPAN_YAUTJABOLDBIG(X) "[X]" diff --git a/code/stylesheet.dm b/code/stylesheet.dm index 145229e23424..8104be1f57e5 100644 --- a/code/stylesheet.dm +++ b/code/stylesheet.dm @@ -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;} diff --git a/tgui/packages/tgui-panel/styles/goon/chat-dark.scss b/tgui/packages/tgui-panel/styles/goon/chat-dark.scss index 5ea797fe2230..a430d06b7a00 100644 --- a/tgui/packages/tgui-panel/styles/goon/chat-dark.scss +++ b/tgui/packages/tgui-panel/styles/goon/chat-dark.scss @@ -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 { @@ -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; diff --git a/tgui/packages/tgui-panel/styles/goon/chat-light.scss b/tgui/packages/tgui-panel/styles/goon/chat-light.scss index 87beb202a5ae..23ea05b1c9c1 100644 --- a/tgui/packages/tgui-panel/styles/goon/chat-light.scss +++ b/tgui/packages/tgui-panel/styles/goon/chat-light.scss @@ -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 { @@ -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; From cdb3ff9e736267e0302078c1653a15d8a6a06cbb Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 22 Aug 2024 01:54:56 +0100 Subject: [PATCH 2/3] psy talk ability --- .../living/carbon/human/human_abilities.dm | 25 +++++++++++++++++++ .../chemistry_properties/prop_neutral.dm | 4 +-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_abilities.dm b/code/modules/mob/living/carbon/human/human_abilities.dm index 9976fe37a4ff..ebc27ef9b470 100644 --- a/code/modules/mob/living/carbon/human/human_abilities.dm +++ b/code/modules/mob/living/carbon/human/human_abilities.dm @@ -118,6 +118,31 @@ /datum/action/human_action/smartpack/repair_form/cooldown_check(obj/item/storage/backpack/marine/smartpack/S) return S.repairing + +/datum/action/human_action/psychic_whisper + name = "Psychic Whipser" + action_icon_state = "cultist_channel_hivemind" + +/datum/action/human_action/psychic_whisper/action_activate() + . = ..() + if(!ishuman(owner)) + return + var/mob/living/carbon/human/human_owner = owner + + if(human_owner.client.prefs.muted & MUTE_IC) + to_chat(human_owner, SPAN_DANGER("You cannot whisper (muted).")) + return + + var/list/target_list = list() + for(var/mob/living/carbon/possible_target in view(7, human_owner)) + if(possible_target == human_owner || !possible_target.client) continue + target_list += possible_target + + var/mob/living/carbon/target_mob = tgui_input_list(usr, "Target", "Send a Psychic Whisper to whom?", target_list, theme="hive_status") + if(!target_mob) return + + human_owner.psychic_whisper(target_mob) + /* CULT */ diff --git a/code/modules/reagents/chemistry_properties/prop_neutral.dm b/code/modules/reagents/chemistry_properties/prop_neutral.dm index 7bebb786aa34..9410f6f43ce7 100644 --- a/code/modules/reagents/chemistry_properties/prop_neutral.dm +++ b/code/modules/reagents/chemistry_properties/prop_neutral.dm @@ -531,11 +531,11 @@ ..() chem_host.pain.recalculate_pain() - remove_verb(chem_host, /mob/living/carbon/human/proc/psychic_whisper) + remove_action(chem_host, /datum/action/human_action/psychic_whisper) to_chat(chem_host, SPAN_NOTICE("The pain in your head subsides, and you are left feeling strangely alone.")) /datum/chem_property/neutral/encephalophrasive/reaction_mob(mob/chem_host, method=INGEST, volume, potency) - add_verb(chem_host, /mob/living/carbon/human/proc/psychic_whisper) + give_action(chem_host, /datum/action/human_action/psychic_whisper) to_chat(chem_host, SPAN_NOTICE("A terrible headache manifests, and suddenly it feels as though your mind is outside of your skull.")) /datum/chem_property/neutral/encephalophrasive/process(mob/living/chem_host, potency = 1, delta_time) From e9999e6c9f36fea80e6970eba89bd30da79c06cf Mon Sep 17 00:00:00 2001 From: forest2001 <41653574+realforest2001@users.noreply.github.com> Date: Sat, 24 Aug 2024 19:46:06 +0100 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: harryob <55142896+harryob@users.noreply.github.com> --- code/modules/mob/living/carbon/human/human_abilities.dm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_abilities.dm b/code/modules/mob/living/carbon/human/human_abilities.dm index ebc27ef9b470..58e4b617a19c 100644 --- a/code/modules/mob/living/carbon/human/human_abilities.dm +++ b/code/modules/mob/living/carbon/human/human_abilities.dm @@ -135,11 +135,13 @@ var/list/target_list = list() for(var/mob/living/carbon/possible_target in view(7, human_owner)) - if(possible_target == human_owner || !possible_target.client) continue + if(possible_target == human_owner || !possible_target.client) + continue target_list += possible_target - var/mob/living/carbon/target_mob = tgui_input_list(usr, "Target", "Send a Psychic Whisper to whom?", target_list, theme="hive_status") - if(!target_mob) return + var/mob/living/carbon/target_mob = tgui_input_list(human_owner, "Target", "Send a Psychic Whisper to whom?", target_list, theme = "hive_status") + if(!target_mob) + return human_owner.psychic_whisper(target_mob)