Hud refactor

This commit is contained in:
Aurorablade
2015-12-10 01:01:54 -05:00
parent a02d49d177
commit c590958f2d
58 changed files with 1002 additions and 692 deletions
+35 -11
View File
@@ -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
-22
View File
@@ -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
+84
View File
@@ -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
+6 -1
View File
@@ -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)
-94
View File
@@ -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
+6
View File
@@ -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.
+263
View File
@@ -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]"
+49
View File
@@ -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)
@@ -137,7 +137,7 @@
newtraitor << "\red <B>ATTENTION:</B> \black It is time to pay your debt to the Syndicate..."
newtraitor << "<B>You are now a traitor.</B>"
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)
@@ -64,11 +64,13 @@
user << "<span class='notice'>We have regenerated.</span>"
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
+25 -18
View File
@@ -213,14 +213,14 @@
M << "<FONT size = 3>[cult_mind.current] looks like they just reverted to their old faith!</FONT>"
/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()
+50 -50
View File
@@ -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
+7 -35
View File
@@ -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)
+13 -96
View File
@@ -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 <FONT size = 3><B>The frame's firmware detects and deletes your neural reprogramming! You remember nothing from the moment you were flashed until now.</B></FONT>"
@@ -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//
//////////////////////////
@@ -105,7 +105,6 @@
rev_mind.current << "\red <FONT size = 3> 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!</FONT>"
rev_mind.special_role = "Revolutionary"
update_rev_icons_added(rev_mind)
H.hud_updateflag |= 1 << SPECIALROLE_HUD
return 1
/////////////////////////////
+8 -40
View File
@@ -136,7 +136,7 @@ Made by Xhuis
if(shadow_mind.assigned_role == "Clown")
S << "<span class='notice'>Your alien nature has allowed you to overcome your clownishness.</span>"
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)
+6 -44
View File
@@ -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
+1
View File
@@ -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."
+13
View File
@@ -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))
+6
View File
@@ -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
+5
View File
@@ -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
+3 -3
View File
@@ -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))
+5 -2
View File
@@ -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)
+18
View File
@@ -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("<font color='blue'><b>Internal fire extinquished.</b></font>")
if(MECHA_INT_TANK_BREACH)
occupant_message("<font color='blue'><b>Damaged internal tank has been sealed.</b></font>")
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()
+15 -15
View File
@@ -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("<font color='red'>[H.glasses] prevent you from using [src] [hud]</font>")
if(H.glasses && istype(H.glasses, /obj/item/clothing/glasses/hud))
occupant_message("<span class='warning'>Your [H.glasses] prevent you from using the built-in medical hud.</span>")
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
@@ -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
@@ -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()
+11 -1
View File
@@ -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
+2 -2
View File
@@ -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(
+24 -3
View File
@@ -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"
+18 -14
View File
@@ -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 <B>Medical HUD Disabled</B>"
else
medHUD = 1
src << "\blue <B>Medical HUD Enabled</B>"
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"
@@ -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)
+14
View File
@@ -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)
@@ -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")
@@ -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
+31 -20
View File
@@ -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."
@@ -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 << "<span class='notice'>Your [O.name] is shaped normally again.</span>"
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
@@ -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
@@ -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
+93 -91
View File
@@ -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(..())
@@ -5,6 +5,4 @@
src << "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>"
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
@@ -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)
+1 -1
View File
@@ -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()
+1 -24
View File
@@ -11,30 +11,7 @@
src << "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>"
//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 .
+13 -11
View File
@@ -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
..()
+9 -6
View File
@@ -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)
+4 -4
View File
@@ -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
@@ -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
+14 -9
View File
@@ -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
*/
+14 -9
View File
@@ -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)
+41 -8
View File
@@ -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 << "<span class='notice'>Security records overlay enabled.</span>"
if ("Medical")
sensor_mode = MED_HUD
add_med_hud()
src << "<span class='notice'>Life signs monitor overlay enabled.</span>"
if ("Diagnostic")
add_diag_hud()
src << "<span class='notice'>Robotics diagnostic overlay enabled.</span>"
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)
@@ -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()
..()
+3
View File
@@ -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))
+5
View File
@@ -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
+2
View File
@@ -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
+2 -2
View File
@@ -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))
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 12 KiB

+3 -2
View File
@@ -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"