POLARIS: Planes shenanigans. Begins 'plane' work.

This commit is contained in:
Arokha Sieyes
2018-01-13 23:24:48 -05:00
parent 05864e06ea
commit ad74dec1c0
52 changed files with 601 additions and 464 deletions

View File

@@ -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 SPACE_PLANE -32 // Reserved for use in space/parallax
#define PARALLAX_PLANE -30 // 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 // OPENSPACE_PLANE reserves all planes between OPENSPACE_PLANE_START and OPENSPACE_PLANE_END inclusive
#define OPENSPACE_PLANE_START -23 #define OPENSPACE_PLANE -55 // /turf/simulated/open will use OPENSPACE_PLANE + z (Valid z's being 2 thru 17)
#define OPENSPACE_PLANE_END -8 #define OPENSPACE_PLANE_START -53
#define OPENSPACE_PLANE -25 // /turf/simulated/open will use OPENSPACE_PLANE + z (Valid z's being 2 thru 17) #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)

View File

@@ -227,4 +227,29 @@
// For slime commanding. Higher numbers allow for more actions. // For slime commanding. Higher numbers allow for more actions.
#define SLIME_COMMAND_OBEY 1 // When disciplined. #define SLIME_COMMAND_OBEY 1 // When disciplined.
#define SLIME_COMMAND_FACTION 2 // When in the same 'faction'. #define SLIME_COMMAND_FACTION 2 // When in the same 'faction'.
#define SLIME_COMMAND_FRIEND 3 // When befriended with a slime friendship agent. #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.

View File

@@ -873,3 +873,9 @@ proc/sort_atoms_by_layer(var/list/atoms)
result.Swap(i, gap + i) result.Swap(i, gap + i)
swapped = 1 swapped = 1
return result 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

View File

@@ -129,7 +129,7 @@ proc/age2agedescription(age)
else return "unknown" else return "unknown"
/proc/RoundHealth(health) /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) for(var/icon_state in icon_states)
if(health >= text2num(icon_state)) if(health >= text2num(icon_state))
return icon_state return icon_state

View File

@@ -68,6 +68,7 @@
icon_state = "default" icon_state = "default"
screen_loc = "CENTER-7,CENTER-7" screen_loc = "CENTER-7,CENTER-7"
layer = FULLSCREEN_LAYER layer = FULLSCREEN_LAYER
plane = PLANE_FULLSCREEN
mouse_opacity = 0 mouse_opacity = 0
var/severity = 0 var/severity = 0

View File

