diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm index fc591df9c14..c7aae28faf7 100644 --- a/code/__DEFINES/hud.dm +++ b/code/__DEFINES/hud.dm @@ -1,11 +1,35 @@ -// for secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list of humans. -#define HEALTH_HUD 1 // a simple line rounding the mob's number health -#define STATUS_HUD 2 // alive, dead, diseased, etc. -#define ID_HUD 3 // the job asigned to your ID -#define WANTED_HUD 4 // wanted, released, parroled, security status -#define IMPLOYAL_HUD 5 // loyality implant -#define IMPCHEM_HUD 6 // chemical implant -#define IMPTRACK_HUD 7 // tracking implant -#define SPECIALROLE_HUD 8 // AntagHUD image -#define STATUS_HUD_OOC 9 // STATUS_HUD without virus db check for someone being ill. -#define NATIONS_HUD 10 //Show nations icons during nations gamemode +// for secHUDs and medHUDs and variants. The number is the location of the image on the list hud_list +// note: if you add more HUDs, even for non-human atoms, make sure to use unique numbers for the defines! +// /datum/hud expects these to be unique +#define HEALTH_HUD "1" // a simple line rounding the mob's number health +#define STATUS_HUD "2" // alive, dead, diseased, etc. +#define ID_HUD "3" // the job asigned to your ID +#define WANTED_HUD "4" // wanted, released, parroled, security status +#define IMPLOYAL_HUD "5" // loyality implant +#define IMPCHEM_HUD "6" // chemical implant +#define IMPTRACK_HUD "7" // tracking implant +#define SPECIALROLE_HUD "8" // AntagHUD image +#define STATUS_HUD_OOC "9" // STATUS_HUD without virus db check for someone being ill. +#define NATIONS_HUD "10" //Show nations icons during nations gamemode +#define DIAG_STAT_HUD "11" // Silicon/Mech Status +#define DIAG_HUD "12" // Silicon health bar +#define DIAG_BATT_HUD "13"// Borg/Mech power meter +#define DIAG_MECH_HUD "14"// Mech health bar + +//data HUD (medhud, sechud) defines +//Don't forget to update human/New() if you change these! +#define DATA_HUD_SECURITY_BASIC 1 +#define DATA_HUD_SECURITY_ADVANCED 2 +#define DATA_HUD_MEDICAL_BASIC 3 +#define DATA_HUD_MEDICAL_ADVANCED 4 +#define DATA_HUD_DIAGNOSTIC 5 +//antag HUD defines +#define ANTAG_HUD_CULT 6 +#define ANTAG_HUD_REV 7 +#define ANTAG_HUD_OPS 8 +#define ANTAG_HUD_WIZ 9 +#define ANTAG_HUD_SHADOW 10 +#define ANTAG_HUD_VAMPIRE 11 + +//NATIONS +#define DATA_HUD_NATIONS 12 \ No newline at end of file diff --git a/code/__HELPERS/mobs.dm b/code/__HELPERS/mobs.dm index fe27e399c84..eb79649dcec 100644 --- a/code/__HELPERS/mobs.dm +++ b/code/__HELPERS/mobs.dm @@ -116,28 +116,6 @@ proc/age2agedescription(age) if(70 to INFINITY) return "elderly" else return "unknown" -proc/RoundHealth(health) - switch(health) - if(100 to INFINITY) - return "health100" - if(70 to 100) - return "health80" - if(50 to 70) - return "health60" - if(30 to 50) - return "health40" - if(18 to 30) - return "health25" - if(5 to 18) - return "health10" - if(1 to 5) - return "health1" - if(-99 to 0) - return "health0" - else - return "health-100" - return "0" - /* Proc for attack log creation, because really why not diff --git a/code/datums/hud.dm b/code/datums/hud.dm new file mode 100644 index 00000000000..3b52ab3c7ca --- /dev/null +++ b/code/datums/hud.dm @@ -0,0 +1,84 @@ +/* HUD DATUMS */ + +///GLOBAL HUD LIST +var/datum/atom_hud/huds = list( + DATA_HUD_SECURITY_BASIC = new/datum/atom_hud/data/human/security/basic(), + 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(), + ANTAG_HUD_CULT = new/datum/atom_hud/antag(), + ANTAG_HUD_REV = new/datum/atom_hud/antag(), + ANTAG_HUD_OPS = new/datum/atom_hud/antag(), + ANTAG_HUD_WIZ = new/datum/atom_hud/antag(), + ANTAG_HUD_SHADOW = new/datum/atom_hud/antag(), + DATA_HUD_NATIONS = new/datum/atom_hud/data/human/nations() + ) + +/datum/atom_hud + var/list/atom/hudatoms = list() //list of all atoms which display this hud + var/list/mob/hudusers = list() //list with all mobs who can see the hud + var/list/hud_icons = list() //these will be the indexes for the atom's hud_list + +/datum/atom_hud/proc/remove_hud_from(mob/M) + if(!M) + return + //if(src in M.permanent_huds)//I will deal with you later -Fethas + // return + for(var/atom/A in hudatoms) + remove_from_single_hud(M, A) + hudusers -= M + +/datum/atom_hud/proc/remove_from_hud(atom/A) + if(!A) + return + for(var/mob/M in hudusers) + remove_from_single_hud(M, A) + hudatoms -= A + +/datum/atom_hud/proc/remove_from_single_hud(mob/M, atom/A) //unsafe, no sanity apart from client + if(!M || !M.client || !A) + return + for(var/i in hud_icons) + M.client.images -= A.hud_list[i] + +/datum/atom_hud/proc/add_hud_to(mob/M) + if(!M) + return + hudusers |= M + for(var/atom/A in hudatoms) + add_to_single_hud(M, A) + +/datum/atom_hud/proc/add_to_hud(atom/A) + if(!A) + return + hudatoms |= A + for(var/mob/M in hudusers) + add_to_single_hud(M, A) + +/datum/atom_hud/proc/add_to_single_hud(mob/M, atom/A) //unsafe, no sanity apart from client + if(!M || !M.client || !A) + return + for(var/i in hud_icons) + if(A.hud_list[i]) + M.client.images |= A.hud_list[i] + +//MOB PROCS +/mob/proc/reload_huds() + //var/gang_huds = list() + //if(ticker.mode) + // for(var/datum/gang/G in ticker.mode.gangs) + // gang_huds += G.ganghud + + for(var/datum/atom_hud/hud in huds)//|gang_huds)) + if(src in hud.hudusers) + hud.add_hud_to(src) + +/mob/new_player/reload_huds() + return + +/mob/proc/add_click_catcher() + client.screen += client.void + +/mob/new_player/add_click_catcher() + return \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 0ac395baf02..514cba49c9a 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -58,6 +58,9 @@ var/datum/vampire/vampire //vampire holder var/datum/nations/nation //nation holder + var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state + var/datum/atom_hud/antag/antag_hud = null //this mind's antag HUD + var/rev_cooldown = 0 // the world.time since the mob has been brigged, or -1 if not at all @@ -79,6 +82,8 @@ if(new_character.mind) //remove any mind currently in our new body's mind variable new_character.mind.current = null + var/datum/atom_hud/antag/hud_to_transfer = antag_hud//we need this because leave_hud() will clear this list + transfer_antag_huds(hud_to_transfer) //inherit the antag HUD current = new_character //link ourself to our new body new_character.mind = src //and link our new body to ourself @@ -1054,7 +1059,7 @@ log_admin("[key_name(usr)] has thralled [current].") else if (href_list["silicon"]) - current.hud_updateflag |= (1 << SPECIALROLE_HUD) + //current.hud_updateflag |= (1 << SPECIALROLE_HUD) switch(href_list["silicon"]) if("unmalf") if(src in ticker.mode.malf_ai) diff --git a/code/defines/procs/hud.dm b/code/defines/procs/hud.dm deleted file mode 100644 index f51cb42d4cb..00000000000 --- a/code/defines/procs/hud.dm +++ /dev/null @@ -1,94 +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! */ - -//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 || patient.alpha < 127) - continue - - if(!local_scanner) - if(istype(patient.w_uniform, /obj/item/clothing/under)) - var/obj/item/clothing/under/U = patient.w_uniform - if(U.sensor_mode < 2) - continue - else - continue - - P.Client.images += patient.hud_list[HEALTH_HUD] - if(local_scanner) - P.Client.images += patient.hud_list[STATUS_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 || perp.alpha < 127) - 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] - - -/proc/process_antag_hud(var/mob/M, var/mob/Alt) - if(!can_process_hud(M)) - return - var/datum/arranged_hud_process/P = arrange_hud_process(M, Alt, antag_hud_users) - for(var/mob/living/carbon/human/target in P.Mob.in_view(P.Turf)) - if(P.Mob.see_invisible < target.invisibility || target.alpha < 127) - continue - - P.Client.images += target.hud_list[SPECIALROLE_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/regular_hud_updates() //Used in the life.dm of mobs that can use HUDs. - if(client) - for(var/image/hud in client.images) - if(copytext(hud.icon_state,1,4) == "hud") //this makes me weep - client.images -= hud - med_hud_users -= src - sec_hud_users -= src - antag_hud_users -= src - -/mob/proc/in_view(var/turf/T) - return view(T) - -/mob/aiEye/in_view(var/turf/T) - var/list/viewed = new - for(var/mob/living/carbon/human/H in mob_list) - if(get_dist(H, T) <= 7) - viewed += H - return viewed diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 3fa9337059a..374609d7963 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -17,6 +17,12 @@ ///Chemistry. var/datum/reagents/reagents = null + //This atom's HUD (med/sec, etc) images. Associative list. + var/list/image/hud_list = list() + //HUD images that this atom can provide. + var/list/hud_possible + + //var/chem_is_open_container = 0 // replaced by OPENCONTAINER flags and atom/proc/is_open_container() ///Chemistry. diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm new file mode 100644 index 00000000000..b7cff80f8f4 --- /dev/null +++ b/code/game/data_huds.dm @@ -0,0 +1,263 @@ + /* Data HUDs have been rewritten in a more generic way. + * In short, they now use an observer-listener pattern. + * See code/datum/hud.dm for the generic hud datum. + * Update the HUD icons when needed with the appropriate hook. (see below) + */ + +/* DATA HUD DATUMS */ + +/atom/proc/add_to_all_human_data_huds() + for(var/datum/atom_hud/data/human/hud in huds) hud.add_to_hud(src) + +/atom/proc/remove_from_all_data_huds() + for(var/datum/atom_hud/data/hud in huds) hud.remove_from_hud(src) + +/datum/atom_hud/data + +/datum/atom_hud/data/human/medical + hud_icons = list(HEALTH_HUD, STATUS_HUD) + +/datum/atom_hud/data/human/medical/basic + +/datum/atom_hud/data/human/medical/basic/proc/check_sensors(mob/living/carbon/human/H) + if(!istype(H)) return 0 + var/obj/item/clothing/under/U = H.w_uniform + if(!istype(U)) return 0 + if(U.sensor_mode <= 2) return 0 + return 1 + +/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H) + if(check_sensors(H)) + ..() + +/datum/atom_hud/data/human/medical/basic/proc/update_suit_sensors(mob/living/carbon/H) + check_sensors(H) ? add_to_hud(H) : remove_from_hud(H) + +/datum/atom_hud/data/human/medical/advanced + +/datum/atom_hud/data/human/security + +/datum/atom_hud/data/human/security/basic + hud_icons = list(ID_HUD) + +/datum/atom_hud/data/human/security/advanced + hud_icons = list(ID_HUD, IMPTRACK_HUD, IMPLOYAL_HUD, IMPCHEM_HUD, WANTED_HUD) + +/datum/atom_hud/data/diagnostic + hud_icons = list (DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD) + + +/datum/atom_hud/data/human/nations + hud_icons = list(NATIONS_HUD) +/* MED/SEC/DIAG HUD HOOKS */ + +/* + * THESE HOOKS SHOULD BE CALLED BY THE MOB SHOWING THE HUD + */ + +/*********************************************** + Medical HUD! Basic mode needs suit sensors on. +************************************************/ + +//HELPERS + +//called when a carbon changes virus +/mob/living/carbon/proc/check_virus() + for (var/ID in virus2) + if (ID in virusDB) + return 1 + return 0 +//helper for getting the appropriate health status +/proc/RoundHealth(health) + switch(health) + if(100 to INFINITY) + return "health100" + if(70 to 100) + return "health80" + if(50 to 70) + return "health60" + if(30 to 50) + return "health40" + if(18 to 30) + return "health25" + if(5 to 18) + return "health10" + if(1 to 5) + return "health1" + if(-99 to 0) + return "health0" + else + return "health-100" + return "0" + +///HOOKS + +//called when a human changes suit sensors +/mob/living/carbon/proc/update_suit_sensors() + var/datum/atom_hud/data/human/medical/basic/B = huds[DATA_HUD_MEDICAL_BASIC] + B.update_suit_sensors(src) + + +//called when a carbon changes health +/mob/living/carbon/proc/med_hud_set_health() + var/image/holder = hud_list[HEALTH_HUD] + if(stat == 2) + holder.icon_state = "hudhealth-100" + else + holder.icon_state = "hud[RoundHealth(health)]" + +//called when a carbon changes stat, virus or XENO_HOST +/mob/living/carbon/proc/med_hud_set_status() + var/image/holder = hud_list[STATUS_HUD] + if(stat == 2) + holder.icon_state = "huddead" + else if(status_flags & XENO_HOST) + holder.icon_state = "hudxeno" + else if(check_virus()) + holder.icon_state = "hudill" + else if(has_brain_worms()) + var/mob/living/simple_animal/borer/B = has_brain_worms() + if(B.controlling) + holder.icon_state = "hudbrainworm" + else + holder.icon_state = "hudhealthy" + else + holder.icon_state = "hudhealthy" + + + +/*********************************************** + Security HUDs! Basic mode shows only the job. +************************************************/ + +//HOOKS + +/mob/living/carbon/human/proc/sec_hud_set_ID() + var/image/holder = hud_list[ID_HUD] + holder.icon_state = "hudunknown" + if(wear_id) + holder.icon_state = "hud[ckey(wear_id.GetJobName())]" + sec_hud_set_security_status() + + + +/mob/living/carbon/human/proc/sec_hud_set_implants() + var/image/holder + for(var/i in list(IMPTRACK_HUD, IMPLOYAL_HUD, IMPCHEM_HUD)) + holder = hud_list[i] + holder.icon_state = null + for(var/obj/item/weapon/implant/I in src) + if(I.implanted) + if(istype(I,/obj/item/weapon/implant/tracking)) + holder = hud_list[IMPTRACK_HUD] + holder.icon_state = "hud_imp_tracking" + else if(istype(I,/obj/item/weapon/implant/loyalty)) + holder = hud_list[IMPLOYAL_HUD] + holder.icon_state = "hud_imp_loyal" + else if(istype(I,/obj/item/weapon/implant/chem)) + holder = hud_list[IMPCHEM_HUD] + holder.icon_state = "hud_imp_chem" + +/mob/living/carbon/human/proc/sec_hud_set_security_status() + var/image/holder = hud_list[WANTED_HUD] + var/perpname = get_face_name(get_id_name("")) + if(perpname) + var/datum/data/record/R = find_record("name", perpname, data_core.security) + if(R) + switch(R.fields["criminal"]) + if("*Arrest*") + holder.icon_state = "hudwanted" + return + if("Incarcerated") + holder.icon_state = "hudincarcerated" + return + if("Parolled") + holder.icon_state = "hudparolled" + return + if("Discharged") + holder.icon_state = "huddischarged" + return + holder.icon_state = null + +/*********************************************** + Diagnostic HUDs! +************************************************/ + +//For Diag health and cell bars! +/proc/RoundDiagBar(value) + switch(value * 100) + if(95 to INFINITY) + return "max" + if(80 to 100) + return "good" + if(60 to 80) + return "high" + if(40 to 60) + return "med" + if(20 to 40) + return "low" + if(1 to 20) + return "crit" + else + return "dead" + return "dead" + +//Sillycone hooks +/mob/living/silicon/proc/diag_hud_set_health() + var/image/holder = hud_list[DIAG_HUD] + if(stat == DEAD) + holder.icon_state = "huddiagdead" + else + holder.icon_state = "huddiag[RoundDiagBar(health/maxHealth)]" + +/mob/living/silicon/proc/diag_hud_set_status() + var/image/holder = hud_list[DIAG_STAT_HUD] + switch(stat) + if(CONSCIOUS) + holder.icon_state = "hudstat" + if(UNCONSCIOUS) + holder.icon_state = "hudoffline" + else + holder.icon_state = "huddead2" + +//Borgie battery tracking! +/mob/living/silicon/robot/proc/diag_hud_set_borgcell() + var/image/holder = hud_list[DIAG_BATT_HUD] + if (cell) + var/chargelvl = (cell.charge/cell.maxcharge) + holder.icon_state = "hudbatt[RoundDiagBar(chargelvl)]" + else + holder.icon_state = "hudnobatt" + +/*~~~~~~~~~~~~~~~~~~~~ + BIG STOMPY MECHS +~~~~~~~~~~~~~~~~~~~~~*/ +/obj/mecha/proc/diag_hud_set_mechhealth() + var/image/holder = hud_list[DIAG_MECH_HUD] + holder.icon_state = "huddiag[RoundDiagBar(health/initial(health))]" + + +/obj/mecha/proc/diag_hud_set_mechcell() + var/image/holder = hud_list[DIAG_BATT_HUD] + if (cell) + var/chargelvl = cell.charge/cell.maxcharge + holder.icon_state = "hudbatt[RoundDiagBar(chargelvl)]" + else + holder.icon_state = "hudnobatt" + + +/obj/mecha/proc/diag_hud_set_mechstat() + var/image/holder = hud_list[DIAG_STAT_HUD] + holder.icon_state = null + if(internal_damage) + holder.icon_state = "hudwarn" + + +////NATIONS///// +/mob/living/carbon/human/proc/nation_hud_set_ID() + var/image/holder = hud_list[NATIONS_HUD] + holder.icon_state = "hudunknown" + if(mind && mind.nation) + holder.icon_state = "hud[mind.nation.default_name]" + + diff --git a/code/game/gamemodes/antag_hud.dm b/code/game/gamemodes/antag_hud.dm new file mode 100644 index 00000000000..b2d41c47c6d --- /dev/null +++ b/code/game/gamemodes/antag_hud.dm @@ -0,0 +1,49 @@ +/datum/atom_hud/antag + hud_icons = list(SPECIALROLE_HUD) + +/datum/atom_hud/antag/proc/join_hud(mob/M) + if(!istype(M)) + CRASH("join_hud(): [M] ([M.type]) is not a mob!") + if(M.mind.antag_hud) //note: please let this runtime if a mob has no mind, as mindless mobs shouldn't be getting antagged + M.mind.antag_hud.leave_hud(M) + add_to_hud(M) + add_hud_to(M) + M.mind.antag_hud = src + +/datum/atom_hud/antag/proc/leave_hud(mob/M) + if(!istype(M)) + CRASH("leave_hud(): [M] ([M.type]) is not a mob!") + remove_from_hud(M) + remove_hud_from(M) + if(M.mind) + M.mind.antag_hud = null + + +//GAME_MODE PROCS +//called to set a mob's antag icon state +/datum/game_mode/proc/set_antag_hud(mob/M, new_icon_state) + if(!istype(M)) + CRASH("set_antag_hud(): [M] ([M.type]) is not a mob!") + var/image/holder = M.hud_list[SPECIALROLE_HUD] + if(holder) + holder.icon_state = new_icon_state + if(M.mind || new_icon_state) //in mindless mobs, only null is acceptable, otherwise we're antagging a mindless mob, meaning we should runtime + M.mind.antag_hud_icon_state = new_icon_state + + +//MIND PROCS +//these are called by mind.transfer_to() +/datum/mind/proc/transfer_antag_huds(var/datum/atom_hud/antag/newhud) + leave_all_huds() + ticker.mode.set_antag_hud(current, antag_hud_icon_state) + if(newhud) + newhud.join_hud(current) + +/datum/mind/proc/leave_all_huds() + for(var/datum/atom_hud/antag/hud in huds) + if(current in hud.hudusers) + hud.leave_hud(current) + + for(var/datum/atom_hud/data/hud in huds) + if(current in hud.hudusers) + hud.remove_hud_from(current) \ No newline at end of file diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index 46eba7bd3c8..be2356f1150 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -137,7 +137,7 @@ newtraitor << "\red ATTENTION: \black It is time to pay your debt to the Syndicate..." newtraitor << "You are now a traitor." newtraitor.mind.special_role = "traitor" - newtraitor.hud_updateflag |= 1 << SPECIALROLE_HUD + var/obj_count = 1 newtraitor << "\blue Your current objectives:" for(var/datum/objective/objective in newtraitor.mind.objectives) diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index e5cc89aeaed..27c1dd59fbc 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -64,11 +64,13 @@ user << "We have regenerated." user.regenerate_icons() - user.hud_updateflag |= 1 << HEALTH_HUD - user.hud_updateflag |= 1 << STATUS_HUD + //user.hud_updateflag |= 1 << HEALTH_HUD + //user.hud_updateflag |= 1 << STATUS_HUD user.status_flags &= ~(FAKEDEATH) user.update_canmove() user.mind.changeling.purchasedpowers -= src + user.med_hud_set_status() + user.med_hud_set_health() feedback_add_details("changeling_powers","CR") return 1 diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index 09e184e2b3c..1ecdc7d8c50 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -213,14 +213,14 @@ M << "[cult_mind.current] looks like they just reverted to their old faith!" -/datum/game_mode/proc/update_all_cult_icons() - spawn(0) - // reset the cult - for(var/datum/mind/cultist in cult) - reset_cult_icons_for_cultist(cultist) - // reset the spirits - for(var/mob/spirit/currentSpirit in spirits) - reset_cult_icons_for_spirit(currentSpirit) +///datum/game_mode/proc/update_all_cult_icons() +// spawn(0) +// // reset the cult +// for(var/datum/mind/cultist in cult) +// reset_cult_icons_for_cultist(cultist) +// // reset the spirits +// for(var/mob/spirit/currentSpirit in spirits) +// reset_cult_icons_for_spirit(currentSpirit) /datum/game_mode/proc/reset_cult_icons_for_cultist(var/datum/mind/target) @@ -315,19 +315,26 @@ /datum/game_mode/proc/update_cult_icons_added(datum/mind/cult_mind) - spawn(0) - for(var/datum/mind/cultist in cult) - cult_icon_pair_link(cultist,cult_mind) - for(var/mob/spirit/currentSpirit in spirits) - add_cult_icon_to_spirit(currentSpirit,cult_mind) + //spawn(0) + // for(var/datum/mind/cultist in cult) + // cult_icon_pair_link(cultist,cult_mind) + // for(var/mob/spirit/currentSpirit in spirits) + // add_cult_icon_to_spirit(currentSpirit,cult_mind) + + var/datum/atom_hud/antag/culthud = huds[ANTAG_HUD_CULT] + culthud.join_hud(cult_mind.current) + set_antag_hud(cult_mind.current, "hudcultist") /datum/game_mode/proc/update_cult_icons_removed(datum/mind/cult_mind) - spawn(0) - for(var/datum/mind/cultist in cult) - cult_icon_pair_unlink(cultist,cult_mind) - for(var/mob/spirit/currentSpirit in spirits) - remove_cult_icon_from_spirit(currentSpirit,cult_mind) + //spawn(0) + // for(var/datum/mind/cultist in cult) + // cult_icon_pair_unlink(cultist,cult_mind) + // for(var/mob/spirit/currentSpirit in spirits) + // remove_cult_icon_from_spirit(currentSpirit,cult_mind) + var/datum/atom_hud/antag/culthud = huds[ANTAG_HUD_CULT] + culthud.leave_hud(cult_mind.current) + set_antag_hud(cult_mind.current, null) /datum/game_mode/cult/proc/get_unconvertables() diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm index 39c81b4b8d0..b1e159ca2f0 100644 --- a/code/game/gamemodes/nations/nations.dm +++ b/code/game/gamemodes/nations/nations.dm @@ -38,9 +38,9 @@ datum/game_mode/nations if(H.mind) if(H.mind.assigned_role in engineering_positions) H.mind.nation = all_nations["Atmosia"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudatmosia") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudatmosia") + //H.client.images += I H.mind.nation.membership += H.mind.current if(H.mind.assigned_role == H.mind.nation.default_leader) H.mind.nation.current_leader = H.mind.current @@ -51,9 +51,9 @@ datum/game_mode/nations if(H.mind.assigned_role in medical_positions) H.mind.nation = all_nations["Medistan"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudmedistan") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudmedistan") + //H.client.images += I H.mind.nation.membership += H.mind.current if(H.mind.assigned_role == H.mind.nation.default_leader) H.mind.nation.current_leader = H.mind.current @@ -64,9 +64,9 @@ datum/game_mode/nations if(H.mind.assigned_role in science_positions) H.mind.nation = all_nations["Scientopia"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudscientopia") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudscientopia") + //H.client.images += I H.mind.nation.membership += H.mind.current if(H.mind.assigned_role == H.mind.nation.default_leader) H.mind.nation.current_leader = H.mind.current @@ -77,9 +77,9 @@ datum/game_mode/nations if(H.mind.assigned_role in security_positions) H.mind.nation = all_nations["Brigston"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudbrigston") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudbrigston") + //H.client.images += I H.mind.nation.membership += H.mind.current if(H.mind.assigned_role == H.mind.nation.default_leader) H.mind.nation.current_leader = H.mind.current @@ -90,9 +90,9 @@ datum/game_mode/nations if(H.mind.assigned_role in cargonians) H.mind.nation = all_nations["Cargonia"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcargonia") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcargonia") + //H.client.images += I H.mind.nation.membership += H.mind.current if(H.mind.assigned_role == H.mind.nation.default_leader) H.mind.nation.current_leader = H.mind.current @@ -103,9 +103,9 @@ datum/game_mode/nations if(H.mind.assigned_role in servicion) H.mind.nation = all_nations["Servicion"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudservice") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudservice") + //H.client.images += I H.mind.nation.membership += H.mind.current if(H.mind.assigned_role == H.mind.nation.default_leader) H.mind.nation.current_leader = H.mind.current @@ -116,9 +116,9 @@ datum/game_mode/nations if(H.mind.assigned_role in support_positions) H.mind.nation = all_nations["People's Republic of Commandzakstan"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcommand") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcommand") + //H.client.images += I H.mind.nation.membership += H.mind.current if(H.mind.assigned_role == H.mind.nation.default_leader) H.mind.nation.current_leader = H.mind.current @@ -129,9 +129,9 @@ datum/game_mode/nations if(H.mind.assigned_role in command_positions) H.mind.nation = all_nations["People's Republic of Commandzakstan"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcommand") - H.client.images += I + // H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcommand") + // H.client.images += I H.mind.nation.membership += H.mind.current if(H.mind.assigned_role == H.mind.nation.default_leader) H.mind.nation.current_leader = H.mind.current @@ -139,7 +139,7 @@ datum/game_mode/nations continue H << "You are now part of the great sovereign nation of [H.mind.nation.default_name]!" continue - + H.nation_hud_set_ID() if(H.mind.assigned_role in civilian_positions) H << "You do not belong to any nation and are free to sell your services to the highest bidder." continue @@ -203,76 +203,76 @@ datum/game_mode/nations if(H.mind) if(H.mind.assigned_role in engineering_positions) H.mind.nation = all_nations["Atmosia"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudatmosia") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudatmosia") + //H.client.images += I H.mind.nation.membership += H.mind.current H << "You are now part of the great sovereign nation of [H.mind.nation.current_name]!" return 1 if(H.mind.assigned_role in medical_positions) H.mind.nation = all_nations["Medistan"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudmedistan") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudmedistan") + //H.client.images += I H.mind.nation.membership += H.mind.current H << "You are now part of the great sovereign nation of [H.mind.nation.current_name]!" return 1 if(H.mind.assigned_role in science_positions) H.mind.nation = all_nations["Scientopia"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudscientopia") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudscientopia") + //H.client.images += I H.mind.nation.membership += H.mind.current H << "You are now part of the great sovereign nation of [H.mind.nation.current_name]!" return 1 if(H.mind.assigned_role in security_positions) H.mind.nation = all_nations["Brigston"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudbrigston") - H.client.images += I + // H.hud_updateflag |= 1 << NATIONS_HUD + // var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudbrigston") + // H.client.images += I H.mind.nation.membership += H.mind.current H << "You are now part of the great sovereign nation of [H.mind.nation.current_name]!" return 1 if(H.mind.assigned_role in cargonians) H.mind.nation = all_nations["Cargonia"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcargonia") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcargonia") + // H.client.images += I H.mind.nation.membership += H.mind.current H << "You are now part of the great sovereign nation of [H.mind.nation.current_name]!" return 1 if(H.mind.assigned_role in servicion) H.mind.nation = all_nations["Servicion"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudservice") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + // var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudservice") + // H.client.images += I H.mind.nation.membership += H.mind.current H << "You are now part of the great sovereign nation of [H.mind.nation.current_name]!" return 1 if(H.mind.assigned_role in support_positions) H.mind.nation = all_nations["People's Republic of Commandzakstan"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcommand") - H.client.images += I + //H.hud_updateflag |= 1 << NATIONS_HUD + //var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcommand") + // H.client.images += I H.mind.nation.membership += H.mind.current H << "You are now part of the great sovereign nation of [H.mind.nation.current_name]!" return 1 if(H.mind.assigned_role in command_positions) H.mind.nation = all_nations["People's Republic of Commandzakstan"] - H.hud_updateflag |= 1 << NATIONS_HUD - var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcommand") - H.client.images += I + // H.hud_updateflag |= 1 << NATIONS_HUD + // var/I = image('icons/mob/hud.dmi', loc = H.mind.current, icon_state = "hudcommand") + // H.client.images += I H.mind.nation.membership += H.mind.current H << "You are now part of the great sovereign nation of [H.mind.nation.current_name]!" return 1 - + H.nation_hud_set_ID() if(H.mind.assigned_role in civilian_positions) H << "You do not belong to any nation and are free to sell your services to the highest bidder." return 1 diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index a2658d13c88..b10a78e0bd7 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -64,44 +64,16 @@ proc/issyndicate(mob/living/M as mob) //////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////// -/datum/game_mode/proc/update_all_synd_icons() - spawn(0) - for(var/datum/mind/synd_mind in syndicates) - if(synd_mind.current) - if(synd_mind.current.client) - for(var/image/I in synd_mind.current.client.images) - if(I.icon_state == "synd") - qdel(I) - - for(var/datum/mind/synd_mind in syndicates) - if(synd_mind.current) - if(synd_mind.current.client) - for(var/datum/mind/synd_mind_1 in syndicates) - if(synd_mind_1.current) - var/I = image('icons/mob/mob.dmi', loc = synd_mind_1.current, icon_state = "synd") - synd_mind.current.client.images += I /datum/game_mode/proc/update_synd_icons_added(datum/mind/synd_mind) - spawn(0) - if(synd_mind.current) - if(synd_mind.current.client) - var/I = image('icons/mob/mob.dmi', loc = synd_mind.current, icon_state = "synd") - synd_mind.current.client.images += I + var/datum/atom_hud/antag/opshud = huds[ANTAG_HUD_OPS] + opshud.join_hud(synd_mind.current) + set_antag_hud(synd_mind.current, "hudoperative") /datum/game_mode/proc/update_synd_icons_removed(datum/mind/synd_mind) - spawn(0) - for(var/datum/mind/synd in syndicates) - if(synd.current) - if(synd.current.client) - for(var/image/I in synd.current.client.images) - if(I.icon_state == "synd" && I.loc == synd_mind.current) - qdel(I) - - if(synd_mind.current) - if(synd_mind.current.client) - for(var/image/I in synd_mind.current.client.images) - if(I.icon_state == "synd") - qdel(I) + var/datum/atom_hud/antag/opshud = huds[ANTAG_HUD_OPS] + opshud.leave_hud(synd_mind.current) + set_antag_hud(synd_mind.current, null) //////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////// @@ -150,7 +122,7 @@ proc/issyndicate(mob/living/M as mob) spawnpos++ update_synd_icons_added(synd_mind) - update_all_synd_icons() + //update_all_synd_icons() if(uplinklocker) new /obj/structure/closet/syndicate/nuclear(uplinklocker.loc) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 82ff00fdfea..d51064bf877 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -242,7 +242,7 @@ if(rev_mind in revolutionaries) revolutionaries -= rev_mind rev_mind.special_role = null - rev_mind.current.hud_updateflag |= 1 << SPECIALROLE_HUD + //rev_mind.current.hud_updateflag |= 1 << SPECIALROLE_HUD if(beingborged) rev_mind.current << "\red The frame's firmware detects and deletes your neural reprogramming! You remember nothing from the moment you were flashed until now." @@ -259,104 +259,21 @@ M << "[rev_mind.current] looks like they just remembered their real allegiance!" -///////////////////////////////////////////////////////////////////////////////////////////////// -//Keeps track of players having the correct icons//////////////////////////////////////////////// -//CURRENTLY CONTAINS BUGS://///////////////////////////////////////////////////////////////////// -//-PLAYERS THAT HAVE BEEN REVS FOR AWHILE OBTAIN THE BLUE ICON WHILE STILL NOT BEING A REV HEAD// -// -Possibly caused by cloning of a standard rev///////////////////////////////////////////////// -//-UNCONFIRMED: DECONVERTED REVS NOT LOSING THEIR ICON PROPERLY////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////////// -/datum/game_mode/proc/update_all_rev_icons() - spawn(0) - for(var/datum/mind/head_rev_mind in head_revolutionaries) - if(head_rev_mind.current) - if(head_rev_mind.current.client) - for(var/image/I in head_rev_mind.current.client.images) - if(I.icon_state == "rev" || I.icon_state == "rev_head") - qdel(I) - - for(var/datum/mind/rev_mind in revolutionaries) - if(rev_mind.current) - if(rev_mind.current.client) - for(var/image/I in rev_mind.current.client.images) - if(I.icon_state == "rev" || I.icon_state == "rev_head") - qdel(I) - - for(var/datum/mind/head_rev in head_revolutionaries) - if(head_rev.current) - if(head_rev.current.client) - for(var/datum/mind/rev in revolutionaries) - if(rev.current) - var/I = image('icons/mob/mob.dmi', loc = rev.current, icon_state = "rev") - head_rev.current.client.images += I - for(var/datum/mind/head_rev_1 in head_revolutionaries) - if(head_rev_1.current) - var/I = image('icons/mob/mob.dmi', loc = head_rev_1.current, icon_state = "rev_head") - head_rev.current.client.images += I - - for(var/datum/mind/rev in revolutionaries) - if(rev.current) - if(rev.current.client) - for(var/datum/mind/head_rev in head_revolutionaries) - if(head_rev.current) - var/I = image('icons/mob/mob.dmi', loc = head_rev.current, icon_state = "rev_head") - rev.current.client.images += I - for(var/datum/mind/rev_1 in revolutionaries) - if(rev_1.current) - var/I = image('icons/mob/mob.dmi', loc = rev_1.current, icon_state = "rev") - rev.current.client.images += I - -//////////////////////////////////////////////////// -//Keeps track of converted revs icons/////////////// -//Refer to above bugs. They may apply here as well// -//////////////////////////////////////////////////// +///////////////////////////////////// +//Adds the rev hud to a new convert// +///////////////////////////////////// /datum/game_mode/proc/update_rev_icons_added(datum/mind/rev_mind) - spawn(0) - for(var/datum/mind/head_rev_mind in head_revolutionaries) - if(head_rev_mind.current) - if(head_rev_mind.current.client) - var/I = image('icons/mob/mob.dmi', loc = rev_mind.current, icon_state = "rev") - head_rev_mind.current.client.images += I - if(rev_mind.current) - if(rev_mind.current.client) - var/image/J = image('icons/mob/mob.dmi', loc = head_rev_mind.current, icon_state = "rev_head") - rev_mind.current.client.images += J + var/datum/atom_hud/antag/revhud = huds[ANTAG_HUD_REV] + revhud.join_hud(rev_mind.current) + set_antag_hud(rev_mind.current, ((rev_mind in head_revolutionaries) ? "hudheadrevolutionary" : "hudrevolutionary")) - for(var/datum/mind/rev_mind_1 in revolutionaries) - if(rev_mind_1.current) - if(rev_mind_1.current.client) - var/I = image('icons/mob/mob.dmi', loc = rev_mind.current, icon_state = "rev") - rev_mind_1.current.client.images += I - if(rev_mind.current) - if(rev_mind.current.client) - var/image/J = image('icons/mob/mob.dmi', loc = rev_mind_1.current, icon_state = "rev") - rev_mind.current.client.images += J - -/////////////////////////////////// -//Keeps track of deconverted revs// -/////////////////////////////////// +///////////////////////////////////////// +//Removes the hud from deconverted revs// +///////////////////////////////////////// /datum/game_mode/proc/update_rev_icons_removed(datum/mind/rev_mind) - spawn(0) - for(var/datum/mind/head_rev_mind in head_revolutionaries) - if(head_rev_mind.current) - if(head_rev_mind.current.client) - for(var/image/I in head_rev_mind.current.client.images) - if((I.icon_state == "rev" || I.icon_state == "rev_head") && I.loc == rev_mind.current) - qdel(I) - - for(var/datum/mind/rev_mind_1 in revolutionaries) - if(rev_mind_1.current) - if(rev_mind_1.current.client) - for(var/image/I in rev_mind_1.current.client.images) - if((I.icon_state == "rev" || I.icon_state == "rev_head") && I.loc == rev_mind.current) - qdel(I) - - if(rev_mind.current) - if(rev_mind.current.client) - for(var/image/I in rev_mind.current.client.images) - if(I.icon_state == "rev" || I.icon_state == "rev_head") - qdel(I) - + var/datum/atom_hud/antag/revhud = huds[ANTAG_HUD_REV] + revhud.leave_hud(rev_mind.current) + set_antag_hud(rev_mind.current, null) ////////////////////////// //Checks for rev victory// ////////////////////////// diff --git a/code/game/gamemodes/revolution/rp_revolution.dm b/code/game/gamemodes/revolution/rp_revolution.dm index 8e7759233f4..3e9c18bca12 100644 --- a/code/game/gamemodes/revolution/rp_revolution.dm +++ b/code/game/gamemodes/revolution/rp_revolution.dm @@ -105,7 +105,6 @@ rev_mind.current << "\red You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill, capture or convert the heads to win the revolution!" rev_mind.special_role = "Revolutionary" update_rev_icons_added(rev_mind) - H.hud_updateflag |= 1 << SPECIALROLE_HUD return 1 ///////////////////////////// diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 4cdeec3edf0..39dd483d1b0 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -136,7 +136,7 @@ Made by Xhuis if(shadow_mind.assigned_role == "Clown") S << "Your alien nature has allowed you to overcome your clownishness." S.mutations.Remove(CLUMSY) - shadow_mind.current.hud_updateflag |= (1 << SPECIALROLE_HUD) + //shadow_mind.current.hud_updateflag |= (1 << SPECIALROLE_HUD) /datum/game_mode/proc/add_thrall(datum/mind/new_thrall_mind) if(!istype(new_thrall_mind)) @@ -302,44 +302,12 @@ Made by Xhuis burn_mod = 1.5 //1.5x burn damage, 2x is excessive /datum/game_mode/proc/update_shadow_icons_added(datum/mind/shadow_mind) - spawn(0) - for(var/datum/mind/shadowling in shadows) - if(shadowling.current && shadowling != shadow_mind) - if(shadowling.current.client) - var/I = image('icons/mob/mob.dmi', loc = shadow_mind.current, icon_state = "thrall") - shadowling.current.client.images += I - if(shadow_mind.current) - if(shadow_mind.current.client) - var/image/J = image('icons/mob/mob.dmi', loc = shadowling.current, icon_state = "shadowling") - shadow_mind.current.client.images += J - for(var/datum/mind/thrall in shadowling_thralls) - if(thrall.current) - if(thrall.current.client) - var/I = image('icons/mob/mob.dmi', loc = shadow_mind.current, icon_state = "thrall") - thrall.current.client.images += I - if(shadow_mind.current) - if(shadow_mind.current.client) - var/image/J = image('icons/mob/mob.dmi', loc = thrall.current, icon_state = "thrall") - shadow_mind.current.client.images += J + var/datum/atom_hud/antag/shadow_hud = huds[ANTAG_HUD_SHADOW] + shadow_hud.join_hud(shadow_mind.current) + set_antag_hud(shadow_mind.current, ((shadow_mind in shadows) ? "hudshadowling" : "hudshadowlingthrall")) -/datum/game_mode/proc/update_shadow_icons_removed(datum/mind/shadow_mind) - spawn(0) - for(var/datum/mind/shadowling in shadows) - if(shadowling.current) - if(shadowling.current.client) - for(var/image/I in shadowling.current.client.images) - if((I.icon_state == "thrall" || I.icon_state == "shadowling") && I.loc == shadow_mind.current) - qdel(I) - for(var/datum/mind/thrall in shadowling_thralls) - if(thrall.current) - if(thrall.current.client) - for(var/image/I in thrall.current.client.images) - if((I.icon_state == "thrall" || I.icon_state == "shadowling") && I.loc == shadow_mind.current) - qdel(I) - - if(shadow_mind.current) - if(shadow_mind.current.client) - for(var/image/I in shadow_mind.current.client.images) - if(I.icon_state == "thrall" || I.icon_state == "shadowling") - qdel(I) +/datum/game_mode/proc/update_shadow_icons_removed(datum/mind/shadow_mind) //This should never actually occur, but it's here anyway. + var/datum/atom_hud/antag/shadow_hud = huds[ANTAG_HUD_SHADOW] + shadow_hud.leave_hud(shadow_mind.current) + set_antag_hud(shadow_mind.current, null) \ No newline at end of file diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index 122e99e520f..d72f8f7e529 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -379,52 +379,14 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha //no verb //prepare for copypaste /datum/game_mode/proc/update_vampire_icons_added(datum/mind/vampire_mind) - var/ref = "\ref[vampire_mind]" - if(ref in vampire_thralls) - if(vampire_mind.current) - if(vampire_mind.current.client) - var/I = image('icons/mob/mob.dmi', loc = vampire_mind.current, icon_state = "vampire") - vampire_mind.current.client.images += I - for(var/headref in vampire_thralls) - for(var/datum/mind/t_mind in vampire_thralls[headref]) - var/datum/mind/head = locate(headref) - if(head) - if(head.current) - if(head.current.client) - var/I = image('icons/mob/mob.dmi', loc = t_mind.current, icon_state = "vampthrall") - head.current.client.images += I - if(t_mind.current) - if(t_mind.current.client) - var/I = image('icons/mob/mob.dmi', loc = head.current, icon_state = "vampire") - t_mind.current.client.images += I - if(t_mind.current) - if(t_mind.current.client) - var/I = image('icons/mob/mob.dmi', loc = t_mind.current, icon_state = "vampthrall") - t_mind.current.client.images += I + var/datum/atom_hud/antag/vamp_hud = huds[ANTAG_HUD_VAMPIRE] + vamp_hud.join_hud(vampire_mind.current) + set_antag_hud(vampire_mind.current, ((vampire_mind in vampires) ? "hudvampire" : "hudvampirethrall")) /datum/game_mode/proc/update_vampire_icons_removed(datum/mind/vampire_mind) - for(var/headref in vampire_thralls) - var/datum/mind/head = locate(headref) - for(var/datum/mind/t_mind in vampire_thralls[headref]) - if(t_mind.current) - if(t_mind.current.client) - for(var/image/I in t_mind.current.client.images) - if((I.icon_state == "vampthrall" || I.icon_state == "vampire") && I.loc == vampire_mind.current) - //log_to_dd("deleting [vampire_mind] overlay") - qdel(I) - if(head) - //log_to_dd("found [head.name]") - if(head.current) - if(head.current.client) - for(var/image/I in head.current.client.images) - if((I.icon_state == "vampthrall" || I.icon_state == "vampire") && I.loc == vampire_mind.current) - //log_to_dd("deleting [vampire_mind] overlay") - qdel(I) - if(vampire_mind.current) - if(vampire_mind.current.client) - for(var/image/I in vampire_mind.current.client.images) - if(I.icon_state == "vampthrall" || I.icon_state == "vampire") - qdel(I) + var/datum/atom_hud/antag/shadow_hud = huds[ANTAG_HUD_SHADOW] + shadow_hud.leave_hud(vampire_mind.current) + set_antag_hud(vampire_mind.current, null) /datum/game_mode/proc/remove_vampire_mind(datum/mind/vampire_mind, datum/mind/head) //var/list/removal diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 63de49edb1b..17e60881cc5 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -101,6 +101,7 @@ M.mind.objectives += new_objective ticker.mode.traitors += M.mind M.mind.special_role = "apprentice" + ticker.mode.update_wiz_icons_added(M.mind) M.faction = list("wizard") else H << "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later." diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 25cddf67b4f..8b7267408b9 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -12,6 +12,7 @@ uplink_welcome = "Wizardly Uplink Console:" uplink_uses = 20 + var/use_huds = 0 var/finished = 0 /datum/game_mode/wizard/announce() @@ -52,9 +53,21 @@ equip_wizard(wizard.current) name_wizard(wizard.current) greet_wizard(wizard) + if(use_huds) + update_wiz_icons_added(wizard) ..() +/datum/game_mode/proc/update_wiz_icons_added(datum/mind/wiz_mind) + var/datum/atom_hud/antag/wizhud = huds[ANTAG_HUD_WIZ] + wizhud.join_hud(wiz_mind.current) + set_antag_hud(wiz_mind.current, ((wiz_mind in wizards) ? "hudwizard" : "apprentice")) + + +/datum/game_mode/proc/update_wiz_icons_removed(datum/mind/wiz_mind) + var/datum/atom_hud/antag/wizhud = huds[ANTAG_HUD_WIZ] + wizhud.leave_hud(wiz_mind.current) + set_antag_hud(wiz_mind.current, null) /datum/game_mode/proc/forge_wizard_objectives(var/datum/mind/wizard) switch(rand(1,100)) diff --git a/code/game/jobs/job/security.dm b/code/game/jobs/job/security.dm index 2bf5b7d156c..641b9a2a869 100644 --- a/code/game/jobs/job/security.dm +++ b/code/game/jobs/job/security.dm @@ -43,6 +43,7 @@ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected @@ -89,6 +90,7 @@ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected @@ -144,6 +146,7 @@ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected @@ -191,6 +194,7 @@ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected @@ -229,6 +233,7 @@ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected @@ -269,6 +274,7 @@ var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected diff --git a/code/game/jobs/job/supervisor.dm b/code/game/jobs/job/supervisor.dm index 257f82dc3c0..03d929ee0a8 100644 --- a/code/game/jobs/job/supervisor.dm +++ b/code/game/jobs/job/supervisor.dm @@ -38,6 +38,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() captain_announcement.Announce("All hands, captain [H.real_name] on deck!") var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L @@ -136,6 +137,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected @@ -183,6 +185,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected @@ -226,6 +229,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected @@ -268,6 +272,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1) var/obj/item/weapon/implant/loyalty/L = new/obj/item/weapon/implant/loyalty(H) L.imp_in = H L.implanted = 1 + H.sec_hud_set_implants() var/obj/item/organ/external/affected = H.organs_by_name["head"] affected.implants += L L.part = affected diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 891be23fdf2..4cfad239a4f 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -244,13 +244,13 @@ callHook("clone", list(H)) if((H.mind in ticker.mode:revolutionaries) || (H.mind in ticker.mode:head_revolutionaries)) - ticker.mode.update_all_rev_icons() //So the icon actually appears + ticker.mode.update_rev_icons_added() //So the icon actually appears if(H.mind in ticker.mode.syndicates) - ticker.mode.update_all_synd_icons() + ticker.mode.update_synd_icons_added() if (H.mind in ticker.mode.cult) ticker.mode.add_cult_viewpoint(H) ticker.mode.add_cultist(src.occupant.mind) - ticker.mode.update_all_cult_icons() //So the icon actually appears + ticker.mode.update_cult_icons_added() //So the icon actually appears if(("\ref[H.mind]" in ticker.mode.implanter) || (H.mind in ticker.mode.implanted)) ticker.mode.update_traitor_icons_added(H.mind) //So the icon actually appears if(("\ref[H.mind]" in ticker.mode.vampire_thralls) || (H.mind in ticker.mode.vampire_enthralled)) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 9498a070d98..45dcd0422d5 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -511,8 +511,8 @@ What a mess.*/ if ("Change Criminal Status") if (active2) - for(var/mob/living/carbon/human/H in player_list) - H.hud_updateflag |= 1 << WANTED_HUD + //for(var/mob/living/carbon/human/H in player_list) + //H.hud_updateflag |= 1 << WANTED_HUD switch(href_list["criminal2"]) if("none") active2.fields["criminal"] = "None" @@ -525,6 +525,9 @@ What a mess.*/ if("released") active2.fields["criminal"] = "Released" + for(var/mob/living/carbon/human/H in mob_list) + H.sec_hud_set_security_status() + if ("Delete Record (Security) Execute") if (active2) qdel(active2) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index b9d19239284..63ab4f67a02 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -75,6 +75,8 @@ var/melee_cooldown = 10 var/melee_can_hit = 1 + hud_possible = list (DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD) + /obj/mecha/New() ..() events = new @@ -92,6 +94,12 @@ log_message("[src.name] created.") loc.Entered(src) mechas_list += src //global mech list + prepare_huds() + var/datum/atom_hud/data/diagnostic/diag_hud = huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_to_hud(src) + diag_hud_set_mechhealth() + diag_hud_set_mechcell() + diag_hud_set_mechstat() return //////////////////////// @@ -451,6 +459,7 @@ pr_internal_damage.start() log_append_to_last("Internal damage of type [int_dam_flag].",1) occupant << sound('sound/machines/warning-buzzer.ogg',wait=0) + diag_hud_set_mechstat() return /obj/mecha/proc/clearInternalDamage(int_dam_flag) @@ -463,6 +472,7 @@ occupant_message("Internal fire extinquished.") if(MECHA_INT_TANK_BREACH) occupant_message("Damaged internal tank has been sealed.") + diag_hud_set_mechstat() return @@ -1830,12 +1840,20 @@ if(get_charge()) cell.use(amount) return 1 + //Diagnostic HUD updates + diag_hud_set_mechhealth() + diag_hud_set_mechcell() + diag_hud_set_mechstat() return 0 /obj/mecha/proc/give_power(amount) if(!isnull(get_charge())) cell.give(amount) return 1 + //Diagnostic HUD updates + diag_hud_set_mechhealth() + diag_hud_set_mechcell() + diag_hud_set_mechstat() return 0 /obj/mecha/proc/reset_icon() diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm index d5a4e91ed47..de876b6c282 100644 --- a/code/game/mecha/medical/odysseus.dm +++ b/code/game/mecha/medical/odysseus.dm @@ -10,37 +10,37 @@ internal_damage_threshold = 35 deflect_chance = 15 step_energy_drain = 6 - var/obj/item/clothing/glasses/hud/health/mech/hud - - New() - ..() - hud = new /obj/item/clothing/glasses/hud/health/mech(src) - return + var/builtin_hud_user = 0 moved_inside(var/mob/living/carbon/human/H as mob) if(..()) - if(H.glasses) - occupant_message("[H.glasses] prevent you from using [src] [hud]") + if(H.glasses && istype(H.glasses, /obj/item/clothing/glasses/hud)) + occupant_message("Your [H.glasses] prevent you from using the built-in medical hud.") else - H.glasses = hud + var/datum/atom_hud/data/human/medical/advanced/A = huds[DATA_HUD_MEDICAL_ADVANCED] + A.add_hud_to(H) + builtin_hud_user = 1 return 1 else return 0 pilot_mmi_hud(var/mob/living/carbon/brain/pilot) - pilot.regular_hud_updates() - process_med_hud(pilot, 1) + //pilot.regular_hud_updates() + //process_med_hud(pilot, 1) + var/datum/atom_hud/data/human/medical/advanced/A = huds[DATA_HUD_MEDICAL_ADVANCED] + A.add_hud_to(pilot) + builtin_hud_user = 1 return ..() go_out() - if(ishuman(occupant)) + if(ishuman(occupant) && builtin_hud_user) var/mob/living/carbon/human/H = occupant - if(H.glasses == hud) - H.glasses = null + var/datum/atom_hud/data/human/medical/advanced/A = huds[DATA_HUD_MEDICAL_ADVANCED] + A.remove_hud_from(H) ..() return //TODO - Check documentation for client.eye and client.perspective... /obj/item/clothing/glasses/hud/health/mech name = "Integrated Medical Hud" - HUDType = MEDHUD + HUDType = DATA_HUD_MEDICAL_ADVANCED diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 74863ccd4af..9b2e3ef86fc 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -21,7 +21,10 @@ // What does the implant do upon injection? // return 0 if the implant fails (ex. Revhead and loyalty implant.) // return 1 if the implant succeeds (ex. Nonrevhead and loyalty implant.) -/obj/item/weapon/implant/proc/implanted(var/mob/source) +/obj/item/weapon/implant/proc/implanted(var/mob/source) + if(istype(source, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = source + H.sec_hud_set_implants() return 1 /obj/item/weapon/implant/proc/get_data() @@ -55,11 +58,11 @@ desc = "Track with this." origin_tech = "materials=2;magnets=2;programming=2;biotech=2" var/id = 1.0 - + /obj/item/weapon/implant/tracking/New() ..() tracking_implants += src - + /obj/item/weapon/implant/tracking/Destroy() tracking_implants -= src return ..() @@ -287,7 +290,7 @@ the implant may become unstable and either pre-maturely inject the subject or si reagents = R R.my_atom = src tracking_implants += src - + /obj/item/weapon/implant/chem/Destroy() tracking_implants -= src return ..() @@ -414,7 +417,7 @@ the implant may become unstable and either pre-maturely inject the subject or si ticker.mode.update_traitor_icons_added(user.mind) log_admin("[ckey(user.key)] has mind-slaved [ckey(H.key)].") return 1 - + /obj/item/weapon/implant/traitor/islegal() return 0 diff --git a/code/game/objects/items/weapons/implants/implanter.dm b/code/game/objects/items/weapons/implants/implanter.dm index f0cad339826..10438e8a29b 100644 --- a/code/game/objects/items/weapons/implants/implanter.dm +++ b/code/game/objects/items/weapons/implants/implanter.dm @@ -53,7 +53,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) affected.implants += src.imp imp.part = affected - H.hud_updateflag |= 1 << IMPLOYAL_HUD + H.sec_hud_set_implants() M:implanting = 0 src.imp = null update() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 0361ad7c5f5..7acc46213e3 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -135,6 +135,7 @@ flags = GLASSESCOVERSEYES slot_flags = SLOT_EYES materials = list(MAT_GLASS = 250) + var/emagged = 0 var/vision_flags = 0 var/darkness_view = 0//Base human is 2 var/invisa_view = 0 @@ -223,6 +224,11 @@ BLIND // can't see anything user << "Your suit will now report your vital lifesigns." if(3) user << "Your suit will now report your vital lifesigns as well as your coordinate position." + if(istype(user,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = user + if(H.w_uniform == src) + H.update_suit_sensors() + else if (istype(src.loc, /mob)) switch(sensor_mode) if(0) @@ -237,6 +243,10 @@ BLIND // can't see anything if(3) for(var/mob/V in viewers(user, 1)) V.show_message("[user] sets [src.loc]'s sensors to maximum.", 1) + if(istype(src,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = src + if(H.w_uniform == src) + H.update_suit_sensors() /obj/item/clothing/under/verb/toggle() set name = "Toggle Suit Sensors" @@ -253,7 +263,7 @@ BLIND // can't see anything var/blockTracking // Do we block AI tracking? var/flash_protect = 0 var/tint = 0 - var/HUDType = 0 + var/HUDType = null var/vision_flags = 0 var/see_darkness = 1 diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index eaf73f5cd61..65d821003df 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -10,7 +10,7 @@ var/prescription = 0 var/prescription_upgradable = 0 var/see_darkness = 1 - var/HUDType = 0 + var/HUDType = null /obj/item/clothing/glasses/New() . = ..() @@ -321,7 +321,7 @@ darkness_view = 1 flash_protect = 1 tint = 1 - HUDType = SECHUD + HUDType = DATA_HUD_SECURITY_BASIC prescription_upgradable = 1 species_fit = list("Vox") sprite_sheets = list( diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 1d852ed6257..b7e0e549a74 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -3,23 +3,38 @@ desc = "A heads-up display that provides important info in (almost) real time." flags = null //doesn't protect eyes because it's a monocle, duh origin_tech = "magnets=3;biotech=2" - HUDType = SECHUD + HUDType = DATA_HUD_SECURITY_BASIC prescription_upgradable = 1 var/list/icon/current = list() //the current hud icons +/obj/item/clothing/glasses/hud/equipped(mob/living/carbon/human/user, slot) + if(slot == slot_glasses) + var/datum/atom_hud/H = huds[HUDType] + H.add_hud_to(user) + +/obj/item/clothing/glasses/hud/dropped(mob/living/carbon/human/user) + if(user.glasses == src) + var/datum/atom_hud/H = huds[HUDType] + H.remove_hud_from(user) + +/obj/item/clothing/glasses/hud/emp_act(severity) + if(emagged == 0) + emagged = 1 + desc = desc + " The display flickers slightly." + /obj/item/clothing/glasses/hud/health name = "/improper Health Scanner HUD" desc = "A heads-up display that scans the humans in view and provides accurate data about their health status." icon_state = "healthhud" - HUDType = MEDHUD + HUDType = DATA_HUD_MEDICAL_ADVANCED /obj/item/clothing/glasses/hud/health_advanced name = "/improper Advanced Health Scanner HUD" desc = "A heads-up display that scans the humans in view and provides accurate data about their health status. Includes anti-flash filter." icon_state = "advmedhud" flash_protect = 1 - HUDType = MEDHUD + HUDType = DATA_HUD_MEDICAL_ADVANCED /obj/item/clothing/glasses/hud/health/night name = "/improper Night Vision Health Scanner HUD" @@ -30,6 +45,11 @@ see_darkness = 0 prescription_upgradable = 0 +/obj/item/clothing/glasses/hud/diagnostic + name = "Diagnostic HUD" + desc = "A heads-up display that scans silicons" + icon_state = "healthhud" + HUDType = DATA_HUD_DIAGNOSTIC /obj/item/clothing/glasses/hud/security name = "/improper Security HUD" @@ -37,6 +57,7 @@ icon_state = "securityhud" var/global/list/jobs[0] flash_protect = 1 + HUDType = DATA_HUD_SECURITY_ADVANCED /obj/item/clothing/glasses/hud/security/jensenshades name = "augmented shades" diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 2a694bb1d6f..e5cdfece68e 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -23,12 +23,11 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi //Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot. universal_speak = 1 var/atom/movable/following = null - var/medHUD = 0 - var/secHUD = 0 var/anonsay = 0 var/image/ghostimage = null //this mobs ghost image, for deleting and stuff var/ghostvision = 1 //is the ghost able to see things humans can't? var/seedarkness = 1 + var/data_hud_seen = 0 //this should one of the defines in __DEFINES/hud.dm /mob/dead/observer/New(var/mob/body=null, var/flags=1) sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF @@ -111,7 +110,7 @@ Works together with spawning an observer, noted above. if(!loc) return if(!client) return 0 - regular_hud_updates() + //regular_hud_updates() if(client.images.len) for(var/image/hud in client.images) if(copytext(hud.icon_state,1,4) == "hud") @@ -123,12 +122,12 @@ Works together with spawning an observer, noted above. target_list += target if(target_list.len) assess_targets(target_list, src) - if(medHUD) - process_medHUD(src) - if(secHUD) - process_secHUD(src) - + //if(medHUD) + /// process_medHUD(src) + //if(secHUD) + // process_secHUD(src) +/* /mob/dead/proc/process_medHUD(var/mob/M) var/client/C = M.client for(var/mob/living/carbon/human/patient in oview(M, 14)) @@ -141,6 +140,7 @@ Works together with spawning an observer, noted above. C.images += target.hud_list[IMPTRACK_HUD] C.images += target.hud_list[IMPLOYAL_HUD] C.images += target.hud_list[IMPCHEM_HUD] +*/ /mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U) var/client/C = U.client @@ -270,18 +270,22 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp return 1 +/mob/dead/observer/proc/show_me_the_hud(hud_index) + var/datum/atom_hud/H = huds[hud_index] + H.add_hud_to(src) + data_hud_seen = hud_index + /mob/dead/observer/verb/toggle_medHUD() set category = "Ghost" set name = "Toggle MedicHUD" set desc = "Toggles the medical HUD." if(!client) return - if(medHUD) - medHUD = 0 - src << "\blue Medical HUD Disabled" - else - medHUD = 1 - src << "\blue Medical HUD Enabled" + + if(data_hud_seen) //remove old huds + var/datum/atom_hud/H = huds[data_hud_seen] + H.remove_hud_from(src) + show_me_the_hud(DATA_HUD_SECURITY_BASIC) /mob/dead/observer/verb/toggle_antagHUD() set category = "Ghost" diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm index e6f39f606fa..5494b199a87 100644 --- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm +++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm @@ -14,6 +14,9 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds if(istype(loc, /mob/living)) affected_mob = loc affected_mob.status_flags |= XENO_HOST + if(istype(affected_mob,/mob/living/carbon)) + var/mob/living/carbon/H = affected_mob + H.med_hud_set_status() processing_objects.Add(src) spawn(0) AddInfectionImages(affected_mob) @@ -23,6 +26,9 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds /obj/item/alien_embryo/Destroy() if(affected_mob) affected_mob.status_flags &= ~(XENO_HOST) + if(istype(affected_mob,/mob/living/carbon)) + var/mob/living/carbon/H = affected_mob + H.med_hud_set_status() spawn(0) RemoveInfectionImages(affected_mob) return ..() @@ -31,6 +37,9 @@ var/const/ALIEN_AFK_BRACKET = 450 // 45 seconds if(!affected_mob) return if(loc != affected_mob) affected_mob.status_flags &= ~(XENO_HOST) + if(istype(affected_mob,/mob/living/carbon)) + var/mob/living/carbon/H = affected_mob + H.med_hud_set_status() processing_objects.Remove(src) spawn(0) RemoveInfectionImages(affected_mob) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 98c17d2e9d8..3179f32d3f7 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -7,6 +7,20 @@ mob/living update_hud() return +/mob/living/carbon/prepare_huds() + ..() + prepare_data_huds() + +/mob/living/carbon/proc/prepare_data_huds() + ..() + med_hud_set_health() + med_hud_set_status() + +/mob/living/carbon/updatehealth() + ..() + med_hud_set_health() + med_hud_set_status() + /mob/living/carbon/Destroy() for(var/atom/movable/guts in internal_organs) qdel(guts) diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index 6b698640d5c..1c0c48bd3d2 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -91,10 +91,10 @@ dizziness = 0 jitteriness = 0 - hud_updateflag |= 1 << HEALTH_HUD - hud_updateflag |= 1 << STATUS_HUD + //hud_updateflag |= 1 << HEALTH_HUD + //hud_updateflag |= 1 << STATUS_HUD - handle_hud_list() + //handle_hud_list() //Handle species-specific deaths. if(species) species.handle_death(src) @@ -135,6 +135,8 @@ if(client) blind.layer = 0 timeofdeath = worldtime2text() + med_hud_set_health() + med_hud_set_status() if(mind) mind.store_memory("Time of death: [timeofdeath]", 0) if(ticker && ticker.mode) // log_to_dd("k") diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 15791ddd85a..51241c3d7f4 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -492,14 +492,11 @@ else return 0 else if(istype(M, /mob/living/silicon)) - var/mob/living/silicon/R = M switch(hudtype) if("security") - if(R.sensor_mode == 1) - return 1 + return 1 if("medical") - if(R.sensor_mode == 2) - return 1 + return 1 else return 0 else diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 8b453e8f100..353e859f7cd 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -6,7 +6,7 @@ icon_state = "body_m_s" //why are these here and not in human_defines.dm - var/list/hud_list[10] + //var/list/hud_list[10] var/datum/species/species //Contains icon generation and language information, set during New(). var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us. var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call. @@ -29,16 +29,16 @@ reagents = R R.my_atom = src - hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100") - hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy") - hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudunknown") - hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[STATUS_HUD_OOC] = image('icons/mob/hud.dmi', src, "hudhealthy") - hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100") + //hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealthy") + //hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudunknown") + ////hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[STATUS_HUD_OOC] = image('icons/mob/hud.dmi', src, "hudhealthy") + //hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") ..() @@ -48,6 +48,7 @@ var/mob/M = src faction |= "\ref[M]" //what + prepare_data_huds() // Set up DNA. if(!delay_ready_dna && dna) dna.ready_dna(src) @@ -55,6 +56,16 @@ sync_organ_dna() //this shouldn't be necessaaaarrrryyyyyyyy UpdateAppearance() +/mob/living/carbon/human/prepare_data_huds() + //Update med hud images... + ..() + //...sec hud images... + sec_hud_set_ID() + sec_hud_set_implants() + sec_hud_set_security_status() + //...and display them. + add_to_all_human_data_huds() + /mob/living/carbon/human/Destroy() for(var/atom/movable/organelle in organs) qdel(organelle) @@ -858,13 +869,13 @@ modified = 1 spawn() - hud_updateflag |= 1 << WANTED_HUD + //hud_updateflag |= 1 << WANTED_HUD if(istype(usr,/mob/living/carbon/human)) - var/mob/living/carbon/human/U = usr - U.handle_regular_hud_updates() + //var/mob/living/carbon/human/U = usr + sec_hud_set_security_status() if(istype(usr,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/U = usr - U.handle_regular_hud_updates() + //var/mob/living/silicon/robot/U = usr + sec_hud_set_security_status() if(!modified) usr << "\red Unable to locate a data core entry for this person." @@ -990,11 +1001,11 @@ spawn() if(istype(usr,/mob/living/carbon/human)) - var/mob/living/carbon/human/U = usr - U.handle_regular_hud_updates() + //var/mob/living/carbon/human/U = usr + sec_hud_set_security_status() if(istype(usr,/mob/living/silicon/robot)) - var/mob/living/silicon/robot/U = usr - U.handle_regular_hud_updates() + //var/mob/living/silicon/robot/U = usr + sec_hud_set_security_status() if(!modified) usr << "\red Unable to locate a data core entry for this person." diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 28943a4c22b..ac165d9dd6e 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -22,8 +22,12 @@ if(B) if((health >= (config.health_threshold_dead / 100 * 75)) && stat == DEAD) update_revive() + med_hud_set_health() + med_hud_set_status() if(stat == CONSCIOUS && (src in dead_mob_list)) //Defib fix update_revive() + med_hud_set_health() + med_hud_set_status() /mob/living/carbon/human/adjustBrainLoss(var/amount) if(status_flags & GODMODE) @@ -88,7 +92,7 @@ take_overall_damage(amount, 0) else heal_overall_damage(-amount, 0) - hud_updateflag |= 1 << HEALTH_HUD + //hud_updateflag |= 1 << HEALTH_HUD /mob/living/carbon/human/adjustFireLoss(var/amount) if(species && species.burn_mod) @@ -97,7 +101,7 @@ take_overall_damage(0, amount) else heal_overall_damage(0, -amount) - hud_updateflag |= 1 << HEALTH_HUD + //hud_updateflag |= 1 << HEALTH_HUD /mob/living/carbon/human/proc/adjustBruteLossByPart(var/amount, var/organ_name, var/obj/damage_source = null) if(species && species.brute_mod) @@ -112,7 +116,7 @@ //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. O.heal_damage(-amount, 0, internal=0, robo_repair=(O.status & ORGAN_ROBOT)) - hud_updateflag |= 1 << HEALTH_HUD + //hud_updateflag |= 1 << HEALTH_HUD /mob/living/carbon/human/proc/adjustFireLossByPart(var/amount, var/organ_name, var/obj/damage_source = null) if(species && species.burn_mod) @@ -127,7 +131,7 @@ //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. O.heal_damage(0, -amount, internal=0, robo_repair=(O.status & ORGAN_ROBOT)) - hud_updateflag |= 1 << HEALTH_HUD + //hud_updateflag |= 1 << HEALTH_HUD /mob/living/carbon/human/Stun(amount) ..() @@ -181,7 +185,7 @@ O.unmutate() src << "Your [O.name] is shaped normally again." - hud_updateflag |= 1 << HEALTH_HUD //what even is this shit + //hud_updateflag |= 1 << HEALTH_HUD //what even is this shit // Defined here solely to take species flags into account without having to recast at mob/living level. /mob/living/carbon/human/getOxyLoss() @@ -246,7 +250,7 @@ var/obj/item/organ/external/picked = pick(parts) if(picked.heal_damage(brute,burn)) UpdateDamageIcon() - hud_updateflag |= 1 << HEALTH_HUD + //hud_updateflag |= 1 << HEALTH_HUD updatehealth() //Damages ONE external organ, organ gets randomly selected from damagable ones. @@ -259,7 +263,7 @@ var/obj/item/organ/external/picked = pick(parts) if(picked.take_damage(brute,burn,sharp,edge)) UpdateDamageIcon() - hud_updateflag |= 1 << HEALTH_HUD + //hud_updateflag |= 1 << HEALTH_HUD updatehealth() speech_problem_flag = 1 @@ -283,7 +287,7 @@ parts -= picked updatehealth() - hud_updateflag |= 1 << HEALTH_HUD + //hud_updateflag |= 1 << HEALTH_HUD speech_problem_flag = 1 if(update) UpdateDamageIcon() @@ -308,7 +312,7 @@ parts -= picked updatehealth() - hud_updateflag |= 1 << HEALTH_HUD + //hud_updateflag |= 1 << HEALTH_HUD if(update) UpdateDamageIcon() @@ -335,7 +339,7 @@ This function restores all organs. if(istype(E, /obj/item/organ/external)) if(E.heal_damage(brute, burn)) UpdateDamageIcon() - hud_updateflag |= 1 << HEALTH_HUD + //hud_updateflag |= 1 << HEALTH_HUD else return 0 diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index fe075d41aef..9bbb0021366 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -1,4 +1,6 @@ /mob/living/carbon/human + + hud_possible = list(HEALTH_HUD,STATUS_HUD,ID_HUD,WANTED_HUD,IMPLOYAL_HUD,IMPCHEM_HUD,IMPTRACK_HUD,SPECIALROLE_HUD) //Hair colour and style var/r_hair = 0 var/g_hair = 0 diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index fae439fd414..e728fb2db9d 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -164,9 +164,11 @@ if(internals) internals.icon_state = "internal0" internal = null + sec_hud_set_ID() update_inv_wear_mask() else if(I == wear_id) wear_id = null + sec_hud_set_ID() update_inv_wear_id() else if(I == wear_pda) wear_pda = null @@ -220,6 +222,7 @@ wear_mask = W if((wear_mask.flags & BLOCKHAIR) || (wear_mask.flags & BLOCKHEADHAIR)) update_hair(redraw_mob) //rebuild hair + sec_hud_set_ID() update_inv_wear_mask(redraw_mob) if(slot_handcuffed) handcuffed = W @@ -238,6 +241,7 @@ update_inv_belt(redraw_mob) if(slot_wear_id) wear_id = W + sec_hud_set_ID() update_inv_wear_id(redraw_mob) if(slot_wear_pda) wear_pda = W diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index fe373bf3280..fa288852406 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -51,8 +51,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc loc_as_cryobag.used++ in_stasis = 1 - if(mob_master.current_cycle % 30 == 15) - hud_updateflag = 1022 + //if(mob_master.current_cycle % 30 == 15) + //hud_updateflag = 1022 + //HudRefactor:WTF do i put here.... voice = GetVoice() @@ -990,13 +991,13 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc /mob/living/carbon/human/handle_hud_icons() species.handle_hud_icons(src) -/mob/living/carbon/human/handle_regular_hud_updates() - if(hud_updateflag) - handle_hud_list() +///mob/living/carbon/human/handle_regular_hud_updates() +// if(hud_updateflag) +// handle_hud_list() - if(..()) - if(hud_updateflag) - handle_hud_list() +// if(..()) +// if(hud_updateflag) +// handle_hud_list() /mob/living/carbon/human/handle_random_events() @@ -1260,92 +1261,92 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc */ -/mob/living/carbon/human/proc/handle_hud_list() +///mob/living/carbon/human/proc/handle_hud_list() +// +// if(hud_updateflag & 1 << HEALTH_HUD) +// var/image/holder = hud_list[HEALTH_HUD] +// if(stat == 2) +// holder.icon_state = "hudhealth-100" // X_X +// else +// holder.icon_state = "hud[RoundHealth(health)]" +// +// hud_list[HEALTH_HUD] = holder +// +// +// if(hud_updateflag & 1 << STATUS_HUD) +// var/foundVirus = 0 +// for (var/ID in virus2) +// if (ID in virusDB) +// foundVirus = 1 +// break - if(hud_updateflag & 1 << HEALTH_HUD) - var/image/holder = hud_list[HEALTH_HUD] - if(stat == 2) - holder.icon_state = "hudhealth-100" // X_X - else - holder.icon_state = "hud[RoundHealth(health)]" +// var/image/holder = hud_list[STATUS_HUD] +// var/image/holder2 = hud_list[STATUS_HUD_OOC] +// if(stat == 2) +// holder.icon_state = "huddead" +// holder2.icon_state = "huddead" +// else if(status_flags & XENO_HOST) +// holder.icon_state = "hudxeno" +// holder2.icon_state = "hudxeno" +// else if(foundVirus) +// holder.icon_state = "hudill" +// else if(has_brain_worms()) +// var/mob/living/simple_animal/borer/B = has_brain_worms() +// if(B.controlling) +// holder.icon_state = "hudbrainworm" +// else +// holder.icon_state = "hudhealthy" +// holder2.icon_state = "hudbrainworm" +// else +// holder.icon_state = "hudhealthy" +// if(virus2.len) +// holder2.icon_state = "hudill" +// else +// holder2.icon_state = "hudhealthy" - hud_list[HEALTH_HUD] = holder +// hud_list[STATUS_HUD] = holder +// hud_list[STATUS_HUD_OOC] = holder2 +// - - if(hud_updateflag & 1 << STATUS_HUD) - var/foundVirus = 0 - for (var/ID in virus2) - if (ID in virusDB) - foundVirus = 1 - break - - var/image/holder = hud_list[STATUS_HUD] - var/image/holder2 = hud_list[STATUS_HUD_OOC] - if(stat == 2) - holder.icon_state = "huddead" - holder2.icon_state = "huddead" - else if(status_flags & XENO_HOST) - holder.icon_state = "hudxeno" - holder2.icon_state = "hudxeno" - else if(foundVirus) - holder.icon_state = "hudill" - else if(has_brain_worms()) - var/mob/living/simple_animal/borer/B = has_brain_worms() - if(B.controlling) - holder.icon_state = "hudbrainworm" - else - holder.icon_state = "hudhealthy" - holder2.icon_state = "hudbrainworm" - else - holder.icon_state = "hudhealthy" - if(virus2.len) - holder2.icon_state = "hudill" - else - holder2.icon_state = "hudhealthy" - - hud_list[STATUS_HUD] = holder - hud_list[STATUS_HUD_OOC] = holder2 - - - if(hud_updateflag & 1 << ID_HUD) - var/image/holder = hud_list[ID_HUD] - if(wear_id) - var/obj/item/weapon/card/id/I = wear_id.GetID() - if(I) - holder.icon_state = "hud[ckey(I.GetJobName())]" - else - holder.icon_state = "hudunknown" - else - holder.icon_state = "hudunknown" - - - hud_list[ID_HUD] = holder - - - if(hud_updateflag & 1 << WANTED_HUD) - var/image/holder = hud_list[WANTED_HUD] - holder.icon_state = "hudblank" - var/perpname = name - if(wear_id) - var/obj/item/weapon/card/id/I = wear_id.GetID() - if(I) - perpname = I.registered_name - for(var/datum/data/record/E in data_core.general) - if(E.fields["name"] == perpname) - for (var/datum/data/record/R in data_core.security) - if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) - holder.icon_state = "hudwanted" - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated")) - holder.icon_state = "hudprisoner" - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled")) - holder.icon_state = "hudparolled" - break - else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released")) - holder.icon_state = "hudreleased" - break - hud_list[WANTED_HUD] = holder +// if(hud_updateflag & 1 << ID_HUD) +// var/image/holder = hud_list[ID_HUD] +// if(wear_id) +// var/obj/item/weapon/card/id/I = wear_id.GetID() +// if(I) +// holder.icon_state = "hud[ckey(I.GetJobName())]" +// else +// holder.icon_state = "hudunknown" +// else +// holder.icon_state = "hudunknown" +// +// +// hud_list[ID_HUD] = holder +// +// +// if(hud_updateflag & 1 << WANTED_HUD) +// var/image/holder = hud_list[WANTED_HUD] +// holder.icon_state = "hudblank" +// var/perpname = name +// if(wear_id) +// var/obj/item/weapon/card/id/I = wear_id.GetID() +// if(I) +// perpname = I.registered_name +// for(var/datum/data/record/E in data_core.general) +// if(E.fields["name"] == perpname) +// for (var/datum/data/record/R in data_core.security) +// if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) +// holder.icon_state = "hudwanted" +// break +// else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated")) +// holder.icon_state = "hudprisoner" +// break +// else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Parolled")) +// holder.icon_state = "hudparolled" +// break +// else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Released")) +// holder.icon_state = "hudreleased" +// break +/* hud_list[WANTED_HUD] = holder if(hud_updateflag & 1 << IMPLOYAL_HUD || hud_updateflag & 1 << IMPCHEM_HUD || hud_updateflag & 1 << IMPTRACK_HUD) @@ -1436,6 +1437,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc hud_list[NATIONS_HUD] = holder hud_updateflag = 0 +*/ /mob/living/carbon/human/handle_silent() if(..()) diff --git a/code/modules/mob/living/carbon/human/login.dm b/code/modules/mob/living/carbon/human/login.dm index 28862cf6cfc..ee5034a23f2 100644 --- a/code/modules/mob/living/carbon/human/login.dm +++ b/code/modules/mob/living/carbon/human/login.dm @@ -5,6 +5,4 @@ src << "You can ventcrawl! Use alt+click on vents to quickly travel about the station." update_pipe_vision() update_hud() - if(ticker && ticker.mode) - ticker.mode.update_all_synd_icons() //This proc only sounds CPU-expensive on paper. It is O(n^2), but the outer for-loop only iterates through syndicates, which are only prsenet in nuke rounds and even when they exist, there's usually 6 of them. return diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 6c12bc9b5a7..3de3c0a714b 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -422,13 +422,13 @@ if(!G.see_darkness) H.see_invisible = SEE_INVISIBLE_MINIMUM - switch(G.HUDType) - if(SECHUD) - process_sec_hud(H,1) - if(MEDHUD) - process_med_hud(H,1) - if(ANTAGHUD) - process_antag_hud(H) + //switch(G.HUDType) + // if(SECHUD) + // process_sec_hud(H,1) + // if(MEDHUD) + // process_med_hud(H,1) + // if(ANTAGHUD) + // process_antag_hud(H) if(H.head) if(istype(H.head, /obj/item/clothing/head)) @@ -438,13 +438,13 @@ if(!hat.see_darkness) H.see_invisible = SEE_INVISIBLE_MINIMUM - switch(hat.HUDType) - if(SECHUD) - process_sec_hud(H,1) - if(MEDHUD) - process_med_hud(H,1) - if(ANTAGHUD) - process_antag_hud(H) + //switch(hat.HUDType) + // if(SECHUD) + // process_sec_hud(H,1) + // if(MEDHUD) + // process_med_hud(H,1) + // if(ANTAGHUD) + // process_antag_hud(H) if(istype(H.back, /obj/item/weapon/rig)) ///ahhhg so snowflakey var/obj/item/weapon/rig/rig = H.back @@ -460,13 +460,13 @@ if(!G.see_darkness) H.see_invisible = SEE_INVISIBLE_MINIMUM - switch(G.HUDType) - if(SECHUD) - process_sec_hud(H,1) - if(MEDHUD) - process_med_hud(H,1) - if(ANTAGHUD) - process_antag_hud(H) + //switch(G.HUDType) + // if(SECHUD) + // process_sec_hud(H,1) + // if(MEDHUD) + // process_med_hud(H,1) + // if(ANTAGHUD) + // process_antag_hud(H) if(H.vision_type) H.see_in_dark = max(H.see_in_dark, H.vision_type.see_in_dark, darksight) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 0b1ee60a3ea..062a8e3b69e 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -54,7 +54,7 @@ update_canmove() if(client) - regular_hud_updates() //THIS DOESN'T FUCKING UPDATE SHIT + //regular_hud_updates() //THIS DOESN'T FUCKING UPDATE SHIT handle_regular_hud_updates() //IT JUST REMOVES FUCKING HUD IMAGES if(get_nations_mode()) process_nations() diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index 9c3cac087a4..11877529681 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -11,30 +11,7 @@ src << "You can ventcrawl! Use alt+click on vents to quickly travel about the station." //Should update regardless of if we can ventcrawl, since we can end up in pipes in other ways. update_pipe_vision() - + update_interface() - //Round specific stuff like hud updates - if(ticker && ticker.mode) - var/ref = "\ref[mind]" - switch(ticker.mode.name) - if("revolution") - if((mind in ticker.mode.revolutionaries) || (src.mind in ticker.mode:head_revolutionaries)) - ticker.mode.update_rev_icons_added(src.mind) - if("cult") - if(mind in ticker.mode:cult) - ticker.mode.update_cult_icons_added(src.mind) - if("nuclear emergency") - if(mind in ticker.mode:syndicates) - ticker.mode.update_all_synd_icons() - if("mutiny") - var/datum/game_mode/mutiny/mode = get_mutiny_mode() - if(mode) - mode.update_all_icons() - if("vampire") - if((ref in ticker.mode.vampire_thralls) || (mind in ticker.mode.vampire_enthralled)) - ticker.mode.update_vampire_icons_added(mind) - if("shadowling") - if((mind in ticker.mode.shadowling_thralls) || (mind in ticker.mode.shadows)) - ticker.mode.update_shadow_icons_added(src.mind) return . diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 92d1c1cdff3..d01e5c6c9ab 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -82,10 +82,12 @@ var/list/ai_verbs_default = list( var/turf/waypoint //Holds the turf of the currently selected waypoint. var/waypoint_mode = 0 //Waypoint mode is for selecting a turf via clicking. - var/obj/item/borg/sight/hud/sec/sechud = null - var/obj/item/borg/sight/hud/med/healthhud = null + //var/obj/item/borg/sight/hud/sec/sechud = null + //var/obj/item/borg/sight/hud/med/healthhud = null var/arrivalmsg = "$name, $rank, has arrived on the station." + med_hud = DATA_HUD_MEDICAL_BASIC + sec_hud = DATA_HUD_SECURITY_BASIC /mob/living/silicon/ai/proc/add_ai_verbs() src.verbs |= ai_verbs_default @@ -175,15 +177,15 @@ var/list/ai_verbs_default = list( new /obj/machinery/ai_powersupply(src) - hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") ai_list += src ..() diff --git a/code/modules/mob/living/silicon/ai/life.dm b/code/modules/mob/living/silicon/ai/life.dm index 8d1125982aa..86dc6b21343 100644 --- a/code/modules/mob/living/silicon/ai/life.dm +++ b/code/modules/mob/living/silicon/ai/life.dm @@ -145,13 +145,13 @@ theAPC = null process_queued_alarms() - regular_hud_updates() + //regular_hud_updates() - switch(sensor_mode) - if (SEC_HUD) - process_sec_hud(src, 1, eyeobj) - if (MED_HUD) - process_med_hud(src, 1, eyeobj) + //switch(sensor_mode) + /// if (SEC_HUD) + // process_sec_hud(src, 1, eyeobj) + // if (MED_HUD) + // process_med_hud(src, 1, eyeobj) if(get_nations_mode()) process_nations_ai() @@ -165,6 +165,9 @@ health = 100 - getOxyLoss() - getToxLoss() - getBruteLoss() else health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss() + diag_hud_set_status() + diag_hud_set_health() + /mob/living/silicon/ai/proc/lacks_power() var/turf/T = get_turf(src) diff --git a/code/modules/mob/living/silicon/pai/life.dm b/code/modules/mob/living/silicon/pai/life.dm index 6a981464bd5..8b7c7863afc 100644 --- a/code/modules/mob/living/silicon/pai/life.dm +++ b/code/modules/mob/living/silicon/pai/life.dm @@ -1,10 +1,10 @@ /mob/living/silicon/pai/Life() . = ..() if(.) - if(secHUD == 1) - process_sec_hud(src, 1) - if(medHUD == 1) - process_med_hud(src, 1) + //if(secHUD == 1) + // process_sec_hud(src, 1) + ////if(medHUD == 1) + // process_med_hud(src, 1) if(silence_time) if(world.timeofday >= silence_time) silence_time = null diff --git a/code/modules/mob/living/silicon/pai/software_modules.dm b/code/modules/mob/living/silicon/pai/software_modules.dm index 7c7a802a17e..da92258aaba 100644 --- a/code/modules/mob/living/silicon/pai/software_modules.dm +++ b/code/modules/mob/living/silicon/pai/software_modules.dm @@ -460,7 +460,9 @@ toggle(mob/living/silicon/pai/user) user.secHUD = !user.secHUD - + user.remove_med_sec_hud() + if(user.secHUD) + user.add_sec_hud() is_active(mob/living/silicon/pai/user) return user.secHUD @@ -471,6 +473,9 @@ toggle(mob/living/silicon/pai/user) user.medHUD = !user.medHUD + user.remove_med_sec_hud() + if(user.medHUD) + user.add_med_hud() is_active(mob/living/silicon/pai/user) return user.medHUD diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index a6ce6632258..e11766bb001 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -71,6 +71,7 @@ stat = UNCONSCIOUS update_headlamp(1) Paralyse(3) + diag_hud_set_borgcell() /mob/living/silicon/robot/handle_regular_status_updates() @@ -95,6 +96,7 @@ if(.) //alive if(health <= config.health_threshold_dead) death() + diag_hud_set_status() return if(!istype(src, /mob/living/silicon/robot/drone)) @@ -119,6 +121,8 @@ else stat = CONSCIOUS + diag_hud_set_health() + diag_hud_set_status() else //dead eye_blind = 1 @@ -224,15 +228,15 @@ cells.icon_state = "charge-empty" -/mob/living/silicon/robot/handle_regular_hud_updates() - if(!client) - return - - switch(sensor_mode) - if(SEC_HUD) - process_sec_hud(src,1) - if(MED_HUD) - process_med_hud(src,1) +/*/mob/living/silicon/robot/handle_regular_hud_updates() +// if(!client) +// return +// +// switch(sensor_mode) +// if(SEC_HUD) +// process_sec_hud(src,1) +// if(MED_HUD) +// process_med_hud(src,1) if(syndicate) if(ticker.mode.name == "traitor") @@ -251,6 +255,7 @@ ..() return 1 + */ diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 842ff2262a9..5096653c7fa 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -80,6 +80,8 @@ var/list/robot_verbs_default = list( var/updating = 0 //portable camera camerachunk update + hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD, DIAG_BATT_HUD) + var/jetpackoverlay = 0 var/magpulse = 0 @@ -141,15 +143,16 @@ var/list/robot_verbs_default = list( cell_component.wrapped = cell cell_component.installed = 1 - hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100") - hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") - hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[HEALTH_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[STATUS_HUD] = image('icons/mob/hud.dmi', src, "hudhealth100") + //hud_list[ID_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[WANTED_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[IMPLOYAL_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[IMPCHEM_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[IMPTRACK_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + //hud_list[NATIONS_HUD] = image('icons/mob/hud.dmi', src, "hudblank") + diag_hud_set_borgcell() scanner.Grant(src) /mob/living/silicon/robot/proc/init(var/alien=0) @@ -719,6 +722,7 @@ var/list/robot_verbs_default = list( //This will mean that removing and replacing a power cell will repair the mount, but I don't care at this point. ~Z C.brute_damage = 0 C.electronics_damage = 0 + diag_hud_set_borgcell() else if (istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool)) if (wiresexposed) @@ -959,6 +963,7 @@ var/list/robot_verbs_default = list( user << "You remove \the [cell]." cell = null update_icons() + diag_hud_set_borgcell() if(!opened && (!istype(user, /mob/living/silicon))) if (user.a_intent == I_HELP) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 986f6b3c7e1..f4e28cf2d48 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -8,7 +8,7 @@ var/list/stating_laws = list()// Channels laws are currently being stated on var/list/alarms_to_show = list() var/list/alarms_to_clear = list() - var/list/hud_list[10] + //var/list/hud_list[10] var/list/speech_synthesizer_langs = list() //which languages can be vocalized by the speech synthesizer var/list/alarm_handlers = list() // List of alarm handlers this silicon is registered to var/designation = "" @@ -19,19 +19,28 @@ var/speak_query = "queries" var/pose //Yes, now AIs can pose too. - var/sensor_mode = 0 //Determines the current HUD. + //var/sensor_mode = 0 //Determines the current HUD. var/next_alarm_notice var/list/datum/alarm/queued_alarms = new() - #define SEC_HUD 1 //Security HUD mode - #define MED_HUD 2 //Medical HUD mode + hud_possible = list(SPECIALROLE_HUD, DIAG_STAT_HUD, DIAG_HUD) + + + 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 //There is only one kind of diag hud + var/local_transmit //If set, can only speak to others of the same type within a short range. var/obj/item/device/radio/common_radio /mob/living/silicon/New() silicon_mob_list |= src ..() + var/datum/atom_hud/data/diagnostic/diag_hud = huds[DATA_HUD_DIAGNOSTIC] + diag_hud.add_to_hud(src) + diag_hud_set_status() + diag_hud_set_health() add_language("Galactic Common") init_subsystems() @@ -252,17 +261,41 @@ /mob/living/silicon/binarycheck() return 1 +/mob/living/silicon/proc/remove_med_sec_hud() + var/datum/atom_hud/secsensor = huds[sec_hud] + var/datum/atom_hud/medsensor = huds[med_hud] + var/datum/atom_hud/diagsensor = 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() + var/datum/atom_hud/secsensor = huds[sec_hud] + secsensor.add_hud_to(src) + +/mob/living/silicon/proc/add_med_hud() + var/datum/atom_hud/medsensor = huds[med_hud] + medsensor.add_hud_to(src) + +/mob/living/silicon/proc/add_diag_hud() + var/datum/atom_hud/diagsensor = huds[d_hud] + diagsensor.add_hud_to(src) + + /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","Diagnostic","Disable") + remove_med_sec_hud() switch(sensor_type) if ("Security") - sensor_mode = SEC_HUD + add_sec_hud() src << "Security records overlay enabled." if ("Medical") - sensor_mode = MED_HUD + add_med_hud() src << "Life signs monitor overlay enabled." + if ("Diagnostic") + add_diag_hud() + src << "Robotics diagnostic overlay enabled." if ("Disable") - sensor_mode = 0 src << "Sensor augmentations disabled." /mob/living/silicon/proc/receive_alarm(var/datum/alarm_handler/alarm_handler, var/datum/alarm/alarm, was_raised) diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index d8c6fabb5fe..71b0e5a6122 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -340,8 +340,8 @@ /mob/living/simple_animal/hostile/guardian/healer/Life() ..() - regular_hud_updates() - process_med_hud(src, 1) + var/datum/atom_hud/medsensor = huds[DATA_HUD_MEDICAL_ADVANCED] + medsensor.add_hud_to(src) /mob/living/simple_animal/hostile/guardian/healer/AttackingTarget() ..() diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm index 4ed0f62e96b..ce0dfc31efe 100644 --- a/code/modules/mob/login.dm +++ b/code/modules/mob/login.dm @@ -64,6 +64,9 @@ client.screen += client.void + //HUD updates (antag hud, etc) + //readd this mob's HUDs (antag, med, etc) + reload_huds() CallHook("Login", list("client" = src.client, "mob" = src)) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 46a7c80667b..26f629b1ae3 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -18,8 +18,13 @@ dead_mob_list += src else living_mob_list += src + prepare_huds() ..() +/atom/proc/prepare_huds() + for(var/hud in hud_possible) + hud_list[hud] = image('icons/mob/hud.dmi', src, "") + /mob/proc/generate_name() return name diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 4f3ad8d2d6b..0a61d9030c1 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -131,6 +131,8 @@ var/datum/hud/hud_used = null + hud_possible = list(SPECIALROLE_HUD) + var/research_scanner = 0 //For research scanner equipped mobs. Enable to show research data when examining. var/datum/action/scan_mode/scanner = new diff --git a/code/modules/surgery/implant.dm b/code/modules/surgery/implant.dm index 80223eafe04..a6cd4553270 100644 --- a/code/modules/surgery/implant.dm +++ b/code/modules/surgery/implant.dm @@ -31,7 +31,7 @@ if ("groin") return "abdominal" return "" - + fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/chest/affected = target.get_organ(target_zone) user.visible_message("\red [user]'s hand slips, scraping around inside [target]'s [affected.name] with \the [tool]!", \ @@ -177,7 +177,7 @@ "\blue You take [obj] out of [target]'s [affected.name]s with \the [tool]." ) affected.implants -= obj - target.hud_updateflag |= 1 << IMPLOYAL_HUD + target.sec_hud_set_implants() //Handle possessive brain borers. if(istype(obj,/mob/living/simple_animal/borer)) diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index 6edb0d7c573..d89c3342e77 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ diff --git a/paradise.dme b/paradise.dme index 0f1016441a2..fda32c4de2d 100644 --- a/paradise.dme +++ b/paradise.dme @@ -182,6 +182,7 @@ #include "code\datums\datacore.dm" #include "code\datums\datumvars.dm" #include "code\datums\gas_mixture.dm" +#include "code\datums\hud.dm" #include "code\datums\martial.dm" #include "code\datums\material_container.dm" #include "code\datums\mind.dm" @@ -246,13 +247,13 @@ #include "code\defines\procs\announce.dm" #include "code\defines\procs\AStar.dm" #include "code\defines\procs\dbcore.dm" -#include "code\defines\procs\hud.dm" #include "code\defines\procs\radio.dm" #include "code\defines\procs\records.dm" #include "code\defines\procs\statistics.dm" #include "code\game\asteroid.dm" #include "code\game\atoms.dm" #include "code\game\atoms_movable.dm" +#include "code\game\data_huds.dm" #include "code\game\response_team.dm" #include "code\game\shuttle_engines.dm" #include "code\game\skincmd.dm" @@ -275,6 +276,7 @@ #include "code\game\dna\genes\powers.dm" #include "code\game\dna\genes\vg_disabilities.dm" #include "code\game\dna\genes\vg_powers.dm" +#include "code\game\gamemodes\antag_hud.dm" #include "code\game\gamemodes\antag_spawner.dm" #include "code\game\gamemodes\events.dm" #include "code\game\gamemodes\factions.dm" @@ -1382,7 +1384,6 @@ #include "code\modules\mob\living\carbon\metroid\death.dm" #include "code\modules\mob\living\carbon\metroid\emote.dm" #include "code\modules\mob\living\carbon\metroid\examine.dm" -#include "code\modules\mob\living\carbon\metroid\hud.dm" #include "code\modules\mob\living\carbon\metroid\life.dm" #include "code\modules\mob\living\carbon\metroid\login.dm" #include "code\modules\mob\living\carbon\metroid\metroid.dm"