Files
Letter NandGitHub 42ea5dce9d update radial & tooltip (#7479)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
yeah
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game

<!-- Argue for the merits of your changes and how they benefit the game,
especially if they are controversial and/or far reaching. If you can't
actually explain WHY what you are doing will improve the game, then it
probably isn't good for the game in the first place. -->

## Changelog

<!-- If your PR modifies aspects of the game that can be concretely
observed by players or admins you should add a changelog. If your change
does NOT meet this description, remove this section. Please note that
maintainers freely reserve the right to remove and add tags should they
deem it appropriate. You can attempt to finagle the system all you want,
but it's best to shoot for clear communication right off the bat. -->

<!-- Both 🆑's are required for the changelog to work! You can put
your name to the right of the first 🆑 if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
2026-01-13 13:40:33 -05:00

185 lines
4.3 KiB
Plaintext

/atom/movable/screen/ghost
icon = 'icons/screen/hud/styles/common/observer.dmi'
/atom/movable/screen/ghost/MouseEntered(location,control,params)
. = ..()
flick(icon_state + "_anim", src)
openToolTip(usr, src, params, title = name, content = desc)
/atom/movable/screen/ghost/MouseExited()
closeToolTip(usr)
/atom/movable/screen/ghost/Click()
closeToolTip(usr)
/atom/movable/screen/ghost/returntomenu
name = "Respawn"
desc = "Return to the title screen menu."
icon_state = "returntomenu"
/atom/movable/screen/ghost/returntomenu/Click()
..()
var/mob/observer/dead/G = usr
G.abandon_mob()
/atom/movable/screen/ghost/jumptomob
name = "Jump to mob"
desc = "Pick a mob from a list to jump to."
icon_state = "jumptomob"
/atom/movable/screen/ghost/jumptomob/Click()
..()
var/mob/observer/dead/G = usr
G.jumptomob()
/atom/movable/screen/ghost/orbit
name = "Orbit"
desc = "Pick a mob to follow and orbit."
icon_state = "orbit"
/atom/movable/screen/ghost/orbit/Click()
..()
var/mob/observer/dead/G = usr
G.follow()
/atom/movable/screen/ghost/reenter_corpse
name = "Reenter corpse"
desc = "Only applicable if you HAVE a corpse..."
icon_state = "reenter_corpse"
/atom/movable/screen/ghost/reenter_corpse/Click()
..()
var/mob/observer/dead/G = usr
G.reenter_corpse()
/atom/movable/screen/ghost/teleport
name = "Teleport"
desc = "Pick an area to teleport to."
icon_state = "teleport"
/atom/movable/screen/ghost/teleport/Click()
..()
var/mob/observer/dead/G = usr
G.dead_tele()
/atom/movable/screen/ghost/pai
name = "pAI Alert"
desc = "Ping all the unoccupied pAI devices in the world."
icon_state = "pai"
/atom/movable/screen/ghost/pai/Click()
..()
var/mob/observer/dead/G = usr
G.paialert()
/atom/movable/screen/ghost/up
name = "Move Upwards"
desc = "Move up a z-level."
icon_state = "up"
/atom/movable/screen/ghost/up/Click()
..()
var/mob/observer/dead/G = usr
G.zMove(UP)
/atom/movable/screen/ghost/down
name = "Move Downwards"
desc = "Move down a z-level."
icon_state = "down"
/atom/movable/screen/ghost/down/Click()
..()
var/mob/observer/dead/G = usr
G.zMove(DOWN)
/atom/movable/screen/ghost/spawners
name = "Ghost Roles/Spawners"
desc = "Open the ghostrole/spawner menu."
icon_state = "spawners"
/atom/movable/screen/ghost/spawners/Click()
. = ..()
GLOB.ghostrole_menu.ui_interact(usr)
// TODO; /datum/hud refactor
/datum/hud/proc/ghost_hud(apply_to_client = TRUE)
var/list/adding = list()
var/atom/movable/screen/using
using = new /atom/movable/screen/ghost/returntomenu()
using.screen_loc = ui_ghost_returntomenu
using.hud_legacy = src
adding += using
using = new /atom/movable/screen/ghost/jumptomob()
using.screen_loc = ui_ghost_jumptomob
using.hud_legacy = src
adding += using
using = new /atom/movable/screen/ghost/orbit()
using.screen_loc = ui_ghost_orbit
using.hud_legacy = src
adding += using
using = new /atom/movable/screen/ghost/reenter_corpse()
using.screen_loc = ui_ghost_reenter_corpse
using.hud_legacy = src
adding += using
using = new /atom/movable/screen/ghost/teleport()
using.screen_loc = ui_ghost_teleport
using.hud_legacy = src
adding += using
using = new /atom/movable/screen/ghost/pai()
using.screen_loc = ui_ghost_pai
using.hud_legacy = src
adding += using
using = new /atom/movable/screen/ghost/up()
using.screen_loc = ui_ghost_updown
using.hud_legacy = src
adding += using
using = new /atom/movable/screen/ghost/down()
using.screen_loc = ui_ghost_updown
using.hud_legacy = src
adding += using
using = new /atom/movable/screen/ghost/spawners
using.screen_loc = ui_ghost_spawners
using.hud_legacy = src
adding += using
if(mymob.client && apply_to_client)
mymob.client.screen = list()
mymob.client.screen += adding
mymob.reload_rendering()
/* I wish we had this. Not yet, though.
/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
// don't show this HUD if observing; show the HUD of the observee
var/mob/observer/dead/O = mymob
if (istype(O) && O.observetarget)
plane_masters_update()
return FALSE
. = ..()
if(!.)
return
var/mob/screenmob = viewmob || mymob
if(!screenmob.client.prefs.ghost_hud)
screenmob.client.screen -= static_inventory
else
screenmob.client.screen += static_inventory
//We should only see observed mob alerts.
/datum/hud/ghost/reorganize_alerts(mob/viewmob)
var/mob/observer/dead/O = mymob
if (istype(O) && O.observetarget)
return
. = ..()
*/