@@ -39,32 +39,30 @@ var/list/global_huds = list(
screen.icon = 'icons/obj/hud_full.dmi' screen.icon = 'icons/obj/hud_full.dmi'
screen.icon_state = icon_state screen.icon_state = icon_state
screen.layer = SCREEN_LAYER screen.layer = SCREEN_LAYER
screen.plane = PLANE_FULLSCREEN
screen.mouse_opacity = 0 screen.mouse_opacity = 0
return screen return screen
/obj/screen/global_screen
screen_loc = ui_entire_screen
layer = 17
plane = PLANE_FULLSCREEN
mouse_opacity = 0
/datum/global_hud/New() /datum/global_hud/New()
//420erryday psychedellic colours screen overlay for when you are high //420erryday psychedellic colours screen overlay for when you are high
druggy = new /obj/screen() druggy = new /obj/screen/global_screen()
druggy.screen_loc = ui_entire_screen
druggy.icon_state = "druggy" druggy.icon_state = "druggy"
druggy.layer = 17
druggy.mouse_opacity = 0
//that white blurry effect you get when you eyes are damaged //that white blurry effect you get when you eyes are damaged
blurry = new /obj/screen() blurry = new /obj/screen/global_screen()
blurry.screen_loc = ui_entire_screen
blurry.icon_state = "blurry" blurry.icon_state = "blurry"
blurry.layer = 17
blurry.mouse_opacity = 0
//static overlay effect for cameras and the like //static overlay effect for cameras and the like
whitense = new /obj/screen() whitense = new /obj/screen/global_screen()
whitense.screen_loc = ui_entire_screen
whitense.icon = 'icons/effects/static.dmi' whitense.icon = 'icons/effects/static.dmi'
whitense.icon_state = "1 light" whitense.icon_state = "1 light"
whitense.layer = 17
whitense.mouse_opacity = 0
nvg = setup_overlay("nvg_hud") nvg = setup_overlay("nvg_hud")
thermal = setup_overlay("thermal_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) vimpaired = newlist(/obj/screen,/obj/screen,/obj/screen,/obj/screen)
O = vimpaired[1] O = vimpaired[1]
O.screen_loc = "1,1 to 5,15" O.screen_loc = "1,1 to 5,15"
O.plane = PLANE_FULLSCREEN
O = vimpaired[2] O = vimpaired[2]
O.screen_loc = "5,1 to 10,5" O.screen_loc = "5,1 to 10,5"
O.plane = PLANE_FULLSCREEN
O = vimpaired[3] O = vimpaired[3]
O.screen_loc = "6,11 to 10,15" O.screen_loc = "6,11 to 10,15"
O.plane = PLANE_FULLSCREEN
O = vimpaired[4] O = vimpaired[4]
O.screen_loc = "11,1 to 15,15" O.screen_loc = "11,1 to 15,15"
O.plane = PLANE_FULLSCREEN
//welding mask overlay black/dither //welding mask overlay black/dither
darkMask = newlist(/obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen, /obj/screen) 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 = vimpaired[i]
O.icon_state = "dither50" O.icon_state = "dither50"
O.layer = 17 O.layer = 17
O.plane = PLANE_FULLSCREEN
O.mouse_opacity = 0 O.mouse_opacity = 0
O = darkMask[i] O = darkMask[i]
O.icon_state = "dither50" O.icon_state = "dither50"
O.layer = 17 O.layer = 17
O.plane = PLANE_FULLSCREEN
O.mouse_opacity = 0 O.mouse_opacity = 0
for(i = 5, i <= 8, i++) for(i = 5, i <= 8, i++)
O = darkMask[i] O = darkMask[i]
O.icon_state = "black" O.icon_state = "black"
O.layer = 17 O.layer = 17
O.mouse_opacity = 0 O.plane = PLANE_FULLSCREEN
O.mouse_opacity = 2
/* /*
The hud datum The hud datum

View File

@@ -13,7 +13,7 @@
src.adding = list() src.adding = list()
src.other = 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/list/hud_elements = list()
var/obj/screen/using var/obj/screen/using
@@ -25,7 +25,6 @@
inv_box = new /obj/screen/inventory() inv_box = new /obj/screen/inventory()
inv_box.icon = ui_style inv_box.icon = ui_style
inv_box.layer = 19
inv_box.color = ui_color inv_box.color = ui_color
inv_box.alpha = ui_alpha inv_box.alpha = ui_alpha
@@ -50,7 +49,7 @@
using.icon = ui_style using.icon = ui_style
using.icon_state = "other" using.icon_state = "other"
using.screen_loc = ui_inventory using.screen_loc = ui_inventory
using.layer = 20 using.hud_layerise()
using.color = ui_color using.color = ui_color
using.alpha = ui_alpha using.alpha = ui_alpha
src.adding += using src.adding += using
@@ -65,7 +64,6 @@
using.screen_loc = ui_acti using.screen_loc = ui_acti
using.color = ui_color using.color = ui_color
using.alpha = ui_alpha using.alpha = ui_alpha
using.layer = 20
src.adding += using src.adding += using
action_intent = using action_intent = using
@@ -82,7 +80,7 @@
using.icon = ico using.icon = ico
using.screen_loc = ui_acti using.screen_loc = ui_acti
using.alpha = ui_alpha using.alpha = ui_alpha
using.layer = 21 using.layer = LAYER_HUD_ITEM //These sit on the intent box
src.adding += using src.adding += using
help_intent = using help_intent = using
@@ -94,7 +92,7 @@
using.icon = ico using.icon = ico
using.screen_loc = ui_acti using.screen_loc = ui_acti
using.alpha = ui_alpha using.alpha = ui_alpha
using.layer = 21 using.layer = LAYER_HUD_ITEM
src.adding += using src.adding += using
disarm_intent = using disarm_intent = using
@@ -106,7 +104,7 @@
using.icon = ico using.icon = ico
using.screen_loc = ui_acti using.screen_loc = ui_acti
using.alpha = ui_alpha using.alpha = ui_alpha
using.layer = 21 using.layer = LAYER_HUD_ITEM
src.adding += using src.adding += using
grab_intent = using grab_intent = using
@@ -118,7 +116,7 @@
using.icon = ico using.icon = ico
using.screen_loc = ui_acti using.screen_loc = ui_acti
using.alpha = ui_alpha using.alpha = ui_alpha
using.layer = 21 using.layer = LAYER_HUD_ITEM
src.adding += using src.adding += using
hurt_intent = using hurt_intent = using
//end intent small hud objects //end intent small hud objects
@@ -129,7 +127,6 @@
using.icon = ui_style using.icon = ui_style
using.icon_state = (mymob.m_intent == "run" ? "running" : "walking") using.icon_state = (mymob.m_intent == "run" ? "running" : "walking")
using.screen_loc = ui_movi using.screen_loc = ui_movi
using.layer = 20
using.color = ui_color using.color = ui_color
using.alpha = ui_alpha using.alpha = ui_alpha
src.adding += using src.adding += using
@@ -141,7 +138,6 @@
using.icon = ui_style using.icon = ui_style
using.icon_state = "act_drop" using.icon_state = "act_drop"
using.screen_loc = ui_drop_throw using.screen_loc = ui_drop_throw
using.layer = 19
using.color = ui_color using.color = ui_color
using.alpha = ui_alpha using.alpha = ui_alpha
src.hotkeybuttons += using src.hotkeybuttons += using
@@ -153,7 +149,6 @@
using.icon = ui_style using.icon = ui_style
using.icon_state = "act_equip" using.icon_state = "act_equip"
using.screen_loc = ui_equip using.screen_loc = ui_equip
using.layer = 20
using.color = ui_color using.color = ui_color
using.alpha = ui_alpha using.alpha = ui_alpha
src.adding += using src.adding += using
@@ -167,7 +162,6 @@
inv_box.icon_state = "r_hand_active" inv_box.icon_state = "r_hand_active"
inv_box.screen_loc = ui_rhand inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand inv_box.slot_id = slot_r_hand
inv_box.layer = 19
inv_box.color = ui_color inv_box.color = ui_color
inv_box.alpha = ui_alpha inv_box.alpha = ui_alpha
@@ -183,7 +177,6 @@
inv_box.icon_state = "l_hand_active" inv_box.icon_state = "l_hand_active"
inv_box.screen_loc = ui_lhand inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand inv_box.slot_id = slot_l_hand
inv_box.layer = 19
inv_box.color = ui_color inv_box.color = ui_color
inv_box.alpha = ui_alpha inv_box.alpha = ui_alpha
src.l_hand_hud_object = inv_box src.l_hand_hud_object = inv_box
@@ -194,7 +187,6 @@
using.icon = ui_style using.icon = ui_style
using.icon_state = "hand1" using.icon_state = "hand1"
using.screen_loc = ui_swaphand1 using.screen_loc = ui_swaphand1
using.layer = 19
using.color = ui_color using.color = ui_color
using.alpha = ui_alpha using.alpha = ui_alpha
src.adding += using src.adding += using
@@ -204,7 +196,6 @@
using.icon = ui_style using.icon = ui_style
using.icon_state = "hand2" using.icon_state = "hand2"
using.screen_loc = ui_swaphand2 using.screen_loc = ui_swaphand2
using.layer = 19
using.color = ui_color using.color = ui_color
using.alpha = ui_alpha using.alpha = ui_alpha
src.adding += using src.adding += using
@@ -215,7 +206,6 @@
using.icon = ui_style using.icon = ui_style
using.icon_state = "act_resist" using.icon_state = "act_resist"
using.screen_loc = ui_pull_resist using.screen_loc = ui_pull_resist
using.layer = 19
using.color = ui_color using.color = ui_color
using.alpha = ui_alpha using.alpha = ui_alpha
src.hotkeybuttons += using src.hotkeybuttons += using

View File

@@ -258,7 +258,7 @@ var/obj/screen/robot_inventory
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7" A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
else else
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7" A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
A.layer = 20 A.hud_layerise()
x++ x++
if(x == 4) if(x == 4)

View File

@@ -9,7 +9,8 @@
/obj/screen /obj/screen
name = "" name = ""
icon = 'icons/mob/screen1.dmi' icon = 'icons/mob/screen1.dmi'
layer = 20.0 layer = LAYER_HUD_BASE
plane = PLANE_PLAYER_HUD
unacidable = 1 unacidable = 1
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally. 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. var/datum/hud/hud = null // A reference to the owner HUD, if any.

View File

@@ -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

View File

@@ -185,7 +185,8 @@ var/global/datum/controller/gameticker/ticker
cinematic = new(src) cinematic = new(src)
cinematic.icon = 'icons/effects/station_explosion.dmi' cinematic.icon = 'icons/effects/station_explosion.dmi'
cinematic.icon_state = "station_intact" cinematic.icon_state = "station_intact"
cinematic.layer = 20 cinematic.layer = 100
cinematic.plane = PLANE_PLAYER_HUD
cinematic.mouse_opacity = 0 cinematic.mouse_opacity = 0
cinematic.screen_loc = "1,0" cinematic.screen_loc = "1,0"

View File

@@ -63,28 +63,28 @@ datum/hSB
var/mob/living/carbon/human/P = usr var/mob/living/carbon/human/P = usr
if(P.wear_suit) if(P.wear_suit)
P.wear_suit.loc = P.loc 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 = null
P.wear_suit = new/obj/item/clothing/suit/space(P) P.wear_suit = new/obj/item/clothing/suit/space(P)
P.wear_suit.layer = 20 P.wear_suit.hud_layerise()
if(P.head) if(P.head)
P.head.loc = P.loc P.head.loc = P.loc
P.head.layer = initial(P.head.layer) P.head.reset_plane_and_layer()
P.head = null P.head = null
P.head = new/obj/item/clothing/head/helmet/space(P) P.head = new/obj/item/clothing/head/helmet/space(P)
P.head.layer = 20 P.head.hud_layerise()
if(P.wear_mask) if(P.wear_mask)
P.wear_mask.loc = P.loc 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 = null
P.wear_mask = new/obj/item/clothing/mask/gas(P) P.wear_mask = new/obj/item/clothing/mask/gas(P)
P.wear_mask.layer = 20 P.wear_mask.hud_layerise()
if(P.back) if(P.back)
P.back.loc = P.loc P.back.loc = P.loc
P.back.layer = initial(P.back.layer) P.back.reset_plane_and_layer()
P.back = null P.back = null
P.back = new/obj/item/weapon/tank/jetpack(P) P.back = new/obj/item/weapon/tank/jetpack(P)
P.back.layer = 20 P.back.hud_layerise()
P.internal = P.back P.internal = P.back
if("hsbmetal") if("hsbmetal")
var/obj/item/stack/sheet/hsb = new/obj/item/stack/sheet/metal var/obj/item/stack/sheet/hsb = new/obj/item/stack/sheet/metal

View File

@@ -23,6 +23,7 @@
occupant_message("<font color='red'>[H.glasses] prevent you from using [src] [hud]</font>") occupant_message("<font color='red'>[H.glasses] prevent you from using [src] [hud]</font>")
else else
H.glasses = hud H.glasses = hud
H.recalculate_vis()
return 1 return 1
else else
return 0 return 0
@@ -32,6 +33,7 @@
var/mob/living/carbon/human/H = occupant var/mob/living/carbon/human/H = occupant
if(H.glasses == hud) if(H.glasses == hud)
H.glasses = null H.glasses = null
H.recalculate_vis()
..() ..()
return return
/* /*
@@ -63,7 +65,7 @@
name = "Integrated Medical Hud" name = "Integrated Medical Hud"
process_hud(var/mob/M) // process_hud(var/mob/M) //TODO VIS
/* /*
world<< "view(M)" world<< "view(M)"
for(var/mob/mob in view(M)) for(var/mob/mob in view(M))
@@ -74,7 +76,7 @@
world<< "view(M.loc)" world<< "view(M.loc)"
for(var/mob/mob in view(M.loc)) for(var/mob/mob in view(M.loc))
world << "[mob]" world << "[mob]"
*/
if(!M || M.stat || !(M in view(M))) return if(!M || M.stat || !(M in view(M))) return
if(!M.client) return if(!M.client) return
@@ -115,7 +117,7 @@
holder.icon_state = "hudhealthy" holder.icon_state = "hudhealthy"
C.images += holder C.images += holder
*/
/obj/mecha/medical/odysseus/loaded/New() /obj/mecha/medical/odysseus/loaded/New()
..() ..()
var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/sleeper var/obj/item/mecha_parts/mecha_equipment/ME = new /obj/item/mecha_parts/mecha_equipment/tool/sleeper

View File

@@ -258,7 +258,7 @@
// for items that can be placed in multiple slots // for items that can be placed in multiple slots
// note this isn't called during the initial dressing of a player // note this isn't called during the initial dressing of a player
/obj/item/proc/equipped(var/mob/user, var/slot) /obj/item/proc/equipped(var/mob/user, var/slot)
layer = 20 hud_layerise()
if(user.client) user.client.screen |= src if(user.client) user.client.screen |= src
if(user.pulling == src) user.stop_pulling() if(user.pulling == src) user.stop_pulling()
return return

View File

@@ -174,7 +174,7 @@
src.boxes.screen_loc = "[tx]:,[ty] to [mx],[my]" src.boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
for(var/obj/O in src.contents) for(var/obj/O in src.contents)
O.screen_loc = "[cx],[cy]" O.screen_loc = "[cx],[cy]"
O.layer = 20 O.hud_layerise()
cx++ cx++
if (cx > mx) if (cx > mx)
cx = tx cx = tx
@@ -192,7 +192,7 @@
for(var/datum/numbered_display/ND in display_contents) for(var/datum/numbered_display/ND in display_contents)
ND.sample_object.screen_loc = "[cx]:16,[cy]:16" ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>" ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
ND.sample_object.layer = 20 ND.sample_object.hud_layerise()
cx++ cx++
if (cx > (4+cols)) if (cx > (4+cols))
cx = 4 cx = 4
@@ -201,7 +201,7 @@
for(var/obj/O in contents) for(var/obj/O in contents)
O.screen_loc = "[cx]:16,[cy]:16" O.screen_loc = "[cx]:16,[cy]:16"
O.maptext = "" O.maptext = ""
O.layer = 20 O.hud_layerise()
cx++ cx++
if (cx > (4+cols)) if (cx > (4+cols))
cx = 4 cx = 4
@@ -252,7 +252,7 @@
O.screen_loc = "4:[round((startpoint+endpoint)/2)+2],2:16" O.screen_loc = "4:[round((startpoint+endpoint)/2)+2],2:16"
O.maptext = "" O.maptext = ""
O.layer = 20 O.hud_layerise()
src.closer.screen_loc = "4:[storage_width+19],2:16" src.closer.screen_loc = "4:[storage_width+19],2:16"
return return
@@ -395,9 +395,9 @@
if(ismob(loc)) if(ismob(loc))
W.dropped(usr) W.dropped(usr)
if(ismob(new_location)) if(ismob(new_location))
W.layer = 20 W.hud_layerise()
else else
W.layer = initial(W.layer) W.reset_plane_and_layer()
W.forceMove(new_location) W.forceMove(new_location)
else else
W.forceMove(get_turf(src)) W.forceMove(get_turf(src))
@@ -546,41 +546,38 @@
src.boxes.master = src src.boxes.master = src
src.boxes.icon_state = "block" src.boxes.icon_state = "block"
src.boxes.screen_loc = "7,7 to 10,8" src.boxes.screen_loc = "7,7 to 10,8"
src.boxes.layer = 19
src.storage_start = new /obj/screen/storage( ) src.storage_start = new /obj/screen/storage( )
src.storage_start.name = "storage" src.storage_start.name = "storage"
src.storage_start.master = src src.storage_start.master = src
src.storage_start.icon_state = "storage_start" src.storage_start.icon_state = "storage_start"
src.storage_start.screen_loc = "7,7 to 10,8" 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 = new /obj/screen/storage( )
src.storage_continue.name = "storage" src.storage_continue.name = "storage"
src.storage_continue.master = src src.storage_continue.master = src
src.storage_continue.icon_state = "storage_continue" src.storage_continue.icon_state = "storage_continue"
src.storage_continue.screen_loc = "7,7 to 10,8" 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 = new /obj/screen/storage( )
src.storage_end.name = "storage" src.storage_end.name = "storage"
src.storage_end.master = src src.storage_end.master = src
src.storage_end.icon_state = "storage_end" src.storage_end.icon_state = "storage_end"
src.storage_end.screen_loc = "7,7 to 10,8" 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 = new /obj //we just need these to hold the icon
src.stored_start.icon_state = "stored_start" src.stored_start.icon_state = "stored_start"
src.stored_start.layer = 19
src.stored_continue = new /obj src.stored_continue = new /obj
src.stored_continue.icon_state = "stored_continue" src.stored_continue.icon_state = "stored_continue"
src.stored_continue.layer = 19
src.stored_end = new /obj src.stored_end = new /obj
src.stored_end.icon_state = "stored_end" src.stored_end.icon_state = "stored_end"
src.stored_end.layer = 19
src.closer = new /obj/screen/close( ) src.closer = new /obj/screen/close( )
src.closer.master = src src.closer.master = src
src.closer.icon_state = "storage_close" src.closer.icon_state = "storage_close"
src.closer.layer = 20 src.closer.hud_layerise()
orient2hud() orient2hud()
return return

View File

@@ -48,7 +48,7 @@
else else
src.icon_state = "morgue3" src.icon_state = "morgue3"
if(broadcast) 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 else
src.icon_state = "morgue1" src.icon_state = "morgue1"
return return

View File

@@ -10,8 +10,6 @@ var/global/list/machines = list() // TODO - Move into SSmachines
var/global/list/processing_objects = list() var/global/list/processing_objects = list()
var/global/list/processing_power_items = list() // TODO - Move into SSmachines var/global/list/processing_power_items = list() // TODO - Move into SSmachines
var/global/list/active_diseases = list() 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() 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. // 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/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") 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')

View File

@@ -60,6 +60,7 @@ var/list/admin_verbs_admin = list(
/client/proc/check_antagonists, /client/proc/check_antagonists,
/client/proc/admin_memo, //admin memo system. show/delete/write. +SERVER needed to delete admin memos of others, /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/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/toggle_hear_deadcast, //toggles whether we hear deadchat,
/client/proc/investigate_show, //various admintools for investigation. Such as a singulo grief-log, /client/proc/investigate_show, //various admintools for investigation. Such as a singulo grief-log,
/client/proc/secrets, /client/proc/secrets,
@@ -215,6 +216,7 @@ var/list/admin_verbs_debug = list(
/client/proc/jumptomob, /client/proc/jumptomob,
/client/proc/jumptocoord, /client/proc/jumptocoord,
/client/proc/dsay, /client/proc/dsay,
/client/proc/ghost_view,
/client/proc/toggle_debug_logs, /client/proc/toggle_debug_logs,
/client/proc/admin_ghost, //allows us to ghost/reenter body at will, /client/proc/admin_ghost, //allows us to ghost/reenter body at will,
/datum/admins/proc/view_runtimes, /datum/admins/proc/view_runtimes,
@@ -329,6 +331,7 @@ var/list/admin_verbs_mod = list(
/datum/admins/proc/show_player_info, /datum/admins/proc/show_player_info,
/client/proc/player_panel_new, /client/proc/player_panel_new,
/client/proc/dsay, /client/proc/dsay,
/client/proc/ghost_view,
/datum/admins/proc/show_skills, /datum/admins/proc/show_skills,
/datum/admins/proc/show_player_panel, /datum/admins/proc/show_player_panel,
/client/proc/check_antagonists, /client/proc/check_antagonists,
@@ -353,6 +356,7 @@ var/list/admin_verbs_event_manager = list(
/client/proc/admin_ghost, /client/proc/admin_ghost,
/datum/admins/proc/show_player_info, /datum/admins/proc/show_player_info,
/client/proc/dsay, /client/proc/dsay,
/client/proc/ghost_view,
/client/proc/cmd_admin_subtle_message, /client/proc/cmd_admin_subtle_message,
/client/proc/debug_variables, /client/proc/debug_variables,
/client/proc/check_antagonists, /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 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! 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,"<span class='notice'>Ghosts are now visible (while in this mob).</span>")
else if(mob.plane_holder)
mob.plane_holder.set_vis(VIS_GHOSTS,FALSE)
to_chat(src,"<span class='notice'>Ghosts are now hidden (while in this mob).</span>")
/client/proc/invisimin() /client/proc/invisimin()
set name = "Invisimin" set name = "Invisimin"

View File

@@ -37,7 +37,8 @@
/obj/effect/bmode//Cleaning up the tree a bit /obj/effect/bmode//Cleaning up the tree a bit
density = 1 density = 1
anchored = 1 anchored = 1
layer = 20 layer = LAYER_HUD_BASE
plane = PLANE_PLAYER_HUD
dir = NORTH dir = NORTH
icon = 'icons/misc/buildmode.dmi' icon = 'icons/misc/buildmode.dmi'
var/obj/effect/bmode/buildholder/master = null var/obj/effect/bmode/buildholder/master = null

View File

@@ -11,6 +11,8 @@
var/flash_protection = FLASH_PROTECTION_NONE var/flash_protection = FLASH_PROTECTION_NONE
var/tint = TINT_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. 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) var/obj/item/clothing/accessory/tie = new T(src)
src.attach_accessory(null, tie) 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. //BS12: Species-restricted clothing check.
/obj/item/clothing/mob_can_equip(M as mob, slot) /obj/item/clothing/mob_can_equip(M as mob, slot)

View File

@@ -16,6 +16,7 @@ BLIND // can't see anything
icon = 'icons/obj/clothing/glasses.dmi' icon = 'icons/obj/clothing/glasses.dmi'
w_class = ITEMSIZE_SMALL w_class = ITEMSIZE_SMALL
slot_flags = SLOT_EYES slot_flags = SLOT_EYES
plane_slots = list(slot_glasses)
var/vision_flags = 0 var/vision_flags = 0
var/darkness_view = 0//Base human is 2 var/darkness_view = 0//Base human is 2
var/see_invisible = -1 var/see_invisible = -1
@@ -25,6 +26,7 @@ BLIND // can't see anything
var/active = 1 var/active = 1
var/activation_sound = 'sound/items/goggles_charge.ogg' var/activation_sound = 'sound/items/goggles_charge.ogg'
var/obj/screen/overlay = null var/obj/screen/overlay = null
var/list/away_planes //Holder for disabled planes
sprite_sheets = list( sprite_sheets = list(
"Teshari" = 'icons/mob/species/seromi/eyes.dmi', "Teshari" = 'icons/mob/species/seromi/eyes.dmi',
@@ -44,6 +46,8 @@ BLIND // can't see anything
user.update_inv_glasses() user.update_inv_glasses()
flash_protection = FLASH_PROTECTION_NONE flash_protection = FLASH_PROTECTION_NONE
tint = TINT_NONE tint = TINT_NONE
away_planes = enables_planes
enables_planes = null
to_chat(usr, "You deactivate the optical matrix on the [src].") to_chat(usr, "You deactivate the optical matrix on the [src].")
else else
active = 1 active = 1
@@ -51,8 +55,11 @@ BLIND // can't see anything
user.update_inv_glasses() user.update_inv_glasses()
flash_protection = initial(flash_protection) flash_protection = initial(flash_protection)
tint = initial(tint) tint = initial(tint)
enables_planes = away_planes
away_planes = null
to_chat(usr, "You activate the optical matrix on the [src].") to_chat(usr, "You activate the optical matrix on the [src].")
user.update_action_buttons() user.update_action_buttons()
user.recalculate_vis()
/obj/item/clothing/glasses/meson /obj/item/clothing/glasses/meson
name = "optical meson scanner" name = "optical meson scanner"
@@ -63,6 +70,7 @@ BLIND // can't see anything
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2) origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
toggleable = 1 toggleable = 1
vision_flags = SEE_TURFS vision_flags = SEE_TURFS
enables_planes = (VIS_FULLBRIGHT)
/obj/item/clothing/glasses/meson/New() /obj/item/clothing/glasses/meson/New()
..() ..()
@@ -130,9 +138,9 @@ BLIND // can't see anything
darkness_view = 7 darkness_view = 7
toggleable = 1 toggleable = 1
action_button_name = "Toggle Goggles" action_button_name = "Toggle Goggles"
see_invisible = SEE_INVISIBLE_NOLIGHTING
off_state = "denight" off_state = "denight"
flash_protection = FLASH_PROTECTION_REDUCED flash_protection = FLASH_PROTECTION_REDUCED
enables_planes = list(VIS_FULLBRIGHT)
/obj/item/clothing/glasses/night/vox /obj/item/clothing/glasses/night/vox
name = "Alien Optics" name = "Alien Optics"
@@ -316,12 +324,7 @@ BLIND // can't see anything
name = "\improper HUD sunglasses" name = "\improper HUD sunglasses"
desc = "Sunglasses with a HUD." desc = "Sunglasses with a HUD."
icon_state = "sunSecHud" icon_state = "sunSecHud"
var/obj/item/clothing/glasses/hud/security/hud = null enables_planes = list(VIS_CH_ID,VIS_CH_WANTED,VIS_CH_IMPTRACK,VIS_CH_IMPLOYAL,VIS_CH_IMPCHEM)
New()
..()
src.hud = new/obj/item/clothing/glasses/hud/security(src)
return
/obj/item/clothing/glasses/sunglasses/sechud/tactical /obj/item/clothing/glasses/sunglasses/sechud/tactical
name = "tactical HUD" name = "tactical HUD"
@@ -338,31 +341,22 @@ BLIND // can't see anything
toggleable = 1 toggleable = 1
activation_sound = 'sound/effects/pop.ogg' 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) /obj/item/clothing/glasses/sunglasses/sechud/aviator/attack_self(mob/user)
if(toggleable && !user.incapacitated()) if(toggleable && !user.incapacitated())
on = !on on = !on
if(on) if(on)
flash_protection = FLASH_PROTECTION_NONE 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.") to_chat(usr, "You switch the [src] to HUD mode.")
else else
flash_protection = initial(flash_protection) 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.") to_chat(usr, "You switch \the [src] to flash protection mode.")
update_icon() update_icon()
user << activation_sound user << activation_sound
user.recalculate_vis()
user.update_inv_glasses() user.update_inv_glasses()
user.update_action_buttons() user.update_action_buttons()
@@ -381,12 +375,7 @@ BLIND // can't see anything
name = "\improper HUD sunglasses" name = "\improper HUD sunglasses"
desc = "Sunglasses with a HUD." desc = "Sunglasses with a HUD."
icon_state = "sunMedHud" icon_state = "sunMedHud"
var/obj/item/clothing/glasses/hud/health/hud = null enables_planes = list(VIS_CH_STATUS,VIS_CH_HEALTH)
/obj/item/clothing/glasses/sunglasses/medhud/New()
..()
src.hud = new/obj/item/clothing/glasses/hud/health(src)
return
/obj/item/clothing/glasses/thermal /obj/item/clothing/glasses/thermal
name = "optical thermal scanner" name = "optical thermal scanner"
@@ -397,7 +386,7 @@ BLIND // can't see anything
toggleable = 1 toggleable = 1
action_button_name = "Toggle Goggles" action_button_name = "Toggle Goggles"
vision_flags = SEE_MOBS vision_flags = SEE_MOBS
see_invisible = SEE_INVISIBLE_NOLIGHTING enables_planes = list(VIS_FULLBRIGHT)
flash_protection = FLASH_PROTECTION_REDUCED flash_protection = FLASH_PROTECTION_REDUCED
emp_act(severity) emp_act(severity)
@@ -454,4 +443,4 @@ BLIND // can't see anything
name = "optical thermal implants" name = "optical thermal implants"
desc = "A set of implantable lenses designed to augment your vision" desc = "A set of implantable lenses designed to augment your vision"
icon_state = "thermalimplants" icon_state = "thermalimplants"
item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses") item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses")

View File

@@ -3,10 +3,6 @@
desc = "A heads-up display that provides important info in (almost) real time." 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 flags = 0 //doesn't protect eyes because it's a monocle, duh
origin_tech = list(TECH_MAGNET = 3, TECH_BIO = 2) 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 /obj/item/clothing/glasses/hud/health
name = "Health Scanner HUD" name = "Health Scanner HUD"
@@ -14,6 +10,7 @@
icon_state = "healthhud" icon_state = "healthhud"
item_state_slots = list(slot_r_hand_str = "headset", slot_l_hand_str = "headset") item_state_slots = list(slot_r_hand_str = "headset", slot_l_hand_str = "headset")
body_parts_covered = 0 body_parts_covered = 0
enables_planes = list(VIS_CH_STATUS,VIS_CH_HEALTH)
/obj/item/clothing/glasses/hud/health/prescription /obj/item/clothing/glasses/hud/health/prescription
name = "Prescription Health Scanner HUD" name = "Prescription Health Scanner HUD"
@@ -22,16 +19,13 @@
icon_state = "healthhudpresc" icon_state = "healthhudpresc"
item_state_slots = list(slot_r_hand_str = "glasses", slot_l_hand_str = "glasses") 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 /obj/item/clothing/glasses/hud/security
name = "Security HUD" 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." 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" icon_state = "securityhud"
item_state_slots = list(slot_r_hand_str = "headset", slot_l_hand_str = "headset") item_state_slots = list(slot_r_hand_str = "headset", slot_l_hand_str = "headset")
body_parts_covered = 0 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 /obj/item/clothing/glasses/hud/security/prescription
name = "Prescription Security HUD" name = "Prescription Security HUD"
@@ -47,6 +41,3 @@
item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses") item_state_slots = list(slot_r_hand_str = "sunglasses", slot_l_hand_str = "sunglasses")
vision_flags = SEE_MOBS vision_flags = SEE_MOBS
see_invisible = SEE_INVISIBLE_NOLIGHTING see_invisible = SEE_INVISIBLE_NOLIGHTING
/obj/item/clothing/glasses/hud/security/process_hud(var/mob/M)
process_sec_hud(M, 1)

View File

@@ -6,7 +6,8 @@
anchored = 1 anchored = 1
icon = LIGHTING_ICON icon = LIGHTING_ICON
layer = LIGHTING_LAYER layer = LIGHTING_LAYER
invisibility = INVISIBILITY_LIGHTING plane = PLANE_LIGHTING
//invisibility = INVISIBILITY_LIGHTING
color = LIGHTING_BASE_MATRIX color = LIGHTING_BASE_MATRIX
icon_state = "light1" icon_state = "light1"
auto_init = 0 // doesn't need special init auto_init = 0 // doesn't need special init

View File

@@ -1,5 +1,7 @@
//Nobody here anymore.
/mob/observer/dead/Login() /mob/observer/dead/Login()
..() ..() //Creates the plane_holder lazily
if (ghostimage) plane_holder.set_vis(VIS_GHOSTS, ghostvision)
ghostimage.icon_state = src.icon_state plane_holder.set_vis(VIS_FULLBRIGHT, !seedarkness)
updateghostimages() plane_holder.set_vis(VIS_AI_EYE, TRUE)
plane = PLANE_GHOSTS

View File

@@ -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 /mob/observer
name = "observer" name = "observer"
desc = "This shouldn't appear" 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 = 'icons/mob/ghost.dmi'
icon_state = "ghost" icon_state = "ghost"
layer = 3.9 //Just below normal mobs layer = 3.9 //Just below normal mobs
plane = PLANE_GHOSTS
alpha = 127
stat = DEAD stat = DEAD
canmove = 0 canmove = 0
blinded = 0 blinded = 0
anchored = 1 // don't get pushed around anchored = 1 // don't get pushed around
invisibility = INVISIBILITY_OBSERVER
var/can_reenter_corpse var/can_reenter_corpse
var/datum/hud/living/carbon/hud = null // hud var/datum/hud/living/carbon/hud = null // hud
var/bootime = 0 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/atom/movable/following = null
var/admin_ghosted = 0 var/admin_ghosted = 0
var/anonsay = 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/ghostvision = 1 //is the ghost able to see things humans can't?
// var/seedarkness = 1
incorporeal_move = 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. 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) /mob/observer/dead/New(mob/body)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
see_invisible = SEE_INVISIBLE_OBSERVER 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 verbs += /mob/observer/dead/proc/dead_tele
stat = DEAD stat = DEAD
ghostimage = image(src.icon,src,src.icon_state)
ghost_darkness_images |= ghostimage
updateallghostimages()
var/turf/T var/turf/T
if(ismob(body)) if(ismob(body))
T = get_turf(body) //Where is the body located? 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 icon_state = body.icon_state
overlays = body.overlays overlays = body.overlays
alpha = 127
gender = body.gender gender = body.gender
if(body.mind && body.mind.name) if(body.mind && body.mind.name)
name = 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 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) /mob/observer/dead/Topic(href, href_list)
if (href_list["track"]) if (href_list["track"])
var/mob/target = locate(href_list["track"]) in mob_list var/mob/target = locate(href_list["track"]) in mob_list
if(target) if(target)
ManualFollow(target) ManualFollow(target)
/mob/observer/dead/attackby(obj/item/W, mob/user) /mob/observer/dead/attackby(obj/item/W, mob/user)
if(istype(W,/obj/item/weapon/book/tome)) if(istype(W,/obj/item/weapon/book/tome))
var/mob/observer/dead/M = src var/mob/observer/dead/M = src
@@ -174,31 +155,6 @@ Works together with spawning an observer, noted above.
handle_regular_hud_updates() 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) /mob/proc/ghostize(var/can_reenter_corpse = 1)
if(key) if(key)
if(ishuman(src)) 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 category = "Ghost"
set name = "Toggle MedicHUD" set name = "Toggle MedicHUD"
set desc = "Toggles Medical HUD allowing you to see how everyone is doing" set desc = "Toggles Medical HUD allowing you to see how everyone is doing"
if(!client)
return medHUD = !medHUD
if(medHUD) plane_holder.set_vis(VIS_CH_HEALTH, medHUD)
medHUD = 0 plane_holder.set_vis(VIS_CH_STATUS_OOC, medHUD)
src << "<font color='blue'><B>Medical HUD Disabled</B></font>" to_chat(src,"<font color='blue'><B>Medical HUD [medHUD ? "Enabled" : "Disabled"]</B></font>")
else
medHUD = 1
src << "<font color='blue'><B>Medical HUD Enabled</B></font>"
/mob/observer/dead/verb/toggle_antagHUD() /mob/observer/dead/verb/toggle_antagHUD()
set category = "Ghost" set category = "Ghost"
set name = "Toggle AntagHUD" set name = "Toggle AntagHUD"
set desc = "Toggles AntagHUD allowing you to see who is the antagonist" set desc = "Toggles AntagHUD allowing you to see who is the antagonist"
if(!client)
return
if(!config.antag_hud_allowed && !client.holder) if(!config.antag_hud_allowed && !client.holder)
src << "<font color='red'>Admins have disabled this for this round.</font>" src << "<font color='red'>Admins have disabled this for this round.</font>"
return return
var/mob/observer/dead/M = src if(jobban_isbanned(src, "AntagHUD"))
if(jobban_isbanned(M, "AntagHUD"))
src << "<font color='red'><B>You have been banned from using this feature</B></font>" src << "<font color='red'><B>You have been banned from using this feature</B></font>"
return 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") 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 if(response == "No") return
M.can_reenter_corpse = 0 can_reenter_corpse = FALSE
if(!M.has_enabled_antagHUD && !client.holder) if(!has_enabled_antagHUD && !client.holder)
M.has_enabled_antagHUD = 1 has_enabled_antagHUD = TRUE
if(M.antagHUD)
M.antagHUD = 0 antagHUD = !antagHUD
src << "<font color='blue'><B>AntagHUD Disabled</B></font>" plane_holder.set_vis(VIS_CH_SPECIAL, antagHUD)
else to_chat(src,"<font color='blue'><B>AntagHUD [antagHUD ? "Enabled" : "Disabled"]</B></font>")
M.antagHUD = 1
src << "<font color='blue'><B>AntagHUD Enabled</B></font>"
/mob/observer/dead/proc/dead_tele(var/area/A in return_sorted_areas()) /mob/observer/dead/proc/dead_tele(var/area/A in return_sorted_areas())
set category = "Ghost" 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)) if(check_rights(R_ADMIN|R_FUN, 0, src))
return 0 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 /mob/observer/dead/verb/jumptomob(target in getmobs()) //Moves the ghost instead of just changing the ghosts's eye -Nodrak
set category = "Ghost" 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 return 1
/mob/observer/dead/proc/manifest(mob/user) /mob/observer/dead/proc/manifest(mob/user)
is_manifest = 0 is_manifest = TRUE
if(!is_manifest) verbs |= /mob/observer/dead/proc/toggle_visibility
is_manifest = 1 verbs |= /mob/observer/dead/proc/ghost_whisper
verbs += /mob/observer/dead/proc/toggle_visibility to_chat(src,"<font color='purple'>As you are now in the realm of the living, you can whisper to the living with the <b>Spectral Whisper</b> verb, inside the IC tab.</font>")
verbs += /mob/observer/dead/proc/ghost_whisper if(plane != PLANE_WORLD)
src << "<font color='purple'>As you are now in the realm of the living, you can whisper to the living with the <b>Spectral Whisper</b> verb, inside the IC tab.</font>"
if(src.invisibility != 0)
user.visible_message( \ user.visible_message( \
"<span class='warning'>\The [user] drags ghost, [src], to our plane of reality!</span>", \ "<span class='warning'>\The [user] drags ghost, [src], to our plane of reality!</span>", \
"<span class='warning'>You drag [src] to our plane of reality!</span>" \ "<span class='warning'>You drag [src] to our plane of reality!</span>" \
) )
toggle_visibility(1) toggle_visibility(TRUE)
else else
user.visible_message ( \ user.visible_message ( \
"<span class='warning'>\The [user] just tried to smash \his book into that ghost! It's not very effective.</span>", \ "<span class='warning'>\The [user] just tried to smash \his book into that ghost! It's not very effective.</span>", \
@@ -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." set desc = "Allows you to turn (in)visible (almost) at will."
var/toggled_invisible 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..." src << "You must gather strength before you can turn visible again..."
return return
if(invisibility == 0) if(plane == PLANE_WORLD)
toggled_invisible = world.time toggled_invisible = world.time
visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible.</span>") visible_message("<span class='emote'>It fades from sight...</span>", "<span class='info'>You are now invisible.</span>")
else else
src << "<span class='info'>You are now visible!</span>" src << "<span class='info'>You are now visible!</span>"
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 // Give the ghost a cult icon which should be visible only to itself
toggle_icon("cult") 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 name = "Toggle Ghost Vision"
set desc = "Toggles your ability to see things only ghosts can see, like other ghosts" set desc = "Toggles your ability to see things only ghosts can see, like other ghosts"
set category = "Ghost" set category = "Ghost"
ghostvision = !(ghostvision) ghostvision = !ghostvision
updateghostsight() 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() /mob/observer/dead/verb/toggle_darkness()
set name = "Toggle Darkness" set name = "Toggle Darkness"
set desc = "Toggles your ability to see lighting overlays, and the darkness they create."
set category = "Ghost" set category = "Ghost"
seedarkness = !(seedarkness) seedarkness = !seedarkness
updateghostsight() updateghostsight()
to_chat(src,"You [seedarkness ? "now" : "no longer"] see darkness.")
/mob/observer/dead/proc/updateghostsight() /mob/observer/dead/proc/updateghostsight()
if (!seedarkness) plane_holder.set_vis(VIS_FULLBRIGHT, !seedarkness) //Inversion, because "not seeing" the darkness is "seeing" the lighting plane master.
see_invisible = SEE_INVISIBLE_NOLIGHTING plane_holder.set_vis(VIS_GHOSTS, ghostvision)
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
mob/observer/dead/MayRespawn(var/feedback = 0) mob/observer/dead/MayRespawn(var/feedback = 0)
if(!client) if(!client)

View File

@@ -16,7 +16,7 @@
see_in_dark = 7 see_in_dark = 7
status_flags = GODMODE status_flags = GODMODE
invisibility = INVISIBILITY_EYE plane = PLANE_AI_EYE
var/mob/owner = null var/mob/owner = null
var/list/visibleChunks = list() var/list/visibleChunks = list()
@@ -24,20 +24,7 @@
var/ghostimage = null var/ghostimage = null
var/datum/visualnet/visualnet var/datum/visualnet/visualnet
/mob/observer/eye/New() /mob/observer/eye/Destroy()
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()
if(owner) if(owner)
if(owner.eyeobj == src) if(owner.eyeobj == src)
owner.eyeobj = null owner.eyeobj = null

View File

@@ -122,7 +122,7 @@ var/list/slot_equipment_priority = list( \
if(!W) if(!W)
return 0 return 0
W.forceMove(get_turf(src)) W.forceMove(get_turf(src))
W.layer = initial(W.layer) W.reset_plane_and_layer()
W.dropped() W.dropped()
return 0 return 0
@@ -198,7 +198,7 @@ var/list/slot_equipment_priority = list( \
src.u_equip(O) src.u_equip(O)
if (src.client) if (src.client)
src.client.screen -= O src.client.screen -= O
O.layer = initial(O.layer) O.reset_plane_and_layer()
O.screen_loc = null O.screen_loc = null
if(istype(O, /obj/item)) if(istype(O, /obj/item))
var/obj/item/I = O var/obj/item/I = O

View File

@@ -87,7 +87,7 @@
visible_message("<span class='warning'>[src] is trying to inject [H]!</span>") visible_message("<span class='warning'>[src] is trying to inject [H]!</span>")
if(declare_treatment) if(declare_treatment)
var/area/location = get_area(src) var/area/location = get_area(src)
broadcast_medical_hud_message("[src] is treating <b>[H]</b> in <b>[location]</b>", src) global_announcer.autosay("[src] is treating <b>[H]</b> in <b>[location]</b>", "[src]", "Medical")
busy = 1 busy = 1
update_icons() update_icons()
if(do_mob(src, H, 30)) if(do_mob(src, H, 30))

View File

@@ -153,7 +153,7 @@
/mob/living/bot/secbot/proc/react_to_attack(mob/attacker) /mob/living/bot/secbot/proc/react_to_attack(mob/attacker)
if(!target) if(!target)
playsound(src.loc, pick(threat_found_sounds), 50) playsound(src.loc, pick(threat_found_sounds), 50)
broadcast_security_hud_message("[src] was attacked by a hostile <b>[target_name(attacker)]</b> in <b>[get_area(src)]</b>.", src) global_announcer.autosay("[src] was attacked by a hostile <b>[target_name(attacker)]</b> in <b>[get_area(src)]</b>.", "[src]", "Security")
target = attacker target = attacker
awaiting_surrender = INFINITY // Don't try and wait for surrender 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) /mob/living/bot/secbot/proc/demand_surrender(mob/target, var/threat)
var/suspect_name = target_name(target) var/suspect_name = target_name(target)
if(declare_arrests) if(declare_arrests)
broadcast_security_hud_message("[src] is [arrest_type ? "detaining" : "arresting"] a level [threat] suspect <b>[suspect_name]</b> in <b>[get_area(src)]</b>.", src) global_announcer.autosay("[src] is [arrest_type ? "detaining" : "arresting"] a level [threat] suspect <b>[suspect_name]</b> in <b>[get_area(src)]</b>.", "[src]", "Security")
say("Down on the floor, [suspect_name]! You have [SECBOT_WAIT_TIME] seconds to comply.") say("Down on the floor, [suspect_name]! You have [SECBOT_WAIT_TIME] seconds to comply.")
playsound(src.loc, pick(preparing_arrest_sounds), 50) playsound(src.loc, pick(preparing_arrest_sounds), 50)
// Register to be told when the target moves // Register to be told when the target moves
@@ -214,7 +214,7 @@
var/action = arrest_type ? "detaining" : "arresting" var/action = arrest_type ? "detaining" : "arresting"
if(istype(target, /mob/living/simple_animal)) if(istype(target, /mob/living/simple_animal))
action = "fighting" action = "fighting"
broadcast_security_hud_message("[src] is [action] a level [threat] [action != "fighting" ? "suspect" : "threat"] <b>[target_name(target)]</b> in <b>[get_area(src)]</b>.", src) global_announcer.autosay("[src] is [action] a level [threat] [action != "fighting" ? "suspect" : "threat"] <b>[target_name(target)]</b> in <b>[get_area(src)]</b>.", "[src]", "Security")
UnarmedAttack(target) UnarmedAttack(target)
// So Beepsky talks while beating up simple mobs. // So Beepsky talks while beating up simple mobs.

View File

@@ -37,26 +37,7 @@
nutrition = rand(200,400) nutrition = rand(200,400)
hud_list[HEALTH_HUD] = new /image/hud_overlay('icons/mob/hud_med.dmi', src, "100") make_hud_overlays()
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")
human_mob_list |= src human_mob_list |= src
..() ..()

View File

@@ -76,6 +76,7 @@
var/icon/stand_icon = null var/icon/stand_icon = null
var/icon/lying_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() 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 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. // 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 var/mob/living/carbon/human/vr_holder = null
// Used by "real" mobs after they leave a VR session // Used by "real" mobs after they leave a VR session

View File

@@ -108,6 +108,58 @@
return FBP_NONE 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_ISSUE
#undef HUMAN_EATING_NO_MOUTH #undef HUMAN_EATING_NO_MOUTH
#undef HUMAN_EATING_BLOCKED_MOUTH #undef HUMAN_EATING_BLOCKED_MOUTH

View File

@@ -1,6 +1,7 @@
/mob/living/carbon/human/dummy /mob/living/carbon/human/dummy
real_name = "Test Dummy" real_name = "Test Dummy"
status_flags = GODMODE|CANPUSH status_flags = GODMODE|CANPUSH
has_huds = FALSE
/mob/living/carbon/human/dummy/mannequin/New() /mob/living/carbon/human/dummy/mannequin/New()
..() ..()

View File

@@ -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) var/obj/item/clothing/ears/offear/O = new(W)
O.loc = src O.loc = src
src.r_ear = O src.r_ear = O
O.layer = 20 O.hud_layerise()
W.equipped(src, slot) W.equipped(src, slot)
update_inv_ears(redraw_mob) update_inv_ears(redraw_mob)
if(slot_r_ear) 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) var/obj/item/clothing/ears/offear/O = new(W)
O.loc = src O.loc = src
src.l_ear = O src.l_ear = O
O.layer = 20 O.hud_layerise()
W.equipped(src, slot) W.equipped(src, slot)
update_inv_ears(redraw_mob) update_inv_ears(redraw_mob)
if(slot_glasses) 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 src.r_hand = null
update_inv_r_hand() update_inv_r_hand()
W.layer = 20 W.hud_layerise()
if(W.action_button_name) if(W.action_button_name)
update_action_buttons() update_action_buttons()

View File

@@ -1217,6 +1217,7 @@
var/mutable_appearance/healths_ma = new(healths) var/mutable_appearance/healths_ma = new(healths)
healths_ma.icon_state = "blank" healths_ma.icon_state = "blank"
healths_ma.overlays = null healths_ma.overlays = null
healths_ma.plane = PLANE_PLAYER_HUD
var/no_damage = 1 var/no_damage = 1
var/trauma_val = 0 // Used in calculating softcrit/hardcrit indicators. var/trauma_val = 0 // Used in calculating softcrit/hardcrit indicators.
@@ -1382,29 +1383,13 @@
client.screen |= G.overlay client.screen |= G.overlay
if(G.vision_flags) if(G.vision_flags)
sight |= 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) if(istype(G,/obj/item/clothing/glasses/night) && !seer)
see_invisible = SEE_INVISIBLE_MINIMUM 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 if(G.see_invisible >= 0)
var/obj/item/clothing/glasses/hud/O = G see_invisible = G.see_invisible
//VOREStation Add - Support for omnihud glasses else if(!druggy && !seer)
if(istype(G, /obj/item/clothing/glasses/omnihud)) see_invisible = SEE_INVISIBLE_LIVING
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
/mob/living/carbon/human/handle_random_events() /mob/living/carbon/human/handle_random_events()
if(inStasisNow()) if(inStasisNow())
@@ -1733,6 +1718,7 @@
hud_list[SPECIALROLE_HUD] = holder hud_list[SPECIALROLE_HUD] = holder
attempt_vr(src,"handle_hud_list_vr",list()) //VOREStation Add - Custom HUDs. attempt_vr(src,"handle_hud_list_vr",list()) //VOREStation Add - Custom HUDs.
hud_updateflag = 0 hud_updateflag = 0
update_icons()
/mob/living/carbon/human/handle_stunned() /mob/living/carbon/human/handle_stunned()
if(!can_feel_pain()) if(!can_feel_pain())

View File

@@ -152,14 +152,20 @@ Please contact me on #coderbus IRC. ~Carn x
update_hud() //TODO: remove the need for this update_hud() //TODO: remove the need for this
overlays.Cut() overlays.Cut()
if (icon_update) icon = icon('icons/effects/effects.dmi', "icon_state"="nothing")
icon = stand_icon if(has_huds)
for(var/entry in overlays_standing) for(var/I in hud_list)
if(istype(entry, /image)) overlays += I
overlays += entry overlays += backplane
else if(istype(entry, /list))
for(var/inner_entry in entry) overlays += stand_icon
overlays += inner_entry 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) if(species && species.has_floating_eyes)
overlays |= species.get_eyes(src) overlays |= species.get_eyes(src)

