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

Move holocards to the squad hud #6029

Merged
merged 1 commit into from
Mar 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions code/__DEFINES/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions code/datums/mob_hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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 //////////////////////////////:

Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/living/carbon/human/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
. = ..()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 0 additions & 16 deletions code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Binary file modified icons/effects/Targeted.dmi
Binary file not shown.
Binary file modified icons/mob/hud/marine_hud.dmi
Binary file not shown.
Loading