Files
Bubberstation/code/_onclick/hud/ghost.dm
T
John Willard 2f7e70d11d Removes double spaces in defines and removes some unused ones (#72466)
## About The Pull Request

1. Removes unused defines (DIAG_CIRCUIT_HUD, LIGHTING_BASE_MATRIX,
pda_styles and the defines it uses, MAFIA_MEDAL_CHARISMATIC &
MAFIA_MEDAL_VIP).

2. Removes double spaces (or tab->space & space->tab) from everywhere I
saw them in the defines folder (unless used by autodoc)

3. Removes the unecessary amount of tabs from lists in HubMigrator, this
PR was at first gonna be around achievements but this just bugged me,
which spiraled into this.

## Why It's Good For The Game

me when i spread my code standards onto the codebase i contribute to

this doesn't affect the game however it does make the defines look
cleaner and brings it up to date with our most recent standards.

## Changelog

not player-facing.
2023-01-09 18:54:49 -08:00

119 lines
2.9 KiB
Plaintext

/atom/movable/screen/ghost
icon = 'icons/hud/screen_ghost.dmi'
/atom/movable/screen/ghost/MouseEntered(location, control, params)
. = ..()
flick(icon_state + "_anim", src)
/atom/movable/screen/ghost/spawners_menu
name = "Spawners menu"
icon_state = "spawners"
/atom/movable/screen/ghost/spawners_menu/Click()
var/mob/dead/observer/observer = usr
observer.open_spawners_menu()
/atom/movable/screen/ghost/orbit
name = "Orbit"
icon_state = "orbit"
/atom/movable/screen/ghost/orbit/Click()
var/mob/dead/observer/G = usr
G.follow()
/atom/movable/screen/ghost/reenter_corpse
name = "Reenter corpse"
icon_state = "reenter_corpse"
/atom/movable/screen/ghost/reenter_corpse/Click()
var/mob/dead/observer/G = usr
G.reenter_corpse()
/atom/movable/screen/ghost/teleport
name = "Teleport"
icon_state = "teleport"
/atom/movable/screen/ghost/teleport/Click()
var/mob/dead/observer/G = usr
G.dead_tele()
/atom/movable/screen/ghost/pai
name = "pAI Candidate"
icon_state = "pai"
/atom/movable/screen/ghost/pai/Click()
var/mob/dead/observer/G = usr
G.register_pai()
/atom/movable/screen/ghost/minigames_menu
name ="Minigames"
icon_state = "minigames"
/atom/movable/screen/ghost/minigames_menu/Click()
var/mob/dead/observer/observer = usr
observer.open_minigames_menu()
/datum/hud/ghost/New(mob/owner)
..()
var/atom/movable/screen/using
using = new /atom/movable/screen/ghost/spawners_menu()
using.screen_loc = ui_ghost_spawners_menu
using.hud = src
static_inventory += using
using = new /atom/movable/screen/ghost/orbit()
using.screen_loc = ui_ghost_orbit
using.hud = src
static_inventory += using
using = new /atom/movable/screen/ghost/reenter_corpse()
using.screen_loc = ui_ghost_reenter_corpse
using.hud = src
static_inventory += using
using = new /atom/movable/screen/ghost/teleport()
using.screen_loc = ui_ghost_teleport
using.hud = src
static_inventory += using
using = new /atom/movable/screen/ghost/pai()
using.screen_loc = ui_ghost_pai
using.hud = src
static_inventory += using
using = new /atom/movable/screen/ghost/minigames_menu()
using.screen_loc = ui_ghost_minigames
using.hud = src
static_inventory += using
using = new /atom/movable/screen/language_menu
using.screen_loc = ui_ghost_language_menu
using.icon = ui_style
using.hud = src
static_inventory += using
/datum/hud/ghost/show_hud(version = 0, mob/viewmob)
// don't show this HUD if observing; show the HUD of the observee
var/mob/dead/observer/O = mymob
if (istype(O) && O.observetarget)
plane_masters_update()
return FALSE
. = ..()
if(!.)
return
var/mob/screenmob = viewmob || mymob
if(screenmob.client.prefs.read_preference(/datum/preference/toggle/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/dead/observer/O = mymob
if (istype(O) && O.observetarget)
return
. = ..()