From b2a4ea1f287b5c9f0d22dd1eb216fe44927b76cc Mon Sep 17 00:00:00 2001 From: forest2001 Date: Wed, 4 Sep 2024 04:41:29 +0100 Subject: [PATCH 1/2] bonk --- code/datums/factions/clf.dm | 19 +++-- code/datums/factions/faction.dm | 2 + code/datums/factions/pmc.dm | 19 +++-- code/datums/factions/royalmarinescommando.dm | 19 +++-- code/datums/factions/upp.dm | 19 +++-- code/datums/factions/uscm.dm | 82 ++++++++----------- code/game/jobs/job/marine/squad_info.dm | 4 +- code/game/objects/items/pamphlets.dm | 2 +- .../mob/living/carbon/human/human_defines.dm | 8 +- 9 files changed, 101 insertions(+), 73 deletions(-) diff --git a/code/datums/factions/clf.dm b/code/datums/factions/clf.dm index ce53b505b352..44bf1e995b24 100644 --- a/code/datums/factions/clf.dm +++ b/code/datums/factions/clf.dm @@ -1,13 +1,15 @@ /datum/faction/clf name = "Colonial Liberation Front" faction_tag = FACTION_CLF + hud_icon_prefix = "clf_" -/datum/faction/clf/modify_hud_holder(image/holder, mob/living/carbon/human/human) +/datum/faction/clf/modify_hud_holder(image/holder, mob/living/carbon/human/current_human) var/hud_icon_state - var/obj/item/card/id/ID = human.get_idcard() + var/used_icon_file = hud_icon_file + var/obj/item/card/id/ID = current_human.get_idcard() var/_role - if(human.mind) - _role = human.job + if(current_human.mind) + _role = current_human.job else if(ID) _role = ID.rank switch(_role) @@ -23,8 +25,15 @@ hud_icon_state = "synth" if(JOB_CLF_COMMANDER) hud_icon_state = "cellcom" + + if(current_human.rank_icon_file_override) + used_icon_file = current_human.rank_icon_file_override + if(current_human.rank_icon_state_override) + hud_icon_state = current_human.rank_icon_state_override + if(current_human.rank_icon_prefix_override) + hud_icon_prefix = current_human.rank_icon_prefix_override if(hud_icon_state) - holder.overlays += image('icons/mob/hud/marine_hud.dmi', human, "clf_[hud_icon_state]") + holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][hud_icon_state]") /datum/faction/clf/get_antag_guns_snowflake_equipment() return list( diff --git a/code/datums/factions/faction.dm b/code/datums/factions/faction.dm index a6201da70467..34d3495b19c2 100644 --- a/code/datums/factions/faction.dm +++ b/code/datums/factions/faction.dm @@ -2,6 +2,8 @@ var/name = "Neutral Faction" var/faction_tag = FACTION_NEUTRAL var/hud_type = FACTION_HUD + var/hud_icon_prefix + var/hud_icon_file = 'icons/mob/hud/marine_hud.dmi' /datum/faction/proc/modify_hud_holder(image/holder, mob/living/carbon/human/H) return diff --git a/code/datums/factions/pmc.dm b/code/datums/factions/pmc.dm index c5b319a13c7b..0335d0aa4636 100644 --- a/code/datums/factions/pmc.dm +++ b/code/datums/factions/pmc.dm @@ -1,13 +1,15 @@ /datum/faction/pmc name = "Private Military Company" faction_tag = FACTION_PMC + hud_icon_prefix = "pmc_" -/datum/faction/pmc/modify_hud_holder(image/holder, mob/living/carbon/human/H) +/datum/faction/pmc/modify_hud_holder(image/holder, mob/living/carbon/human/current_human) var/hud_icon_state - var/obj/item/card/id/ID = H.get_idcard() + var/used_icon_file = hud_icon_file + var/obj/item/card/id/ID = current_human.get_idcard() var/_role - if(H.mind) - _role = H.job + if(current_human.mind) + _role = current_human.job else if(ID) _role = ID.rank switch(_role) @@ -23,8 +25,15 @@ hud_icon_state = "md" if(JOB_PMC_SYNTH) hud_icon_state = "syn" + + if(current_human.rank_icon_file_override) + used_icon_file = current_human.rank_icon_file_override + if(current_human.rank_icon_state_override) + hud_icon_state = current_human.rank_icon_state_override + if(current_human.rank_icon_prefix_override) + hud_icon_prefix = current_human.rank_icon_prefix_override if(hud_icon_state) - holder.overlays += image('icons/mob/hud/marine_hud.dmi', H, "pmc_[hud_icon_state]") + holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][hud_icon_state]") /datum/faction/pmc/get_antag_guns_snowflake_equipment() return list( diff --git a/code/datums/factions/royalmarinescommando.dm b/code/datums/factions/royalmarinescommando.dm index 2fab0348bcfa..a0af7cb4dee3 100644 --- a/code/datums/factions/royalmarinescommando.dm +++ b/code/datums/factions/royalmarinescommando.dm @@ -1,13 +1,15 @@ /datum/faction/royal_marines_commando name = "Royal Marines Commando" faction_tag = FACTION_TWE + hud_icon_prefix = "rmc_" -/datum/faction/royal_marines_commando/modify_hud_holder(image/holder, mob/living/carbon/human/H) +/datum/faction/royal_marines_commando/modify_hud_holder(image/holder, mob/living/carbon/human/current_human) var/hud_icon_state - var/obj/item/card/id/dogtag/ID = H.get_idcard() + var/used_icon_file = hud_icon_file + var/obj/item/card/id/dogtag/ID = current_human.get_idcard() var/_role - if(H.mind) - _role = H.job + if(current_human.mind) + _role = current_human.job else if(ID) _role = ID.rank switch(_role) @@ -23,8 +25,15 @@ hud_icon_state = "smartgunner" if(JOB_TWE_RMC_BREACHER) hud_icon_state = "breacher" + + if(current_human.rank_icon_file_override) + used_icon_file = current_human.rank_icon_file_override + if(current_human.rank_icon_state_override) + hud_icon_state = current_human.rank_icon_state_override + if(current_human.rank_icon_prefix_override) + hud_icon_prefix = current_human.rank_icon_prefix_override if(hud_icon_state) - holder.overlays += image('icons/mob/hud/marine_hud.dmi', H, "rmc_[hud_icon_state]") + holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][hud_icon_state]") /datum/faction/royal_marines_commando/get_antag_guns_snowflake_equipment() return list( diff --git a/code/datums/factions/upp.dm b/code/datums/factions/upp.dm index 1a1f0e9a2390..ccf79d9cc8ed 100644 --- a/code/datums/factions/upp.dm +++ b/code/datums/factions/upp.dm @@ -1,13 +1,15 @@ /datum/faction/upp name = "Union of Progressive Peoples" faction_tag = FACTION_UPP + hud_icon_prefix = "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/current_human) var/hud_icon_state - var/obj/item/card/id/ID = H.get_idcard() + var/used_icon_file = hud_icon_file + var/obj/item/card/id/ID = current_human.get_idcard() var/_role - if(H.mind) - _role = H.job + if(current_human.mind) + _role = current_human.job else if(ID) _role = ID.rank switch(_role) @@ -57,8 +59,15 @@ hud_icon_state = "log" if(JOB_UPP_COMMISSAR) hud_icon_state = "commi" + + if(current_human.rank_icon_file_override) + used_icon_file = current_human.rank_icon_file_override + if(current_human.rank_icon_state_override) + hud_icon_state = current_human.rank_icon_state_override + if(current_human.rank_icon_prefix_override) + hud_icon_prefix = current_human.rank_icon_prefix_override if(hud_icon_state) - holder.overlays += image('icons/mob/hud/marine_hud.dmi', H, "upp_[hud_icon_state]") + holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][hud_icon_state]") /datum/faction/upp/get_antag_guns_snowflake_equipment() return list( diff --git a/code/datums/factions/uscm.dm b/code/datums/factions/uscm.dm index 6a4b61289ea3..46c3f1cc8b2e 100644 --- a/code/datums/factions/uscm.dm +++ b/code/datums/factions/uscm.dm @@ -1,18 +1,22 @@ /datum/faction/uscm name = "United States Colonial Marines" faction_tag = FACTION_MARINE + hud_icon_prefix = "hudsquad_" /datum/faction/uscm/modify_hud_holder(image/holder, mob/living/carbon/human/current_human) + var/marine_rk + var/used_icon_file = hud_icon_file + + var/obj/item/card/id/id_card = current_human.get_idcard() + var/_role + if(current_human.job) + _role = current_human.job + else if(id_card) + _role = id_card.rank + var/datum/squad/squad = current_human.assigned_squad if(istype(squad)) var/squad_clr = current_human.assigned_squad.equipment_color - var/marine_rk - var/obj/item/card/id/I = current_human.get_idcard() - var/_role - if(current_human.job) - _role = current_human.job - else if(I) - _role = I.rank switch(GET_DEFAULT_ROLE(_role)) if(JOB_SQUAD_ENGI) marine_rk = "engi" if(JOB_SQUAD_SPECIALIST) marine_rk = "spec" @@ -42,52 +46,38 @@ current_human.langchat_color = current_human.assigned_squad.chat_color - if(!marine_rk) marine_rk = current_human.rank_fallback + if(!marine_rk) + marine_rk = current_human.rank_icon_state_override if(marine_rk) - var/image/IMG = image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad") + var/image/IMG = image(used_icon_file, current_human, "hudsquad") if(squad_clr) IMG.color = squad_clr else IMG.color = "#5A934A" holder.overlays += IMG - holder.overlays += image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad_[marine_rk]") + holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][marine_rk]") if(current_human.assigned_squad && current_human.assigned_fireteam) - var/image/IMG2 = image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad_[current_human.assigned_fireteam]") + var/image/IMG2 = image(used_icon_file, current_human, "[hud_icon_prefix][current_human.assigned_fireteam]") IMG2.color = squad_clr holder.overlays += IMG2 if(current_human.assigned_squad.fireteam_leaders[current_human.assigned_fireteam] == current_human) - var/image/IMG3 = image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad_ftl") + var/image/IMG3 = image(used_icon_file, current_human, "[hud_icon_prefix]ftl") IMG3.color = squad_clr holder.overlays += IMG3 else - var/marine_rk - var/border_rk - var/icon_prefix = "hudsquad_" - var/obj/item/card/id/ID = current_human.get_idcard() - var/_role - if(current_human.mind) - _role = current_human.job - else if(ID) - _role = ID.rank switch(_role) if(JOB_XO) marine_rk = "xo" - border_rk = "command" if(JOB_CO) marine_rk = "co" - border_rk = "command" if(JOB_USCM_OBSV) marine_rk = "vo" - border_rk = "command" if(JOB_SO) marine_rk = "so" - border_rk = "command" if(JOB_AUXILIARY_OFFICER) marine_rk = "aso" - border_rk = "command" if(JOB_GENERAL, JOB_COLONEL, JOB_ACMC, JOB_CMC) marine_rk = "general" - border_rk = "command" if(JOB_PLT_MED) marine_rk = "med" if(JOB_PLT_SL) @@ -104,39 +94,32 @@ marine_rk = "dcc" if(JOB_CHIEF_POLICE) marine_rk = "cmp" - border_rk = "command" if(JOB_POLICE) marine_rk = "mp" if(JOB_TANK_CREW) marine_rk = "tc" if(JOB_WARDEN) marine_rk = "warden" - border_rk = "command" if(JOB_CHIEF_REQUISITION) marine_rk = "ro" if(JOB_CARGO_TECH) marine_rk = "ct" if(JOB_CHIEF_ENGINEER) marine_rk = "ce" - border_rk = "command" if(JOB_MAINT_TECH) marine_rk = "mt" if(JOB_ORDNANCE_TECH) marine_rk = "ot" if(JOB_CMO) marine_rk = "cmo" - border_rk = "command" if(JOB_DOCTOR) marine_rk = "doctor" - border_rk = "command" if(JOB_RESEARCHER) marine_rk = "researcher" - border_rk = "command" if(JOB_NURSE) marine_rk = "nurse" if(JOB_SEA) marine_rk = "sea" - border_rk = "command" if(JOB_SYNTH) marine_rk = "syn" if(JOB_MESS_SERGEANT) @@ -148,22 +131,16 @@ marine_rk = "pvtml" if(JOB_PROVOST_INSPECTOR) marine_rk = "pvi" - border_rk = "command" if(JOB_PROVOST_UNDERCOVER) marine_rk = "pvuc" - border_rk = "command" if(JOB_PROVOST_CINSPECTOR) marine_rk = "pvci" - border_rk = "command" if(JOB_PROVOST_ADVISOR) marine_rk = "pva" - border_rk = "command" if(JOB_PROVOST_DMARSHAL) marine_rk = "pvdm" - border_rk = "command" if(JOB_PROVOST_MARSHAL, JOB_PROVOST_CMARSHAL, JOB_PROVOST_SMARSHAL) marine_rk = "pvm" - border_rk = "command" // TIS if(JOB_TIS_IO) marine_rk = "tisio" @@ -200,19 +177,19 @@ // Colonial Marshals if(JOB_CMB_TL) marine_rk = "mar" - icon_prefix = "cmb_" + hud_icon_prefix = "cmb_" if(JOB_CMB) marine_rk = "dep" - icon_prefix = "cmb_" + hud_icon_prefix = "cmb_" if(JOB_CMB_SYN) marine_rk = "syn" - icon_prefix = "cmb_" + hud_icon_prefix = "cmb_" if(JOB_CMB_ICC) marine_rk = "icc" - icon_prefix = "cmb_" + hud_icon_prefix = "cmb_" if(JOB_CMB_OBS) marine_rk = "obs" - icon_prefix = "cmb_" + hud_icon_prefix = "cmb_" // Check squad marines here too, for the unique ones if(JOB_SQUAD_ENGI) marine_rk = "engi" @@ -227,10 +204,17 @@ if(JOB_SQUAD_LEADER) marine_rk = "leader" + if(current_human.rank_icon_file_override) + used_icon_file = current_human.rank_icon_file_override + if(current_human.rank_icon_state_override) + marine_rk = current_human.rank_icon_state_override + if(current_human.rank_icon_prefix_override) + hud_icon_prefix = current_human.rank_icon_prefix_override + + + if(marine_rk) - var/image/I = image('icons/mob/hud/marine_hud.dmi', current_human, "hudsquad") + var/image/I = image(used_icon_file, current_human, "hudsquad") I.color = "#5A934A" holder.overlays += I - holder.overlays += image('icons/mob/hud/marine_hud.dmi', current_human, "[icon_prefix][marine_rk]") - if(border_rk) - holder.overlays += image('icons/mob/hud/marine_hud.dmi', current_human, "hudmarineborder[border_rk]") + holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][marine_rk]") diff --git a/code/game/jobs/job/marine/squad_info.dm b/code/game/jobs/job/marine/squad_info.dm index 406263115196..7b5c512fd22f 100644 --- a/code/game/jobs/job/marine/squad_info.dm +++ b/code/game/jobs/job/marine/squad_info.dm @@ -252,8 +252,8 @@ rank = "SL" else rank = "" - if(H.rank_fallback) - rank = H.rank_fallback + if(H.rank_icon_state_override) + rank = H.rank_icon_state_override mar[H.real_name] += list("rank" = rank) else mar[H.real_name] += list("paygrade" = "N/A") diff --git a/code/game/objects/items/pamphlets.dm b/code/game/objects/items/pamphlets.dm index d8bbb2a01432..a053f7a4858a 100644 --- a/code/game/objects/items/pamphlets.dm +++ b/code/game/objects/items/pamphlets.dm @@ -92,7 +92,7 @@ /obj/item/pamphlet/skill/spotter/on_use(mob/living/carbon/human/user) . = ..() - user.rank_fallback = "ass" + user.rank_icon_state_override = "ass" user.hud_set_squad() var/obj/item/card/id/ID = user.get_idcard() diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 0bb446bf5f02..7ab1c132257e 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -114,7 +114,13 @@ var/shield_slowdown = 0 // Slowdown from readying shields var/datum/equipment_preset/assigned_equipment_preset - var/rank_fallback + + /// Variable used to override the icon file the job HUD is drawn from. + var/rank_icon_file_override + /// Variable used to override the first part of the icon state for job HUD. + var/rank_icon_prefix_override + /// Variable used to override the second part of the icon state for job HUD. + var/rank_icon_state_override var/datum/squad/assigned_squad //the squad this human is assigned to var/assigned_fireteam = 0 //the fireteam this human is assigned to From 6a6e552c001766dd1c3b3bc08a87d867f688ecf1 Mon Sep 17 00:00:00 2001 From: forest2001 Date: Wed, 4 Sep 2024 05:01:10 +0100 Subject: [PATCH 2/2] bunk --- code/datums/factions/clf.dm | 5 +- code/datums/factions/pmc.dm | 5 +- code/datums/factions/royalmarinescommando.dm | 5 +- code/datums/factions/upp.dm | 5 +- code/datums/factions/uscm.dm | 53 +++++++++----------- 5 files changed, 37 insertions(+), 36 deletions(-) diff --git a/code/datums/factions/clf.dm b/code/datums/factions/clf.dm index 44bf1e995b24..483938229c57 100644 --- a/code/datums/factions/clf.dm +++ b/code/datums/factions/clf.dm @@ -6,6 +6,7 @@ /datum/faction/clf/modify_hud_holder(image/holder, mob/living/carbon/human/current_human) var/hud_icon_state var/used_icon_file = hud_icon_file + var/used_icon_prefix = hud_icon_prefix var/obj/item/card/id/ID = current_human.get_idcard() var/_role if(current_human.mind) @@ -31,9 +32,9 @@ if(current_human.rank_icon_state_override) hud_icon_state = current_human.rank_icon_state_override if(current_human.rank_icon_prefix_override) - hud_icon_prefix = current_human.rank_icon_prefix_override + used_icon_prefix = current_human.rank_icon_prefix_override if(hud_icon_state) - holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][hud_icon_state]") + holder.overlays += image(used_icon_file, current_human, "[used_icon_prefix][hud_icon_state]") /datum/faction/clf/get_antag_guns_snowflake_equipment() return list( diff --git a/code/datums/factions/pmc.dm b/code/datums/factions/pmc.dm index 0335d0aa4636..7971a20a4ba7 100644 --- a/code/datums/factions/pmc.dm +++ b/code/datums/factions/pmc.dm @@ -6,6 +6,7 @@ /datum/faction/pmc/modify_hud_holder(image/holder, mob/living/carbon/human/current_human) var/hud_icon_state var/used_icon_file = hud_icon_file + var/used_icon_prefix = hud_icon_prefix var/obj/item/card/id/ID = current_human.get_idcard() var/_role if(current_human.mind) @@ -31,9 +32,9 @@ if(current_human.rank_icon_state_override) hud_icon_state = current_human.rank_icon_state_override if(current_human.rank_icon_prefix_override) - hud_icon_prefix = current_human.rank_icon_prefix_override + used_icon_prefix = current_human.rank_icon_prefix_override if(hud_icon_state) - holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][hud_icon_state]") + holder.overlays += image(used_icon_file, current_human, "[used_icon_prefix][hud_icon_state]") /datum/faction/pmc/get_antag_guns_snowflake_equipment() return list( diff --git a/code/datums/factions/royalmarinescommando.dm b/code/datums/factions/royalmarinescommando.dm index a0af7cb4dee3..618f3b8e7675 100644 --- a/code/datums/factions/royalmarinescommando.dm +++ b/code/datums/factions/royalmarinescommando.dm @@ -6,6 +6,7 @@ /datum/faction/royal_marines_commando/modify_hud_holder(image/holder, mob/living/carbon/human/current_human) var/hud_icon_state var/used_icon_file = hud_icon_file + var/used_icon_prefix = hud_icon_prefix var/obj/item/card/id/dogtag/ID = current_human.get_idcard() var/_role if(current_human.mind) @@ -31,9 +32,9 @@ if(current_human.rank_icon_state_override) hud_icon_state = current_human.rank_icon_state_override if(current_human.rank_icon_prefix_override) - hud_icon_prefix = current_human.rank_icon_prefix_override + used_icon_prefix = current_human.rank_icon_prefix_override if(hud_icon_state) - holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][hud_icon_state]") + holder.overlays += image(used_icon_file, current_human, "[used_icon_prefix][hud_icon_state]") /datum/faction/royal_marines_commando/get_antag_guns_snowflake_equipment() return list( diff --git a/code/datums/factions/upp.dm b/code/datums/factions/upp.dm index ccf79d9cc8ed..a72d09b6a2ce 100644 --- a/code/datums/factions/upp.dm +++ b/code/datums/factions/upp.dm @@ -6,6 +6,7 @@ /datum/faction/upp/modify_hud_holder(image/holder, mob/living/carbon/human/current_human) var/hud_icon_state var/used_icon_file = hud_icon_file + var/used_icon_prefix = hud_icon_prefix var/obj/item/card/id/ID = current_human.get_idcard() var/_role if(current_human.mind) @@ -65,9 +66,9 @@ if(current_human.rank_icon_state_override) hud_icon_state = current_human.rank_icon_state_override if(current_human.rank_icon_prefix_override) - hud_icon_prefix = current_human.rank_icon_prefix_override + used_icon_prefix = current_human.rank_icon_prefix_override if(hud_icon_state) - holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][hud_icon_state]") + holder.overlays += image(used_icon_file, current_human, "[used_icon_prefix][hud_icon_state]") /datum/faction/upp/get_antag_guns_snowflake_equipment() return list( diff --git a/code/datums/factions/uscm.dm b/code/datums/factions/uscm.dm index 46c3f1cc8b2e..3ce0932b5914 100644 --- a/code/datums/factions/uscm.dm +++ b/code/datums/factions/uscm.dm @@ -6,6 +6,11 @@ /datum/faction/uscm/modify_hud_holder(image/holder, mob/living/carbon/human/current_human) var/marine_rk var/used_icon_file = hud_icon_file + var/used_icon_prefix = hud_icon_prefix + var/squad_clr + + if(current_human.rank_icon_file_override) + used_icon_file = current_human.rank_icon_file_override var/obj/item/card/id/id_card = current_human.get_idcard() var/_role @@ -16,7 +21,7 @@ var/datum/squad/squad = current_human.assigned_squad if(istype(squad)) - var/squad_clr = current_human.assigned_squad.equipment_color + squad_clr = current_human.assigned_squad.equipment_color switch(GET_DEFAULT_ROLE(_role)) if(JOB_SQUAD_ENGI) marine_rk = "engi" if(JOB_SQUAD_SPECIALIST) marine_rk = "spec" @@ -48,20 +53,12 @@ if(!marine_rk) marine_rk = current_human.rank_icon_state_override - if(marine_rk) - var/image/IMG = image(used_icon_file, current_human, "hudsquad") - if(squad_clr) - IMG.color = squad_clr - else - IMG.color = "#5A934A" - holder.overlays += IMG - holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][marine_rk]") if(current_human.assigned_squad && current_human.assigned_fireteam) - var/image/IMG2 = image(used_icon_file, current_human, "[hud_icon_prefix][current_human.assigned_fireteam]") + var/image/IMG2 = image(used_icon_file, current_human, "[used_icon_prefix][current_human.assigned_fireteam]") IMG2.color = squad_clr holder.overlays += IMG2 if(current_human.assigned_squad.fireteam_leaders[current_human.assigned_fireteam] == current_human) - var/image/IMG3 = image(used_icon_file, current_human, "[hud_icon_prefix]ftl") + var/image/IMG3 = image(used_icon_file, current_human, "[used_icon_prefix]ftl") IMG3.color = squad_clr holder.overlays += IMG3 else @@ -177,19 +174,19 @@ // Colonial Marshals if(JOB_CMB_TL) marine_rk = "mar" - hud_icon_prefix = "cmb_" + used_icon_prefix = "cmb_" if(JOB_CMB) marine_rk = "dep" - hud_icon_prefix = "cmb_" + used_icon_prefix = "cmb_" if(JOB_CMB_SYN) marine_rk = "syn" - hud_icon_prefix = "cmb_" + used_icon_prefix = "cmb_" if(JOB_CMB_ICC) marine_rk = "icc" - hud_icon_prefix = "cmb_" + used_icon_prefix = "cmb_" if(JOB_CMB_OBS) marine_rk = "obs" - hud_icon_prefix = "cmb_" + used_icon_prefix = "cmb_" // Check squad marines here too, for the unique ones if(JOB_SQUAD_ENGI) marine_rk = "engi" @@ -204,17 +201,17 @@ if(JOB_SQUAD_LEADER) marine_rk = "leader" - if(current_human.rank_icon_file_override) - used_icon_file = current_human.rank_icon_file_override - if(current_human.rank_icon_state_override) - marine_rk = current_human.rank_icon_state_override - if(current_human.rank_icon_prefix_override) - hud_icon_prefix = current_human.rank_icon_prefix_override - + if(current_human.rank_icon_state_override) + marine_rk = current_human.rank_icon_state_override + if(current_human.rank_icon_prefix_override) + used_icon_prefix = current_human.rank_icon_prefix_override - if(marine_rk) - var/image/I = image(used_icon_file, current_human, "hudsquad") - I.color = "#5A934A" - holder.overlays += I - holder.overlays += image(used_icon_file, current_human, "[hud_icon_prefix][marine_rk]") + if(marine_rk) + var/image/underlay = image(used_icon_file, current_human, "hudsquad") + if(squad_clr) + underlay.color = squad_clr + else + underlay.color = "#5A934A" + holder.overlays += underlay + holder.overlays += image(used_icon_file, current_human, "[used_icon_prefix][marine_rk]")