Files
GS13NG/code/_onclick/hud/ghost.dm
2021-07-29 13:57:19 +03:00

96 lines
2.3 KiB
Plaintext

/atom/movable/screen/ghost
icon = 'icons/mob/screen_ghost.dmi'
/atom/movable/screen/ghost/MouseEntered()
flick(icon_state + "_anim", src)
/atom/movable/screen/ghost/jumptomob
name = "Jump to mob"
icon_state = "jumptomob"
/atom/movable/screen/ghost/jumptomob/Click()
var/mob/dead/observer/G = usr
G.jumptomob()
/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/spawners
name = "Ghost role spawners"
icon_state = "spawners"
/atom/movable/screen/ghost/spawners/Click()
var/mob/dead/observer/G = usr
G.open_spawners_menu()
/datum/hud/ghost/New(mob/owner)
..()
var/atom/movable/screen/using
using = new /atom/movable/screen/ghost/jumptomob()
using.screen_loc = ui_ghost_jumptomob
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/spawners()
using.screen_loc = ui_ghost_spawners
using.hud = src
static_inventory += using
using = new /atom/movable/screen/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.ghost_hud)
screenmob.client.screen -= static_inventory
else
screenmob.client.screen += static_inventory