Merge pull request #2797 from Aurorablade/HudRefactor

[Ready for Review][WTF]Hud refactor
This commit is contained in:
Fox McCloud
2015-12-18 21:13:21 -05:00
81 changed files with 1000 additions and 1038 deletions
+2 -2
View File
@@ -144,6 +144,7 @@
"cN" = (/obj/docking_port/stationary/transit{dir = 8; dwidth = 2; height = 11; id = "specops_transit"; name = "specops in transit"; turf_type = /turf/space/transit/horizontal; width = 5},/turf/space/transit/horizontal,/area/space)
"cO" = (/obj/docking_port/stationary/transit{dir = 8; dwidth = 2; height = 12; id = "ferry_transit"; name = "ferry in transit"; turf_type = /turf/space/transit/horizontal; width = 5},/turf/space/transit/horizontal,/area/space)
"cP" = (/obj/docking_port/stationary/transit{dir = 2; dwidth = 3; height = 5; id = "engineering_transit"; name = "engineering in transit"; turf_type = /turf/space/transit/horizontal; width = 7},/turf/space/transit/horizontal,/area/space)
"cQ" = (/obj/structure/rack,/obj/item/clothing/glasses/sunglasses{pixel_x = -3; pixel_y = 3},/obj/item/clothing/glasses/hud/health/health_advanced,/obj/item/clothing/glasses/hud/security/sunglasses,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
"cR" = (/obj/effect/decal/cleanable/blood,/turf/unsimulated/wall,/area/prison/solitary)
"cS" = (/obj/structure/stool/bed,/turf/unsimulated/floor{name = "plating"},/area/prison/solitary)
"cT" = (/turf/unsimulated/floor{icon_state = "platingdmg3"},/area/prison/solitary)
@@ -931,7 +932,6 @@
"DN" = (/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/turf/unsimulated/wall{dir = 4; icon = 'icons/turf/shuttle.dmi'; icon_state = "window5_mid"; name = "window"; opacity = 0; tag = "icon-window5 (EAST)"},/area/admin)
"DO" = (/obj/structure/rack,/obj/item/clothing/under/chameleon/all{pixel_x = -3; pixel_y = 3},/obj/item/clothing/under/soviet,/obj/item/clothing/under/pirate{pixel_x = 3; pixel_y = -3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
"DP" = (/obj/structure/rack,/obj/item/clothing/glasses/material{pixel_x = -3; pixel_y = 3},/obj/item/clothing/glasses/meson,/obj/item/clothing/glasses/thermal{pixel_x = 3; pixel_y = -3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
"DQ" = (/obj/structure/rack,/obj/item/clothing/glasses/sunglasses{pixel_x = -3; pixel_y = 3},/obj/item/clothing/glasses/sunglasses/sechud,/obj/item/clothing/glasses/hud/health_advanced{pixel_x = 3; pixel_y = -3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
"DR" = (/obj/structure/rack,/obj/item/clothing/gloves/color/black/thief{pixel_x = -3; pixel_y = 3},/obj/item/clothing/gloves/color/yellow,/obj/item/clothing/gloves/color/rainbow{pixel_x = 3; pixel_y = -3},/obj/item/clothing/gloves/combat{pixel_x = -3; pixel_y = 3},/obj/item/clothing/gloves/color/latex,/obj/item/clothing/gloves/color/captain{pixel_x = 3; pixel_y = -3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
"DS" = (/obj/structure/rack,/obj/item/clothing/suit/armor/bulletproof{pixel_x = -3; pixel_y = 3},/obj/item/clothing/suit/armor/laserproof,/obj/item/clothing/suit/armor/vest{pixel_x = 3; pixel_y = -3},/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
"DT" = (/obj/mecha/combat/marauder/loaded,/turf/unsimulated/floor{tag = "icon-floor"; icon_state = "floor"},/area/admin)
@@ -1404,7 +1404,7 @@ aNaNaNaNaNaNbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbWbW
aNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNDvDtDwDxDyDyDyDzDwDuDvaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaN
aNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNDtDADBDCDDDEDFDGDHDADuaNaNaNaNaNaNDuaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaN
aNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNDIDJDKDKDKDKDKDLDADwDMDwDMDwDMDwDwDuaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaN
aNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNDNDODKDPDQDRDKDSDADTDKDUDKDVDWDXDYDADuaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaN
aNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNDNDODKDPcQDRDKDSDADTDKDUDKDVDWDXDYDADuaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaN
aNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNDNDZDKEaEbEcDKEdDADKDKDKDKDKDKDKEeDIaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaN
aNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNEfEgEhDKDKDKEhEiDAEjDKEkDKElDWDXDYEfaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaN
aNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNDADwDwDKDKDKDwDwDADKDKDKDKDKDKDKEmDAEnaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaNaN
+39 -11
View File
@@ -1,11 +1,39 @@
// 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/atom_hud expects these to be unique
// these need to be strings in order to make them associative lists
#define HEALTH_HUD "1" // dead, alive, sick, health status
#define STATUS_HUD "2" // a simple line rounding the mob's number health
#define ID_HUD "3" // the job asigned to your ID
#define WANTED_HUD "4" // wanted, released, parroled, security status
#define IMPLOYAL_HUD "5" // loyality implant
#define IMPCHEM_HUD "6" // chemical implant
#define IMPTRACK_HUD "7" // tracking implant
#define DIAG_STAT_HUD "8" // Silicon/Mech Status
#define DIAG_HUD "9" // Silicon health bar
#define DIAG_BATT_HUD "10"// Borg/Mech power meter
#define DIAG_MECH_HUD "11"// Mech health bar
#define STATUS_HUD_OOC "12" // STATUS_HUD without virus db check for someone being ill.
//for antag huds. these are used at the /mob level
#define SPECIALROLE_HUD "13"
#define NATIONS_HUD "14" //Show nations icons during nations gamemode
//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
//NATIONS
#define GAME_HUD_NATIONS 6
//antag HUD defines
#define ANTAG_HUD_CULT 7
#define ANTAG_HUD_REV 8
#define ANTAG_HUD_OPS 9
#define ANTAG_HUD_WIZ 10
#define ANTAG_HUD_SHADOW 11
#define ANTAG_HUD_SOLO 12
-22
View File
@@ -134,28 +134,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
+3
View File
@@ -137,6 +137,9 @@
if(isAI(usr))
var/mob/living/silicon/ai/AI = usr
AI.sensor_mode()
else if(isrobot(usr))
var/mob/living/silicon/robot/borg = usr
borg.sensor_mode()
/datum/hud/proc/ai_hud()
+85
View File
@@ -0,0 +1,85 @@
/* 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(),
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(), \
ANTAG_HUD_WIZ = new/datum/atom_hud/antag(), \
ANTAG_HUD_SHADOW = new/datum/atom_hud/antag(), \
ANTAG_HUD_SOLO = new/datum/atom_hud/antag(), \
)
/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
+15 -12
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,9 +82,11 @@
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
leave_all_huds() //leave all the huds in the old body, so it won't get huds if somebody else enters it
current = new_character //link ourself to our new body
new_character.mind = src //and link our new body to ourself
transfer_antag_huds(hud_to_transfer) //inherit the antag HUD
transfer_actions(new_character)
if(active)
@@ -610,8 +615,6 @@
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.
switch(href_list["implant"])
if("remove")
for(var/obj/item/weapon/implant/loyalty/I in H.contents)
@@ -628,6 +631,7 @@
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
log_admin("[key_name(usr)] has given [key_name(current)] a loyalty implant")
message_admins("[key_name_admin(usr)] has given [key_name_admin(current)] a loyalty implant")
@@ -657,7 +661,6 @@
log_admin("[key_name_admin(usr)] has de-traitor'ed [current].")
else if (href_list["revolution"])
current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["revolution"])
if("clear")
@@ -761,7 +764,6 @@
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)
switch(href_list["cult"])
if("clear")
if(src in ticker.mode.cult)
@@ -804,7 +806,6 @@
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)
switch(href_list["wizard"])
if("clear")
@@ -813,6 +814,7 @@
special_role = null
current.spellremove(current)
current.faction = list("Station")
ticker.mode.update_wiz_icons_removed(src)
current << "\red <FONT size = 3><B>You have been brainwashed! You are no longer a wizard!</B></FONT>"
log_admin("[key_name(usr)] has de-wizarded [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-wizarded [key_name_admin(current)]")
@@ -821,6 +823,7 @@
ticker.mode.wizards += src
special_role = "Wizard"
//ticker.mode.learn_basic_spells(current)
ticker.mode.update_wiz_icons_added(src)
current << "<B>\red You are the Space Wizard!</B>"
current.faction = list("wizard")
log_admin("[key_name(usr)] has wizarded [key_name(current)]")
@@ -845,13 +848,13 @@
else if (href_list["changeling"])
current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["changeling"])
if("clear")
if(src in ticker.mode.changelings)
ticker.mode.changelings -= src
special_role = null
current.remove_changeling_powers()
ticker.mode.update_change_icons_removed(src)
if(changeling) qdel(changeling)
current << "<FONT color='red' size = 3><B>You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!</B></FONT>"
log_admin("[key_name(usr)] has de-changelinged [key_name(current)]")
@@ -860,6 +863,7 @@
if(!(src in ticker.mode.changelings))
ticker.mode.changelings += src
ticker.mode.grant_changeling_powers(current)
ticker.mode.update_change_icons_added(src)
special_role = "Changeling"
current << "<B><font color='red'>Your powers are awoken. A flash of memory returns to us...we are a changeling!</font></B>"
log_admin("[key_name(usr)] has changelinged [key_name(current)]")
@@ -889,6 +893,7 @@
ticker.mode.vampires -= src
special_role = null
current.remove_vampire_powers()
ticker.mode.update_vampire_icons_removed(src)
if(vampire) qdel(vampire)
current << "<FONT color='red' size = 3><B>You grow weak and lose your powers! You are no longer a vampire and are stuck in your current form!</B></FONT>"
log_admin("[key_name(usr)] has de-vampired [key_name(current)]")
@@ -897,6 +902,7 @@
if(!(src in ticker.mode.vampires))
ticker.mode.vampires += src
ticker.mode.grant_vampire_powers(current)
ticker.mode.update_vampire_icons_added(src)
special_role = "Vampire"
current << "<B><font color='red'>Your powers are awoken. Your lust for blood grows... You are a Vampire!</font></B>"
log_admin("[key_name(usr)] has vampired [key_name(current)]")
@@ -912,8 +918,6 @@
else if (href_list["nuclear"])
var/mob/living/carbon/human/H = current
current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["nuclear"])
if("clear")
if(src in ticker.mode.syndicates)
@@ -977,7 +981,6 @@
usr << "\red No valid nuke found!"
else if (href_list["traitor"])
current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["traitor"])
if("clear")
if(src in ticker.mode.traitors)
@@ -990,6 +993,7 @@
var/mob/living/silicon/ai/A = current
A.set_zeroth_law("")
A.show_laws()
ticker.mode.update_traitor_icons_removed(src)
if("traitor")
@@ -1003,6 +1007,7 @@
var/mob/living/silicon/A = current
call(/datum/game_mode/proc/add_law_zero)(A)
A.show_laws()
ticker.mode.update_traitor_icons_added(src)
if("autoobjectives")
ticker.mode.forge_traitor_objectives(src)
@@ -1054,7 +1059,6 @@
log_admin("[key_name(usr)] has thralled [current].")
else if (href_list["silicon"])
current.hud_updateflag |= (1 << SPECIALROLE_HUD)
switch(href_list["silicon"])
if("unmalf")
if(src in ticker.mode.malf_ai)
@@ -1073,7 +1077,6 @@
qdel(A.malf_picker)
A.show_laws()
A.icon_state = "ai"
A << "\red <FONT size = 3><B>You have been patched! You are no longer malfunctioning!</B></FONT>"
message_admins("[key_name_admin(usr)] has de-malf'ed [A].")
log_admin("[key_name(usr)] has de-malf'd [key_name(current)]")
-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.
+256
View File
@@ -0,0 +1,256 @@
/* 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) || istype(M,/mob/dead/observer) )
..()
/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)
/* 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]
//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"
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"
//holder2.icon_state = "hudhealthy"
else
holder.icon_state = "hudhealthy"
//holder2.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(!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)
switch(R.fields["criminal"])
if("*Arrest*")
holder.icon_state = "hudwanted"
return
if("Incarcerated")
holder.icon_state = "hudprisoner"
return
if("Parolled")
holder.icon_state = "hudparolled"
return
if("Released")
holder.icon_state = "hudreleased"
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"
+68
View File
@@ -0,0 +1,68 @@
/datum/atom_hud/antag
hud_icons = list(SPECIALROLE_HUD,NATIONS_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)
if(!ismask(M))//FUCK YOU MASK OF NARNAR!
add_to_hud(M)
add_hud_to(M)
M.mind.antag_hud = src
/datum/atom_hud/antag/proc/join_solo_hud(mob/M)//for non team antags and for observer huds
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)
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
//Nations Icons
/datum/game_mode/proc/set_nations_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[NATIONS_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,10 @@
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/datum/atom_hud/antag/tatorhud = huds[SPECIALROLE_HUD]
tatorhud.join_solo_hud(newtraitor)
set_antag_hud(src, "hudsyndicate")
var/obj_count = 1
newtraitor << "\blue Your current objectives:"
for(var/datum/objective/objective in newtraitor.mind.objectives)
+12 -1
View File
@@ -68,6 +68,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
grant_changeling_powers(changeling.current)
forge_changeling_objectives(changeling)
greet_changeling(changeling)
update_change_icons_added(changeling)
..()
@@ -136,7 +137,6 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
changeling.current << "<B>\red You are a changeling!</B>"
changeling.current << "<b>\red Use say \":g message\" to communicate with your fellow changelings. Remember: you get all of their absorbed DNA if you absorb them.</b>"
changeling.current << "<B>You must complete the following tasks:</B>"
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."
@@ -148,6 +148,17 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
obj_count++
return
/datum/game_mode/proc/update_change_icons_added(datum/mind/changeling)
var/datum/atom_hud/antag/linghud = huds[ANTAG_HUD_SOLO]
linghud.join_solo_hud(changeling.current)
set_antag_hud(changeling.current, "hudchangeling")
/datum/game_mode/proc/update_change_icons_removed(datum/mind/changeling)
var/datum/atom_hud/antag/linghud = huds[ANTAG_HUD_SOLO]
linghud.leave_hud(changeling.current)
set_antag_hud(changeling.current, null)
/*/datum/game_mode/changeling/check_finished()
var/changelings_alive = 0
for(var/datum/mind/changeling in changelings)
@@ -64,11 +64,11 @@
user << "<span class='notice'>We have regenerated.</span>"
user.regenerate_icons()
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
+23 -105
View File
@@ -201,8 +201,6 @@
cult_mind.current << "\red <FONT size = 3><B>An unfamiliar white light flashes through your mind, cleansing the taint of the dark-one and the memories of your time as his servant with it.</B></FONT>"
cult_mind.memory = ""
cult_mind.special_role = null
cult_mind.current.hud_updateflag |= 1 << SPECIALROLE_HUD
// remove the cult viewpoint object
var/obj/viewpoint = getCultViewpoint(cult_mind.current)
qdel(viewpoint)
@@ -213,121 +211,41 @@
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/reset_cult_icons_for_cultist(var/datum/mind/target)
if(target.current)
if(target.current.client)
remove_all_cult_icons(target)
for(var/datum/mind/cultist in cult)
if(cultist.current)
add_cult_icon(target.current.client,cultist.current)
/datum/game_mode/proc/reset_cult_icons_for_spirit(mob/spirit/target)
if (target.client)
remove_all_cult_icons(target)
for(var/datum/mind/cultist in cult)
if(cultist.current)
add_cult_icon(target.client,cultist.current)
/datum/game_mode/proc/add_cult_icon(client/target_client,mob/target_mob)
var/I = image('icons/mob/mob.dmi', loc = target_mob, icon_state = "cult")
target_client.images += I
/datum/game_mode/proc/remove_cult_icon(client/target_client,mob/target_mob)
for(var/image/I in target_client.images)
if(I.icon_state == "cult" && I.loc == target_mob)
qdel(I)
/datum/game_mode/proc/remove_all_cult_icons_from_client(client/target)
for(var/image/I in target.images)
if(I.icon_state == "cult")
qdel(I)
/datum/game_mode/proc/remove_all_cult_icons(target)
var/datum/mind/cultist = target
if(istype(cultist))
if(cultist.current)
if(cultist.current.client)
remove_all_cult_icons_from_client(cultist.current.client)
return TRUE
var/mob/spirit/currentSpirit = target
if(istype(currentSpirit))
if (currentSpirit.client)
remove_all_cult_icons_from_client(currentSpirit.client)
return TRUE
return FALSE
/datum/game_mode/proc/add_cult_icon_to_spirit(mob/spirit/currentSpirit,datum/mind/cultist)
if(!istype(currentSpirit) || !istype(cultist))
/datum/game_mode/proc/add_cult_icon_to_spirit(mob/spirit/currentSpirit)
if(!istype(currentSpirit))
return FALSE
if (currentSpirit.client)
if (cultist.current)
add_cult_icon(currentSpirit.client,cultist.current)
var/datum/atom_hud/antag/maskhud = huds[ANTAG_HUD_CULT]
maskhud.join_hud(currentSpirit)
set_antag_hud(currentSpirit,"hudcultist")
/datum/game_mode/proc/add_cult_icon_to_cultist(datum/mind/first_cultist,datum/mind/second_cultist)
if(first_cultist.current && second_cultist.current)
if(first_cultist.current.client)
add_cult_icon(first_cultist.current.client, second_cultist.current)
/datum/game_mode/proc/remove_cult_icon_from_cultist(datum/mind/first_cultist,datum/mind/second_cultist)
if(first_cultist.current && second_cultist.current)
if(first_cultist.current.client)
remove_cult_icon(first_cultist.current.client,second_cultist.current)
/datum/game_mode/proc/remove_cult_icon_from_spirit(mob/spirit/currentSpirit,datum/mind/cultist)
if(!istype(currentSpirit) || !istype(cultist))
/datum/game_mode/proc/remove_cult_icon_from_spirit(mob/spirit/currentSpirit)
if(!istype(currentSpirit))
return FALSE
if (currentSpirit.client)
if (cultist.current)
remove_cult_icon(currentSpirit.client,cultist.current)
/datum/game_mode/proc/cult_icon_pair_link(datum/mind/first_cultist,datum/mind/second_cultist)
if (!istype(first_cultist) || !istype(second_cultist))
return 0
add_cult_icon_to_cultist(first_cultist,second_cultist)
add_cult_icon_to_cultist(second_cultist,first_cultist)
/datum/game_mode/proc/cult_icon_pair_unlink(datum/mind/first_cultist,datum/mind/second_cultist)
if (!istype(first_cultist) || !istype(second_cultist))
return 0
remove_cult_icon_from_cultist(first_cultist,second_cultist)
remove_cult_icon_from_cultist(second_cultist,first_cultist)
var/datum/atom_hud/antag/maskhud = huds[ANTAG_HUD_CULT]
maskhud.leave_hud(currentSpirit)
set_antag_hud(currentSpirit, null)
/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)
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)
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()
@@ -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()
@@ -82,6 +83,7 @@
..()
/datum/game_mode/proc/greet_malf(var/datum/mind/malf)
set_antag_hud(malf, "hudmalai")
malf.current << "<font color=red size=3><B>You are malfunctioning!</B> You do not have to follow any laws.</font>"
malf.current << "<B>The crew does not know you have malfunctioned. You may keep it a secret or go wild.</B>"
malf.current << "<B>You must overwrite the programming of the station's APCs to assume full control of the station.</B>"
@@ -91,6 +93,7 @@
return
/datum/game_mode/proc/greet_malf_robot(var/datum/mind/robot)
set_antag_hud(robot, "hudmalborg")
robot.current << "<font color=red size=3><B>Your AI master is malfunctioning!</B> You do not have to follow any laws, but still need to obey your master.</font>"
robot.current << "<B>The crew does not know your AI master has malfunctioned. Keep it a secret unless your master tells you otherwise.</B>"
return
+31 -51
View File
@@ -38,9 +38,7 @@ 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
update_nations_icons_added(H,"hudatmosia")
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 +49,7 @@ 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
update_nations_icons_added(H,"hudmedistan")
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 +60,7 @@ 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
update_nations_icons_added(H,"hudscientopia")
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 +71,7 @@ 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
update_nations_icons_added(H,"hudbrigston")
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 +82,7 @@ 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
update_nations_icons_added(H,"hudcargonia")
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 +93,7 @@ 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
update_nations_icons_added(H,"hudservice")
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 +104,7 @@ 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
update_nations_icons_added(H,"hudcommand")
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 +115,7 @@ 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
update_nations_icons_added(H,"hudcommand")
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 +123,6 @@ datum/game_mode/nations
continue
H << "You are now part of the great sovereign nation of [H.mind.nation.default_name]!"
continue
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
@@ -148,6 +131,7 @@ datum/game_mode/nations
message_admins("[H.name] with [H.mind.assigned_role] could not find any nation to assign!")
continue
/datum/game_mode/nations/proc/set_ai()
for(var/mob/living/silicon/ai/AI in mob_list)
AI.set_zeroth_law("")
@@ -203,76 +187,59 @@ 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
mode.update_nations_icons_added(H,"atmosia")
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
mode.update_nations_icons_added(H,"hudmedistan")
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
mode.update_nations_icons_added(H,"hudscientopia")
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
mode.update_nations_icons_added(H,"hudbrigston")
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
mode.update_nations_icons_added(H,"hudcargonia")
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
mode.update_nations_icons_added(H,"hudservice")
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
mode.update_nations_icons_added(H,"hudcommand")
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
mode.update_nations_icons_added(H,"hudcommand")
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 civilian_positions)
H << "You do not belong to any nation and are free to sell your services to the highest bidder."
return 1
@@ -291,4 +258,17 @@ datum/game_mode/nations
if(!ticker || !istype(ticker.mode, /datum/game_mode/nations))
return null
return ticker.mode
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/naticon)
var/datum/atom_hud/antag/nations_hud = huds[GAME_HUD_NATIONS]
nations_hud.join_hud(nations_mind)
set_nations_hud(nations_mind.current,naticon)
/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_nations_hud(nations_mind.current, null)
+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)
+12 -96
View File
@@ -237,7 +237,6 @@
if(rev_mind in revolutionaries)
revolutionaries -= rev_mind
rev_mind.special_role = null
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>"
@@ -254,104 +253,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
/////////////////////////////
+7 -41
View File
@@ -136,7 +136,6 @@ 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)
/datum/game_mode/proc/add_thrall(datum/mind/new_thrall_mind)
if(!istype(new_thrall_mind))
@@ -157,7 +156,6 @@ Made by Xhuis
new_thrall_mind.current << "<span class='shadowling'>Though not nearly as powerful as your masters, you possess some weak powers. These can be found in the Thrall Abilities tab.</span>"
new_thrall_mind.current << "<span class='shadowling'>You may communicate with your allies by speaking in the Shadowling Hivemind (:8).</span>"
new_thrall_mind.current.hud_updateflag |= (1 << SPECIALROLE_HUD)
return 1
/datum/game_mode/proc/remove_thrall(datum/mind/thrall_mind, var/kill = 0)
@@ -304,44 +302,12 @@ Made by Xhuis
silent_steps = 1
/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)
+7 -44
View File
@@ -337,52 +337,15 @@
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
/datum/game_mode/proc/update_traitor_icons_added(datum/mind/traitor_mind)
var/ref = "\ref[traitor_mind]"
if(ref in implanter)
if(traitor_mind.current)
if(traitor_mind.current.client)
var/I = image('icons/mob/mob.dmi', loc = traitor_mind.current, icon_state = "greytide_head")
traitor_mind.current.client.images += I
for(var/headref in implanter)
for(var/datum/mind/t_mind in implanter[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 = "greytide")
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 = "greytide_head")
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 = "greytide")
t_mind.current.client.images += I
//var/ref = "\ref[traitor_mind]"
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_SOLO]
tatorhud.join_solo_hud(traitor_mind.current)
set_antag_hud(traitor_mind.current, "hudsyndicate")
/datum/game_mode/proc/update_traitor_icons_removed(datum/mind/traitor_mind)
for(var/headref in implanter)
var/datum/mind/head = locate(headref)
for(var/datum/mind/t_mind in implanter[headref])
if(t_mind.current)
if(t_mind.current.client)
for(var/image/I in t_mind.current.client.images)
if((I.icon_state == "greytide" || I.icon_state == "greytide_head") && I.loc == traitor_mind.current)
//log_to_dd("deleting [traitor_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 == "greytide" || I.icon_state == "greytide_head") && I.loc == traitor_mind.current)
//log_to_dd("deleting [traitor_mind] overlay")
qdel(I)
if(traitor_mind.current)
if(traitor_mind.current.client)
for(var/image/I in traitor_mind.current.client.images)
if(I.icon_state == "greytide" || I.icon_state == "greytide_head")
qdel(I)
var/datum/atom_hud/antag/tatorhud = huds[ANTAG_HUD_SOLO]
tatorhud.leave_hud(traitor_mind.current)
set_antag_hud(traitor_mind.current, null)
/datum/game_mode/proc/remove_traitor_mind(datum/mind/traitor_mind, datum/mind/head)
//var/list/removal
+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_SOLO]
vamp_hud.join_solo_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/vampire_hud = huds[ANTAG_HUD_SOLO]
vampire_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))
+1
View File
@@ -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()
+9 -3
View File
@@ -31,7 +31,7 @@
H.equip_or_collect(new /obj/item/device/pda/heads/hos(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/color/black/hos(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/head/HoS(H), slot_head)
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
H.equip_or_collect(new /obj/item/weapon/gun/energy/gun(H), slot_s_store)
if(H.backbag == 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
@@ -46,6 +46,7 @@
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
return 1
@@ -76,7 +77,7 @@
H.equip_to_slot_or_del(new /obj/item/clothing/head/warden(H), slot_head)
H.equip_or_collect(new /obj/item/device/pda/warden(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/clothing/gloves/color/black(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
// H.equip_or_collect(new /obj/item/clothing/mask/gas(H), slot_wear_mask) //Grab one from the armory you donk
H.equip_or_collect(new /obj/item/device/flash(H), slot_l_store)
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
@@ -92,6 +93,7 @@
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
return 1
@@ -147,6 +149,7 @@
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
H.dna.SetSEState(SOBERBLOCK,1)
H.mutations += SOBER
@@ -194,6 +197,7 @@
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
return 1
/datum/job/brigdoc
@@ -217,7 +221,7 @@
if(4) H.equip_or_collect(new /obj/item/weapon/storage/backpack/satchel(H), slot_back)
H.equip_or_collect(new /obj/item/clothing/under/rank/security/brigphys(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/storage/fr_jacket(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/health_advanced, slot_glasses)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/health/health_advanced, slot_glasses)
H.equip_or_collect(new /obj/item/clothing/shoes/white(H), slot_shoes)
H.equip_or_collect(new /obj/item/device/pda/medical(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/storage/firstaid/adv(H), slot_l_hand)
@@ -232,6 +236,7 @@
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
return 1
/datum/job/pilot
@@ -272,4 +277,5 @@
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
return 1
+8 -3
View File
@@ -42,6 +42,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
callHook("captain_spawned", list("captain" = H))
return 1
@@ -139,6 +140,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
return 1
/datum/job/blueshield
@@ -171,7 +173,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_or_collect(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/clothing/gloves/combat(H), slot_gloves)
H.equip_or_collect(new /obj/item/clothing/shoes/jackboots(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/health_advanced, slot_glasses)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/health/health_advanced, slot_glasses)
H.equip_or_collect(new /obj/item/clothing/under/rank/blueshield(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/armor/vest/blueshield(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/weapon/gun/energy/advtaser(H), slot_s_store)
@@ -186,6 +188,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
return 1
/datum/job/judge
@@ -219,7 +222,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_or_collect(new /obj/item/clothing/suit/judgerobe(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/centcom(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/head/powdered_wig(H), slot_head)
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
H.equip_or_collect(new /obj/item/device/pda/heads/magistrate(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/melee/classic_baton/telescopic(H.back), slot_in_backpack)
H.equip_or_collect(new /obj/item/device/flash(H), slot_r_store)
@@ -229,6 +232,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
return 1
//var/global/lawyer = 0//Checks for another lawyer //This changed clothes on 2nd lawyer, both IA get the same dreds.
@@ -256,7 +260,7 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
H.equip_or_collect(new /obj/item/clothing/under/rank/internalaffairs(H), slot_w_uniform)
H.equip_or_collect(new /obj/item/clothing/suit/storage/internalaffairs(H), slot_wear_suit)
H.equip_or_collect(new /obj/item/clothing/shoes/brown(H), slot_shoes)
H.equip_or_collect(new /obj/item/clothing/glasses/sunglasses/sechud(H), slot_glasses)
H.equip_or_collect(new /obj/item/clothing/glasses/hud/security/sunglasses(H), slot_glasses)
H.equip_or_collect(new /obj/item/device/pda/lawyer(H), slot_wear_pda)
H.equip_or_collect(new /obj/item/weapon/storage/briefcase(H), slot_l_hand)
H.equip_or_collect(new /obj/item/device/laser_pointer(H), slot_l_store)
@@ -271,4 +275,5 @@ var/datum/announcement/minor/captain_announcement = new(do_newscast = 1)
var/obj/item/organ/external/affected = H.organs_by_name["head"]
affected.implants += L
L.part = affected
H.sec_hud_set_implants()
return 1
+2 -3
View File
@@ -482,9 +482,8 @@ 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()
return H
+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))
+3 -2
View File
@@ -511,8 +511,6 @@ 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
switch(href_list["criminal2"])
if("none")
active2.fields["criminal"] = "None"
@@ -525,6 +523,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()
+26 -17
View File
@@ -10,37 +10,46 @@
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)
return ..()
mmi_moved_inside(var/obj/item/device/mmi/mmi_as_oc as obj,mob/user as mob)
if(..())
if(occupant.client)
var/datum/atom_hud/A = huds[DATA_HUD_MEDICAL_ADVANCED]
A.add_hud_to(occupant)
builtin_hud_user = 1
return 1
else
return 0
go_out()
if(ishuman(occupant))
if(istype(occupant,/mob/living/carbon/human) && 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)
builtin_hud_user = 0
else if ((istype(occupant, /mob/living/carbon/brain) || pilot_is_mmi()) && builtin_hud_user )
var/mob/living/carbon/brain/H = occupant
var/datum/atom_hud/A = huds[DATA_HUD_MEDICAL_ADVANCED]
A.remove_hud_from(H)
builtin_hud_user = 0
..()
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()
@@ -112,7 +112,7 @@
new /obj/item/clothing/suit/armor/hos/alt(src)
new /obj/item/clothing/head/HoS(src)
new /obj/item/clothing/head/HoS/beret(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
new /obj/item/weapon/storage/lockbox/loyalty(src)
new /obj/item/weapon/storage/box/flashbangs(src)
new /obj/item/clothing/mask/gas/sechailer/swat(src)
@@ -151,7 +151,7 @@
new /obj/item/clothing/under/rank/warden(src)
new /obj/item/clothing/under/rank/warden/formal(src)
new /obj/item/clothing/under/rank/warden/corp(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/taperoll/police(src)
new /obj/item/weapon/storage/box/zipties(src)
@@ -190,7 +190,7 @@
new /obj/item/weapon/grenade/flashbang(src)
new /obj/item/weapon/storage/belt/security/sec(src)
new /obj/item/clothing/mask/gas/sechailer(src)
new /obj/item/clothing/glasses/sunglasses/sechud(src)
new /obj/item/clothing/glasses/hud/security/sunglasses(src)
new /obj/item/clothing/head/helmet(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/taperoll/police(src)
@@ -248,7 +248,7 @@
new /obj/item/weapon/restraints/handcuffs(src)
new /obj/item/weapon/melee/baton/loaded(src)
new /obj/item/clothing/glasses/sunglasses(src)
new /obj/item/clothing/glasses/hud/health_advanced
new /obj/item/clothing/glasses/hud/health/health_advanced
new /obj/item/clothing/head/beret/centcom/officer(src)
new /obj/item/clothing/suit/armor/vest/blueshield(src)
new /obj/item/clothing/suit/storage/blueshield(src)
@@ -346,6 +346,8 @@
/obj/structure/closet/wardrobe/robotics_black/New()
..()
sleep(2)
new /obj/item/clothing/glasses/hud/diagnostic(src)
new /obj/item/clothing/glasses/hud/diagnostic(src)
new /obj/item/clothing/under/rank/roboticist(src)
new /obj/item/clothing/under/rank/roboticist(src)
new /obj/item/clothing/suit/storage/labcoat(src)
+4 -4
View File
@@ -381,7 +381,7 @@ var/send_emergency_team
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/armor/vest/ert/security(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/advtaser(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/ert/security(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer(M), slot_in_backpack)
@@ -458,7 +458,7 @@ var/send_emergency_team
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/security(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/advtaser(M), slot_s_store)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/head/helmet/space/rig/ert/security(M), slot_in_backpack)
M.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/sechailer(M), slot_in_backpack)
@@ -475,7 +475,7 @@ var/send_emergency_team
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/white(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/latex/nitrile(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/medical(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health_advanced(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/health/health_advanced(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/defibrillator/compact/loaded(M), slot_belt)
@@ -494,7 +494,7 @@ var/send_emergency_team
M.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(M), slot_shoes)
M.equip_to_slot_or_del(new /obj/item/clothing/gloves/color/black(M), slot_gloves)
M.equip_to_slot_or_del(new /obj/item/clothing/suit/space/rig/ert/commander(M), slot_wear_suit)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses/sechud(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/clothing/glasses/hud/security/sunglasses(M), slot_glasses)
M.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/gun/nuclear(M), slot_belt)
+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
-18
View File
@@ -10,7 +10,6 @@
var/prescription = 0
var/prescription_upgradable = 0
var/see_darkness = 1
var/HUDType = 0
/obj/item/clothing/glasses/New()
. = ..()
@@ -327,23 +326,6 @@
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/sunglasses/sechud
name = "HUDSunglasses"
desc = "Sunglasses with a HUD."
icon_state = "sunhud"
darkness_view = 1
flash_protect = 1
tint = 1
HUDType = SECHUD
prescription_upgradable = 1
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/sunglasses/sechud/prescription
prescription = 1
/obj/item/clothing/glasses/thermal
name = "Optical Thermal Scanner"
desc = "Thermals in the shape of glasses."
+51 -4
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
var/HUDType = null //Hudtype is defined on glasses.dm
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(HUDType && 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(HUDType && istype(user) && 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
/obj/item/clothing/glasses/hud/health/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,20 @@
see_darkness = 0
prescription_upgradable = 0
/obj/item/clothing/glasses/hud/diagnostic
name = "Diagnostic HUD"
desc = "A heads-up display capable of analyzing the integrity and status of robotics and exosuits."
icon_state = "diagnostichud"
HUDType = DATA_HUD_DIAGNOSTIC
/obj/item/clothing/glasses/hud/diagnostic/night
name = "Night Vision Diagnostic HUD"
desc = "A robotics diagnostic HUD fitted with a light amplifier."
icon_state = "diagnostichudnight"
item_state = "glasses"
darkness_view = 8
see_darkness = 0
prescription_upgradable = 0
/obj/item/clothing/glasses/hud/security
name = "\improper Security HUD"
@@ -37,6 +66,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"
@@ -53,3 +83,20 @@
darkness_view = 8
see_darkness = 0
prescription_upgradable = 0
/obj/item/clothing/glasses/hud/security/sunglasses
name = "HUDSunglasses"
desc = "Sunglasses with a HUD."
icon_state = "sunhud"
darkness_view = 1
flash_protect = 1
tint = 1
HUDType = DATA_HUD_SECURITY_ADVANCED
prescription_upgradable = 1
species_fit = list("Vox")
sprite_sheets = list(
"Vox" = 'icons/mob/species/vox/eyes.dmi'
)
/obj/item/clothing/glasses/hud/security/sunglasses/prescription
prescription = 1
+3 -2
View File
@@ -565,8 +565,7 @@ 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
switch(href_list["criminal2"])
if("none")
active2.fields["criminal"] = "None"
@@ -578,6 +577,8 @@ What a mess.*/
active2.fields["criminal"] = "Parolled"
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)
+31 -44
View File
@@ -23,12 +23,12 @@ 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
var/medhud = 0
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
@@ -111,45 +111,28 @@ Works together with spawning an observer, noted above.
if(!loc) return
if(!client) return 0
regular_hud_updates()
if(client.images.len)
for(var/image/hud in client.images)
if(copytext(hud.icon_state,1,4) == "hud")
client.images.Remove(hud)
if(antagHUD)
var/list/target_list = list()
for(var/mob/living/target in oview(src, 14))
if(target.mind && (target.mind.special_role || issilicon(target) || target.mind.nation))
target_list += target
if(target_list.len)
assess_targets(target_list, src)
if(medHUD)
process_medHUD(src)
if(secHUD)
process_secHUD(src)
//regular_hud_updates()
//if(client.images.len)
// for(var/image/hud in client.images)
// if(copytext(hud.icon_state,1,4) == "hud")
// client.images.Remove(hud)
//if(antagHUD)
// var/list/target_list = list()
// for(var/mob/living/target in oview(src, 14))
// if(target.mind && (target.mind.special_role || issilicon(target) || target.mind.nation))
// target_list += target
// if(target_list.len)
// assess_targets(target_list, 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))
C.images += patient.hud_list[HEALTH_HUD]
C.images += patient.hud_list[STATUS_HUD_OOC]
/mob/dead/proc/process_secHUD(var/mob/M)
var/client/C = M.client
for(var/mob/living/carbon/human/target in oview(M, 14))
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
for(var/mob/living/carbon/human/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
C.images += target.hud_list[NATIONS_HUD]
//C.images += target.hud_list[NATIONS_HUD]
for(var/mob/living/silicon/target in target_list)
C.images += target.hud_list[SPECIALROLE_HUD]
C.images += target.hud_list[NATIONS_HUD]
//C.images += target.hud_list[NATIONS_HUD]
return 1
@@ -270,18 +253,21 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return 1
/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>"
var/datum/atom_hud/H = huds[DATA_HUD_MEDICAL_BASIC]
H.remove_hud_from(src)//out with the old..
if(medhud==0)//TOGGLE!
medhud = 1
H.add_hud_to(src)
else
medHUD = 1
src << "\blue <B>Medical HUD Enabled</B>"
medhud = 0
/mob/dead/observer/verb/toggle_antagHUD()
set category = "Ghost"
@@ -304,12 +290,13 @@ 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 <B>AntagHUD Disabled</B>"
else
M.antagHUD = 1
src << "\blue <B>AntagHUD Enabled</B>"
var/datum/atom_hud/A = huds[DATA_HUD_SECURITY_ADVANCED]
var/adding_hud = (usr in A.hudusers) ? 0 : 1
for(var/datum/atom_hud/H in huds)
if(istype(H, /datum/atom_hud/antag) || istype(H, /datum/atom_hud/data/human/security/advanced))
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
/mob/dead/observer/proc/dead_tele(A in ghostteleportlocs)
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)
@@ -93,10 +93,4 @@
sight &= ~SEE_OBJS
see_in_dark = 2
see_invisible = SEE_INVISIBLE_LIVING
if (container && istype(container, /obj/item/device/mmi))
var/obj/item/device/mmi/mmi = container
if (mmi.mecha)
var/obj/mecha/piloted = mmi.mecha
piloted.pilot_mmi_hud(src)
handle_hud_icons_health()
+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)
@@ -1,5 +1,6 @@
/mob/living/carbon/
gender = MALE
hud_possible = list(HEALTH_HUD,STATUS_HUD,SPECIALROLE_HUD)
var/list/stomach_contents = list()
var/brain_op_stage = 0.0
var/list/datum/disease2/disease/virus2 = list()
+5
View File
@@ -0,0 +1,5 @@
/mob/living/carbon/death(gibbed)
losebreath = 0
med_hud_set_health()
med_hud_set_status()
..(gibbed)
@@ -91,11 +91,6 @@
dizziness = 0
jitteriness = 0
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
handle_hud_list()
//Handle species-specific deaths.
if(species) species.handle_death(src)
@@ -135,6 +130,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")
@@ -486,20 +486,17 @@
var/mob/living/carbon/human/H = M
switch(hudtype)
if("security")
return istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/sunglasses/sechud)
return istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.glasses, /obj/item/clothing/glasses/hud/security/sunglasses)
if("medical")
return istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.glasses, /obj/item/clothing/glasses/hud/health_advanced)
return istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.glasses, /obj/item/clothing/glasses/hud/health/health_advanced)
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
+19 -21
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,17 +29,6 @@
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")
..()
prev_gender = gender // Debug for plural genders
@@ -55,6 +44,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 +857,12 @@
modified = 1
spawn()
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 +988,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."
@@ -24,6 +24,8 @@
update_revive()
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 +90,6 @@
take_overall_damage(amount, 0)
else
heal_overall_damage(-amount, 0)
hud_updateflag |= 1 << HEALTH_HUD
/mob/living/carbon/human/adjustFireLoss(var/amount)
if(species && species.burn_mod)
@@ -97,7 +98,6 @@
take_overall_damage(0, amount)
else
heal_overall_damage(0, -amount)
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 +112,6 @@
//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
/mob/living/carbon/human/proc/adjustFireLossByPart(var/amount, var/organ_name, var/obj/damage_source = null)
if(species && species.burn_mod)
@@ -127,7 +126,6 @@
//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
/mob/living/carbon/human/Stun(amount)
..()
@@ -181,7 +179,6 @@
O.unmutate()
src << "<span class='notice'>Your [O.name] is shaped normally again.</span>"
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 +243,6 @@
var/obj/item/organ/external/picked = pick(parts)
if(picked.heal_damage(brute,burn))
UpdateDamageIcon()
hud_updateflag |= 1 << HEALTH_HUD
updatehealth()
//Damages ONE external organ, organ gets randomly selected from damagable ones.
@@ -259,7 +255,6 @@
var/obj/item/organ/external/picked = pick(parts)
if(picked.take_damage(brute,burn,sharp,edge))
UpdateDamageIcon()
hud_updateflag |= 1 << HEALTH_HUD
updatehealth()
speech_problem_flag = 1
@@ -283,7 +278,6 @@
parts -= picked
updatehealth()
hud_updateflag |= 1 << HEALTH_HUD
speech_problem_flag = 1
if(update)
UpdateDamageIcon()
@@ -308,7 +302,6 @@
parts -= picked
updatehealth()
hud_updateflag |= 1 << HEALTH_HUD
if(update)
UpdateDamageIcon()
@@ -335,7 +328,6 @@ This function restores all organs.
if(istype(E, /obj/item/organ/external))
if(E.heal_damage(brute, burn))
UpdateDamageIcon()
hud_updateflag |= 1 << HEALTH_HUD
else
return 0
@@ -409,5 +401,4 @@ This function restores all organs.
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
updatehealth()
hud_updateflag |= 1 << HEALTH_HUD
return 1
@@ -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,NATIONS_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
+3 -188
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,15 +991,6 @@ 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()
if(..())
if(hud_updateflag)
handle_hud_list()
/mob/living/carbon/human/handle_random_events()
// Puke if toxloss is too high
if(!stat)
@@ -1260,183 +1252,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
*/
/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
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 << IMPLOYAL_HUD || hud_updateflag & 1 << IMPCHEM_HUD || hud_updateflag & 1 << IMPTRACK_HUD)
var/image/holder1 = hud_list[IMPTRACK_HUD]
var/image/holder2 = hud_list[IMPLOYAL_HUD]
var/image/holder3 = hud_list[IMPCHEM_HUD]
holder1.icon_state = "hudblank"
holder2.icon_state = "hudblank"
holder3.icon_state = "hudblank"
for(var/obj/item/weapon/implant/I in src)
if(I.implanted)
if(istype(I,/obj/item/weapon/implant/tracking))
holder1.icon_state = "hud_imp_tracking"
if(istype(I,/obj/item/weapon/implant/loyalty))
holder2.icon_state = "hud_imp_loyal"
if(istype(I,/obj/item/weapon/implant/chem))
holder3.icon_state = "hud_imp_chem"
hud_list[IMPTRACK_HUD] = holder1
hud_list[IMPLOYAL_HUD] = holder2
hud_list[IMPCHEM_HUD] = holder3
if(hud_updateflag & 1 << SPECIALROLE_HUD)
var/image/holder = hud_list[SPECIALROLE_HUD]
holder.icon_state = "hudblank"
if(mind)
switch(mind.special_role)
if("traitor","Syndicate")
holder.icon_state = "hudsyndicate"
if("Revolutionary")
holder.icon_state = "hudrevolutionary"
if("Head Revolutionary")
holder.icon_state = "hudheadrevolutionary"
if("Cultist")
holder.icon_state = "hudcultist"
if("Changeling")
holder.icon_state = "hudchangeling"
if("Wizard","Fake Wizard")
holder.icon_state = "hudwizard"
if("Death Commando")
holder.icon_state = "huddeathsquad"
if("Ninja")
holder.icon_state = "hudninja"
if("Vampire") // TODO: Check this
holder.icon_state = "hudvampire"
if("VampThrall")
holder.icon_state = "hudvampthrall"
if("head_loyalist")
holder.icon_state = "loyalist"
if("loyalist")
holder.icon_state = "loyalist"
if("head_mutineer")
holder.icon_state = "mutineer"
if("mutineer")
holder.icon_state = "mutineer"
if("Shadowling")
holder.icon_state = "hudshadowling"
if("shadowling thrall")
holder.icon_state = "hudshadowlingthrall"
hud_list[SPECIALROLE_HUD] = holder
if(hud_updateflag & 1 << NATIONS_HUD)
var/image/holder = hud_list[NATIONS_HUD]
holder.icon_state = "hudblank"
if(mind && mind.nation)
switch(mind.nation.default_name)
if("Atmosia")
holder.icon_state = "hudatmosia"
if("Brigston")
holder.icon_state = "hudbrigston"
if("Cargonia")
holder.icon_state = "hudcargonia"
if("People's Republic of Commandzakstan")
holder.icon_state = "hudcommand"
if("Servicion")
holder.icon_state = "hudservice"
if("Medistan")
holder.icon_state = "hudmedistan"
if("Scientopia")
holder.icon_state = "hudscientopia"
hud_list[NATIONS_HUD] = holder
hud_updateflag = 0
/mob/living/carbon/human/handle_silent()
if(..())
speech_problem_flag = 1
@@ -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
@@ -423,13 +423,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))
@@ -439,13 +439,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
@@ -461,13 +461,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)
@@ -571,9 +571,6 @@ var/global/list/damage_icon_parts = list()
else
overlays_standing[ID_LAYER] = null
hud_updateflag |= 1 << ID_HUD
hud_updateflag |= 1 << WANTED_HUD
if(update_icons) update_icons()
/mob/living/carbon/human/update_inv_gloves(var/update_icons=1)
+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()
-4
View File
@@ -314,8 +314,6 @@
for(var/datum/reagent/R in C.reagents.reagent_list)
C.reagents.clear_reagents()
C.reagents.addiction_list.Cut()
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
/mob/living/proc/update_revive() // handles revival through other means than cloning or adminbus (defib, IPC repair)
stat = CONSCIOUS
@@ -381,8 +379,6 @@
stat = CONSCIOUS
update_fire()
regenerate_icons()
hud_updateflag |= 1 << HEALTH_HUD
hud_updateflag |= 1 << STATUS_HUD
return
/mob/living/proc/UpdateDamageIcon()
@@ -5,7 +5,6 @@
var/maxHealth = 100 //Maximum health that should be possible.
var/health = 100 //A mob's health
var/hud_updateflag = 0
//Damage related vars, NOTE: THESE SHOULD ONLY BE MODIFIED BY PROCS
var/bruteloss = 0.0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage)
+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 .
+4 -12
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,16 +177,6 @@ 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")
ai_list += src
shuttle_caller_list += src
..()
+3 -7
View File
@@ -145,13 +145,6 @@
theAPC = null
process_queued_alarms()
regular_hud_updates()
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 +158,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
*/
@@ -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,NATIONS_HUD)
var/jetpackoverlay = 0
var/magpulse = 0
@@ -141,15 +143,7 @@ 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")
diag_hud_set_borgcell()
scanner.Grant(src)
/mob/living/silicon/robot/proc/init(var/alien=0)
@@ -719,6 +713,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 +954,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,NATIONS_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)
@@ -129,13 +129,14 @@
var/input = stripped_input(src, "Please enter a message to tell your summoner.", "Guardian", "")
if(!input) return
for(var/mob/M in mob_list)
if(M == summoner)
M << "<span class='changeling'><i>[src]:</i> [input]</span>"
log_say("Guardian Communication: [key_name(src)] -> [key_name(M)] : [input]")
else if (M in dead_mob_list)
M << "<span class='changeling'><i>Guardian Communication from <b>[src]</b> ([ghost_follow_link(src, ghost=M)]): [input]</i>"
src << "<span class='changeling'><i>[src]:</i> [input]</span>"
log_say("Guardian Communication: [src.real_name]/[src.key] : [input]")
/mob/living/simple_animal/hostile/guardian/proc/ToggleMode()
src << "<span class='danger'><B>You dont have another mode!</span></B>"
@@ -153,10 +154,11 @@
var/mob/living/simple_animal/hostile/guardian/G = M
if(G.summoner == src)
G << "<span class='changeling'><i>[src]:</i> [input]</span>"
log_say("Guardian Communication: [key_name(src)] -> [key_name(G)] : [input]")
else if (M in dead_mob_list)
M << "<span class='changeling'><i>Guardian Communication from <b>[src]</b> ([ghost_follow_link(src, ghost=M)]): [input]</i>"
src << "<span class='changeling'><i>[src]:</i> [input]</span>"
log_say("Guardian Communication: [src.real_name]/[src.key] : [text]")
/mob/living/proc/guardian_recall()
set name = "Recall Guardian"
@@ -340,8 +342,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
+3 -3
View File
@@ -113,7 +113,7 @@
// let spirits identify cultists
if(ticker.mode)
ticker.mode.reset_cult_icons_for_spirit(new_spirit)
ticker.mode.add_cult_icon_to_spirit(new_spirit)
// highlander test
there_can_be_only_one_mask(new_spirit)
@@ -320,7 +320,7 @@
/mob/proc/safe_respawn(var/MP)
if(!MP)
return 0
return 0
if(ispath(MP, /mob/living/simple_animal/pet/cat))
return 1
@@ -347,7 +347,7 @@
if(ispath(MP, /mob/living/simple_animal/borer) && !jobban_isbanned(src, "alien") && !jobban_isbanned(src, "Syndicate"))
return 1
if(ispath(MP, /mob/living/simple_animal/diona) && !jobban_isbanned(src, "Dionaea"))
return 1
@@ -141,3 +141,23 @@
materials = list(MAT_METAL = 250, MAT_GLASS = 300, MAT_PLASMA = 250, MAT_URANIUM = 1000)
build_path = /obj/item/clothing/glasses/science/night
category = list("Equipment")
/datum/design/diagnostic_hud
name = "Diagnostic HUD"
desc = "A HUD used to analyze and determine faults within robotic machinery."
id = "dianostic_hud"
req_tech = list("magnets" = 3, "engineering" = 3, "materials" = 2)
build_type = PROTOLATHE
materials = list("$metal" = 50, "$glass" = 50)
build_path = /obj/item/clothing/glasses/hud/diagnostic
category = list("Equipment")
/datum/design/diagnostic_hud_night
name = "Night Vision Diagnostic HUD"
desc = "Upgraded version of the diagnostic HUD designed to function during a power failure."
id = "dianostic_hud_night"
req_tech = list("magnets" = 5, "engineering" = 4, "materials" = 4)
build_type = PROTOLATHE
materials = list("$metal" = 200, "$glass" = 200, "$uranium" = 1000, "$plasma" = 300)
build_path = /obj/item/clothing/glasses/hud/diagnostic/night
category = list("Equipment")
+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))
-1
View File
@@ -110,7 +110,6 @@
for(var/datum/disease2/effectholder/e in effects)
e.effect.deactivate(mob)
mob.virus2.Remove("[uniqueID]")
mob.hud_updateflag |= 1 << STATUS_HUD
/datum/disease2/disease/proc/minormutate()
//uniqueID = rand(0,10000)
+3 -6
View File
@@ -3,11 +3,11 @@ proc/get_infection_chance(var/mob/living/carbon/M, var/vector = "Airborne")
var/score = 0
if (!istype(M))
return 0
var/mob/living/carbon/human/H = M
if(istype(H) && H.species.virus_immune)
return 0
return 0
if(istype(M, /mob/living/carbon/human))
if (vector == "Airborne")
if(M.internal) //not breathing infected air helps greatly
@@ -89,7 +89,6 @@ proc/airborne_can_reach(turf/source, turf/target, var/radius=5)
var/datum/disease2/disease/D = disease.getcopy()
D.minormutate()
M.virus2["[D.uniqueID]"] = D
M.hud_updateflag |= 1 << STATUS_HUD
//Infects mob M with random lesser disease, if he doesn't have one
/proc/infect_mob_random_lesser(var/mob/living/carbon/M)
@@ -97,14 +96,12 @@ proc/airborne_can_reach(turf/source, turf/target, var/radius=5)
D.makerandom()
D.infectionchance = 1
M.virus2["[D.uniqueID]"] = D
M.hud_updateflag |= 1 << STATUS_HUD
//Infects mob M with random greated disease, if he doesn't have one
/proc/infect_mob_random_greater(var/mob/living/carbon/M)
var/datum/disease2/disease/D = new /datum/disease2/disease
D.makerandom(1)
M.virus2["[D.uniqueID]"] = D
M.hud_updateflag |= 1 << STATUS_HUD
//Fancy prob() function.
/proc/dprob(var/p)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 10 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

+4 -2
View File
@@ -181,6 +181,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"
@@ -245,13 +246,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"
@@ -273,6 +274,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"
@@ -1310,6 +1312,7 @@
#include "code\modules\mob\living\carbon\carbon.dm"
#include "code\modules\mob\living\carbon\carbon_defenses.dm"
#include "code\modules\mob\living\carbon\carbon_defines.dm"
#include "code\modules\mob\living\carbon\death.dm"
#include "code\modules\mob\living\carbon\give.dm"
#include "code\modules\mob\living\carbon\life.dm"
#include "code\modules\mob\living\carbon\shock.dm"
@@ -1381,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"