Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Импланты больше не отображаются на HUD'е #11497

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/atom_hud.dm
Expand Up @@ -53,6 +53,7 @@

//data HUD (medhud, sechud) defines
#define DATA_HUD_SECURITY "data_hud_sec"
#define DATA_HUD_IMPLANTS "data_hud_imp"
#define DATA_HUD_MEDICAL "data_hud_med"
#define DATA_HUD_MEDICAL_ADV "data_hud_med_adv"
#define DATA_HUD_DIAGNOSTIC "data_hud_diag"
Expand Down
1 change: 1 addition & 0 deletions code/datums/atom_huds/atom_hud.dm
Expand Up @@ -5,6 +5,7 @@ var/global/list/all_huds = list()
//global HUD LIST
var/global/list/huds = list(
DATA_HUD_SECURITY = new/datum/atom_hud/data/security,
DATA_HUD_IMPLANTS = new/datum/atom_hud/data/implants,
DATA_HUD_MEDICAL = new/datum/atom_hud/data/medical,
DATA_HUD_MEDICAL_ADV = new/datum/atom_hud/data/medical/adv,
DATA_HUD_DIAGNOSTIC = new/datum/atom_hud/data/diagnostic,
Expand Down
5 changes: 4 additions & 1 deletion code/datums/atom_huds/atom_hud_data.dm
Expand Up @@ -61,7 +61,10 @@
return TRUE

/datum/atom_hud/data/security
hud_icons = list(ID_HUD, IMPTRACK_HUD, IMPLOYAL_HUD, IMPCHEM_HUD, IMPMINDS_HUD, IMPOBED_HUD, WANTED_HUD)
hud_icons = list(ID_HUD, WANTED_HUD)
Deahaka marked this conversation as resolved.
Show resolved Hide resolved

/datum/atom_hud/data/implants
hud_icons = list(IMPTRACK_HUD, IMPLOYAL_HUD, IMPCHEM_HUD, IMPMINDS_HUD, IMPOBED_HUD)

/datum/atom_hud/data/diagnostic
hud_icons = list(DIAG_HUD, DIAG_STAT_HUD, DIAG_BATT_HUD, DIAG_MECH_HUD, DIAG_AIRLOCK_HUD)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/dead/observer/observer.dm
Expand Up @@ -22,7 +22,7 @@ var/global/list/image/ghost_sightless_images = list() //this is a list of images
//If you died in the game and are a ghsot - this will remain as null.
//Note that this is not a reliable way to determine if admins started as observers, since they change mobs a lot.
var/has_enabled_antagHUD = 0
var/list/datahuds = list(DATA_HUD_SECURITY, DATA_HUD_MEDICAL_ADV, DATA_HUD_DIAGNOSTIC, DATA_HUD_HOLY) // Data huds allowed all ghost
var/list/datahuds = list(DATA_HUD_SECURITY, DATA_HUD_MEDICAL_ADV, DATA_HUD_DIAGNOSTIC, DATA_HUD_HOLY, DATA_HUD_IMPLANTS) // Data huds allowed all ghost
var/data_hud = FALSE
var/antagHUD = FALSE
universal_speak = 1
Expand Down
23 changes: 23 additions & 0 deletions code/modules/mob/living/carbon/human/examine.dm
Expand Up @@ -485,6 +485,29 @@
msg += "Отображает на экране: \"<span class=\"emojify\">[BP.display_text]</span>\"\n"

if(hasHUD(user,"security"))
var/has_implants = FALSE
var/list/showing_implants_strings = list()
for(var/obj/item/weapon/implant/I in src)
has_implants = TRUE
if(istype(I, /obj/item/weapon/implant/chem))
if(I.implanted)
showing_implants_strings += "Chemical"
if(istype(I, /obj/item/weapon/implant/tracking))
showing_implants_strings += "Tracking"
if(isloyal())
has_implants = TRUE
showing_implants_strings += "Loyality"
if(ismindshielded())
has_implants = TRUE
showing_implants_strings += "MindShield"
if(has_implants)
msg += "<span class='info'>[t_He] has implants:"
var/num = 1
for(var/implant in showing_implants_strings)
msg += " [implant][showing_implants_strings.len > num ? "," : "."]"
num++
msg += "</span><br>"

var/perpname = "wot"
var/criminal = "None"

Expand Down