Files
Bubberstation/code/_onclick/observer.dm
John Willard ca96a9e2cd Ghost settings UI (#91370)
## About The Pull Request

This is part of my ongoing project to remove the Stat panel which you
can read/contribute to here: https://hackmd.io/443_dE5lRWeEAp9bjGcKYw

Replaces the pAI button at the bottom of Ghost's HUD with a new button
for Ghost settings

Default look

![image](https://github.com/user-attachments/assets/7b97287d-5f8b-40a4-b574-98ecaafa8533)

With fun verbs (admin only, the 2 buttons at the top right), No body,
and lag switches on (disables T-Ray and Zooming)

![image](https://github.com/user-attachments/assets/3ee9bb9b-389c-452c-8ff5-fbd0ee677fef)

The ghost icon next to "re-enter body" is the DNR button, which requires
double click.
Extra view is now easier to understand, 0 is "default", anything more is
extra vision you get. Goes to 3 for regular users, 7 for BYOND members.

Removes the "Ghost" tab from the stat panel entirely, this replaces it.

## Why It's Good For The Game

The Ghost tab of the stat panel is filled with barely functional stuff,
like "Jump to Mob" which allows you to jump to "oranges ear" which
teleports you to nullspace, or the 4 different jump to verbs for
different things which is irrelevant from the Orbit menu and the many
improvements it got over the years, and even the Notifications panel,
which seems pretty useful, but because it's delegated to a small button
filled with the rest of these it gets entirely drowned out.
This puts all the important things in front of the user at the click of
a button, meant to be easy to navigate and giving important information
first.

## Changelog

🆑
add: Added a 'Ghost settings' button, taking the spot of the pAI
candidate button and replacing the "Ghost" tab of the Stat panel. This
button contains buttons pertinent to your time as an Observer.
/🆑
2025-05-29 10:21:29 -07:00

83 lines
2.4 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(user.client && (user.ghost_hud_flags & GHOST_HEALTH))
healthscan(user, src, 1, TRUE)
if(user.client && (user.ghost_hud_flags & GHOST_CHEM))
chemscan(user, src)
return ..()
// ---------------------------------------
// 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))