View File

@@ -172,16 +172,6 @@ var/list/ai_verbs_default = list(
spawn(5) spawn(5)
new /obj/machinery/ai_powersupply(src) 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 ai_list += src
..() ..()
return return

View File

@@ -150,11 +150,6 @@
process_queued_alarms() process_queued_alarms()
handle_regular_hud_updates() 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() /mob/living/silicon/ai/proc/lacks_power()
if(APU_power) if(APU_power)

View File

@@ -15,12 +15,6 @@
handle_regular_hud_updates() 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(silence_time)
if(world.timeofday >= silence_time) if(world.timeofday >= silence_time)
silence_time = null silence_time = null
@@ -31,7 +25,7 @@
if(health <= 0) if(health <= 0)
death(null,"gives one shrill beep before falling lifeless.") death(null,"gives one shrill beep before falling lifeless.")
/mob/living/silicon/pai/updatehealth() /mob/living/silicon/pai/updatehealth()
if(status_flags & GODMODE) if(status_flags & GODMODE)

View File

@@ -231,21 +231,21 @@
return return
if(!module_state_1) if(!module_state_1)
module_state_1 = O module_state_1 = O
O.layer = 20 O.hud_layerise()
O.screen_loc = inv1.screen_loc O.screen_loc = inv1.screen_loc
contents += O contents += O
if(istype(module_state_1,/obj/item/borg/sight)) if(istype(module_state_1,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode sight_mode |= module_state_1:sight_mode
else if(!module_state_2) else if(!module_state_2)
module_state_2 = O module_state_2 = O
O.layer = 20 O.hud_layerise()
O.screen_loc = inv2.screen_loc O.screen_loc = inv2.screen_loc
contents += O contents += O
if(istype(module_state_2,/obj/item/borg/sight)) if(istype(module_state_2,/obj/item/borg/sight))
sight_mode |= module_state_2:sight_mode sight_mode |= module_state_2:sight_mode
else if(!module_state_3) else if(!module_state_3)
module_state_3 = O module_state_3 = O
O.layer = 20 O.hud_layerise()
O.screen_loc = inv3.screen_loc O.screen_loc = inv3.screen_loc
contents += O contents += O
if(istype(module_state_3,/obj/item/borg/sight)) if(istype(module_state_3,/obj/item/borg/sight))

View File

@@ -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.healths)
if (src.stat != 2) if (src.stat != 2)
if(istype(src,/mob/living/silicon/robot/drone)) if(istype(src,/mob/living/silicon/robot/drone))

View File

@@ -109,7 +109,6 @@
robot_modules_background = new() robot_modules_background = new()
robot_modules_background.icon_state = "block" 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) ident = rand(1, 999)
module_sprites["Basic"] = "robot" module_sprites["Basic"] = "robot"
icontype = "Basic" icontype = "Basic"
@@ -151,15 +150,15 @@
add_robot_verbs() add_robot_verbs()
hud_list[HEALTH_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] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealth100") hud_list[STATUS_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudhealth100", plane = PLANE_CH_STATUS)
hud_list[LIFE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealth100") hud_list[LIFE_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudhealth100", plane = PLANE_CH_LIFE)
hud_list[ID_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank") hud_list[ID_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_ID)
hud_list[WANTED_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank") hud_list[WANTED_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_WANTED)
hud_list[IMPLOYAL_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank") hud_list[IMPLOYAL_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_IMPLOYAL)
hud_list[IMPCHEM_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank") hud_list[IMPCHEM_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_IMPCHEM)
hud_list[IMPTRACK_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank") hud_list[IMPTRACK_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_IMPTRACK)
hud_list[SPECIALROLE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudblank") hud_list[SPECIALROLE_HUD] = gen_hud_image('icons/mob/hud.dmi', src, "hudblank", plane = PLANE_CH_SPECIAL)
/mob/living/silicon/robot/proc/init() /mob/living/silicon/robot/proc/init()
aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src) aiCamera = new/obj/item/device/camera/siliconcam/robot_camera(src)
@@ -812,19 +811,19 @@
return 1 return 1
if(!module_state_1) if(!module_state_1)
module_state_1 = O module_state_1 = O
O.layer = 20 O.hud_layerise()
contents += O contents += O
if(istype(module_state_1,/obj/item/borg/sight)) if(istype(module_state_1,/obj/item/borg/sight))
sight_mode |= module_state_1:sight_mode sight_mode |= module_state_1:sight_mode
else if(!module_state_2) else if(!module_state_2)
module_state_2 = O module_state_2 = O
O.layer = 20 O.hud_layerise()
contents += O contents += O
if(istype(module_state_2,/obj/item/borg/sight)) if(istype(module_state_2,/obj/item/borg/sight))
sight_mode |= module_state_2:sight_mode sight_mode |= module_state_2:sight_mode
else if(!module_state_3) else if(!module_state_3)
module_state_3 = O module_state_3 = O
O.layer = 20 O.hud_layerise()
contents += O contents += O
if(istype(module_state_3,/obj/item/borg/sight)) if(istype(module_state_3,/obj/item/borg/sight))
sight_mode |= module_state_3:sight_mode sight_mode |= module_state_3:sight_mode

View File

@@ -18,8 +18,6 @@
var/obj/item/device/camera/siliconcam/aiCamera = null //photography 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/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/next_alarm_notice
var/list/datum/alarm/queued_alarms = new() var/list/datum/alarm/queued_alarms = new()
@@ -238,17 +236,49 @@
return return
/mob/living/silicon/proc/toggle_sensor_mode() /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) switch(sensor_type)
if ("Security") if ("Security")
sensor_mode = SEC_HUD if(plane_holder)
src << "<span class='notice'>Security records overlay enabled.</span>" //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,"<span class='notice'>Security records overlay enabled.</span>")
if ("Medical") if ("Medical")
sensor_mode = MED_HUD if(plane_holder)
src << "<span class='notice'>Life signs monitor overlay enabled.</span>" //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,"<span class='notice'>Life signs monitor overlay enabled.</span>")
if ("Disable") if ("Disable")
sensor_mode = 0 if(plane_holder)
src << "Sensor augmentations disabled." //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() /mob/living/silicon/verb/pose()
set name = "Set Pose" set name = "Set Pose"

View File

@@ -47,5 +47,12 @@
client.perspective = MOB_PERSPECTIVE client.perspective = MOB_PERSPECTIVE
reload_fullscreen() // Reload any fullscreen overlays this mob has. reload_fullscreen() // Reload any fullscreen overlays this mob has.
add_click_catcher() 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) //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") winset(src, null, "mainwindow.macro=macro hotkey_toggle.is-checked=false input.focus=true input.background-color=#D3B5B5")

View File

@@ -13,6 +13,7 @@
if(mind && mind.current == src) if(mind && mind.current == src)
spellremove(src) spellremove(src)
ghostize() ghostize()
qdel_null(plane_holder)
..() ..()
return QDEL_HINT_HARDDEL_NOW return QDEL_HINT_HARDDEL_NOW

View File

@@ -34,6 +34,9 @@
var/obj/screen/wizard/energy/wiz_energy_display = null var/obj/screen/wizard/energy/wiz_energy_display = null
var/obj/screen/wizard/instability/wiz_instability_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 //spells hud icons - this interacts with add_spell and remove_spell
var/list/obj/screen/movable/spell_master/spell_masters = null var/list/obj/screen/movable/spell_master/spell_masters = null
var/obj/screen/movable/ability_master/ability_master = null var/obj/screen/movable/ability_master/ability_master = null

View File

@@ -355,19 +355,6 @@ proc/is_blind(A)
return 1 return 1
return 0 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("<span class='info'>\icon[icon] [message]</span>", 1)
/proc/mobs_in_area(var/area/A) /proc/mobs_in_area(var/area/A)
var/list/mobs = new var/list/mobs = new
for(var/mob/living/M in mob_list) 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) /mob/proc/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
return 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

View File

@@ -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

View File

@@ -448,13 +448,13 @@
else if (h_user.l_store == src) else if (h_user.l_store == src)
h_user.drop_from_inventory(src) h_user.drop_from_inventory(src)
B.loc = h_user B.loc = h_user
B.layer = 20 B.hud_layerise()
h_user.l_store = B h_user.l_store = B
h_user.update_inv_pockets() h_user.update_inv_pockets()
else if (h_user.r_store == src) else if (h_user.r_store == src)
h_user.drop_from_inventory(src) h_user.drop_from_inventory(src)
B.loc = h_user B.loc = h_user
B.layer = 20 B.hud_layerise()
h_user.r_store = B h_user.r_store = B
h_user.update_inv_pockets() h_user.update_inv_pockets()
else if (h_user.head == src) else if (h_user.head == src)

View File

@@ -131,6 +131,7 @@ var/global/photo_count = 0
var/icon_on = "camera" var/icon_on = "camera"
var/icon_off = "camera_off" var/icon_off = "camera_off"
var/size = 3 var/size = 3
var/picture_planes = list(PLANE_WORLD)
/obj/item/device/camera/verb/change_size() /obj/item/device/camera/verb/change_size()
set name = "Set Photo Focus" set name = "Set Photo Focus"
@@ -181,6 +182,7 @@ var/global/photo_count = 0
// As well as anything that isn't invisible. // As well as anything that isn't invisible.
for(var/atom/A in the_turf) for(var/atom/A in the_turf)
if(A.invisibility) continue if(A.invisibility) continue
if(!(A.plane in picture_planes)) continue
atoms.Add(A) atoms.Add(A)
// Sort the atoms into their layers // Sort the atoms into their layers

BIN
icons/misc/win32.dmi Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

View File

@@ -21,6 +21,7 @@
#include "code\world.dm" #include "code\world.dm"
#include "code\__defines\_compile_options.dm" #include "code\__defines\_compile_options.dm"
#include "code\__defines\_planes+layers.dm" #include "code\__defines\_planes+layers.dm"
#include "code\__defines\_planes+layers_vr.dm"
#include "code\__defines\_tick.dm" #include "code\__defines\_tick.dm"
#include "code\__defines\admin.dm" #include "code\__defines\admin.dm"
#include "code\__defines\appearance.dm" #include "code\__defines\appearance.dm"
@@ -353,7 +354,6 @@
#include "code\defines\procs\announce.dm" #include "code\defines\procs\announce.dm"
#include "code\defines\procs\AStar.dm" #include "code\defines\procs\AStar.dm"
#include "code\defines\procs\dbcore.dm" #include "code\defines\procs\dbcore.dm"
#include "code\defines\procs\hud.dm"
#include "code\defines\procs\hud_vr.dm" #include "code\defines\procs\hud_vr.dm"
#include "code\defines\procs\radio.dm" #include "code\defines\procs\radio.dm"
#include "code\defines\procs\sd_Alert.dm" #include "code\defines\procs\sd_Alert.dm"
@@ -1736,7 +1736,6 @@
#include "code\modules\lighting\lighting_setup.dm" #include "code\modules\lighting\lighting_setup.dm"
#include "code\modules\lighting\lighting_source.dm" #include "code\modules\lighting\lighting_source.dm"
#include "code\modules\lighting\lighting_turf.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.dm"
#include "code\modules\lore_codex\codex_tree.dm" #include "code\modules\lore_codex\codex_tree.dm"
#include "code\modules\lore_codex\pages.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_grab_specials.dm"
#include "code\modules\mob\mob_helpers.dm" #include "code\modules\mob\mob_helpers.dm"
#include "code\modules\mob\mob_movement.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\mob_transformation_simple.dm"
#include "code\modules\mob\say.dm" #include "code\modules\mob\say.dm"
#include "code\modules\mob\say_vr.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\death.dm"
#include "code\modules\mob\living\carbon\metroid\emote.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\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\life.dm"
#include "code\modules\mob\living\carbon\metroid\login.dm" #include "code\modules\mob\living\carbon\metroid\login.dm"
#include "code\modules\mob\living\carbon\metroid\metroid.dm" #include "code\modules\mob\living\carbon\metroid\metroid.dm"