From 2aaced200d0529cebb450dfc44e17e26d2428951 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Mon, 2 Sep 2024 19:15:49 +0100 Subject: [PATCH 1/8] psyradi --- .../living/carbon/human/human_abilities.dm | 23 +++++++++++-- .../carbon/human/powers/human_powers.dm | 34 +++++++++++++++++++ 2 files changed, 54 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 58e4b617a19c..c1ca2745de17 100644 --- a/code/modules/mob/living/carbon/human/human_abilities.dm +++ b/code/modules/mob/living/carbon/human/human_abilities.dm @@ -135,16 +135,33 @@ 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) + if(possible_target == human_owner || !possible_target.client) continue target_list += possible_target - 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) + var/mob/living/carbon/target_mob = tgui_input_list(human_owner, "Target", "Send a Psychic Whisper to whom?", target_list, theme = "wizard") + if(!target_mob) return human_owner.psychic_whisper(target_mob) + +/datum/action/human_action/psychic_radiance + name = "Psychic Radiance" + action_icon_state = "cultist_channel_hivemind" + +/datum/action/xeno_action/onclick/psychic_radiance/use_ability(atom/A) + . = ..() + 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 + + human_owner.psychic_radiance() + /* CULT */ 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 8daf9a7488d7..1ba10e1ca67c 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -199,6 +199,40 @@ ghost.show_message(rendered_message, SHOW_MESSAGE_AUDIBLE) return +/mob/living/carbon/human/proc/psychic_radiance() + set name = "Psychic Radiance" + set desc = "Whisper silently to multiple people over a distance." + set category = "Abilities" + + var/whisper = strip_html(input("Message:", "Psychic Radiance") as text|null) + var/list/target_list = list() + if(!whisper) + return FALSE + FOR_DVIEW(var/mob/living/possible_target, 12, src, HIDE_INVISIBLE_OBSERVER) + if(possible_target == src || !possible_target.client) + 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. \"[SPAN_PSYTALK(whisper)]\"")) + else + to_chat(possible_target, SPAN_XENOQUEEN("You hear the voice of [src] resonate in your head. \"[SPAN_PSYTALK(whisper)]\"")) + FOR_DVIEW_END + if(!length(target_list)) + to_chat(src, SPAN_XENOWARNING("There is no one around to hear you...")) + return FALSE + var/targetstring = english_list(target_list) + to_chat(src, SPAN_XENONOTICE("You said: \"[whisper]\" to [targetstring]")) + log_say("PsychicRadiance: [key_name(src)]->[targetstring] : [whisper] (AREA: [get_area_name(src)])") + for (var/mob/dead/observer/ghost as anything in GLOB.observer_list) + if(!ghost.client || isnewplayer(ghost)) + continue + if(ghost.client.prefs.toggles_chat & CHAT_GHOSTHIVEMIND) + var/rendered_message + var/human_track = "(F)" + rendered_message = SPAN_XENOLEADER("PsychicRadiance: [src.real_name][human_track] to [targetstring], '[SPAN_PSYTALK(whisper)]'") + ghost.show_message(rendered_message, SHOW_MESSAGE_AUDIBLE) + return TRUE + /mob/living/verb/lay_down() set name = "Rest" set category = "IC" From de30e203b33d746f1f082fafe85cffa45449867c Mon Sep 17 00:00:00 2001 From: forest2001 Date: Sun, 8 Sep 2024 00:02:52 +0100 Subject: [PATCH 2/8] ghost radius --- .../mob/living/carbon/human/powers/human_powers.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 1ba10e1ca67c..615e5cef0dfd 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -188,8 +188,8 @@ 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... [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)) + FOR_DVIEW(var/mob/dead/observer/ghost, 12, src, SEE_INVISIBLE_OBSERVER) + if(!isobserver(ghost) || !ghost.client) continue if(ghost.client.prefs.toggles_chat & CHAT_GHOSTHIVEMIND) var/rendered_message @@ -223,8 +223,8 @@ var/targetstring = english_list(target_list) to_chat(src, SPAN_XENONOTICE("You said: \"[whisper]\" to [targetstring]")) log_say("PsychicRadiance: [key_name(src)]->[targetstring] : [whisper] (AREA: [get_area_name(src)])") - for (var/mob/dead/observer/ghost as anything in GLOB.observer_list) - if(!ghost.client || isnewplayer(ghost)) + FOR_DVIEW(var/mob/dead/observer/ghost, 12, src, SEE_INVISIBLE_OBSERVER) + if(!isobserver(ghost) || !ghost.client) continue if(ghost.client.prefs.toggles_chat & CHAT_GHOSTHIVEMIND) var/rendered_message From 1a59c10df96134bdc2180c4fd7612f91073f85ca Mon Sep 17 00:00:00 2001 From: forest2001 <41653574+realforest2001@users.noreply.github.com> Date: Thu, 12 Sep 2024 13:08:20 +0100 Subject: [PATCH 3/8] Update code/modules/mob/living/carbon/human/powers/human_powers.dm Co-authored-by: harryob <55142896+harryob@users.noreply.github.com> --- code/modules/mob/living/carbon/human/powers/human_powers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 615e5cef0dfd..39b5bd6ae261 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -229,7 +229,7 @@ if(ghost.client.prefs.toggles_chat & CHAT_GHOSTHIVEMIND) var/rendered_message var/human_track = "(F)" - rendered_message = SPAN_XENOLEADER("PsychicRadiance: [src.real_name][human_track] to [targetstring], '[SPAN_PSYTALK(whisper)]'") + rendered_message = SPAN_XENOLEADER("PsychicRadiance: [real_name][human_track] to [targetstring], '[SPAN_PSYTALK(whisper)]'") ghost.show_message(rendered_message, SHOW_MESSAGE_AUDIBLE) return TRUE From cd9573265dbe33444d900048e18e340d222cc9ff Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 12 Sep 2024 13:11:41 +0100 Subject: [PATCH 4/8] changes --- code/modules/mob/living/carbon/human/powers/human_powers.dm | 4 ++-- code/modules/mob/living/carbon/xenomorph/Abilities.dm | 4 ++-- 2 files changed, 4 insertions(+), 4 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 39b5bd6ae261..ede09fc385b9 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -183,7 +183,7 @@ set desc = "Whisper silently to someone over a distance." set category = "Abilities" - var/whisper = strip_html(input("Message:", "Psychic Whisper") as text|null) + var/whisper = tgui_input_text(src, "What do you wish to say?", "Psychic Whisper") 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... [SPAN_PSYTALK(whisper)]")) @@ -204,7 +204,7 @@ set desc = "Whisper silently to multiple people over a distance." set category = "Abilities" - var/whisper = strip_html(input("Message:", "Psychic Radiance") as text|null) + var/whisper = tgui_input_text(src, "What do you wish to say?", "Psychic Radiance") var/list/target_list = list() if(!whisper) return FALSE diff --git a/code/modules/mob/living/carbon/xenomorph/Abilities.dm b/code/modules/mob/living/carbon/xenomorph/Abilities.dm index 35b532136f90..bb2a5ec65aeb 100644 --- a/code/modules/mob/living/carbon/xenomorph/Abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/Abilities.dm @@ -206,7 +206,7 @@ if(!xeno_player.check_state(TRUE)) return - var/whisper = strip_html(input("Message:", "Psychic Whisper") as text|null) + var/whisper = tgui_input_text(xeno_player, "What do you wish to say?", "Psychic Whisper") 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)) @@ -246,7 +246,7 @@ if(!xeno_player.check_state(TRUE)) return var/list/target_list = list() - var/whisper = strip_html(input("Message:", "Psychic Radiance") as text|null) + var/whisper = tgui_input_text(xeno_player, "What do you wish to say?", "Psychic Radiance") if(!whisper || !xeno_player.check_state(TRUE)) return FOR_DVIEW(var/mob/living/possible_target, 12, xeno_player, HIDE_INVISIBLE_OBSERVER) From 36738fb03376929a82ba00f8c174ebc923f65c7f Mon Sep 17 00:00:00 2001 From: forest2001 Date: Thu, 12 Sep 2024 13:17:05 +0100 Subject: [PATCH 5/8] category --- code/modules/mob/living/carbon/human/powers/human_powers.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 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 ede09fc385b9..1dd115bc2aee 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -141,7 +141,7 @@ M.gib(create_cause_data("gutting", usr)) /mob/living/carbon/human/proc/commune() - set category = "Abilities" + set category = "Abilities.Psychic" set name = "Commune with creature" set desc = "Send a telepathic message to an unlucky recipient." @@ -181,7 +181,7 @@ /mob/living/carbon/human/proc/psychic_whisper(mob/target_mob as mob in oview()) set name = "Psychic Whisper" set desc = "Whisper silently to someone over a distance." - set category = "Abilities" + set category = "Abilities.Psychic" var/whisper = tgui_input_text(src, "What do you wish to say?", "Psychic Whisper") if(whisper) @@ -202,7 +202,7 @@ /mob/living/carbon/human/proc/psychic_radiance() set name = "Psychic Radiance" set desc = "Whisper silently to multiple people over a distance." - set category = "Abilities" + set category = "Abilities.Psychic" var/whisper = tgui_input_text(src, "What do you wish to say?", "Psychic Radiance") var/list/target_list = list() From cf8b2bc2e81529be5d68d4bdce6a5221dd1d73f3 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Fri, 13 Sep 2024 03:59:47 +0100 Subject: [PATCH 6/8] t --- .../mob/living/carbon/human/powers/human_powers.dm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 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 1dd115bc2aee..07b0b261f06c 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -186,8 +186,11 @@ var/whisper = tgui_input_text(src, "What do you wish to say?", "Psychic Whisper") 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... [SPAN_PSYTALK(whisper)]")) - to_chat(src, SPAN_XENOWARNING(" You said: \"[whisper]\" to [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... \"[SPAN_PSYTALK(whisper)]\"")) + else + to_chat(target_mob, SPAN_XENOQUEEN("You hear the voice of [src] resonate in your head... \"[SPAN_PSYTALK(whisper)]\"")) + to_chat(src, SPAN_XENOWARNING("You said: \"[whisper]\" to [target_mob]")) FOR_DVIEW(var/mob/dead/observer/ghost, 12, src, SEE_INVISIBLE_OBSERVER) if(!isobserver(ghost) || !ghost.client) continue @@ -213,9 +216,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. \"[SPAN_PSYTALK(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 [src] resonate in your head. \"[SPAN_PSYTALK(whisper)]\"")) + to_chat(possible_target, SPAN_XENOQUEEN("You hear the voice of [src] resonate in your head... \"[SPAN_PSYTALK(whisper)]\"")) FOR_DVIEW_END if(!length(target_list)) to_chat(src, SPAN_XENOWARNING("There is no one around to hear you...")) From 90ca738b14f8bd5b9fd561db34e01e0b8c5114a5 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Fri, 13 Sep 2024 04:13:42 +0100 Subject: [PATCH 7/8] spell --- code/modules/mob/living/carbon/human/human_abilities.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_abilities.dm b/code/modules/mob/living/carbon/human/human_abilities.dm index cdf97dddb9d4..2e4d241f1dee 100644 --- a/code/modules/mob/living/carbon/human/human_abilities.dm +++ b/code/modules/mob/living/carbon/human/human_abilities.dm @@ -129,7 +129,7 @@ /datum/action/human_action/psychic_whisper - name = "Psychic Whipser" + name = "Psychic Whisper" action_icon_state = "cultist_channel_hivemind" /datum/action/human_action/psychic_whisper/action_activate() From 32edf8457993b3c7144752cc25ad1ba7f7ef9548 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Sun, 29 Sep 2024 00:06:12 +0100 Subject: [PATCH 8/8] dead checks --- .../mob/living/carbon/human/human_abilities.dm | 18 +++++++++++++----- .../living/carbon/human/powers/human_powers.dm | 10 +++++++++- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_abilities.dm b/code/modules/mob/living/carbon/human/human_abilities.dm index 2e4d241f1dee..ae5917664738 100644 --- a/code/modules/mob/living/carbon/human/human_abilities.dm +++ b/code/modules/mob/living/carbon/human/human_abilities.dm @@ -135,12 +135,16 @@ /datum/action/human_action/psychic_whisper/action_activate() . = ..() if(!ishuman(owner)) - return + return FALSE 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 + return FALSE + + if(human_owner.stat == DEAD) + to_chat(human_owner, SPAN_WARNING("You cannot talk while dead.")) + return FALSE var/list/target_list = list() for(var/mob/living/carbon/possible_target in view(7, human_owner)) @@ -150,7 +154,7 @@ var/mob/living/carbon/target_mob = tgui_input_list(human_owner, "Target", "Send a Psychic Whisper to whom?", target_list, theme = "wizard") if(!target_mob) - return + return FALSE human_owner.psychic_whisper(target_mob) @@ -162,12 +166,16 @@ /datum/action/xeno_action/onclick/psychic_radiance/use_ability(atom/A) . = ..() if(!ishuman(owner)) - return + return FALSE 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 + return FALSE + + if(human_owner.stat == DEAD) + to_chat(human_owner, SPAN_WARNING("You cannot talk while dead.")) + return FALSE human_owner.psychic_radiance() 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 07b0b261f06c..9ba7fc7c523b 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -183,6 +183,10 @@ set desc = "Whisper silently to someone over a distance." set category = "Abilities.Psychic" + if(stat == DEAD) + to_chat(src, SPAN_WARNING("You cannot talk while dead.")) + return FALSE + var/whisper = tgui_input_text(src, "What do you wish to say?", "Psychic Whisper") if(whisper) log_say("PsychicWhisper: [key_name(src)]->[target_mob.key] : [whisper] (AREA: [get_area_name(loc)])") @@ -200,13 +204,17 @@ var/target_track = "(F)" 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 + return FALSE /mob/living/carbon/human/proc/psychic_radiance() set name = "Psychic Radiance" set desc = "Whisper silently to multiple people over a distance." set category = "Abilities.Psychic" + if(stat == DEAD) + to_chat(src, SPAN_WARNING("You cannot talk while dead.")) + return FALSE + var/whisper = tgui_input_text(src, "What do you wish to say?", "Psychic Radiance") var/list/target_list = list() if(!whisper)