Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds observer UI button for toggling HUDs #4891

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions code/_onclick/hud/ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@
var/mob/dead/observer/G = usr
G.reenter_corpse()

/atom/movable/screen/ghost/toggle_huds
name = "Toggle HUDs"
icon_state = "ghost_hud_toggle"

/atom/movable/screen/ghost/toggle_huds/Click()
var/client/client = usr.client
client.toggle_ghost_hud()

/datum/hud/ghost/New(mob/owner, ui_style='icons/mob/hud/human_white.dmi', ui_color, ui_alpha = 230)
. = ..()
var/atom/movable/screen/using
Expand All @@ -68,6 +76,9 @@
using.screen_loc = ui_ghost_slot4
static_inventory += using

using = new /atom/movable/screen/ghost/toggle_huds()
using.screen_loc = ui_ghost_slot5
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
Expand Down
Binary file modified icons/mob/screen_ghost.dmi
Binary file not shown.