Diagnostic HUD Fixes and Upgrade

This commit is contained in:
Fox McCloud
2020-07-04 20:16:34 -04:00
parent cb29647522
commit 69b7ecd6fe
13 changed files with 46 additions and 24 deletions
+4 -3
View File
@@ -25,8 +25,9 @@
#define PLANT_PEST_HUD "20"// Pest level
#define PLANT_WEED_HUD "21"// Weed level
#define DIAG_TRACK_HUD "22"// Mech tracking beacon
#define DIAG_PATH_HUD "23"//Bot path indicators
#define GLAND_HUD "24"//Gland indicators for abductors
#define DIAG_AIRLOCK_HUD "23" // Airlock shock overlay
#define DIAG_PATH_HUD "24"//Bot path indicators
#define GLAND_HUD "25"//Gland indicators for abductors
//by default everything in the hud_list of an atom is an image
//a value in hud_list with one of these will change that behavior
@@ -38,7 +39,7 @@
#define DATA_HUD_SECURITY_ADVANCED 2
#define DATA_HUD_MEDICAL_BASIC 3
#define DATA_HUD_MEDICAL_ADVANCED 4
#define DATA_HUD_DIAGNOSTIC 5
#define DATA_HUD_DIAGNOSTIC_BASIC 5
#define DATA_HUD_DIAGNOSTIC_ADVANCED 6
#define DATA_HUD_HYDROPONIC 7
//antag HUD defines
+1 -1
View File
@@ -7,7 +7,7 @@ GLOBAL_LIST_INIT(huds, list( \
DATA_HUD_SECURITY_ADVANCED = new/datum/atom_hud/data/human/security/advanced(), \
DATA_HUD_MEDICAL_BASIC = new/datum/atom_hud/data/human/medical/basic(), \
DATA_HUD_MEDICAL_ADVANCED = new/datum/atom_hud/data/human/medical/advanced(), \
DATA_HUD_DIAGNOSTIC = new/datum/atom_hud/data/diagnostic(), \
DATA_HUD_DIAGNOSTIC_BASIC = new/datum/atom_hud/data/diagnostic/basic(), \
DATA_HUD_DIAGNOSTIC_ADVANCED = new/datum/atom_hud/data/diagnostic/advanced(), \
DATA_HUD_HYDROPONIC = new/datum/atom_hud/data/hydroponic(), \
ANTAG_HUD_CULT = new/datum/atom_hud/antag(), \
+13 -1
View File
@@ -44,10 +44,12 @@
hud_icons = list(ID_HUD, IMPTRACK_HUD, IMPMINDSHIELD_HUD, IMPCHEM_HUD, WANTED_HUD)
/datum/atom_hud/data/diagnostic
/datum/atom_hud/data/diagnostic/basic
hud_icons = list (DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_BOT_HUD, DIAG_TRACK_HUD)
/datum/atom_hud/data/diagnostic/advanced
hud_icons = list (DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_BOT_HUD, DIAG_TRACK_HUD, DIAG_PATH_HUD)
hud_icons = list (DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_BOT_HUD, DIAG_TRACK_HUD, DIAG_AIRLOCK_HUD, DIAG_PATH_HUD)
/datum/atom_hud/data/bot_path
hud_icons = list(DIAG_PATH_HUD)
@@ -446,3 +448,13 @@
holder.icon_state = ""
return
holder.icon_state = "hudweed[RoundPlantBar(weedlevel/10)]"
/*~~~~~~~~~~~~
Airlocks!
~~~~~~~~~~~~~*/
/obj/machinery/door/airlock/proc/diag_hud_set_electrified()
var/image/holder = hud_list[DIAG_AIRLOCK_HUD]
if(isElectrified())
holder.icon_state = "electrified"
else
holder.icon_state = ""
+6
View File
@@ -50,6 +50,7 @@ GLOBAL_LIST_EMPTY(airlock_overlays)
damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_N
autoclose = TRUE
explosion_block = 1
hud_possible = list(DIAG_AIRLOCK_HUD)
assemblytype = /obj/structure/door_assembly
normalspeed = 1
siemens_strength = 1
@@ -133,6 +134,10 @@ About the new airlock wires panel:
if(damage_deflection == AIRLOCK_DAMAGE_DEFLECTION_N && security_level > AIRLOCK_SECURITY_METAL)
damage_deflection = AIRLOCK_DAMAGE_DEFLECTION_R
update_icon()
prepare_huds()
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
diag_hud.add_to_hud(src)
diag_hud_set_electrified()
/obj/machinery/door/airlock/proc/update_other_id()
for(var/obj/machinery/door/airlock/A in GLOB.airlocks)
@@ -285,6 +290,7 @@ About the new airlock wires panel:
electrified_timer = addtimer(CALLBACK(src, .proc/electrify, 0), duration SECONDS, TIMER_UNIQUE | TIMER_STOPPABLE)
if(feedback && message)
to_chat(usr, message)
diag_hud_set_electrified()
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
+1 -1
View File
@@ -61,7 +61,7 @@
desc = "A heads-up display capable of analyzing the integrity and status of robotics and exosuits."
icon_state = "diagnostichud"
origin_tech = "magnets=2;engineering=2"
HUDType = DATA_HUD_DIAGNOSTIC
HUDType = DATA_HUD_DIAGNOSTIC_BASIC
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi',
+6 -6
View File
@@ -321,14 +321,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
switch(data_hud_seen) //give new huds
if(FALSE)
data_hud_seen = DATA_HUD_DIAGNOSTIC + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED
show_me_the_hud(DATA_HUD_DIAGNOSTIC)
data_hud_seen = DATA_HUD_DIAGNOSTIC_ADVANCED + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED
show_me_the_hud(DATA_HUD_DIAGNOSTIC_ADVANCED)
show_me_the_hud(DATA_HUD_SECURITY_ADVANCED)
show_me_the_hud(DATA_HUD_MEDICAL_ADVANCED)
to_chat(src, "<span class='notice'>All HUDs enabled.</span>")
if(DATA_HUD_DIAGNOSTIC + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED)
if(DATA_HUD_DIAGNOSTIC_ADVANCED + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED)
data_hud_seen = DATA_HUD_SECURITY_ADVANCED
remove_the_hud(DATA_HUD_DIAGNOSTIC)
remove_the_hud(DATA_HUD_DIAGNOSTIC_ADVANCED)
remove_the_hud(DATA_HUD_MEDICAL_ADVANCED)
to_chat(src, "<span class='notice'>Security HUD set.</span>")
if(DATA_HUD_SECURITY_ADVANCED)
@@ -337,9 +337,9 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
show_me_the_hud(DATA_HUD_MEDICAL_ADVANCED)
to_chat(src, "<span class='notice'>Medical HUD set.</span>")
if(DATA_HUD_MEDICAL_ADVANCED)
data_hud_seen = DATA_HUD_DIAGNOSTIC
data_hud_seen = DATA_HUD_DIAGNOSTIC_ADVANCED
remove_the_hud(DATA_HUD_MEDICAL_ADVANCED)
show_me_the_hud(DATA_HUD_DIAGNOSTIC)
show_me_the_hud(DATA_HUD_DIAGNOSTIC_ADVANCED)
to_chat(src, "<span class='notice'>Diagnostic HUD set.</span>")
else
data_hud_seen = FALSE
@@ -417,7 +417,7 @@
return FALSE
else if(isobserver(M))
var/mob/dead/observer/O = M
if(O.data_hud_seen == DATA_HUD_SECURITY_ADVANCED || O.data_hud_seen == DATA_HUD_DIAGNOSTIC + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED)
if(O.data_hud_seen == DATA_HUD_SECURITY_ADVANCED || O.data_hud_seen == DATA_HUD_DIAGNOSTIC_ADVANCED + DATA_HUD_SECURITY_ADVANCED + DATA_HUD_MEDICAL_ADVANCED)
switch(hudtype)
if("security")
return TRUE
+1
View File
@@ -41,6 +41,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list(
move_resist = MOVE_FORCE_NORMAL
density = 1
status_flags = CANSTUN|CANPARALYSE|CANPUSH
d_hud = DATA_HUD_DIAGNOSTIC_ADVANCED
mob_size = MOB_SIZE_LARGE
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS
see_in_dark = 8
+8 -8
View File
@@ -16,7 +16,7 @@
var/list/alarm_handlers = list() // List of alarm handlers this silicon is registered to
var/designation = ""
var/obj/item/camera/siliconcam/aiCamera = null //photography
//Used in say.dm, allows for pAIs to have different say flavor text, as well as silicons, although the latter is not implemented.
//Used in say.dm, allows for pAIs to have different say flavor text, as well as silicons, although the latter is not implemented.
var/speak_statement = "states"
var/speak_exclamation = "declares"
var/speak_query = "queries"
@@ -33,15 +33,15 @@
var/med_hud = DATA_HUD_MEDICAL_ADVANCED //Determines the med hud to use
var/sec_hud = DATA_HUD_SECURITY_ADVANCED //Determines the sec hud to use
var/d_hud = DATA_HUD_DIAGNOSTIC_ADVANCED //There is only one kind of diag hud
var/d_hud = DATA_HUD_DIAGNOSTIC_BASIC //There is only one kind of diag hud
var/obj/item/radio/common_radio
/mob/living/silicon/New()
GLOB.silicon_mob_list |= src
..()
var/datum/atom_hud/data/diagnostic/diag_hud = GLOB.huds[DATA_HUD_DIAGNOSTIC]
diag_hud.add_to_hud(src)
for(var/datum/atom_hud/data/diagnostic/diag_hud in GLOB.huds)
diag_hud.add_to_hud(src)
diag_hud_set_status()
diag_hud_set_health()
add_language("Galactic Common")
@@ -248,10 +248,10 @@
/mob/living/silicon/proc/remove_med_sec_hud()
var/datum/atom_hud/secsensor = GLOB.huds[sec_hud]
var/datum/atom_hud/medsensor = GLOB.huds[med_hud]
for(var/datum/atom_hud/data/diagnostic/diagsensor in GLOB.huds)
diagsensor.remove_hud_from(src)
var/datum/atom_hud/diagsensor = GLOB.huds[d_hud]
secsensor.remove_hud_from(src)
medsensor.remove_hud_from(src)
diagsensor.remove_hud_from(src)
/mob/living/silicon/proc/add_sec_hud()
@@ -263,8 +263,8 @@
medsensor.add_hud_to(src)
/mob/living/silicon/proc/add_diag_hud()
for(var/datum/atom_hud/data/diagnostic/diagsensor in GLOB.huds)
diagsensor.add_hud_to(src)
var/datum/atom_hud/diagsensor = GLOB.huds[d_hud]
diagsensor.add_hud_to(src)
/mob/living/silicon/proc/toggle_sensor_mode()
@@ -77,7 +77,7 @@
var/control_freq = BOT_FREQ // bot control frequency
var/bot_filter // The radio filter the bot uses to identify itself on the network.
var/bot_type = 0 //The type of bot it is, for radio control.
var/data_hud_type = DATA_HUD_DIAGNOSTIC //The type of data HUD the bot uses. Diagnostic by default.
var/data_hud_type = DATA_HUD_DIAGNOSTIC_BASIC //The type of data HUD the bot uses. Diagnostic by default.
//This holds text for what the bot is mode doing, reported on the remote bot control interface.
var/list/mode_name = list("In Pursuit","Preparing to Arrest", "Arresting", \
"Beginning Patrol", "Patrolling", "Summoned by PDA", \
@@ -1060,6 +1060,8 @@ Pass a positive integer as an argument to override a bot's default speed.
if(newpath)
for(var/i in 1 to newpath.len)
var/turf/T = newpath[i]
if(T == loc) //don't bother putting an image if it's where we already exist.
continue
var/direction = NORTH
if(i > 1)
var/turf/prevT = path[i - 1]
@@ -1102,7 +1104,7 @@ Pass a positive integer as an argument to override a bot's default speed.
return
var/image/I = path[path[1]]
if(I)
I.icon = null
I.icon_state = null
path.Cut(1, 2)
/mob/living/simple_animal/bot/proc/drop_part(obj/item/drop_item, dropzone)
+1 -1
View File
@@ -115,7 +115,7 @@
implant_color = "#ff9000"
origin_tech = "materials=4;engineering=4;biotech=4"
aug_message = "You see the diagnostic information of the synthetics around you..."
HUD_type = DATA_HUD_DIAGNOSTIC
HUD_type = DATA_HUD_DIAGNOSTIC_ADVANCED
/obj/item/organ/internal/cyberimp/eyes/hud/security
name = "Security HUD implant"
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 79 KiB