From b5f3b7442bb4a4b358e8dc2f9d034efeae6fe246 Mon Sep 17 00:00:00 2001
From: Contrabang <91113370+Contrabang@users.noreply.github.com>
Date: Sun, 26 Mar 2023 06:58:38 -0400
Subject: [PATCH] ghosts can point again (#20617)
---
code/_onclick/observer_onclick.dm | 4 ++++
code/modules/mob/dead/observer/observer_base.dm | 13 +++++++++----
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/code/_onclick/observer_onclick.dm b/code/_onclick/observer_onclick.dm
index 5b77d6ff721..01f4a73118a 100644
--- a/code/_onclick/observer_onclick.dm
+++ b/code/_onclick/observer_onclick.dm
@@ -4,6 +4,10 @@
// But we return here since we don't want to do regular dblclick handling
return
+ var/list/modifiers = params2list(params)
+ if(modifiers["middle"]) // Let ghosts point without teleporting
+ return
+
if(can_reenter_corpse && mind && mind.current)
if(A == mind.current || (mind.current in A)) // double click your corpse or whatever holds it
reenter_corpse() // (cloning scanner, body bag, closet, mech, etc)
diff --git a/code/modules/mob/dead/observer/observer_base.dm b/code/modules/mob/dead/observer/observer_base.dm
index e70b2843387..cf903b2accb 100644
--- a/code/modules/mob/dead/observer/observer_base.dm
+++ b/code/modules/mob/dead/observer/observer_base.dm
@@ -734,10 +734,15 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/run_pointed(atom/A as mob|obj|turf in view())
if(!..())
return FALSE
- var/follow_link
- if(invisibility) // Only show the button if the ghost is not visible to the living
- follow_link = " ([ghost_follow_link(A, src)])"
- usr.visible_message("[src] points to [A][follow_link].")
+
+ for(var/mob/M in range(7, src))
+ if(M.see_invisible < invisibility)
+ continue //can't view the invisible
+ var/follow_link
+ if(invisibility) // Only show the button if the ghost is not visible to the living
+ follow_link = " ([ghost_follow_link(A, M)])" // Ghost needs to be link clicker, otherwise it breaks
+ M.show_message("[src] points to [A][follow_link].", EMOTE_VISIBLE)
+
return TRUE
/mob/dead/observer/proc/incarnate_ghost()