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

upp squad chat color #8099

Merged
merged 2 commits into from
Jan 18, 2025
Merged
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
17 changes: 9 additions & 8 deletions code/datums/factions/upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
name = "Union of Progressive Peoples"
faction_tag = FACTION_UPP

/datum/faction/upp/modify_hud_holder(image/holder, mob/living/carbon/human/H)
/datum/faction/upp/modify_hud_holder(image/holder, mob/living/carbon/human/human)
var/hud_icon_state
var/obj/item/card/id/ID = H.get_idcard()
var/obj/item/card/id/ID = human.get_idcard()
var/default_color = FALSE //so squad units get red icons as survs and ERT
var/datum/squad/squad = H.assigned_squad
var/datum/squad/squad = human.assigned_squad

var/_role
if(H.mind)
_role = H.job
if(human.mind)
_role = human.job
else if(ID)
_role = ID.rank
switch(_role)
Expand Down Expand Up @@ -57,11 +57,12 @@
if(JOB_UPP_COMMISSAR)
hud_icon_state = "commi"
if(hud_icon_state)
holder.overlays += image('icons/mob/hud/marine_hud.dmi', H, "upp_background")
var/image/rank_icon_image = image('icons/mob/hud/marine_hud.dmi', H, "upp_[hud_icon_state]")
holder.overlays += image('icons/mob/hud/marine_hud.dmi', human, "upp_background")
var/image/rank_icon_image = image('icons/mob/hud/marine_hud.dmi', human, "upp_[hud_icon_state]")
if(istype(squad))
human.langchat_color = human.assigned_squad.chat_color
rank_icon_image.color = squad.equipment_color
var/image/squad_circle = image('icons/mob/hud/marine_hud.dmi', H, "upp_squad_circle")
var/image/squad_circle = image('icons/mob/hud/marine_hud.dmi', human, "upp_squad_circle")
squad_circle.color = squad.equipment_color
holder.overlays += squad_circle
else
Expand Down
Loading