diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm index 4a1e4f20f98..41d96faa5f7 100644 --- a/code/__DEFINES/hud.dm +++ b/code/__DEFINES/hud.dm @@ -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 diff --git a/code/datums/hud.dm b/code/datums/hud.dm index 50152c4873d..f8ce8b79b1b 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -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(), \ diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 6bd00d286fe..f4f1e473091 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -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 = "" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 1450278e736..aa4ba35eacb 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -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 diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 4d2255a09ab..e17f86a2eb3 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -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', diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 997920c8e23..181cc093b73 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -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, "All HUDs enabled.") - 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, "Security HUD set.") 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, "Medical HUD set.") 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, "Diagnostic HUD set.") else data_hud_seen = FALSE diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 31825ea3765..3598dfdd791 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -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 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 1c232f9f43c..410c0b0acd6 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -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 diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index c923e0912b7..2f2d7385bb3 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -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() diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index cb45fd98e8b..3ca3192530a 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -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) diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index 53907e86d79..89acc22e26d 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -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" diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index df6b8f4de1f..b7b1d418fa2 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ diff --git a/icons/obj/aibots.dmi b/icons/obj/aibots.dmi index a45ff1546da..655b93dc7af 100644 Binary files a/icons/obj/aibots.dmi and b/icons/obj/aibots.dmi differ