diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm index c7aae28faf7..c22ba708774 100644 --- a/code/__DEFINES/hud.dm +++ b/code/__DEFINES/hud.dm @@ -1,20 +1,23 @@ + // 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. +// /datum/atom_hud expects these to be unique +// these need to be strings in order to make them associative lists +#define HEALTH_HUD "1" // dead, alive, sick, health status +#define STATUS_HUD "2" // a simple line rounding the mob's number health #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 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 +#define IMPTRACK_HUD "7" // tracking implant +#define DIAG_STAT_HUD "8" // Silicon/Mech Status +#define DIAG_HUD "9" // Silicon health bar +#define DIAG_BATT_HUD "10"// Borg/Mech power meter +#define DIAG_MECH_HUD "11"// Mech health bar +#define STATUS_HUD_OOC "12" // STATUS_HUD without virus db check for someone being ill. +//for antag huds. these are used at the /mob level +#define SPECIALROLE_HUD "12" +#define NATIONS_HUD "13" //Show nations icons during nations gamemode //data HUD (medhud, sechud) defines //Don't forget to update human/New() if you change these! diff --git a/code/datums/hud.dm b/code/datums/hud.dm index 3b52ab3c7ca..e37f8f0800b 100644 --- a/code/datums/hud.dm +++ b/code/datums/hud.dm @@ -1,18 +1,18 @@ /* 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(), +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() + //DATA_HUD_NATIONS = new/datum/atom_hud/data/human/nations(), \// + 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(), \ ) /datum/atom_hud diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index b7cff80f8f4..3dfc00c5232 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -47,8 +47,8 @@ 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) +///datum/atom_hud/data/human/nations +// hud_icons = list(NATIONS_HUD) /* MED/SEC/DIAG HUD HOOKS */ /* @@ -254,10 +254,10 @@ ////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]" +///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/nations/nations.dm b/code/game/gamemodes/nations/nations.dm index b1e159ca2f0..6003a8a3560 100644 --- a/code/game/gamemodes/nations/nations.dm +++ b/code/game/gamemodes/nations/nations.dm @@ -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() + //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 @@ -272,7 +272,7 @@ datum/game_mode/nations 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() + //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/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 97ac64daf82..4288b561f2d 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -1,5 +1,6 @@ /mob/living/carbon/ gender = MALE + hud_possible = list(HEALTH_HUD,STATUS_HUD,SPECIALROLE_HUD) var/list/stomach_contents = list() var/brain_op_stage = 0.0 var/list/datum/disease2/disease/virus2 = list()