Skip to content

Commit

Permalink
TGS Test Merge (#7087)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Sep 10, 2024
2 parents dbcbd29 + de30e20 commit 81ae0ce
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 5 deletions.
23 changes: 20 additions & 3 deletions code/modules/mob/living/carbon/human/human_abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,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
*/
Expand Down
38 changes: 36 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 @@ -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... <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))
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
Expand All @@ -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_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
var/human_track = "(<a href='byond://?src=\ref[ghost];track=\ref[src]'>F</a>)"
rendered_message = SPAN_XENOLEADER("PsychicRadiance: [src.real_name][human_track] to [targetstring], <span class='normal'>'[SPAN_PSYTALK(whisper)]'</span>")
ghost.show_message(rendered_message, SHOW_MESSAGE_AUDIBLE)
return TRUE

/mob/living/verb/lay_down()
set name = "Rest"
set category = "IC"
Expand Down

0 comments on commit 81ae0ce

Please sign in to comment.