diff --git a/code/__defines/_planes+layers.dm b/code/__defines/_planes+layers.dm
index 129236125c..8084f3339b 100644
--- a/code/__defines/_planes+layers.dm
+++ b/code/__defines/_planes+layers.dm
@@ -40,15 +40,57 @@ What is the naming convention for planes or layers?
*/
-#define DEFAULT_PLANE 0 // BYOND's default value for plane, the "base plane"
+#define PLANE_ADMIN1 -92 //Purely for shenanigans
+#define PLANE_ADMIN2 -91 //And adminbuse
+#define PLANE_ADMIN3 -90 //And generating salt
-#define SPACE_PLANE -32 // Reserved for use in space/parallax
-
-#define PARALLAX_PLANE -30 // Reserved for use in space/parallax
+#define SPACE_PLANE -32 // Reserved for use in space/parallax
+#define PARALLAX_PLANE -30 // Reserved for use in space/parallax
// OPENSPACE_PLANE reserves all planes between OPENSPACE_PLANE_START and OPENSPACE_PLANE_END inclusive
-#define OPENSPACE_PLANE_START -23
-#define OPENSPACE_PLANE_END -8
-#define OPENSPACE_PLANE -25 // /turf/simulated/open will use OPENSPACE_PLANE + z (Valid z's being 2 thru 17)
+#define OPENSPACE_PLANE -55 // /turf/simulated/open will use OPENSPACE_PLANE + z (Valid z's being 2 thru 17)
+#define OPENSPACE_PLANE_START -53
+#define OPENSPACE_PLANE_END -38
+#define OVER_OPENSPACE_PLANE -37
-#define OVER_OPENSPACE_PLANE -7
+////////////////////////////////////////////////////////////////////////////////////////
+#define PLANE_WORLD 0 // BYOND's default value for plane, the "base plane"
+////////////////////////////////////////////////////////////////////////////////////////
+
+#define PLANE_LIGHTING 5 //Where the lighting (and darkness) lives
+
+#define PLANE_GHOSTS 10 //Spooooooooky ghooooooosts
+#define PLANE_AI_EYE 11 //The AI eye lives here
+
+// "Character HUDs", aka HUDs, but not the game's UI. Things like medhuds. I know Planes say they must be intergers, but it's lies.
+#define PLANE_CH_STATUS 15 //Status icon
+#define PLANE_CH_HEALTH 16 //Health icon
+#define PLANE_CH_LIFE 17 //Health bar
+#define PLANE_CH_ID 18 //Job icon
+#define PLANE_CH_WANTED 19 //Arrest icon
+#define PLANE_CH_IMPLOYAL 20 //Loyalty implant icon
+#define PLANE_CH_IMPTRACK 21 //Tracking implant icon
+#define PLANE_CH_IMPCHEM 22 //Chemical implant icon
+#define PLANE_CH_SPECIAL 23 //Special role icon (revhead or w/e)
+#define PLANE_CH_STATUS_OOC 24 //OOC status hud for spooks
+
+//Fullscreen overlays under inventory
+#define PLANE_FULLSCREEN 90 //Blindness, mesons, druggy, etc
+
+//Client UI HUD stuff
+#define PLANE_PLAYER_HUD 95 //The character's UI is on this plane
+ #define LAYER_HUD_UNDER 1 //Under the HUD items
+ #define LAYER_HUD_BASE 2 //The HUD items themselves
+ #define LAYER_HUD_ITEM 3 //Things sitting on HUD items (largely irrelevant because PLANE_PLAYER_HUD_ITEMS)
+ #define LAYER_HUD_ABOVE 4 //Things that reside above items (highlights)
+#define PLANE_PLAYER_HUD_ITEMS 96 //Separate layer with which to apply colorblindness
+
+
+//////////////////////////
+/atom/proc/hud_layerise()
+ plane = PLANE_PLAYER_HUD_ITEMS
+ layer = LAYER_HUD_ITEM
+
+/atom/proc/reset_plane_and_layer()
+ plane = initial(plane)
+ layer = initial(layer)
diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm
index 84007beae3..e0d5cbd45a 100644
--- a/code/__defines/mobs.dm
+++ b/code/__defines/mobs.dm
@@ -227,4 +227,29 @@
// For slime commanding. Higher numbers allow for more actions.
#define SLIME_COMMAND_OBEY 1 // When disciplined.
#define SLIME_COMMAND_FACTION 2 // When in the same 'faction'.
-#define SLIME_COMMAND_FRIEND 3 // When befriended with a slime friendship agent.
\ No newline at end of file
+#define SLIME_COMMAND_FRIEND 3 // When befriended with a slime friendship agent.
+
+//Vision flags, for dealing with plane visibility
+#define VIS_FULLBRIGHT 1
+#define VIS_GHOSTS 2
+#define VIS_AI_EYE 3
+
+#define VIS_CH_STATUS 4
+#define VIS_CH_HEALTH 5
+#define VIS_CH_LIFE 6
+#define VIS_CH_ID 7
+#define VIS_CH_WANTED 8
+#define VIS_CH_IMPLOYAL 9
+#define VIS_CH_IMPTRACK 10
+#define VIS_CH_IMPCHEM 11
+#define VIS_CH_SPECIAL 12
+#define VIS_CH_STATUS_OOC 13
+
+#define VIS_D_COLORBLIND 14
+#define VIS_D_COLORBLINDI 15
+
+#define VIS_ADMIN1 16
+#define VIS_ADMIN2 17
+#define VIS_ADMIN3 18
+
+#define VIS_COUNT 18 //Must be highest number from above.
\ No newline at end of file
diff --git a/code/_helpers/icons.dm b/code/_helpers/icons.dm
index 02a0ce1989..45f9b93021 100644
--- a/code/_helpers/icons.dm
+++ b/code/_helpers/icons.dm
@@ -873,3 +873,9 @@ proc/sort_atoms_by_layer(var/list/atoms)
result.Swap(i, gap + i)
swapped = 1
return result
+
+/proc/gen_hud_image(var/file, var/person, var/state, var/plane)
+ var/image/img = image(file, person, state)
+ img.plane = plane //Thanks Byond.
+ img.appearance_flags = APPEARANCE_UI|KEEP_APART
+ return img
diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm
index 1dffebf607..6606cfb458 100644
--- a/code/_helpers/mobs.dm
+++ b/code/_helpers/mobs.dm
@@ -129,7 +129,7 @@ proc/age2agedescription(age)
else return "unknown"
/proc/RoundHealth(health)
- var/list/icon_states = icon_states('icons/mob/hud_med.dmi')
+ var/list/icon_states = icon_states(ingame_hud_med)
for(var/icon_state in icon_states)
if(health >= text2num(icon_state))
return icon_state
diff --git a/code/_onclick/hud/fullscreen.dm b/code/_onclick/hud/fullscreen.dm
index a00fa6e10d..f5501a623a 100644
--- a/code/_onclick/hud/fullscreen.dm
+++ b/code/_onclick/hud/fullscreen.dm
@@ -68,6 +68,7 @@
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
layer = FULLSCREEN_LAYER
+ plane = PLANE_FULLSCREEN
mouse_opacity = 0
var/severity = 0
diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm
index 6e1b8b2c37..9ab596feaa 100644
--- a/code/_onclick/hud/hud.dm
+++ b/code/_onclick/hud/hud.dm
@@ -39,32 +39,30 @@ var/list/global_huds = list(
screen.icon = 'icons/obj/hud_full.dmi'
screen.icon_state = icon_state
screen.layer = SCREEN_LAYER
+ screen.plane = PLANE_FULLSCREEN
screen.mouse_opacity = 0
return screen
+/obj/screen/global_screen
+ screen_loc = ui_entire_screen
+ layer = 17
+ plane = PLANE_FULLSCREEN
+ mouse_opacity = 0
+
/datum/global_hud/New()
//420erryday psychedellic colours screen overlay for when you are high
- druggy = new /obj/screen()
- druggy.screen_loc = ui_entire_screen
+ druggy = new /obj/screen/global_screen()
druggy.icon_state = "druggy"
- druggy.layer = 17
- druggy.mouse_opacity = 0
//that white blurry effect you get when you eyes are damaged
- blurry = new /obj/screen()
- blurry.screen_loc = ui_entire_screen
+ blurry = new /obj/screen/global_screen()
blurry.icon_state = "blurry"
- blurry.layer = 17
- blurry.mouse_opacity = 0
//static overlay effect for cameras and the like
- whitense = new /obj/screen()
- whitense.screen_loc = ui_entire_screen
+ whitense = new /obj/screen/global_screen()
whitense.icon = 'icons/effects/static.dmi'
whitense.icon_state = "1 light"
- whitense.layer = 17
- whitense.mouse_opacity = 0
nvg = setup_overlay("nvg_hud")
thermal = setup_overlay("thermal_hud")
@@ -89,12 +87,16 @@ var/list/global_huds = list(
vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen)
O = vimpaired[1]
O.screen_loc = "1,1 to 5,15"
+ O.plane = PLANE_FULLSCREEN
O = vimpaired[2]
O.screen_loc = "5,1 to 10,5"
+ O.plane = PLANE_FULLSCREEN
O = vimpaired[3]
O.screen_loc = "6,11 to 10,15"
+ O.plane = PLANE_FULLSCREEN
O = vimpaired[4]
O.screen_loc = "11,1 to 15,15"
+ O.plane = PLANE_FULLSCREEN
//welding mask overlay black/dither
darkMask = newlist(/obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen)
@@ -119,18 +121,21 @@ var/list/global_huds = list(
O = vimpaired[i]
O.icon_state = "dither50"
O.layer = 17
+ O.plane = PLANE_FULLSCREEN
O.mouse_opacity = 0
O = darkMask[i]
O.icon_state = "dither50"
O.layer = 17
+ O.plane = PLANE_FULLSCREEN
O.mouse_opacity = 0
for(i = 5, i <= 8, i++)
O = darkMask[i]
O.icon_state = "black"
O.layer = 17
- O.mouse_opacity = 0
+ O.plane = PLANE_FULLSCREEN
+ O.mouse_opacity = 2
/*
The hud datum
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index 57e1e4bb6a..83f23930dd 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -13,7 +13,7 @@
src.adding = list()
src.other = list()
- src.hotkeybuttons = list() //These can be disabled for hotkey usersx
+ src.hotkeybuttons = list() //These can be disabled for hotkey users
var/list/hud_elements = list()
var/obj/screen/using
@@ -25,7 +25,6 @@
inv_box = new /obj/screen/inventory()
inv_box.icon = ui_style
- inv_box.layer = 19
inv_box.color = ui_color
inv_box.alpha = ui_alpha
@@ -50,7 +49,7 @@
using.icon = ui_style
using.icon_state = "other"
using.screen_loc = ui_inventory
- using.layer = 20
+ using.hud_layerise()
using.color = ui_color
using.alpha = ui_alpha
src.adding += using
@@ -65,7 +64,6 @@
using.screen_loc = ui_acti
using.color = ui_color
using.alpha = ui_alpha
- using.layer = 20
src.adding += using
action_intent = using
@@ -82,7 +80,7 @@
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
- using.layer = 21
+ using.layer = LAYER_HUD_ITEM //These sit on the intent box
src.adding += using
help_intent = using
@@ -94,7 +92,7 @@
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
- using.layer = 21
+ using.layer = LAYER_HUD_ITEM
src.adding += using
disarm_intent = using
@@ -106,7 +104,7 @@
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
- using.layer = 21
+ using.layer = LAYER_HUD_ITEM
src.adding += using
grab_intent = using
@@ -118,7 +116,7 @@
using.icon = ico
using.screen_loc = ui_acti
using.alpha = ui_alpha
- using.layer = 21
+ using.layer = LAYER_HUD_ITEM
src.adding += using
hurt_intent = using
//end intent small hud objects
@@ -129,7 +127,6 @@
using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi
- using.layer = 20
using.color = ui_color
using.alpha = ui_alpha
src.adding += using
@@ -141,7 +138,6 @@
using.icon = ui_style
using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw
- using.layer = 19
using.color = ui_color
using.alpha = ui_alpha
src.hotkeybuttons += using
@@ -153,7 +149,6 @@
using.icon = ui_style
using.icon_state = "act_equip"
using.screen_loc = ui_equip
- using.layer = 20
using.color = ui_color
using.alpha = ui_alpha
src.adding += using
@@ -167,7 +162,6 @@
inv_box.icon_state = "r_hand_active"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
- inv_box.layer = 19
inv_box.color = ui_color
inv_box.alpha = ui_alpha
@@ -183,7 +177,6 @@
inv_box.icon_state = "l_hand_active"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
- inv_box.layer = 19
inv_box.color = ui_color
inv_box.alpha = ui_alpha
src.l_hand_hud_object = inv_box
@@ -194,7 +187,6 @@
using.icon = ui_style
using.icon_state = "hand1"
using.screen_loc = ui_swaphand1
- using.layer = 19
using.color = ui_color
using.alpha = ui_alpha
src.adding += using
@@ -204,7 +196,6 @@
using.icon = ui_style
using.icon_state = "hand2"
using.screen_loc = ui_swaphand2
- using.layer = 19
using.color = ui_color
using.alpha = ui_alpha
src.adding += using
@@ -215,7 +206,6 @@
using.icon = ui_style
using.icon_state = "act_resist"
using.screen_loc = ui_pull_resist
- using.layer = 19
using.color = ui_color
using.alpha = ui_alpha
src.hotkeybuttons += using
diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm
index 52aa248431..daaa52e827 100644
--- a/code/_onclick/hud/robot.dm
+++ b/code/_onclick/hud/robot.dm
@@ -258,7 +258,7 @@ var/obj/screen/robot_inventory
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
else
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
- A.layer = 20
+ A.hud_layerise()
x++
if(x == 4)
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 35ef300978..4119aafb9b 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -9,7 +9,8 @@
/obj/screen
name = ""
icon = 'icons/mob/screen1.dmi'
- layer = 20.0
+ layer = LAYER_HUD_BASE
+ plane = PLANE_PLAYER_HUD
unacidable = 1
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
var/datum/hud/hud = null // A reference to the owner HUD, if any.
diff --git a/code/defines/procs/hud.dm b/code/defines/procs/hud.dm
deleted file mode 100644
index dd4a282740..0000000000
--- a/code/defines/procs/hud.dm
+++ /dev/null
@@ -1,89 +0,0 @@
-/* Using the HUD procs is simple. Call these procs in the life.dm of the intended mob.
-Use the regular_hud_updates() proc before process_med_hud(mob) or process_sec_hud(mob) so
-the HUD updates properly! */
-
-// hud overlay image type, used for clearing client.images precisely
-/image/hud_overlay
- appearance_flags = APPEARANCE_UI // Don't get scaled with macro/micros. VOREStation edit
-
-//Medical HUD outputs. Called by the Life() proc of the mob using it, usually.
-proc/process_med_hud(var/mob/M, var/local_scanner, var/mob/Alt)
- if(!can_process_hud(M))
- return
-
- var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, med_hud_users)
- for(var/mob/living/carbon/human/patient in P.Mob.in_view(P.Turf))
- if(P.Mob.see_invisible < patient.invisibility)
- continue
-
- if(local_scanner)
- P.Client.images += patient.hud_list[HEALTH_HUD]
- P.Client.images += patient.hud_list[STATUS_HUD]
- P.Client.images += patient.hud_list[BACKUP_HUD] //VOREStation Edit - Backup implant indicator
- else
- var/sensor_level = getsensorlevel(patient)
- if(sensor_level >= SUIT_SENSOR_VITAL)
- P.Client.images += patient.hud_list[HEALTH_HUD]
- if(sensor_level >= SUIT_SENSOR_BINARY)
- P.Client.images += patient.hud_list[LIFE_HUD]
-
-//Security HUDs. Pass a value for the second argument to enable implant viewing or other special features.
-proc/process_sec_hud(var/mob/M, var/advanced_mode, var/mob/Alt)
- if(!can_process_hud(M))
- return
- var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, sec_hud_users)
- for(var/mob/living/carbon/human/perp in P.Mob.in_view(P.Turf))
- if(P.Mob.see_invisible < perp.invisibility)
- continue
-
- P.Client.images += perp.hud_list[ID_HUD]
- if(advanced_mode)
- P.Client.images += perp.hud_list[WANTED_HUD]
- P.Client.images += perp.hud_list[IMPTRACK_HUD]
- P.Client.images += perp.hud_list[IMPLOYAL_HUD]
- P.Client.images += perp.hud_list[IMPCHEM_HUD]
-
-datum/arranged_hud_process
- var/client/Client
- var/mob/Mob
- var/turf/Turf
-
-proc/arrange_hud_process(var/mob/M, var/mob/Alt, var/list/hud_list)
- hud_list |= M
- var/datum/arranged_hud_process/P = new
- P.Client = M.client
- P.Mob = Alt ? Alt : M
- P.Turf = get_turf(P.Mob)
- return P
-
-proc/can_process_hud(var/mob/M)
- if(!M)
- return 0
- if(!M.client)
- return 0
- if(M.stat != CONSCIOUS)
- return 0
- return 1
-
-//Deletes the current HUD images so they can be refreshed with new ones.
-mob/proc/handle_regular_hud_updates() //Used in the life.dm of mobs that can use HUDs.
- if(client)
- for(var/image/hud_overlay/hud in client.images)
- client.images -= hud
- med_hud_users -= src
- sec_hud_users -= src
- //VOREStation Add - HUD lists
- eng_hud_users -= src
- sci_hud_users -= src
- gen_hud_users -= src
- if(vantag_hud) process_vantag_hud(src) //VOREStation Add - So any mob can have the vantag hud, observer or not.
- //VOREStation Add End
-mob/proc/in_view(var/turf/T)
- return view(T)
-
-/mob/observer/eye/in_view(var/turf/T)
- var/list/viewed = new
- for(var/mob/living/carbon/human/H in mob_list)
- if(get_dist(H, T) <= 7)
- viewed += H
- return viewed
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index 0e96c99522..d989d42c27 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -185,7 +185,8 @@ var/global/datum/controller/gameticker/ticker
cinematic = new(src)
cinematic.icon = 'icons/effects/station_explosion.dmi'
cinematic.icon_state = "station_intact"
- cinematic.layer = 20
+ cinematic.layer = 100
+ cinematic.plane = PLANE_PLAYER_HUD
cinematic.mouse_opacity = 0
cinematic.screen_loc = "1,0"
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index bd54164aa0..6e9f040f5c 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -63,28 +63,28 @@ datum/hSB
var/mob/living/carbon/human/P = usr
if(P.wear_suit)
P.wear_suit.loc = P.loc
- P.wear_suit.layer = initial(P.wear_suit.layer)
+ P.wear_suit.reset_plane_and_layer()
P.wear_suit = null
P.wear_suit = new/obj/item/clothing/suit/space(P)
- P.wear_suit.layer = 20
+ P.wear_suit.hud_layerise()
if(P.head)
P.head.loc = P.loc
- P.head.layer = initial(P.head.layer)
+ P.head.reset_plane_and_layer()
P.head = null
P.head = new/obj/item/clothing/head/helmet/space(P)
- P.head.layer = 20
+ P.head.hud_layerise()
if(P.wear_mask)
P.wear_mask.loc = P.loc
- P.wear_mask.layer = initial(P.wear_mask.layer)
+ P.wear_mask.reset_plane_and_layer()
P.wear_mask = null
P.wear_mask = new/obj/item/clothing/mask/gas(P)
- P.wear_mask.layer = 20
+ P.wear_mask.hud_layerise()
if(P.back)
P.back.loc = P.loc
- P.back.layer = initial(P.back.layer)
+ P.back.reset_plane_and_layer()
P.back = null
P.back = new/obj/item/weapon/tank/jetpack(P)
- P.back.layer = 20
+ P.back.hud_layerise()
P.internal = P.back
if("hsbmetal")
var/obj/item/stack/sheet/hsb = new/obj/item/stack/sheet/metal
diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm
index 38c3cffb30..90577eaf64 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -23,6 +23,7 @@
occupant_message("[H.glasses] prevent you from using [src] [hud]")
else
H.glasses = hud
+ H.recalculate_vis()
return 1
else
return 0
@@ -32,6 +33,7 @@
var/mob/living/carbon/human/H = occupant
if(H.glasses == hud)
H.glasses = null
+ H.recalculate_vis()
..()
return
/*
@@ -63,7 +65,7 @@
name = "Integrated Medical Hud"
- process_hud(var/mob/M)
+// process_hud(var/mob/M) //TODO VIS
/*
world<< "view(M)"
for(var/mob/mob in view(M))
@@ -74,7 +76,7 @@
world<< "view(M.loc)"
for(var/mob/mob in view(M.loc))
world << "[mob]"
-*/
+
if(!M || M.stat || !(M in view(M))) return
if(!M.client) return
@@ -115,7 +117,7 @@
holder.icon_state = "hudhealthy"
C.images += holder
-
+*/
/obj/mecha/medical/odysseus/loaded/New()
..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/sleeper
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 71e5170852..4263c33941 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -258,7 +258,7 @@
// for items that can be placed in multiple slots
// note this isn't called during the initial dressing of a player
/obj/item/proc/equipped(var/mob/user, var/slot)
- layer = 20
+ hud_layerise()
if(user.client) user.client.screen |= src
if(user.pulling == src) user.stop_pulling()
return
diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm
index 078548ed3f..eb29aaff41 100644
--- a/code/game/objects/items/weapons/storage/storage.dm
+++ b/code/game/objects/items/weapons/storage/storage.dm
@@ -174,7 +174,7 @@
src.boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
for(var/obj/O in src.contents)
O.screen_loc = "[cx],[cy]"
- O.layer = 20
+ O.hud_layerise()
cx++
if (cx > mx)
cx = tx
@@ -192,7 +192,7 @@
for(var/datum/numbered_display/ND in display_contents)
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
ND.sample_object.maptext = "[(ND.number > 1)? "[ND.number]" : ""]"
- ND.sample_object.layer = 20
+ ND.sample_object.hud_layerise()
cx++
if (cx > (4+cols))
cx = 4
@@ -201,7 +201,7 @@
for(var/obj/O in contents)
O.screen_loc = "[cx]:16,[cy]:16"
O.maptext = ""
- O.layer = 20
+ O.hud_layerise()
cx++
if (cx > (4+cols))
cx = 4
@@ -252,7 +252,7 @@
O.screen_loc = "4:[round((startpoint+endpoint)/2)+2],2:16"
O.maptext = ""
- O.layer = 20
+ O.hud_layerise()
src.closer.screen_loc = "4:[storage_width+19],2:16"
return
@@ -395,9 +395,9 @@
if(ismob(loc))
W.dropped(usr)
if(ismob(new_location))
- W.layer = 20
+ W.hud_layerise()
else
- W.layer = initial(W.layer)
+ W.reset_plane_and_layer()
W.forceMove(new_location)
else
W.forceMove(get_turf(src))
@@ -546,41 +546,38 @@
src.boxes.master = src
src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 10,8"
- src.boxes.layer = 19
src.storage_start = new /obj/screen/storage( )
src.storage_start.name = "storage"
src.storage_start.master = src
src.storage_start.icon_state = "storage_start"
src.storage_start.screen_loc = "7,7 to 10,8"
- src.storage_start.layer = 19
+
src.storage_continue = new /obj/screen/storage( )
src.storage_continue.name = "storage"
src.storage_continue.master = src
src.storage_continue.icon_state = "storage_continue"
src.storage_continue.screen_loc = "7,7 to 10,8"
- src.storage_continue.layer = 19
+
src.storage_end = new /obj/screen/storage( )
src.storage_end.name = "storage"
src.storage_end.master = src
src.storage_end.icon_state = "storage_end"
src.storage_end.screen_loc = "7,7 to 10,8"
- src.storage_end.layer = 19
src.stored_start = new /obj //we just need these to hold the icon
src.stored_start.icon_state = "stored_start"
- src.stored_start.layer = 19
+
src.stored_continue = new /obj
src.stored_continue.icon_state = "stored_continue"
- src.stored_continue.layer = 19
+
src.stored_end = new /obj
src.stored_end.icon_state = "stored_end"
- src.stored_end.layer = 19
src.closer = new /obj/screen/close( )
src.closer.master = src
src.closer.icon_state = "storage_close"
- src.closer.layer = 20
+ src.closer.hud_layerise()
orient2hud()
return
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index ec1c46ed96..82a6d7fdfd 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -48,7 +48,7 @@
else
src.icon_state = "morgue3"
if(broadcast)
- broadcast_medical_hud_message("[src] was able to establish a mental interface with occupant.", src)
+ global_announcer.autosay("[src] was able to establish a mental interface with occupant.", "[src]", "Medical")
else
src.icon_state = "morgue1"
return
diff --git a/code/global.dm b/code/global.dm
index 70d4293e48..3437fcc008 100644
--- a/code/global.dm
+++ b/code/global.dm
@@ -10,8 +10,6 @@ var/global/list/machines = list() // TODO - Move into SSmachines
var/global/list/processing_objects = list()
var/global/list/processing_power_items = list() // TODO - Move into SSmachines
var/global/list/active_diseases = list()
-var/global/list/med_hud_users = list() // List of all entities using a medical HUD.
-var/global/list/sec_hud_users = list() // List of all entities using a security HUD.
var/global/list/hud_icon_reference = list()
@@ -199,4 +197,8 @@ var/max_explosion_range = 14
// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it.
var/global/obj/item/device/radio/intercom/global_announcer = new /obj/item/device/radio/intercom{channels=list("Engineering")}(null)
-var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian")
\ No newline at end of file
+var/list/station_departments = list("Command", "Medical", "Engineering", "Science", "Security", "Cargo", "Civilian")
+
+//Icons for in-game HUD glasses. Why don't we just share these a little bit?
+var/static/icon/ingame_hud = icon('icons/mob/hud.dmi')
+var/static/icon/ingame_hud_med = icon('icons/mob/hud_med.dmi')
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 5cc2b690f2..1d1af70551 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -60,6 +60,7 @@ var/list/admin_verbs_admin = list(
/client/proc/check_antagonists,
/client/proc/admin_memo, //admin memo system. show/delete/write. +SERVER needed to delete admin memos of others,
/client/proc/dsay, //talk in deadchat using our ckey/fakekey,
+ /client/proc/ghost_view, //let us see ghosts WHENEVERRRR
// /client/proc/toggle_hear_deadcast, //toggles whether we hear deadchat,
/client/proc/investigate_show, //various admintools for investigation. Such as a singulo grief-log,
/client/proc/secrets,
@@ -215,6 +216,7 @@ var/list/admin_verbs_debug = list(
/client/proc/jumptomob,
/client/proc/jumptocoord,
/client/proc/dsay,
+ /client/proc/ghost_view,
/client/proc/toggle_debug_logs,
/client/proc/admin_ghost, //allows us to ghost/reenter body at will,
/datum/admins/proc/view_runtimes,
@@ -329,6 +331,7 @@ var/list/admin_verbs_mod = list(
/datum/admins/proc/show_player_info,
/client/proc/player_panel_new,
/client/proc/dsay,
+ /client/proc/ghost_view,
/datum/admins/proc/show_skills,
/datum/admins/proc/show_player_panel,
/client/proc/check_antagonists,
@@ -353,6 +356,7 @@ var/list/admin_verbs_event_manager = list(
/client/proc/admin_ghost,
/datum/admins/proc/show_player_info,
/client/proc/dsay,
+ /client/proc/ghost_view,
/client/proc/cmd_admin_subtle_message,
/client/proc/debug_variables,
/client/proc/check_antagonists,
@@ -492,6 +496,23 @@ var/list/admin_verbs_event_manager = list(
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
feedback_add_details("admin_verb","O") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
+/client/proc/ghost_view()
+ set category = "Admin"
+ set name = "Ghost View"
+ set desc = "Toggles ability to see ghosts, even while in a mob."
+ if(!holder) return
+ if(!mob.plane_holder) return
+
+ var/choice = alert(src,"Do you want to see ghosts, or not?","Ghost viewing","Show 'em!","Cancel","Hide 'em!")
+ if(choice == "Cancel")
+ return
+
+ if(choice == "Show 'em!" && mob.plane_holder)
+ mob.plane_holder.set_vis(VIS_GHOSTS,TRUE)
+ to_chat(src,"Ghosts are now visible (while in this mob).")
+ else if(mob.plane_holder)
+ mob.plane_holder.set_vis(VIS_GHOSTS,FALSE)
+ to_chat(src,"Ghosts are now hidden (while in this mob).")
/client/proc/invisimin()
set name = "Invisimin"
diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm
index 9239f6385f..a57b17d15f 100644
--- a/code/modules/admin/verbs/buildmode.dm
+++ b/code/modules/admin/verbs/buildmode.dm
@@ -37,7 +37,8 @@
/obj/effect/bmode//Cleaning up the tree a bit
density = 1
anchored = 1
- layer = 20
+ layer = LAYER_HUD_BASE
+ plane = PLANE_PLAYER_HUD
dir = NORTH
icon = 'icons/misc/buildmode.dmi'
var/obj/effect/bmode/buildholder/master = null
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 2262a25834..9f31231957 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -11,6 +11,8 @@
var/flash_protection = FLASH_PROTECTION_NONE
var/tint = TINT_NONE
+ var/list/enables_planes //Enables these planes in the wearing mob's plane_holder
+ var/list/plane_slots //But only if it's equipped into this specific slot
/*
Sprites used when the clothing item is refit. This is done by setting icon_override.
@@ -37,6 +39,16 @@
var/obj/item/clothing/accessory/tie = new T(src)
src.attach_accessory(null, tie)
+/obj/item/clothing/equipped(var/mob/user,var/slot)
+ ..()
+ if(enables_planes)
+ user.recalculate_vis()
+
+/obj/item/clothing/dropped(var/mob/user)
+ ..()
+ if(enables_planes)
+ user.recalculate_vis()
+
//BS12: Species-restricted clothing check.
/obj/item/clothing/mob_can_equip(M as mob, slot)
diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm
index d0a90a86b5..31452ff50d 100644
--- a/code/modules/clothing/glasses/glasses.dm
+++ b/code/modules/clothing/glasses/glasses.dm
@@ -16,6 +16,7 @@ BLIND // can't see anything
icon = 'icons/obj/clothing/glasses.dmi'
w_class = ITEMSIZE_SMALL
slot_flags = SLOT_EYES
+ plane_slots = list(slot_glasses)
var/vision_flags = 0
var/darkness_view = 0//Base human is 2
var/see_invisible = -1
@@ -25,6 +26,7 @@ BLIND // can't see anything
var/active = 1
var/activation_sound = 'sound/items/goggles_charge.ogg'
var/obj/screen/overlay = null
+ var/list/away_planes //Holder for disabled planes
sprite_sheets = list(
"Teshari" = 'icons/mob/species/seromi/eyes.dmi',
@@ -44,6 +46,8 @@ BLIND // can't see anything
user.update_inv_glasses()
flash_protection = FLASH_PROTECTION_NONE
tint = TINT_NONE
+ away_planes = enables_planes
+ enables_planes = null
to_chat(usr, "You deactivate the optical matrix on the [src].")
else
active = 1
@@ -51,8 +55,11 @@ BLIND // can't see anything
user.update_inv_glasses()
flash_protection = initial(flash_protection)
tint = initial(tint)
+ enables_planes = away_planes
+ away_planes = null
to_chat(usr, "You activate the optical matrix on the [src].")
user.update_action_buttons()
+ user.recalculate_vis()
/obj/item/clothing/glasses/meson
name = "optical meson scanner"
@@ -63,6 +70,7 @@ BLIND // can't see anything
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
toggleable = 1
vision_flags = SEE_TURFS
+ enables_planes = (VIS_FULLBRIGHT)
/obj/item/clothing/glasses/meson/New()
..()
@@ -130,9 +138,9 @@ BLIND // can't see anything
darkness_view = 7
toggleable = 1
action_button_name = "Toggle Goggles"
- see_invisible = SEE_INVISIBLE_NOLIGHTING
off_state = "denight"
flash_protection = FLASH_PROTECTION_REDUCED
+ enables_planes = list(VIS_FULLBRIGHT)
/obj/item/clothing/glasses/night/vox
name = "Alien Optics"
@@ -316,12 +324,7 @@ BLIND // can't see anything
name = "\improper HUD sunglasses"
desc = "Sunglasses with a HUD."
icon_state = "sunSecHud"
- var/obj/item/clothing/glasses/hud/security/hud = null
-
- New()
- ..()
- src.hud = new/obj/item/clothing/glasses/hud/security(src)
- return
+ enables_planes = list(VIS_CH_ID,VIS_CH_WANTED,VIS_CH_IMPTRACK,VIS_CH_IMPLOYAL,VIS_CH_IMPCHEM)
/obj/item/clothing/glasses/sunglasses/sechud/tactical
name = "tactical HUD"
@@ -338,31 +341,22 @@ BLIND // can't see anything
toggleable = 1
activation_sound = 'sound/effects/pop.ogg'
- var/hud_holder
-
-/obj/item/clothing/glasses/sunglasses/sechud/aviator/New()
- ..()
- hud_holder = hud
-
-/obj/item/clothing/glasses/sunglasses/sechud/aviator/Destroy()
- qdel(hud_holder)
- hud_holder = null
- hud = null
- . = ..()
-
/obj/item/clothing/glasses/sunglasses/sechud/aviator/attack_self(mob/user)
if(toggleable && !user.incapacitated())
on = !on
if(on)
flash_protection = FLASH_PROTECTION_NONE
- src.hud = hud_holder
+ enables_planes = away_planes
+ away_planes = null
to_chat(usr, "You switch the [src] to HUD mode.")
else
flash_protection = initial(flash_protection)
- src.hud = null
+ away_planes = enables_planes
+ enables_planes = null
to_chat(usr, "You switch \the [src] to flash protection mode.")
update_icon()
user << activation_sound
+ user.recalculate_vis()
user.update_inv_glasses()
user.update_action_buttons()
@@ -381,12 +375,7 @@ BLIND // can't see anything
name = "\improper HUD sunglasses"
desc = "Sunglasses with a HUD."
icon_state = "sunMedHud"
- var/obj/item/clothing/glasses/hud/health/hud = null
-
-/obj/item/clothing/glasses/sunglasses/medhud/New()
- ..()
- src.hud = new/obj/item/clothing/glasses/hud/health(src)
- return
+ enables_planes = list(VIS_CH_STATUS,VIS_CH_HEALTH)
/obj/item/clothing/glasses/thermal
name = "optical thermal scanner"
@@ -397,7 +386,7 @@ BLIND // can't see anything
toggleable = 1
action_button_name = "Toggle Goggles"
vision_flags = SEE_MOBS
- see_invisible = SEE_INVISIBLE_NOLIGHTING
+ enables_planes = list(VIS_FULLBRIGHT)
flash_protection = FLASH_PROTECTION_REDUCED
emp_act(severity)
@@ -454,4 +443,4 @@ BLIND // can't see anything
name = "optical thermal implants"
desc = "A set of implantable lenses designed to augment your vision"
icon_state = "thermalimplants"
- item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses")
\ No newline at end of file
+ item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses")
diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm
index edd2db2168..fb4f491076 100644
--- a/code/modules/clothing/glasses/hud.dm
+++ b/code/modules/clothing/glasses/hud.dm
@@ -3,10 +3,6 @@
desc = "A heads-up display that provides important info in (almost) real time."
flags = 0 //doesn't protect eyes because it's a monocle, duh
origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 2)
- var/list/icon/current = list() //the current hud icons
-
- proc
- process_hud(var/mob/M) return
/obj/item/clothing/glasses/hud/health
name = "Health Scanner HUD"
@@ -14,6 +10,7 @@
icon_state = "healthhud"
item_state_slots = list(slot_r_hand_str = "headset", slot_l_hand_str = "headset")
body_parts_covered = 0
+ enables_planes = list(VIS_CH_STATUS,VIS_CH_HEALTH)
/obj/item/clothing/glasses/hud/health/prescription
name = "Prescription Health Scanner HUD"
@@ -22,16 +19,13 @@
icon_state = "healthhudpresc"
item_state_slots = list(slot_r_hand_str = "glasses", slot_l_hand_str = "glasses")
-/obj/item/clothing/glasses/hud/health/process_hud(var/mob/M)
- process_med_hud(M, 1)
-
/obj/item/clothing/glasses/hud/security
name = "Security HUD"
desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status and security records."
icon_state = "securityhud"
item_state_slots = list(slot_r_hand_str = "headset", slot_l_hand_str = "headset")
body_parts_covered = 0
- var/global/list/jobs[0]
+ enables_planes = list(VIS_CH_ID,VIS_CH_WANTED,VIS_CH_IMPTRACK,VIS_CH_IMPLOYAL,VIS_CH_IMPCHEM)
/obj/item/clothing/glasses/hud/security/prescription
name = "Prescription Security HUD"
@@ -47,6 +41,3 @@
item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses")
vision_flags = SEE_MOBS
see_invisible = SEE_INVISIBLE_NOLIGHTING
-
-/obj/item/clothing/glasses/hud/security/process_hud(var/mob/M)
- process_sec_hud(M, 1)
diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm
index e02f976281..3fd160ee5a 100644
--- a/code/modules/lighting/lighting_overlay.dm
+++ b/code/modules/lighting/lighting_overlay.dm
@@ -6,7 +6,8 @@
anchored = 1
icon = LIGHTING_ICON
layer = LIGHTING_LAYER
- invisibility = INVISIBILITY_LIGHTING
+ plane = PLANE_LIGHTING
+ //invisibility = INVISIBILITY_LIGHTING
color = LIGHTING_BASE_MATRIX
icon_state = "light1"
auto_init = 0 // doesn't need special init
diff --git a/code/modules/mob/dead/observer/login.dm b/code/modules/mob/dead/observer/login.dm
index 73605d1328..d3d65faa31 100644
--- a/code/modules/mob/dead/observer/login.dm
+++ b/code/modules/mob/dead/observer/login.dm
@@ -1,5 +1,7 @@
+//Nobody here anymore.
/mob/observer/dead/Login()
- ..()
- if (ghostimage)
- ghostimage.icon_state = src.icon_state
- updateghostimages()
+ ..() //Creates the plane_holder lazily
+ plane_holder.set_vis(VIS_GHOSTS, ghostvision)
+ plane_holder.set_vis(VIS_FULLBRIGHT, !seedarkness)
+ plane_holder.set_vis(VIS_AI_EYE, TRUE)
+ plane = PLANE_GHOSTS
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index efe3981e25..ac28f40d6c 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -1,6 +1,3 @@
-var/global/list/image/ghost_darkness_images = list() //this is a list of images for things ghosts should still be able to see when they toggle darkness
-var/global/list/image/ghost_sightless_images = list() //this is a list of images for things ghosts should still be able to see even without ghost sight
-
/mob/observer
name = "observer"
desc = "This shouldn't appear"
@@ -12,11 +9,12 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
icon = 'icons/mob/ghost.dmi'
icon_state = "ghost"
layer = 3.9 //Just below normal mobs
+ plane = PLANE_GHOSTS
+ alpha = 127
stat = DEAD
canmove = 0
blinded = 0
anchored = 1 // don't get pushed around
- invisibility = INVISIBILITY_OBSERVER
var/can_reenter_corpse
var/datum/hud/living/carbon/hud = null // hud
var/bootime = 0
@@ -30,9 +28,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
var/atom/movable/following = null
var/admin_ghosted = 0
var/anonsay = 0
- var/image/ghostimage = null //this mobs ghost image, for deleting and stuff
var/ghostvision = 1 //is the ghost able to see things humans can't?
-// var/seedarkness = 1
incorporeal_move = 1
var/is_manifest = 0 //If set to 1, the ghost is able to whisper. Usually only set if a cultist drags them through the veil.
@@ -92,15 +88,12 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
/mob/observer/dead/New(mob/body)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
see_invisible = SEE_INVISIBLE_OBSERVER
- see_in_dark = 100
+ see_in_dark = world.view //I mean. I don't even know if byond has occlusion culling... but...
+ plane = PLANE_GHOSTS //Why doesn't the var above work...???
verbs += /mob/observer/dead/proc/dead_tele
stat = DEAD
- ghostimage = image(src.icon,src,src.icon_state)
- ghost_darkness_images |= ghostimage
- updateallghostimages()
-
var/turf/T
if(ismob(body))
T = get_turf(body) //Where is the body located?
@@ -115,8 +108,6 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
icon_state = body.icon_state
overlays = body.overlays
- alpha = 127
-
gender = body.gender
if(body.mind && body.mind.name)
name = body.mind.name
@@ -139,22 +130,12 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
real_name = name
..()
-/mob/observer/dead/Destroy()
- if (ghostimage)
- ghost_darkness_images -= ghostimage
- qdel(ghostimage)
- ghostimage = null
- updateallghostimages()
- return ..()
-
/mob/observer/dead/Topic(href, href_list)
if (href_list["track"])
var/mob/target = locate(href_list["track"]) in mob_list
if(target)
ManualFollow(target)
-
-
/mob/observer/dead/attackby(obj/item/W, mob/user)
if(istype(W,/obj/item/weapon/book/tome))
var/mob/observer/dead/M = src
@@ -174,31 +155,6 @@ Works together with spawning an observer, noted above.
handle_regular_hud_updates()
- if(antagHUD)
- var/list/target_list = list()
- for(var/mob/living/target in oview(src, 14))
- if(target.mind && target.mind.special_role)
- target_list += target
- if(target_list.len)
- assess_targets(target_list, src)
- if(medHUD)
- process_medHUD(src)
-
-
-/mob/observer/dead/proc/process_medHUD(var/mob/M)
- var/client/C = M.client
- for(var/mob/living/carbon/human/patient in oview(M, 14))
- C.images += patient.hud_list[HEALTH_HUD]
- C.images += patient.hud_list[STATUS_HUD_OOC]
-
-/mob/observer/dead/proc/assess_targets(list/target_list, mob/observer/dead/U)
- var/client/C = U.client
- for(var/mob/living/carbon/human/target in target_list)
- C.images += target.hud_list[SPECIALROLE_HUD]
- for(var/mob/living/silicon/target in target_list)
- C.images += target.hud_list[SPECIALROLE_HUD]
- return 1
-
/mob/proc/ghostize(var/can_reenter_corpse = 1)
if(key)
if(ishuman(src))
@@ -305,41 +261,33 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set category = "Ghost"
set name = "Toggle MedicHUD"
set desc = "Toggles Medical HUD allowing you to see how everyone is doing"
- if(!client)
- return
- if(medHUD)
- medHUD = 0
- src << "Medical HUD Disabled"
- else
- medHUD = 1
- src << "Medical HUD Enabled"
+
+ medHUD = !medHUD
+ plane_holder.set_vis(VIS_CH_HEALTH, medHUD)
+ plane_holder.set_vis(VIS_CH_STATUS_OOC, medHUD)
+ to_chat(src,"Medical HUD [medHUD ? "Enabled" : "Disabled"]")
/mob/observer/dead/verb/toggle_antagHUD()
set category = "Ghost"
set name = "Toggle AntagHUD"
set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
- if(!client)
- return
if(!config.antag_hud_allowed && !client.holder)
src << "Admins have disabled this for this round."
return
- var/mob/observer/dead/M = src
- if(jobban_isbanned(M, "AntagHUD"))
+ if(jobban_isbanned(src, "AntagHUD"))
src << "You have been banned from using this feature"
return
- if(config.antag_hud_restricted && !M.has_enabled_antagHUD && !client.holder)
+ if(config.antag_hud_restricted && !has_enabled_antagHUD && !client.holder)
var/response = alert(src, "If you turn this on, you will not be able to take any part in the round.","Are you sure you want to turn this feature on?","Yes","No")
if(response == "No") return
- M.can_reenter_corpse = 0
- if(!M.has_enabled_antagHUD && !client.holder)
- M.has_enabled_antagHUD = 1
- if(M.antagHUD)
- M.antagHUD = 0
- src << "AntagHUD Disabled"
- else
- M.antagHUD = 1
- src << "AntagHUD Enabled"
+ can_reenter_corpse = FALSE
+ if(!has_enabled_antagHUD && !client.holder)
+ has_enabled_antagHUD = TRUE
+
+ antagHUD = !antagHUD
+ plane_holder.set_vis(VIS_CH_SPECIAL, antagHUD)
+ to_chat(src,"AntagHUD [antagHUD ? "Enabled" : "Disabled"]")
/mob/observer/dead/proc/dead_tele(var/area/A in return_sorted_areas())
set category = "Ghost"
@@ -433,7 +381,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
if(check_rights(R_ADMIN|R_FUN, 0, src))
return 0
- return (T && T.holy) && (invisibility <= SEE_INVISIBLE_LIVING || (mind in cult.current_antagonists))
+ return (T && T.holy) && (is_manifest || (mind in cult.current_antagonists))
/mob/observer/dead/verb/jumptomob(target in getmobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost"
@@ -665,18 +613,16 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return 1
/mob/observer/dead/proc/manifest(mob/user)
- is_manifest = 0
- if(!is_manifest)
- is_manifest = 1
- verbs += /mob/observer/dead/proc/toggle_visibility
- verbs += /mob/observer/dead/proc/ghost_whisper
- src << "As you are now in the realm of the living, you can whisper to the living with the Spectral Whisper verb, inside the IC tab."
- if(src.invisibility != 0)
+ is_manifest = TRUE
+ verbs |= /mob/observer/dead/proc/toggle_visibility
+ verbs |= /mob/observer/dead/proc/ghost_whisper
+ to_chat(src,"As you are now in the realm of the living, you can whisper to the living with the Spectral Whisper verb, inside the IC tab.")
+ if(plane != PLANE_WORLD)
user.visible_message( \
"\The [user] drags ghost, [src], to our plane of reality!", \
"You drag [src] to our plane of reality!" \
)
- toggle_visibility(1)
+ toggle_visibility(TRUE)
else
user.visible_message ( \
"\The [user] just tried to smash \his book into that ghost! It's not very effective.", \
@@ -703,17 +649,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set desc = "Allows you to turn (in)visible (almost) at will."
var/toggled_invisible
- if(!forced && invisibility && world.time < toggled_invisible + 600)
+ if(!forced && plane == PLANE_GHOSTS && world.time < toggled_invisible + 600)
src << "You must gather strength before you can turn visible again..."
return
- if(invisibility == 0)
+ if(plane == PLANE_WORLD)
toggled_invisible = world.time
visible_message("It fades from sight...", "You are now invisible.")
else
src << "You are now visible!"
- invisibility = invisibility == INVISIBILITY_OBSERVER ? 0 : INVISIBILITY_OBSERVER
+ plane = PLANE_GHOSTS ? PLANE_WORLD : PLANE_GHOSTS
+
// Give the ghost a cult icon which should be visible only to itself
toggle_icon("cult")
@@ -738,41 +685,21 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set name = "Toggle Ghost Vision"
set desc = "Toggles your ability to see things only ghosts can see, like other ghosts"
set category = "Ghost"
- ghostvision = !(ghostvision)
+ ghostvision = !ghostvision
updateghostsight()
- usr << "You [(ghostvision?"now":"no longer")] have ghost vision."
+ to_chat(src,"You [ghostvision ? "now" : "no longer"] have ghost vision.")
/mob/observer/dead/verb/toggle_darkness()
set name = "Toggle Darkness"
+ set desc = "Toggles your ability to see lighting overlays, and the darkness they create."
set category = "Ghost"
- seedarkness = !(seedarkness)
+ seedarkness = !seedarkness
updateghostsight()
+ to_chat(src,"You [seedarkness ? "now" : "no longer"] see darkness.")
/mob/observer/dead/proc/updateghostsight()
- if (!seedarkness)
- see_invisible = SEE_INVISIBLE_NOLIGHTING
- else
- see_invisible = SEE_INVISIBLE_OBSERVER
- if (!ghostvision)
- see_invisible = SEE_INVISIBLE_LIVING;
- updateghostimages()
-
-/proc/updateallghostimages()
- for (var/mob/observer/dead/O in player_list)
- O.updateghostimages()
-
-/mob/observer/dead/proc/updateghostimages()
- if (!client)
- return
- if (seedarkness || !ghostvision)
- client.images -= ghost_darkness_images
- client.images |= ghost_sightless_images
- else
- //add images for the 60inv things ghosts can normally see when darkness is enabled so they can see them now
- client.images -= ghost_sightless_images
- client.images |= ghost_darkness_images
- if (ghostimage)
- client.images -= ghostimage //remove ourself
+ plane_holder.set_vis(VIS_FULLBRIGHT, !seedarkness) //Inversion, because "not seeing" the darkness is "seeing" the lighting plane master.
+ plane_holder.set_vis(VIS_GHOSTS, ghostvision)
mob/observer/dead/MayRespawn(var/feedback = 0)
if(!client)
diff --git a/code/modules/mob/freelook/eye.dm b/code/modules/mob/freelook/eye.dm
index ff8681d128..85cfc736c9 100644
--- a/code/modules/mob/freelook/eye.dm
+++ b/code/modules/mob/freelook/eye.dm
@@ -16,7 +16,7 @@
see_in_dark = 7
status_flags = GODMODE
- invisibility = INVISIBILITY_EYE
+ plane = PLANE_AI_EYE
var/mob/owner = null
var/list/visibleChunks = list()
@@ -24,20 +24,7 @@
var/ghostimage = null
var/datum/visualnet/visualnet
-/mob/observer/eye/New()
- ghostimage = image(src.icon,src,src.icon_state)
- ghost_darkness_images |= ghostimage //so ghosts can see the eye when they disable darkness
- ghost_sightless_images |= ghostimage //so ghosts can see the eye when they disable ghost sight
- updateallghostimages()
- ..()
-
-mob/observer/eye/Destroy()
- if (ghostimage)
- ghost_darkness_images -= ghostimage
- ghost_sightless_images -= ghostimage
- qdel(ghostimage)
- ghostimage = null
- updateallghostimages()
+/mob/observer/eye/Destroy()
if(owner)
if(owner.eyeobj == src)
owner.eyeobj = null
diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm
index bc75344484..d4fbecf481 100644
--- a/code/modules/mob/inventory.dm
+++ b/code/modules/mob/inventory.dm
@@ -122,7 +122,7 @@ var/list/slot_equipment_priority = list( \
if(!W)
return 0
W.forceMove(get_turf(src))
- W.layer = initial(W.layer)
+ W.reset_plane_and_layer()
W.dropped()
return 0
@@ -198,7 +198,7 @@ var/list/slot_equipment_priority = list( \
src.u_equip(O)
if (src.client)
src.client.screen -= O
- O.layer = initial(O.layer)
+ O.reset_plane_and_layer()
O.screen_loc = null
if(istype(O, /obj/item))
var/obj/item/I = O
diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm
index 7812115e76..29e9cd0a9b 100644
--- a/code/modules/mob/living/bot/medbot.dm
+++ b/code/modules/mob/living/bot/medbot.dm
@@ -87,7 +87,7 @@
visible_message("[src] is trying to inject [H]!")
if(declare_treatment)
var/area/location = get_area(src)
- broadcast_medical_hud_message("[src] is treating [H] in [location]", src)
+ global_announcer.autosay("[src] is treating [H] in [location]", "[src]", "Medical")
busy = 1
update_icons()
if(do_mob(src, H, 30))
diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm
index 608bb81c29..843e83d9c0 100644
--- a/code/modules/mob/living/bot/secbot.dm
+++ b/code/modules/mob/living/bot/secbot.dm
@@ -153,7 +153,7 @@
/mob/living/bot/secbot/proc/react_to_attack(mob/attacker)
if(!target)
playsound(src.loc, pick(threat_found_sounds), 50)
- broadcast_security_hud_message("[src] was attacked by a hostile [target_name(attacker)] in [get_area(src)].", src)
+ global_announcer.autosay("[src] was attacked by a hostile [target_name(attacker)] in [get_area(src)].", "[src]", "Security")
target = attacker
awaiting_surrender = INFINITY // Don't try and wait for surrender
@@ -161,7 +161,7 @@
/mob/living/bot/secbot/proc/demand_surrender(mob/target, var/threat)
var/suspect_name = target_name(target)
if(declare_arrests)
- broadcast_security_hud_message("[src] is [arrest_type ? "detaining" : "arresting"] a level [threat] suspect [suspect_name] in [get_area(src)].", src)
+ global_announcer.autosay("[src] is [arrest_type ? "detaining" : "arresting"] a level [threat] suspect [suspect_name] in [get_area(src)].", "[src]", "Security")
say("Down on the floor, [suspect_name]! You have [SECBOT_WAIT_TIME] seconds to comply.")
playsound(src.loc, pick(preparing_arrest_sounds), 50)
// Register to be told when the target moves
@@ -214,7 +214,7 @@
var/action = arrest_type ? "detaining" : "arresting"
if(istype(target, /mob/living/simple_animal))
action = "fighting"
- broadcast_security_hud_message("[src] is [action] a level [threat] [action != "fighting" ? "suspect" : "threat"] [target_name(target)] in [get_area(src)].", src)
+ global_announcer.autosay("[src] is [action] a level [threat] [action != "fighting" ? "suspect" : "threat"] [target_name(target)] in [get_area(src)].", "[src]", "Security")
UnarmedAttack(target)
// So Beepsky talks while beating up simple mobs.
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 75d4fcf836..68ef935806 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -37,26 +37,7 @@
nutrition = rand(200,400)
- hud_list[HEALTH_HUD] = new /image/hud_overlay('icons/mob/hud_med.dmi', src, "100")
- if(isSynthetic())
- hud_list[STATUS_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudrobo")
- hud_list[LIFE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudrobo")
- else
- hud_list[STATUS_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealthy")
- hud_list[LIFE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealthy")
- //VOREStation Add - Custom HUDs
- hud_list[HEALTH_VR_HUD] = new /image/hud_overlay('icons/mob/hud_med_vr.dmi', src, "100")
- hud_list[STATUS_R_HUD] = new /image/hud_overlay('icons/mob/hud_vr.dmi', src, "hudhealthy")
- hud_list[BACKUP_HUD] = new /image/hud_overlay('icons/mob/hud_vr.dmi', src, "hudblank")
- hud_list[VANTAG_HUD] = new /image/hud_overlay('icons/mob/hud_vr.dmi', src, "hudblank")
- //VOREStation Add End
- hud_list[ID_HUD] = new /image/hud_overlay(using_map.id_hud_icons, src, "hudunknown")
- hud_list[WANTED_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[IMPLOYAL_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[IMPCHEM_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[IMPTRACK_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[SPECIALROLE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[STATUS_HUD_OOC] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealthy")
+ make_hud_overlays()
human_mob_list |= src
..()
diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm
index f5710c1f3e..e474610512 100644
--- a/code/modules/mob/living/carbon/human/human_defines.dm
+++ b/code/modules/mob/living/carbon/human/human_defines.dm
@@ -76,6 +76,7 @@
var/icon/stand_icon = null
var/icon/lying_icon = null
+ var/icon/hud_icon = null
var/voice = "" //Instead of new say code calling GetVoice() over and over and over, we're just going to ask this variable, which gets updated in Life()
@@ -106,6 +107,8 @@
can_be_antagged = TRUE
+ var/has_huds = TRUE //Do they have all the fancy life huds? Not for mannequins.
+
// Used by mobs in virtual reality to point back to the "real" mob the client belongs to.
var/mob/living/carbon/human/vr_holder = null
// Used by "real" mobs after they leave a VR session
diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm
index cb49001d3c..9e1497bb06 100644
--- a/code/modules/mob/living/carbon/human/human_helpers.dm
+++ b/code/modules/mob/living/carbon/human/human_helpers.dm
@@ -108,6 +108,58 @@
return FBP_NONE
+/mob/living/carbon/human/proc/make_hud_overlays()
+ hud_list[HEALTH_HUD] = gen_hud_image(ingame_hud_med, src, "100", plane = PLANE_CH_HEALTH)
+ if(isSynthetic())
+ hud_list[STATUS_HUD] = gen_hud_image(ingame_hud, src, "hudrobo", plane = PLANE_CH_STATUS)
+ hud_list[LIFE_HUD] = gen_hud_image(ingame_hud, src, "hudrobo", plane = PLANE_CH_LIFE)
+ else
+ hud_list[STATUS_HUD] = gen_hud_image(ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS)
+ hud_list[LIFE_HUD] = gen_hud_image(ingame_hud, src, "hudhealthy", plane = PLANE_CH_LIFE)
+ hud_list[ID_HUD] = gen_hud_image(using_map.id_hud_icons, src, "hudunknown", plane = PLANE_CH_ID)
+ hud_list[WANTED_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_WANTED)
+ hud_list[IMPLOYAL_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_IMPLOYAL)
+ hud_list[IMPCHEM_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_IMPCHEM)
+ hud_list[IMPTRACK_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_IMPTRACK)
+ hud_list[SPECIALROLE_HUD] = gen_hud_image(ingame_hud, src, "hudblank", plane = PLANE_CH_SPECIAL)
+ hud_list[STATUS_HUD_OOC] = gen_hud_image(ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS_OOC)
+
+/mob/living/carbon/human/recalculate_vis()
+ if(!vis_enabled || !plane_holder)
+ return
+
+ //These things are allowed to add vision flags.
+ //If you code some crazy item that goes on your feet that lets you see ghosts, you need to add a slot here.
+ var/tmp/list/slots = list(slot_glasses,slot_head)
+ var/tmp/list/compiled_vis = list()
+
+ for(var/slot in slots)
+ var/obj/item/clothing/O = get_equipped_item(slot) //Change this type if you move the vision stuff to item or something.
+ if(O && O.enables_planes && (slot in O.plane_slots))
+ compiled_vis |= O.enables_planes
+
+ //VOREStation Add - NIF Support
+ if(nif)
+ compiled_vis |= nif.planes_visible
+ //VOREStation Add End
+
+ if(!compiled_vis.len && !vis_enabled.len)
+ return //Nothin' doin'.
+
+ var/tmp/list/oddities = vis_enabled ^ compiled_vis
+ if(!oddities.len)
+ return //Same thing in both lists!
+
+ var/tmp/list/to_enable = oddities - vis_enabled
+ var/tmp/list/to_disable = oddities - compiled_vis
+
+ for(var/vis in to_enable)
+ plane_holder.set_vis(vis,TRUE)
+ vis_enabled += vis
+ for(var/vis in to_disable)
+ plane_holder.set_vis(vis,FALSE)
+ vis_enabled -= vis
+
#undef HUMAN_EATING_NO_ISSUE
#undef HUMAN_EATING_NO_MOUTH
#undef HUMAN_EATING_BLOCKED_MOUTH
diff --git a/code/modules/mob/living/carbon/human/human_species.dm b/code/modules/mob/living/carbon/human/human_species.dm
index 34a864bf27..8b828900d1 100644
--- a/code/modules/mob/living/carbon/human/human_species.dm
+++ b/code/modules/mob/living/carbon/human/human_species.dm
@@ -1,6 +1,7 @@
/mob/living/carbon/human/dummy
real_name = "Test Dummy"
status_flags = GODMODE|CANPUSH
+ has_huds = FALSE
/mob/living/carbon/human/dummy/mannequin/New()
..()
diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm
index 149c1831f6..d8aeeb2011 100644
--- a/code/modules/mob/living/carbon/human/inventory.dm
+++ b/code/modules/mob/living/carbon/human/inventory.dm
@@ -231,7 +231,7 @@ This saves us from having to call add_fingerprint() any time something is put in
var/obj/item/clothing/ears/offear/O = new(W)
O.loc = src
src.r_ear = O
- O.layer = 20
+ O.hud_layerise()
W.equipped(src, slot)
update_inv_ears(redraw_mob)
if(slot_r_ear)
@@ -240,7 +240,7 @@ This saves us from having to call add_fingerprint() any time something is put in
var/obj/item/clothing/ears/offear/O = new(W)
O.loc = src
src.l_ear = O
- O.layer = 20
+ O.hud_layerise()
W.equipped(src, slot)
update_inv_ears(redraw_mob)
if(slot_glasses)
@@ -303,7 +303,7 @@ This saves us from having to call add_fingerprint() any time something is put in
src.r_hand = null
update_inv_r_hand()
- W.layer = 20
+ W.hud_layerise()
if(W.action_button_name)
update_action_buttons()
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 62da393427..56f07b2bc6 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -1217,6 +1217,7 @@
var/mutable_appearance/healths_ma = new(healths)
healths_ma.icon_state = "blank"
healths_ma.overlays = null
+ healths_ma.plane = PLANE_PLAYER_HUD
var/no_damage = 1
var/trauma_val = 0 // Used in calculating softcrit/hardcrit indicators.
@@ -1382,29 +1383,13 @@
client.screen |= G.overlay
if(G.vision_flags)
sight |= G.vision_flags
- if(!druggy && !seer)
- see_invisible = SEE_INVISIBLE_MINIMUM
- if(G.see_invisible >= 0)
- see_invisible = G.see_invisible
if(istype(G,/obj/item/clothing/glasses/night) && !seer)
see_invisible = SEE_INVISIBLE_MINIMUM
-/* HUD shit goes here, as long as it doesn't modify sight flags */
-// The purpose of this is to stop xray and w/e from preventing you from using huds -- Love, Doohl
- var/obj/item/clothing/glasses/hud/O = G
- //VOREStation Add - Support for omnihud glasses
- if(istype(G, /obj/item/clothing/glasses/omnihud))
- var/obj/item/clothing/glasses/omnihud/S = G
- O = S.hud
- //VOREStation Add End
- else if(istype(G, /obj/item/clothing/glasses/sunglasses/sechud)) //VOREStation Edit - Added else
- var/obj/item/clothing/glasses/sunglasses/sechud/S = G
- O = S.hud
- else if(istype(G, /obj/item/clothing/glasses/sunglasses/medhud)) //VOREStation Edit - Added else
- var/obj/item/clothing/glasses/sunglasses/medhud/M = G
- O = M.hud
- if(istype(O))
- O.process_hud(src)
- if(!druggy && !seer) see_invisible = SEE_INVISIBLE_LIVING
+
+ if(G.see_invisible >= 0)
+ see_invisible = G.see_invisible
+ else if(!druggy && !seer)
+ see_invisible = SEE_INVISIBLE_LIVING
/mob/living/carbon/human/handle_random_events()
if(inStasisNow())
@@ -1733,6 +1718,7 @@
hud_list[SPECIALROLE_HUD] = holder
attempt_vr(src,"handle_hud_list_vr",list()) //VOREStation Add - Custom HUDs.
hud_updateflag = 0
+ update_icons()
/mob/living/carbon/human/handle_stunned()
if(!can_feel_pain())
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index 4e01f7ef88..ff85255bd3 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -152,14 +152,20 @@ Please contact me on #coderbus IRC. ~Carn x
update_hud() //TODO: remove the need for this
overlays.Cut()
- if (icon_update)
- icon = stand_icon
- for(var/entry in overlays_standing)
- if(istype(entry, /image))
- overlays += entry
- else if(istype(entry, /list))
- for(var/inner_entry in entry)
- overlays += inner_entry
+ icon = icon('icons/effects/effects.dmi', "icon_state"="nothing")
+ if(has_huds)
+ for(var/I in hud_list)
+ overlays += I
+ overlays += backplane
+
+ overlays += stand_icon
+ for(var/entry in overlays_standing)
+ if(istype(entry, /image))
+ overlays += entry
+ else if(istype(entry, /list))
+ for(var/inner_entry in entry)
+ overlays += inner_entry
+
if(species && species.has_floating_eyes)
overlays |= species.get_eyes(src)
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 77811b255d..9dffa31fd0 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -172,16 +172,6 @@ var/list/ai_verbs_default = list(
spawn(5)
new /obj/machinery/ai_powersupply(src)
- hud_list[HEALTH_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[STATUS_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[LIFE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[ID_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[WANTED_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[IMPLOYAL_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[IMPCHEM_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[IMPTRACK_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[SPECIALROLE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
-
ai_list += src
..()
return
diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm
index 5c6b617a7b..413cf49250 100644
--- a/code/modules/mob/living/silicon/ai/life.dm
+++ b/code/modules/mob/living/silicon/ai/life.dm
@@ -150,11 +150,6 @@
process_queued_alarms()
handle_regular_hud_updates()
- switch(src.sensor_mode)
- if (SEC_HUD)
- process_sec_hud(src,0,src.eyeobj)
- if (MED_HUD)
- process_med_hud(src,0,src.eyeobj)
/mob/living/silicon/ai/proc/lacks_power()
if(APU_power)
diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm
index f012f7f6ab..92e430b6a5 100644
--- a/code/modules/mob/living/silicon/pai/life.dm
+++ b/code/modules/mob/living/silicon/pai/life.dm
@@ -15,12 +15,6 @@
handle_regular_hud_updates()
- if(src.secHUD == 1)
- process_sec_hud(src, 1)
-
- if(src.medHUD == 1)
- process_med_hud(src, 1)
-
if(silence_time)
if(world.timeofday >= silence_time)
silence_time = null
@@ -31,7 +25,7 @@
if(health <= 0)
death(null,"gives one shrill beep before falling lifeless.")
-
+
/mob/living/silicon/pai/updatehealth()
if(status_flags & GODMODE)
diff --git a/code/modules/mob/living/silicon/robot/inventory.dm b/code/modules/mob/living/silicon/robot/inventory.dm
index d8298e605f..fd8164b01c 100644
--- a/code/modules/mob/living/silicon/robot/inventory.dm
+++ b/code/modules/mob/living/silicon/robot/inventory.dm
@@ -231,21 +231,21 @@
return
if(!module_state_1)
module_state_1 = O
- O.layer = 20
+ O.hud_layerise()
O.screen_loc = inv1.screen_loc
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode
else if(!module_state_2)
module_state_2 = O
- O.layer = 20
+ O.hud_layerise()
O.screen_loc = inv2.screen_loc
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
sight_mode |= module_state_2:sight_mode
else if(!module_state_3)
module_state_3 = O
- O.layer = 20
+ O.hud_layerise()
O.screen_loc = inv3.screen_loc
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index 426220b4ae..ad9767787e 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -191,16 +191,6 @@
..()
- var/obj/item/borg/sight/hud/hud = (locate(/obj/item/borg/sight/hud) in src)
- if(hud && hud.hud)
- hud.hud.process_hud(src)
- else
- switch(src.sensor_mode)
- if (SEC_HUD)
- process_sec_hud(src,0)
- if (MED_HUD)
- process_med_hud(src,0)
-
if (src.healths)
if (src.stat != 2)
if(istype(src,/mob/living/silicon/robot/drone))
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index c12975eb3d..c1bba5db1d 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -109,7 +109,6 @@
robot_modules_background = new()
robot_modules_background.icon_state = "block"
- robot_modules_background.layer = 19 //Objects that appear on screen are on layer 20, UI should be just below it.
ident = rand(1, 999)
module_sprites["Basic"] = "robot"
icontype = "Basic"
@@ -151,15 +150,15 @@
add_robot_verbs()
- hud_list[HEALTH_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[STATUS_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealth100")
- hud_list[LIFE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealth100")
- hud_list[ID_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[WANTED_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[IMPLOYAL_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[IMPCHEM_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[IMPTRACK_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
- hud_list[SPECIALROLE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank")
+ hud_list[HEALTH_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_HEALTH)
+ hud_list[STATUS_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudhealth100", plane = PLANE_CH_STATUS)
+ hud_list[LIFE_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudhealth100", plane = PLANE_CH_LIFE)
+ hud_list[ID_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_ID)
+ hud_list[WANTED_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_WANTED)
+ hud_list[IMPLOYAL_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_IMPLOYAL)
+ hud_list[IMPCHEM_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_IMPCHEM)
+ hud_list[IMPTRACK_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_IMPTRACK)
+ hud_list[SPECIALROLE_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_SPECIAL)
/mob/living/silicon/robot/proc/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
@@ -812,19 +811,19 @@
return 1
if(!module_state_1)
module_state_1 = O
- O.layer = 20
+ O.hud_layerise()
contents += O
if(istype(module_state_1,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode
else if(!module_state_2)
module_state_2 = O
- O.layer = 20
+ O.hud_layerise()
contents += O
if(istype(module_state_2,/obj/item/borg/sight))
sight_mode |= module_state_2:sight_mode
else if(!module_state_3)
module_state_3 = O
- O.layer = 20
+ O.hud_layerise()
contents += O
if(istype(module_state_3,/obj/item/borg/sight))
sight_mode |= module_state_3:sight_mode
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index 84aa81af69..f1554b59a7 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -18,8 +18,6 @@
var/obj/item/device/camera/siliconcam/aiCamera = null //photography
var/local_transmit //If set, can only speak to others of the same type within a short range.
- var/sensor_mode = 0 //Determines the current HUD.
-
var/next_alarm_notice
var/list/datum/alarm/queued_alarms = new()
@@ -238,17 +236,49 @@
return
/mob/living/silicon/proc/toggle_sensor_mode()
- var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security", "Medical","Disable")
+ var/sensor_type = input("Please select sensor type.", "Sensor Integration", null) in list("Security","Medical","Disable")
switch(sensor_type)
if ("Security")
- sensor_mode = SEC_HUD
- src << "Security records overlay enabled."
+ if(plane_holder)
+ //Enable Security planes
+ plane_holder.set_vis(VIS_CH_ID,TRUE)
+ plane_holder.set_vis(VIS_CH_WANTED,TRUE)
+ plane_holder.set_vis(VIS_CH_IMPLOYAL,TRUE)
+ plane_holder.set_vis(VIS_CH_IMPTRACK,TRUE)
+ plane_holder.set_vis(VIS_CH_IMPCHEM,TRUE)
+
+ //Disable Medical planes
+ plane_holder.set_vis(VIS_CH_STATUS,FALSE)
+ plane_holder.set_vis(VIS_CH_HEALTH,FALSE)
+
+ to_chat(src,"Security records overlay enabled.")
if ("Medical")
- sensor_mode = MED_HUD
- src << "Life signs monitor overlay enabled."
+ if(plane_holder)
+ //Disable Security planes
+ plane_holder.set_vis(VIS_CH_ID,FALSE)
+ plane_holder.set_vis(VIS_CH_WANTED,FALSE)
+ plane_holder.set_vis(VIS_CH_IMPLOYAL,FALSE)
+ plane_holder.set_vis(VIS_CH_IMPTRACK,FALSE)
+ plane_holder.set_vis(VIS_CH_IMPCHEM,FALSE)
+
+ //Enable Medical planes
+ plane_holder.set_vis(VIS_CH_STATUS,TRUE)
+ plane_holder.set_vis(VIS_CH_HEALTH,TRUE)
+
+ to_chat(src,"Life signs monitor overlay enabled.")
if ("Disable")
- sensor_mode = 0
- src << "Sensor augmentations disabled."
+ if(plane_holder)
+ //Disable Security planes
+ plane_holder.set_vis(VIS_CH_ID,FALSE)
+ plane_holder.set_vis(VIS_CH_WANTED,FALSE)
+ plane_holder.set_vis(VIS_CH_IMPLOYAL,FALSE)
+ plane_holder.set_vis(VIS_CH_IMPTRACK,FALSE)
+ plane_holder.set_vis(VIS_CH_IMPCHEM,FALSE)
+
+ //Disable Medical planes
+ plane_holder.set_vis(VIS_CH_STATUS,FALSE)
+ plane_holder.set_vis(VIS_CH_HEALTH,FALSE)
+ to_chat(src,"Sensor augmentations disabled.")
/mob/living/silicon/verb/pose()
set name = "Set Pose"
diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm
index 9a0fa7ba9b..a79dbd4362 100644
--- a/code/modules/mob/login.dm
+++ b/code/modules/mob/login.dm
@@ -47,5 +47,12 @@
client.perspective = MOB_PERSPECTIVE
reload_fullscreen() // Reload any fullscreen overlays this mob has.
add_click_catcher()
+
+ if(!plane_holder) //Lazy
+ plane_holder = new(src) //Not a location, it takes it and saves it.
+ vis_enabled = list()
+ client.screen += plane_holder.plane_masters
+ recalculate_vis()
+
//set macro to normal incase it was overriden (like cyborg currently does)
winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 1ab40749ae..5ea49ec1b9 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -13,6 +13,7 @@
if(mind && mind.current == src)
spellremove(src)
ghostize()
+ qdel_null(plane_holder)
..()
return QDEL_HINT_HARDDEL_NOW
diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm
index 8980d9ed52..d20045e55e 100644
--- a/code/modules/mob/mob_defines.dm
+++ b/code/modules/mob/mob_defines.dm
@@ -34,6 +34,9 @@
var/obj/screen/wizard/energy/wiz_energy_display = null
var/obj/screen/wizard/instability/wiz_instability_display = null
+ var/datum/plane_holder/plane_holder = null
+ var/list/vis_enabled = null
+
//spells hud icons - this interacts with add_spell and remove_spell
var/list/obj/screen/movable/spell_master/spell_masters = null
var/obj/screen/movable/ability_master/ability_master = null
diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm
index 97fe494880..0a623059eb 100644
--- a/code/modules/mob/mob_helpers.dm
+++ b/code/modules/mob/mob_helpers.dm
@@ -355,19 +355,6 @@ proc/is_blind(A)
return 1
return 0
-/proc/broadcast_security_hud_message(var/message, var/broadcast_source)
- broadcast_hud_message(message, broadcast_source, sec_hud_users, /obj/item/clothing/glasses/hud/security)
-
-/proc/broadcast_medical_hud_message(var/message, var/broadcast_source)
- broadcast_hud_message(message, broadcast_source, med_hud_users, /obj/item/clothing/glasses/hud/health)
-
-/proc/broadcast_hud_message(var/message, var/broadcast_source, var/list/targets, var/icon)
- var/atom/sourceturf = isarea(broadcast_source) ? broadcast_source : get_turf(broadcast_source) // VOREStation Edit - Allow broadcasts from an area
- for(var/mob/M in targets)
- var/turf/targetturf = get_turf(M)
- if((targetturf.z == sourceturf.z))
- M.show_message("\icon[icon] [message]", 1)
-
/proc/mobs_in_area(var/area/A)
var/list/mobs = new
for(var/mob/living/M in mob_list)
@@ -616,3 +603,22 @@ var/list/global/organ_rel_size = list(
/mob/proc/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
return
+
+//Recalculates what planes this mob can see using their plane_holder, for humans this is checking slots, for others, could be whatever.
+/mob/proc/recalculate_vis()
+ return
+
+//General HUD updates done regularly (health puppet things, etc)
+/mob/proc/handle_regular_hud_updates()
+ return
+
+//Icon is used to occlude things like huds from the faulty byond context menu.
+// http://www.byond.com/forum/?post=2336679
+var/global/image/backplane
+/hook/startup/proc/generate_backplane()
+ backplane = image('icons/misc/win32.dmi')
+ backplane.alpha = 0
+ backplane.plane = -100
+ backplane.mouse_opacity = 0
+
+ return TRUE
diff --git a/code/modules/mob/mob_planes.dm b/code/modules/mob/mob_planes.dm
new file mode 100644
index 0000000000..15d008b81d
--- /dev/null
+++ b/code/modules/mob/mob_planes.dm
@@ -0,0 +1,178 @@
+//////////////////////////////////////////////
+// These planemaster objects are created on mobs when a client logs into them (lazy). We'll use them to adjust the visibility of objects, among other things.
+//
+
+/datum/plane_holder
+ var/mob/my_mob
+ var/list/plane_masters[VIS_COUNT]
+
+/datum/plane_holder/New(mob/this_guy)
+ my_mob = this_guy
+
+ //It'd be nice to lazy init these but some of them are important to just EXIST. Like without ghost planemaster, you can see ghosts. Go figure.
+ plane_masters[VIS_FULLBRIGHT] = new /obj/screen/plane_master/fullbright //Lighting system (lighting_overlay objects)
+ plane_masters[VIS_GHOSTS] = new /obj/screen/plane_master/ghosts //Ghosts!
+ plane_masters[VIS_AI_EYE] = new /obj/screen/plane_master{plane = PLANE_AI_EYE} //AI Eye!
+
+ plane_masters[VIS_CH_STATUS] = new /obj/screen/plane_master{plane = PLANE_CH_STATUS} //Status is the synth/human icon left side of medhuds
+ plane_masters[VIS_CH_HEALTH] = new /obj/screen/plane_master{plane = PLANE_CH_HEALTH} //Health bar
+ plane_masters[VIS_CH_LIFE] = new /obj/screen/plane_master{plane = PLANE_CH_LIFE} //Alive-or-not icon
+ plane_masters[VIS_CH_ID] = new /obj/screen/plane_master{plane = PLANE_CH_ID} //Job ID icon
+ plane_masters[VIS_CH_WANTED] = new /obj/screen/plane_master{plane = PLANE_CH_WANTED} //Wanted status
+ plane_masters[VIS_CH_IMPLOYAL] = new /obj/screen/plane_master{plane = PLANE_CH_IMPLOYAL} //Loyalty implants
+ plane_masters[VIS_CH_IMPTRACK] = new /obj/screen/plane_master{plane = PLANE_CH_IMPTRACK} //Tracking implants
+ plane_masters[VIS_CH_IMPCHEM] = new /obj/screen/plane_master{plane = PLANE_CH_IMPCHEM} //Chemical implants
+ plane_masters[VIS_CH_SPECIAL] = new /obj/screen/plane_master{plane = PLANE_CH_SPECIAL} //"Special" role stuff
+ plane_masters[VIS_CH_STATUS_OOC]= new /obj/screen/plane_master{plane = PLANE_CH_STATUS_OOC} //OOC status HUD
+
+ plane_masters[VIS_ADMIN1] = new /obj/screen/plane_master{plane = PLANE_ADMIN1} //For admin use
+ plane_masters[VIS_ADMIN2] = new /obj/screen/plane_master{plane = PLANE_ADMIN2} //For admin use
+ plane_masters[VIS_ADMIN3] = new /obj/screen/plane_master{plane = PLANE_ADMIN3} //For admin use
+
+ plane_masters[VIS_D_COLORBLIND] = new /obj/screen/plane_master/colorblindness //Colorblindness (affects world)
+ plane_masters[VIS_D_COLORBLINDI]= new /obj/screen/plane_master/colorblindness/items //Colorblindness (items in HUD, subplane of above, don't toggle)
+
+ ..()
+
+/datum/plane_holder/Destroy()
+ if(my_mob)
+ my_mob.plane_holder = null
+ my_mob = null
+ plane_masters.Cut() //Goodbye my children, be free
+ ..() //We will get qdel'd, as there will not be references to us, then our planelets will disappear on their own.
+
+/datum/plane_holder/proc/set_vis(var/which = null, var/state = FALSE)
+ ASSERT(which)
+ var/obj/screen/plane_master/PM = plane_masters[which]
+ if(!PM)
+ crash_with("Tried to alter [which] in plane_holder on [my_mob]!")
+ PM.set_visibility(state)
+ if(PM.sub_planes)
+ var/list/subplanes = PM.sub_planes
+ for(var/SP in subplanes)
+ set_vis(which = SP, state = state)
+
+/datum/plane_holder/proc/set_desired_alpha(var/which = null, var/new_alpha)
+ ASSERT(which)
+ var/obj/screen/plane_master/PM = plane_masters[which]
+ if(!PM)
+ crash_with("Tried to alter [which] in plane_holder on [my_mob]!")
+ PM.set_desired_alpha(new_alpha)
+ if(PM.sub_planes)
+ var/list/subplanes = PM.sub_planes
+ for(var/SP in subplanes)
+ set_vis(which = SP, new_alpha = new_alpha)
+
+////////////////////
+// The Plane Master
+////////////////////
+/obj/screen/plane_master
+ screen_loc = "1,1"
+ plane = -100 //Dodge just in case someone instantiates one of these accidentally, don't end up on 0 with plane_master
+ appearance_flags = PLANE_MASTER
+ mouse_opacity = 0 //Normally unclickable
+ alpha = 0 //Hidden from view
+ var/desired_alpha = 255 //What we go to when we're enabled
+ var/invis_toggle = FALSE
+ var/list/sub_planes
+
+/obj/screen/plane_master/proc/set_desired_alpha(var/new_alpha)
+ if(new_alpha != alpha && new_alpha > 0 && new_alpha <= 255)
+ desired_alpha = new_alpha
+ if(alpha) //If we're already visible, update it now.
+ alpha = new_alpha
+
+/obj/screen/plane_master/proc/set_visibility(var/want = FALSE)
+ //Invisibility-managed
+ if(invis_toggle)
+ if(want && invisibility)
+ invisibility = 0 //Does not need a mouse_opacity toggle because these are for effects
+ else if(!want && !invisibility)
+ invisibility = 101
+ //Alpha-managed
+ else
+ if(want && !alpha)
+ alpha = desired_alpha
+ mouse_opacity = 1 //Not bool, don't replace with true/false
+ else if(!want && alpha)
+ alpha = 0
+ mouse_opacity = 0
+
+/obj/screen/plane_master/proc/set_alpha(var/new_alpha = 255)
+ if(new_alpha != alpha)
+ new_alpha = sanitize_integer(new_alpha, 0, 255, 255)
+ alpha = new_alpha
+
+////////////////////
+// Special masters
+////////////////////
+
+/////////////////
+//Lighting is weird and has matrix shenanigans. Think of this as turning on/off darkness.
+/obj/screen/plane_master/fullbright
+ plane = PLANE_LIGHTING
+ layer = LIGHTING_LAYER
+ color = null //To break lighting when visible (this is sorta backwards)
+ alpha = 255 //Starts full opaque
+ invisibility = 101 //But invisible
+ invis_toggle = TRUE
+
+/////////////////
+//Ghosts has a special alpha level
+/obj/screen/plane_master/ghosts
+ plane = PLANE_GHOSTS
+ desired_alpha = 127 //When enabled, they're like half-transparent
+
+
+//'Normal'ness v v v
+//Various types of colorblindness R2R R2G R2B G2R G2G G2B B2R B2G B2B
+#define MATRIX_Monochromia list(0.33, 0.33, 0.33, 0.59, 0.59, 0.59, 0.11, 0.11, 0.11)
+#define MATRIX_Protanopia list(0.57, 0.43, 0, 0.56, 0.44, 0, 0, 0.24, 0.76)
+#define MATRIX_Protanomaly list(0.82, 0.18, 0, 0.33, 0.67, 0, 0, 0.13, 0.88)
+#define MATRIX_Deuteranopia list(0.63, 0.38, 0, 0.70, 0.30, 0, 0, 0.30, 0.70)
+#define MATRIX_Deuteranomaly list(0.80, 0.20, 0, 0.26, 0.74, 0, 0, 0.14, 0.86)
+#define MATRIX_Tritanopia list(0.95, 0.05, 0, 0, 0.43, 0.57, 0, 0.48, 0.53)
+#define MATRIX_Tritanomaly list(0.97, 0.03, 0, 0, 0.73, 0.27, 0, 0.18, 0.82)
+#define MATRIX_Achromatopsia list(0.30, 0.59, 0.11, 0.30, 0.59, 0.11, 0.30, 0.59, 0.11)
+#define MATRIX_Achromatomaly list(0.62, 0.32, 0.06, 0.16, 0.78, 0.06, 0.16, 0.32, 0.52)
+#define MATRIX_Vulp_Colorblind list(0.50, 0.40, 0.10, 0.50, 0.40, 0.10, 0, 0.20, 0.80)
+#define MATRIX_Taj_Colorblind list(0.40, 0.20, 0.40, 0.40, 0.60, 0, 0.20, 0.20, 0.60)
+
+/////////////////
+//Colorblindness uses special color shenanigans
+/obj/screen/plane_master/colorblindness
+ plane = PLANE_WORLD //Affects the main game world
+ color = MATRIX_Monochromia
+ alpha = 255 //Starts out nice and opaque
+ invisibility = 101 //Can't see it usually
+ mouse_opacity = 1 //Don't make entire world not visible pls
+ invis_toggle = TRUE
+ sub_planes = list(VIS_D_COLORBLINDI)
+ var/list/varieties = list(
+ "Monochromia" = MATRIX_Monochromia,
+ "Protanopia" = MATRIX_Protanopia,
+ "Protanomaly" = MATRIX_Protanomaly,
+ "Deuteranopia" = MATRIX_Deuteranopia,
+ "Deuteranomaly" = MATRIX_Deuteranomaly,
+ "Tritanopia" = MATRIX_Tritanopia,
+ "Tritanomaly" = MATRIX_Tritanomaly,
+ "Achromatopsia" = MATRIX_Achromatopsia,
+ "Achromatomaly" = MATRIX_Achromatomaly,
+ "Paradise Vulp" = MATRIX_Vulp_Colorblind,
+ "Paradise Taj" = MATRIX_Taj_Colorblind
+ )
+
+/obj/screen/plane_master/colorblindness/proc/set_variety(var/which = null)
+ var/new_type = varieties[which]
+ if(!new_type) return
+
+ color = new_type
+
+/obj/screen/plane_master/colorblindness/proc/debug_variety()
+ var/choice = input(usr,"Pick a type of colorblindness","Which?") as null|anything in varieties
+ if(choice)
+ color = varieties[choice]
+
+/obj/screen/plane_master/colorblindness/items
+ plane = PLANE_PLAYER_HUD_ITEMS
+ sub_planes = null
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index bdea8fed70..527751334e 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -448,13 +448,13 @@
else if (h_user.l_store == src)
h_user.drop_from_inventory(src)
B.loc = h_user
- B.layer = 20
+ B.hud_layerise()
h_user.l_store = B
h_user.update_inv_pockets()
else if (h_user.r_store == src)
h_user.drop_from_inventory(src)
B.loc = h_user
- B.layer = 20
+ B.hud_layerise()
h_user.r_store = B
h_user.update_inv_pockets()
else if (h_user.head == src)
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index 19a7e0498d..f135285299 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -131,6 +131,7 @@ var/global/photo_count = 0
var/icon_on = "camera"
var/icon_off = "camera_off"
var/size = 3
+ var/picture_planes = list(PLANE_WORLD)
/obj/item/device/camera/verb/change_size()
set name = "Set Photo Focus"
@@ -181,6 +182,7 @@ var/global/photo_count = 0
// As well as anything that isn't invisible.
for(var/atom/A in the_turf)
if(A.invisibility) continue
+ if(!(A.plane in picture_planes)) continue
atoms.Add(A)
// Sort the atoms into their layers
diff --git a/icons/misc/win32.dmi b/icons/misc/win32.dmi
new file mode 100644
index 0000000000..bae0df09ee
Binary files /dev/null and b/icons/misc/win32.dmi differ
diff --git a/vorestation.dme b/vorestation.dme
index 59d1a0d301..c44622a70c 100644
--- a/vorestation.dme
+++ b/vorestation.dme
@@ -21,6 +21,7 @@
#include "code\world.dm"
#include "code\__defines\_compile_options.dm"
#include "code\__defines\_planes+layers.dm"
+#include "code\__defines\_planes+layers_vr.dm"
#include "code\__defines\_tick.dm"
#include "code\__defines\admin.dm"
#include "code\__defines\appearance.dm"
@@ -353,7 +354,6 @@
#include "code\defines\procs\announce.dm"
#include "code\defines\procs\AStar.dm"
#include "code\defines\procs\dbcore.dm"
-#include "code\defines\procs\hud.dm"
#include "code\defines\procs\hud_vr.dm"
#include "code\defines\procs\radio.dm"
#include "code\defines\procs\sd_Alert.dm"
@@ -1736,7 +1736,6 @@
#include "code\modules\lighting\lighting_setup.dm"
#include "code\modules\lighting\lighting_source.dm"
#include "code\modules\lighting\lighting_turf.dm"
-#include "code\modules\lighting\~lighting_undefs.dm"
#include "code\modules\lore_codex\codex.dm"
#include "code\modules\lore_codex\codex_tree.dm"
#include "code\modules\lore_codex\pages.dm"
@@ -1797,6 +1796,7 @@
#include "code\modules\mob\mob_grab_specials.dm"
#include "code\modules\mob\mob_helpers.dm"
#include "code\modules\mob\mob_movement.dm"
+#include "code\modules\mob\mob_planes.dm"
#include "code\modules\mob\mob_transformation_simple.dm"
#include "code\modules\mob\say.dm"
#include "code\modules\mob\say_vr.dm"
@@ -1960,7 +1960,6 @@
#include "code\modules\mob\living\carbon\metroid\death.dm"
#include "code\modules\mob\living\carbon\metroid\emote.dm"
#include "code\modules\mob\living\carbon\metroid\examine.dm"
-#include "code\modules\mob\living\carbon\metroid\hud.dm"
#include "code\modules\mob\living\carbon\metroid\life.dm"
#include "code\modules\mob\living\carbon\metroid\login.dm"
#include "code\modules\mob\living\carbon\metroid\metroid.dm"