Files

129 lines
3.5 KiB
Plaintext

/atom/movable/screen/ghost
icon = 'icons/hud/screen_ghost.dmi'
mouse_over_pointer = MOUSE_HAND_POINTER
/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()
GLOB.orbit_menu.show(usr)
/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/dnr
name = "Do Not Resuscitate"
icon_state = "dnr"
/atom/movable/screen/ghost/dnr/Click()
var/mob/dead/observer/dnring = usr
dnring.do_not_resuscitate()
/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/settings
name = "Ghost Settings"
icon_state = "settings"
/atom/movable/screen/ghost/settings/MouseEntered(location, control, params)
. = ..()
flick(icon_state + "_anim", src)
/atom/movable/screen/ghost/settings/Click()
GLOB.ghost_menu.ui_interact(usr)
/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(null, src)
using.screen_loc = ui_ghost_spawners_menu
static_inventory += using
using = new /atom/movable/screen/ghost/orbit(null, src)
using.screen_loc = ui_ghost_orbit
static_inventory += using
using = new /atom/movable/screen/ghost/reenter_corpse(null, src)
using.screen_loc = ui_ghost_reenter_corpse
static_inventory += using
using = new /atom/movable/screen/ghost/dnr(null, src)
using.screen_loc = ui_dnr
static_inventory += using
using = new /atom/movable/screen/ghost/teleport(null, src)
using.screen_loc = ui_ghost_teleport
static_inventory += using
using = new /atom/movable/screen/ghost/settings(null, src)
using.screen_loc = ui_ghost_settings
static_inventory += using
using = new /atom/movable/screen/ghost/minigames_menu(null, src)
using.screen_loc = ui_ghost_minigames
static_inventory += using
using = new /atom/movable/screen/language_menu/ghost(null, src)
using.screen_loc = ui_ghost_language_menu
static_inventory += using
floor_change = new /atom/movable/screen/floor_changer/vertical/ghost(null, src)
floor_change.screen_loc = ui_ghost_floor_changer
static_inventory += floor_change
/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
. = ..()