diff --git a/code/__DEFINES/mob_hud.dm b/code/__DEFINES/mob_hud.dm index c451d01d3c90..97fbc64a9da4 100644 --- a/code/__DEFINES/mob_hud.dm +++ b/code/__DEFINES/mob_hud.dm @@ -25,6 +25,7 @@ #define STATUS_HUD_XENO_CULTIST "24" // Whether they are a xeno cultist or not #define HUNTER_CLAN "25" //Displays a colored icon to represent ingame Hunter Clans #define HUNTER_HUD "26" //Displays various statuses on mobs for Hunters to identify targets +#define HOLOCARD_HUD "27" //Displays the holocards set by medical personnel //data HUD (medhud, sechud) defines #define MOB_HUD_SECURITY_BASIC 1 diff --git a/code/datums/mob_hud.dm b/code/datums/mob_hud.dm index b7b5544777b3..5e57b8f5616c 100644 --- a/code/datums/mob_hud.dm +++ b/code/datums/mob_hud.dm @@ -185,7 +185,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( //Factions /datum/mob_hud/faction - hud_icons = list(FACTION_HUD, ORDER_HUD) + hud_icons = list(FACTION_HUD, ORDER_HUD, HOLOCARD_HUD) var/faction_to_check = FACTION_MARINE /datum/mob_hud/faction/add_to_single_hud(mob/user, mob/target) @@ -209,7 +209,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( faction_to_check = FACTION_PMC /datum/mob_hud/faction/observer - hud_icons = list(FACTION_HUD, ORDER_HUD, HUNTER_CLAN) + hud_icons = list(FACTION_HUD, ORDER_HUD, HUNTER_CLAN, HOLOCARD_HUD) ///////// MOB PROCS //////////////////////////////: @@ -753,7 +753,13 @@ GLOBAL_DATUM(hud_icon_hudfocus, /image) holder.overlays += GLOB.hud_icon_hudfocus hud_list[ORDER_HUD] = holder +/mob/proc/hud_set_holocard() + return +// HOLOCARD HUD +/mob/living/carbon/human/hud_set_holocard() + var/image/holder = hud_list[HOLOCARD_HUD] + holder.icon_state = holo_card_color ? "holo_card_[holo_card_color]" : "hudblank" // Xeno "hostile" HUD /mob/living/carbon/human/proc/update_xeno_hostile_hud() diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5929648d06d4..0f52b75106a5 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -896,7 +896,7 @@ return holo_card_color = null to_chat(user, SPAN_NOTICE("You reset your holocard.")) - update_targeted() + hud_set_holocard() return to_chat(user, SPAN_WARNING("You're not trained to use this.")) return @@ -917,7 +917,7 @@ else if(newcolor != holo_card_color) holo_card_color = newcolor to_chat(user, SPAN_NOTICE("You add a [newcolor] holo card on [src].")) - update_targeted() + hud_set_holocard() /mob/living/carbon/human/tgui_interact(mob/user, datum/tgui/ui) // I'M SORRY, SO FUCKING SORRY . = ..() diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 9ec9d0b05ec5..29a9789b5699 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -136,7 +136,7 @@ var/last_chew = 0 //taken from human.dm - hud_possible = list(HEALTH_HUD,STATUS_HUD, STATUS_HUD_OOC, STATUS_HUD_XENO_INFECTION, STATUS_HUD_XENO_CULTIST, ID_HUD, WANTED_HUD, ORDER_HUD, XENO_HOSTILE_ACID, XENO_HOSTILE_SLOW, XENO_HOSTILE_TAG, XENO_HOSTILE_FREEZE, HUNTER_CLAN, HUNTER_HUD, FACTION_HUD) + hud_possible = list(HEALTH_HUD, STATUS_HUD, STATUS_HUD_OOC, STATUS_HUD_XENO_INFECTION, STATUS_HUD_XENO_CULTIST, ID_HUD, WANTED_HUD, ORDER_HUD, XENO_HOSTILE_ACID, XENO_HOSTILE_SLOW, XENO_HOSTILE_TAG, XENO_HOSTILE_FREEZE, HUNTER_CLAN, HUNTER_HUD, FACTION_HUD, HOLOCARD_HUD) var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us. var/allow_gun_usage = TRUE var/melee_allowed = TRUE diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 167876cdca96..9a0cd177e885 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -225,22 +225,6 @@ There are several things that need to be remembered: overlays_standing[HAIR_LAYER] = hair_s apply_overlay(HAIR_LAYER) -//Call when target overlay should be added/removed -/mob/living/carbon/human/update_targeted() - remove_overlay(TARGETED_LAYER) - - var/image/holo_card_image - - if(holo_card_color) - holo_card_image = image("icon" = 'icons/effects/Targeted.dmi', "icon_state" = "holo_card_[holo_card_color]") - - if(!holo_card_image) - return - - holo_card_image.layer = -TARGETED_LAYER - overlays_standing[TARGETED_LAYER] = holo_card_image - apply_overlay(TARGETED_LAYER) - //Call when someone is gauzed or splinted, or when one of those items are removed /mob/living/carbon/human/update_med_icon() remove_overlay(MEDICAL_LAYER) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c11b8acd7f9a..ec8aee36859f 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -102,6 +102,8 @@ I = image('icons/mob/hud/sec_hud.dmi', src, "") if(HUNTER_CLAN,HUNTER_HUD) I = image('icons/mob/hud/hud_yautja.dmi', src, "") + if(HOLOCARD_HUD) + I = image('icons/mob/hud/marine_hud.dmi', src, "") I.appearance_flags |= NO_CLIENT_COLOR|KEEP_APART|RESET_COLOR hud_list[hud] = I diff --git a/icons/effects/Targeted.dmi b/icons/effects/Targeted.dmi index a2c31b169693..24b82a90fe6c 100644 Binary files a/icons/effects/Targeted.dmi and b/icons/effects/Targeted.dmi differ diff --git a/icons/mob/hud/marine_hud.dmi b/icons/mob/hud/marine_hud.dmi index c5372245bdc7..8eefce871099 100644 Binary files a/icons/mob/hud/marine_hud.dmi and b/icons/mob/hud/marine_hud.dmi differ