Skip to content

Commit

Permalink
UPP squad colors (#7544)
Browse files Browse the repository at this point in the history
# About the pull request
squad color gets chnaged depending on squad, waiting for sprites

# Explain why it's good for the game

more RP for HvH and squad coheasion and identity good


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
add: UPP HUD icons get their squad color
/:cl:

---------

Co-authored-by: vincibrv <[email protected]>
  • Loading branch information
cuberound and uuuuhuuuu authored Nov 19, 2024
1 parent 43b0270 commit f8558ea
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion code/datums/factions/upp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
/datum/faction/upp/modify_hud_holder(image/holder, mob/living/carbon/human/H)
var/hud_icon_state
var/obj/item/card/id/ID = H.get_idcard()
var/default_color = FALSE //so squad units get red icons as survs and ERT
var/datum/squad/squad = H.assigned_squad

var/_role
if(H.mind)
_role = H.job
Expand All @@ -13,12 +16,16 @@
switch(_role)
if(JOB_UPP_MEDIC)
hud_icon_state = "med"
default_color = TRUE
if(JOB_UPP_ENGI)
hud_icon_state = "sapper"
default_color = TRUE
if(JOB_UPP_SPECIALIST)
hud_icon_state = "spec"
default_color = TRUE
if(JOB_UPP_LEADER)
hud_icon_state = "sl"
default_color = TRUE
if(JOB_UPP_POLICE)
hud_icon_state = "mp"
if(JOB_UPP_LT_OFFICER)
Expand Down Expand Up @@ -58,7 +65,17 @@
if(JOB_UPP_COMMISSAR)
hud_icon_state = "commi"
if(hud_icon_state)
holder.overlays += image('icons/mob/hud/marine_hud.dmi', H, "upp_[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]")
if(istype(squad))
rank_icon_image.color = squad.equipment_color
var/image/squad_circle = image('icons/mob/hud/marine_hud.dmi', H, "upp_squad_circle")
squad_circle.color = squad.equipment_color
holder.overlays += squad_circle
else
if(default_color)
rank_icon_image.color = "#e61919"
holder.overlays += rank_icon_image

/datum/faction/upp/get_antag_guns_snowflake_equipment()
return list(
Expand Down
Binary file modified icons/mob/hud/marine_hud.dmi
Binary file not shown.

0 comments on commit f8558ea

Please sign in to comment.