mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Make AR glasses show messages like HUDs
So AR-M get the medibot messages, AR-S get the security bot messages, and now AR-E glasses get atmos and fire alarm messages
This commit is contained in:
@@ -71,7 +71,11 @@ mob/proc/handle_regular_hud_updates() //Used in the life.dm of mobs that can use
|
|||||||
client.images -= hud
|
client.images -= hud
|
||||||
med_hud_users -= src
|
med_hud_users -= src
|
||||||
sec_hud_users -= src
|
sec_hud_users -= src
|
||||||
|
//VOREStation Add - HUD lists
|
||||||
|
eng_hud_users -= src
|
||||||
|
sci_hud_users -= src
|
||||||
|
gen_hud_users -= src
|
||||||
|
//VOREStation Add End
|
||||||
mob/proc/in_view(var/turf/T)
|
mob/proc/in_view(var/turf/T)
|
||||||
return view(T)
|
return view(T)
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,32 @@
|
|||||||
|
var/global/list/gen_hud_users = list() // List of all entities using a generic AR shades.
|
||||||
|
var/global/list/eng_hud_users = list() // List of all entities using a engineer HUD.
|
||||||
|
var/global/list/sci_hud_users = list() // List of all entities using a science HUD.
|
||||||
|
|
||||||
|
/proc/broadcast_engineering_hud_message(var/message, var/broadcast_source)
|
||||||
|
broadcast_hud_message(message, broadcast_source, eng_hud_users, /obj/item/clothing/glasses/omnihud/eng)
|
||||||
|
|
||||||
|
/proc/broadcast_science_hud_message(var/message, var/broadcast_source)
|
||||||
|
broadcast_hud_message(message, broadcast_source, sci_hud_users, /obj/item/clothing/glasses/omnihud/rnd)
|
||||||
|
|
||||||
proc/process_omni_hud(var/mob/M, var/mode, var/mob/Alt)
|
proc/process_omni_hud(var/mob/M, var/mode, var/mob/Alt)
|
||||||
if(!can_process_hud(M))
|
if(!can_process_hud(M))
|
||||||
return
|
return
|
||||||
|
|
||||||
var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, med_hud_users)
|
var/datum/arranged_hud_process/P
|
||||||
|
switch(mode)
|
||||||
|
if("med")
|
||||||
|
P = arrange_hud_process(M, Alt, med_hud_users)
|
||||||
|
if("sec")
|
||||||
|
P = arrange_hud_process(M, Alt, sec_hud_users)
|
||||||
|
if("eng")
|
||||||
|
P = arrange_hud_process(M, Alt, eng_hud_users)
|
||||||
|
if("sci")
|
||||||
|
P = arrange_hud_process(M, Alt, sci_hud_users)
|
||||||
|
if("best")
|
||||||
|
P = arrange_hud_process(M, Alt, sec_hud_users)
|
||||||
|
else
|
||||||
|
P = arrange_hud_process(M, Alt, gen_hud_users)
|
||||||
|
|
||||||
for(var/mob/living/carbon/human/guy in P.Mob.in_view(P.Turf))
|
for(var/mob/living/carbon/human/guy in P.Mob.in_view(P.Turf))
|
||||||
if(P.Mob.see_invisible < guy.invisibility)
|
if(P.Mob.see_invisible < guy.invisibility)
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -17,3 +17,10 @@
|
|||||||
if(A.max_severity() == 1)
|
if(A.max_severity() == 1)
|
||||||
minor_alarms.Add(A)
|
minor_alarms.Add(A)
|
||||||
return minor_alarms
|
return minor_alarms
|
||||||
|
|
||||||
|
//VOREStation Add - Alarm for AR glasses
|
||||||
|
/datum/alarm_handler/atmosphere/on_alarm_change(var/datum/alarm/alarm, var/was_raised)
|
||||||
|
..()
|
||||||
|
var/atom/source = alarm.sources_assoc[1]
|
||||||
|
broadcast_engineering_hud_message("Alarm in [alarm.origin]!", source)
|
||||||
|
//VOREStation Add End
|
||||||
@@ -6,6 +6,11 @@
|
|||||||
if(istype(A))
|
if(istype(A))
|
||||||
if(was_raised)
|
if(was_raised)
|
||||||
A.fire_alert()
|
A.fire_alert()
|
||||||
|
|
||||||
|
//VOREStation Add - Alarm for AR glasses uses
|
||||||
|
var/atom/source = alarm.sources_assoc[1]
|
||||||
|
broadcast_engineering_hud_message("Alarm in [alarm.origin]!", source)
|
||||||
|
//VOREStation Add End
|
||||||
else
|
else
|
||||||
A.fire_reset()
|
A.fire_reset()
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
name = "AR-E glasses"
|
name = "AR-E glasses"
|
||||||
desc = "The KHI-62-E AR glasses are a design from Kitsuhana Heavy Industries. \
|
desc = "The KHI-62-E AR glasses are a design from Kitsuhana Heavy Industries. \
|
||||||
These have been upgraded with advanced electrochromic lenses to protect your eyes during welding."
|
These have been upgraded with advanced electrochromic lenses to protect your eyes during welding."
|
||||||
mode = "civ"
|
mode = "eng"
|
||||||
flash_prot = 2 //Welding protection.
|
flash_prot = 2 //Welding protection.
|
||||||
action_button_name = "AR Console (Station Alerts)"
|
action_button_name = "AR Console (Station Alerts)"
|
||||||
arscreen_path = /datum/nano_module/alarm_monitor
|
arscreen_path = /datum/nano_module/alarm_monitor
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
name = "AR-R glasses"
|
name = "AR-R glasses"
|
||||||
desc = "The KHI-62-R AR glasses are a design from Kitsuhana Heavy Industries. \
|
desc = "The KHI-62-R AR glasses are a design from Kitsuhana Heavy Industries. \
|
||||||
These have been ... modified ... to fit into a different frame."
|
These have been ... modified ... to fit into a different frame."
|
||||||
mode = "civ"
|
mode = "sci"
|
||||||
icon = 'icons/obj/clothing/glasses.dmi'
|
icon = 'icons/obj/clothing/glasses.dmi'
|
||||||
icon_override = null
|
icon_override = null
|
||||||
icon_state = "purple"
|
icon_state = "purple"
|
||||||
|
|||||||
Reference in New Issue
Block a user