Files
Bubberstation/code/_onclick/observer.dm
bf98195fda Ghosts can see more info on health scan (#96792)
## About The Pull Request

I have no idea how to word this so here's a list instead. 

1. Fixes #96445 by making it so that instead of healthscan code coming
up with cure text on the spot for viruses, advanced diseases have a
function that can generate cure text so you can use it in things other
than healthscanning.
2. Rewords a single letter var in medical kiosk code
3. As a result of 1, the code for disease state analyzers healthscanning
has been shortened because the cure text generating function only has to
be written once and not twice.
4. Health scans now have a power level instead of just being advanced or
basic. There is a new power level called super, and it's only available
to ghosts. Super scans can see all virus symptoms instead of just 3, and
the current stage of an alien embryo.
5. For some reason a bunch of healthscan code (like stuff from the eye
of god and health scanner mod module) were using 1 instead of
SCANMODE_VERBOSE (a define that equals 1 but is more readable) for the
scanmode. That's no longer the case.
6. A new health scanner, the super health scanner, that replaces the
advanced one in the box of debug tools.

<img width="620" height="223" alt="image"
src="https://github.com/user-attachments/assets/a0c5e56e-cf19-4db2-a2df-b72456123c50"
/>
<img width="73" height="65" alt="image"
src="https://github.com/user-attachments/assets/27f8c81b-4f89-455b-82fa-a0ecf94656cf"
/>

## Why It's Good For The Game

Ghosts should be able to see everything, I think

## Changelog

🆑
qol: Ghosts can see alien embryo stage and all virus symptoms when
health scanning
code: Health scanners now support multiple scan levels
fix: Fixes medical kiosks not being able to identify advanced disease
cures.
/🆑

---------

Co-authored-by: Fghj240 <fakeemail@notrealemail.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2026-07-17 00:07:13 +02:00

86 lines
2.5 KiB
Plaintext

/mob/dead/observer/DblClickOn(atom/A, params)
if(check_click_intercept(params, A))
return
// Things you might plausibly want to follow
if(ismovable(A))
ManualFollow(A)
// Otherwise jump
else if(A.loc)
abstract_move(get_turf(A))
/mob/dead/observer/ClickOn(atom/A, params)
if(check_click_intercept(params,A))
return
var/list/modifiers = params2list(params)
if(SEND_SIGNAL(src, COMSIG_MOB_CLICKON, A, modifiers) & COMSIG_MOB_CANCEL_CLICKON)
return
if(LAZYACCESS(modifiers, SHIFT_CLICK))
if(LAZYACCESS(modifiers, MIDDLE_CLICK))
ShiftMiddleClickOn(A)
return
if(LAZYACCESS(modifiers, CTRL_CLICK))
CtrlShiftClickOn(A)
return
ShiftClickOn(A)
return
if(LAZYACCESS(modifiers, MIDDLE_CLICK))
if(LAZYACCESS(modifiers, CTRL_CLICK))
CtrlMiddleClickOn(A)
else
MiddleClickOn(A, params)
return
if(LAZYACCESS(modifiers, ALT_CLICK))
base_click_alt(A)
return
if(LAZYACCESS(modifiers, CTRL_CLICK))
CtrlClickOn(A)
return
if(world.time <= next_move)
return
// You are responsible for checking config.ghost_interaction when you override this function
// Not all of them require checking, see below
A.attack_ghost(src)
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
/atom/proc/attack_ghost(mob/dead/observer/user)
if(SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_GHOST, user) & COMPONENT_CANCEL_ATTACK_CHAIN)
return TRUE
if(user.client)
if((user.ghost_hud_flags & GHOST_GAS) && atmos_scan(user=user, target=src, silent=TRUE))
return TRUE
else if(isAdminGhostAI(user))
attack_ai(user)
else if(user.client.prefs.read_preference(/datum/preference/toggle/inquisitive_ghost))
user.examinate(src)
return FALSE
/mob/living/attack_ghost(mob/dead/observer/user)
. = ..()
if(isnull(user.client))
return
if (user.ghost_hud_flags & GHOST_HEALTH)
healthscan(user, src, SCANNER_VERBOSE, SCANPOWER_SUPER)
if (user.ghost_hud_flags & GHOST_CHEM)
chemscan(user, src)
// ---------------------------------------
// And here are some good things for free:
// Now you can click through portals, wormholes, gateways, and teleporters while observing. -Sayu
/obj/machinery/teleport/hub/attack_ghost(mob/user)
if(!power_station?.engaged || !power_station.teleporter_console || !power_station.teleporter_console.target_ref)
return ..()
var/atom/target = power_station.teleporter_console.target_ref.resolve()
if(!target)
power_station.teleporter_console.target_ref = null
return ..()
user.abstract_move(get_turf(target))