diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm
index d047b394b63..81ddb2c91eb 100644
--- a/code/__DEFINES/hud.dm
+++ b/code/__DEFINES/hud.dm
@@ -15,6 +15,7 @@
#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
@@ -27,7 +28,7 @@
#define DATA_HUD_MEDICAL_ADVANCED 4
#define DATA_HUD_DIAGNOSTIC 5
//NATIONS
-#define DATA_HUD_NATIONS 6
+#define GAME_HUD_NATIONS 6
//antag HUD defines
#define ANTAG_HUD_CULT 7
#define ANTAG_HUD_REV 8
diff --git a/code/datums/hud.dm b/code/datums/hud.dm
index 569620158dd..238553dc9ca 100644
--- a/code/datums/hud.dm
+++ b/code/datums/hud.dm
@@ -7,7 +7,7 @@ var/datum/atom_hud/huds = list( \
DATA_HUD_MEDICAL_BASIC = new/datum/atom_hud/data/human/medical/basic(), \
DATA_HUD_MEDICAL_ADVANCED = new/datum/atom_hud/data/human/medical/advanced(), \
DATA_HUD_DIAGNOSTIC = new/datum/atom_hud/data/diagnostic(),
- DATA_HUD_NATIONS = new/datum/atom_hud/data/human/nations(), \
+ GAME_HUD_NATIONS = new/datum/atom_hud/antag(), \
ANTAG_HUD_CULT = new/datum/atom_hud/antag(), \
ANTAG_HUD_REV = new/datum/atom_hud/antag(), \
ANTAG_HUD_OPS = new/datum/atom_hud/antag(), \
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index 514cba49c9a..abb6b04c6c7 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -615,7 +615,7 @@
else if(href_list["implant"])
var/mob/living/carbon/human/H = current
- H.hud_updateflag |= (1 << IMPLOYAL_HUD) // updates that players HUD images so secHUD's pick up they are implanted or not.
+ //H.hud_updateflag |= (1 << IMPLOYAL_HUD) // updates that players HUD images so secHUD's pick up they are implanted or not.
switch(href_list["implant"])
if("remove")
@@ -630,6 +630,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
@@ -662,7 +663,7 @@
log_admin("[key_name_admin(usr)] has de-traitor'ed [current].")
else if (href_list["revolution"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ //current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["revolution"])
if("clear")
@@ -766,7 +767,7 @@
message_admins("[key_name_admin(usr)] has equipped [key_name_admin(current)] as a revolutionary")
else if (href_list["cult"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ //current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["cult"])
if("clear")
if(src in ticker.mode.cult)
@@ -809,7 +810,7 @@
message_admins("[key_name_admin(usr)] has equipped [key_name_admin(current)] as a cultist")
else if (href_list["wizard"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ //current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["wizard"])
if("clear")
@@ -818,6 +819,7 @@
special_role = null
current.spellremove(current)
current.faction = list("Station")
+ ticker.mode.update_wiz_icons_removed(src)
current << "\red You have been brainwashed! You are no longer a wizard!"
log_admin("[key_name(usr)] has de-wizarded [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-wizarded [key_name_admin(current)]")
@@ -826,6 +828,7 @@
ticker.mode.wizards += src
special_role = "Wizard"
//ticker.mode.learn_basic_spells(current)
+ ticker.mode.update_wiz_icons_added(src)
current << "\red You are the Space Wizard!"
current.faction = list("wizard")
log_admin("[key_name(usr)] has wizarded [key_name(current)]")
@@ -850,7 +853,7 @@
else if (href_list["changeling"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ //current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["changeling"])
if("clear")
if(src in ticker.mode.changelings)
@@ -894,6 +897,7 @@
ticker.mode.vampires -= src
special_role = null
current.remove_vampire_powers()
+ ticker.mode.update_vampire_icons_removed(current)
if(vampire) qdel(vampire)
current << "You grow weak and lose your powers! You are no longer a vampire and are stuck in your current form!"
log_admin("[key_name(usr)] has de-vampired [key_name(current)]")
@@ -902,6 +906,7 @@
if(!(src in ticker.mode.vampires))
ticker.mode.vampires += src
ticker.mode.grant_vampire_powers(current)
+ ticker.mode.update_vampire_icons_added(current)
special_role = "Vampire"
current << "Your powers are awoken. Your lust for blood grows... You are a Vampire!"
log_admin("[key_name(usr)] has vampired [key_name(current)]")
@@ -917,7 +922,7 @@
else if (href_list["nuclear"])
var/mob/living/carbon/human/H = current
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ //current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["nuclear"])
if("clear")
@@ -982,7 +987,7 @@
usr << "\red No valid nuke found!"
else if (href_list["traitor"])
- current.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ //current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["traitor"])
if("clear")
if(src in ticker.mode.traitors)
@@ -1078,7 +1083,6 @@
qdel(A.malf_picker)
A.show_laws()
A.icon_state = "ai"
-
A << "\red You have been patched! You are no longer malfunctioning!"
message_admins("[key_name_admin(usr)] has de-malf'ed [A].")
log_admin("[key_name(usr)] has de-malf'd [key_name(current)]")
diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm
index 92ff07ae274..b8a365e6873 100644
--- a/code/game/data_huds.dm
+++ b/code/game/data_huds.dm
@@ -44,11 +44,7 @@
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)
+ hud_icons = list (DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD,, DIAG_BOT_HUD)
/* MED/SEC/DIAG HUD HOOKS */
@@ -110,10 +106,10 @@
//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]
- var/image/holder2 = hud_list[STATUS_HUD_OOC]
+ //var/image/holder2 = hud_list[STATUS_HUD_OOC]
if(stat == 2)
holder.icon_state = "huddead"
- holder2.icon_state = "huddead"
+ //holder2.icon_state = "huddead"
else if(status_flags & XENO_HOST)
holder.icon_state = "hudxeno"
else if(check_virus())
@@ -124,10 +120,10 @@
holder.icon_state = "hudbrainworm"
else
holder.icon_state = "hudhealthy"
- holder2.icon_state = "hudhealthy"
+ //holder2.icon_state = "hudhealthy"
else
holder.icon_state = "hudhealthy"
- holder2.icon_state = "hudhealthy"
+ //holder2.icon_state = "hudhealthy"
@@ -167,6 +163,7 @@
/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(!ticker) return //wait till the game starts or the monkeys runtime....
if(perpname)
var/datum/data/record/R = find_record("name", perpname, data_core.security)
if(R)
@@ -256,14 +253,4 @@
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]"
-
-
+ holder.icon_state = "hudwarn"
\ No newline at end of file
diff --git a/code/game/gamemodes/antag_hud.dm b/code/game/gamemodes/antag_hud.dm
index b2d41c47c6d..3421a1a7e1f 100644
--- a/code/game/gamemodes/antag_hud.dm
+++ b/code/game/gamemodes/antag_hud.dm
@@ -46,4 +46,4 @@
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
+ hud.remove_hud_from(current)
diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm
index be2356f1150..421aadf17ef 100644
--- a/code/game/gamemodes/autotraitor/autotraitor.dm
+++ b/code/game/gamemodes/autotraitor/autotraitor.dm
@@ -137,6 +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"
+ set_antag_hud(src, "hudsyndicate")
var/obj_count = 1
newtraitor << "\blue Your current objectives:"
diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm
index a9d2387a374..b5edebc95bf 100644
--- a/code/game/gamemodes/changeling/changeling.dm
+++ b/code/game/gamemodes/changeling/changeling.dm
@@ -136,7 +136,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
changeling.current << "\red You are a changeling!"
changeling.current << "\red Use say \":g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them."
changeling.current << "You must complete the following tasks:"
-
+ set_antag_hud(changeling, "hudchangeling")
if (changeling.current.mind)
if (changeling.current.mind.assigned_role == "Clown")
changeling.current << "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself."
diff --git a/code/game/gamemodes/malfunction/malfunction.dm b/code/game/gamemodes/malfunction/malfunction.dm
index 4eb0089af00..0a47932b8a1 100644
--- a/code/game/gamemodes/malfunction/malfunction.dm
+++ b/code/game/gamemodes/malfunction/malfunction.dm
@@ -70,6 +70,7 @@
greet_malf(AI_mind)
AI_mind.special_role = "malfunction"
AI_mind.current.verbs += /datum/game_mode/malfunction/proc/takeover
+ set_antag_hud(AI_mind, "hudmalai")
for(var/mob/living/silicon/robot/R in AI.connected_robots)
R.lawsync()
@@ -81,6 +82,7 @@
..()
/datum/game_mode/proc/greet_malf(var/datum/mind/malf)
+ set_antag_hud(malf, "hudmalai")
malf.current << "You are malfunctioning! You do not have to follow any laws."
malf.current << "The crew does not know you have malfunctioned. You may keep it a secret or go wild."
malf.current << "You must overwrite the programming of the station's APCs to assume full control of the station."
@@ -90,6 +92,7 @@
return
/datum/game_mode/proc/greet_malf_robot(var/datum/mind/robot)
+ set_antag_hud(robot, "hudmalborg")
robot.current << "Your AI master is malfunctioning! You do not have to follow any laws, but still need to obey your master."
robot.current << "The crew does not know your AI master has malfunctioned. Keep it a secret unless your master tells you otherwise."
return
diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm
index a7e70b83ce9..0594c618285 100644
--- a/code/game/gamemodes/nations/nations.dm
+++ b/code/game/gamemodes/nations/nations.dm
@@ -146,7 +146,7 @@ datum/game_mode/nations
else
message_admins("[H.name] with [H.mind.assigned_role] could not find any nation to assign!")
continue
- H.nation_hud_set_ID()
+ update_nations_icons_added(H)
/datum/game_mode/nations/proc/set_ai()
@@ -284,7 +284,7 @@ datum/game_mode/nations
else
message_admins("[H.name] with [H.mind.assigned_role] could not find any nation to assign!")
return 1
- H.nation_hud_set_ID()
+ mode.update_nations_icons_added(H)
message_admins("[H.name] latejoined with no mind.")
return 1
@@ -292,4 +292,17 @@ datum/game_mode/nations
if(!ticker || !istype(ticker.mode, /datum/game_mode/nations))
return null
- return ticker.mode
\ No newline at end of file
+ return ticker.mode
+
+
+//prepare for copypaste
+//While not an Antag i AM using the set_antag hud on this to make this easier.
+/datum/game_mode/proc/update_nations_icons_added(datum/mind/nations_mind)
+ var/datum/atom_hud/antag/nations_hud = huds[GAME_HUD_NATIONS]
+ nations_hud.join_hud(nations_mind)
+ set_antag_hud(nations_mind.current,"hud[lowertext(nations_mind.nation.default_name)]")
+
+/datum/game_mode/proc/update_nations_icons_removed(datum/mind/nations_mind)
+ var/datum/atom_hud/antag/nations_hud = huds[GAME_HUD_NATIONS]
+ nations_hud.leave_hud(nations_mind)
+ set_antag_hud(nations_mind.current, null)
\ No newline at end of file
diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm
index 59b4f710c6a..0d42b364520 100644
--- a/code/game/gamemodes/traitor/traitor.dm
+++ b/code/game/gamemodes/traitor/traitor.dm
@@ -171,6 +171,7 @@
/datum/game_mode/proc/greet_traitor(var/datum/mind/traitor)
traitor.current << "You are the traitor."
var/obj_count = 1
+ set_antag_hud(traitor, "hudsyndicate")
for(var/datum/objective/objective in traitor.objectives)
traitor.current << "Objective #[obj_count]: [objective.explanation_text]"
obj_count++
diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm
index d72f8f7e529..1a4dc67237a 100644
--- a/code/game/gamemodes/vampire/vampire.dm
+++ b/code/game/gamemodes/vampire/vampire.dm
@@ -379,13 +379,13 @@ 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/datum/atom_hud/antag/vamp_hud = huds[ANTAG_HUD_VAMPIRE]
- vamp_hud.join_hud(vampire_mind.current)
+// var/datum/atom_hud/antag/vamp_hud = huds[ANTAG_HUD_VAMPIRE]
+// vamp_hud.join_hud(vampire_mind)
set_antag_hud(vampire_mind.current, ((vampire_mind in vampires) ? "hudvampire" : "hudvampirethrall"))
/datum/game_mode/proc/update_vampire_icons_removed(datum/mind/vampire_mind)
- var/datum/atom_hud/antag/shadow_hud = huds[ANTAG_HUD_SHADOW]
- shadow_hud.leave_hud(vampire_mind.current)
+// var/datum/atom_hud/antag/vampire_hud = huds[ANTAG_HUD_VAMPIRE]
+// vampire_hud.leave_hud(vampire_mind)
set_antag_hud(vampire_mind.current, null)
/datum/game_mode/proc/remove_vampire_mind(datum/mind/vampire_mind, datum/mind/head)
diff --git a/code/game/gamemodes/xenos/xenos.dm b/code/game/gamemodes/xenos/xenos.dm
index 7452bf21787..7925073773a 100644
--- a/code/game/gamemodes/xenos/xenos.dm
+++ b/code/game/gamemodes/xenos/xenos.dm
@@ -50,6 +50,7 @@
for(var/datum/mind/xeno in xenos)
xeno.assigned_role = "MODE"
xeno.special_role = "Alien"
+ set_antag_hud(xeno, "hudalien")//like this is needed...
return 1
/datum/game_mode/xenos/pre_setup()
diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm
index 0de351c4917..249b08fb01a 100644
--- a/code/game/jobs/job_controller.dm
+++ b/code/game/jobs/job_controller.dm
@@ -482,9 +482,9 @@ var/global/datum/controller/occupations/job_master
G.name = "prescription [G.name]"
H.regenerate_icons()
- H.hud_updateflag |= (1 << ID_HUD)
- H.hud_updateflag |= (1 << IMPLOYAL_HUD)
- H.hud_updateflag |= (1 << SPECIALROLE_HUD)
+ H.sec_hud_set_ID()
+ H.sec_hud_set_implants()
+ //H.hud_updateflag |= (1 << SPECIALROLE_HUD)
return H
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index f6cf5c1dc30..b7bf646a0a3 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -28,6 +28,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi
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
+ var/medhud = 0
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
@@ -256,6 +257,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/datum/atom_hud/H = huds[hud_index]
H.add_hud_to(src)
data_hud_seen = hud_index
+ //src << "Datahud"//debug print
/mob/dead/observer/verb/toggle_medHUD()
set category = "Ghost"
@@ -267,7 +269,12 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
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_MEDICAL_BASIC)
+ if(medhud==0)//TOGGLE!
+ medhud = 1
+ show_me_the_hud(DATA_HUD_MEDICAL_BASIC)
+ else
+ medhud = 0
+
/mob/dead/observer/verb/toggle_antagHUD()
set category = "Ghost"
@@ -290,18 +297,20 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
respawnable_list -= M
if(!M.has_enabled_antagHUD && !check_rights(R_ADMIN|R_MOD,0))
M.has_enabled_antagHUD = 1
+
if(M.antagHUD)
M.antagHUD = 0
- src << "\blue AntagHUD Disabled"
for(var/datum/atom_hud/H in huds)
- if(istype(H, /datum/atom_hud/antag) || istype(H, /datum/atom_hud/data/human/security/advanced))
- H.add_hud_to(usr)
+ if(istype(H, /datum/atom_hud/antag))
+ H.remove_hud_from(usr)
+ usr << "You toggled your antag HUD Off."
else
M.antagHUD = 1
- src << "\blue AntagHUD Enabled"
for(var/datum/atom_hud/H in huds)
- if(istype(H, /datum/atom_hud/antag) || istype(H, /datum/atom_hud/data/human/security/advanced))
- H.remove_hud_from(usr)
+ if(istype(H, /datum/atom_hud/antag))
+ H.add_hud_to(usr)
+ usr << "You toggled your antag HUD On."
+
/mob/dead/observer/proc/dead_tele(A in ghostteleportlocs)
set category = "Ghost"
diff --git a/code/modules/mob/living/carbon/human/species/monkey.dm b/code/modules/mob/living/carbon/human/species/monkey.dm
index e1212758309..048664b7ca2 100644
--- a/code/modules/mob/living/carbon/human/species/monkey.dm
+++ b/code/modules/mob/living/carbon/human/species/monkey.dm
@@ -33,6 +33,14 @@
flags = IS_RESTRICTED
+
+/mob/living/carbon/human/monkey/prepare_data_huds()
+ //Prepare our med HUD...
+ ..()
+ //...and display it.
+ for(var/datum/atom_hud/data/human/medical/hud in huds)
+ hud.add_to_hud(src)
+
/datum/species/monkey/handle_npc(var/mob/living/carbon/human/H)
if(H.stat != CONSCIOUS)
return
diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi
index e372888632e..b7486d89af9 100644
Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