Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Dumbgunner committed Nov 11, 2024
1 parent 23b59e8 commit 040cfbc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate,
overlays_standing[HEAD_LAYER] = I
apply_overlay(HEAD_LAYER)

if(istype(head, /obj/item/clothing/head/helmet/marine) || istype(head, /obj/item/clothing/head/helmet/upp))
if(istype(head, /obj/item/clothing/head/helmet/marine))
var/obj/item/clothing/head/helmet/marine/marine_helmet = head
if(assigned_squad && marine_helmet.flags_marine_helmet & HELMET_SQUAD_OVERLAY)
if(assigned_squad && assigned_squad.equipment_color && assigned_squad.use_stripe_overlay)
Expand Down Expand Up @@ -490,6 +490,23 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate,
for(var/i in HEAD_GARB_LAYER to (HEAD_GARB_LAYER + MAX_HEAD_GARB_ITEMS - 1))
apply_overlay(i)

else if(istype(head, /obj/item/clothing/head/helmet/upp))
var/obj/item/clothing/head/helmet/upp/upp_helmet = head
var/num_helmet_overlays = 0
for(var/i in 1 to length(upp_helmet.helmet_overlays))
// Add small numbers to the head garb layer so we don't have a layer conflict
// the i-1 bit is to make it 0-based, not 1-based like BYOND wants
overlays_standing[HEAD_GARB_LAYER + (i-1)] = image('icons/mob/humans/onmob/helmet_garb.dmi', src, upp_helmet.helmet_overlays[i])
num_helmet_overlays++

// null out the rest of the space allocated for helmet overlays
// God I hate 1-based indexing
for(var/i in num_helmet_overlays+1 to MAX_HEAD_GARB_ITEMS)
overlays_standing[HEAD_GARB_LAYER + (i-1)] = null

for(var/i in HEAD_GARB_LAYER to (HEAD_GARB_LAYER + MAX_HEAD_GARB_ITEMS - 1))
apply_overlay(i)

#undef MAX_HEAD_GARB_ITEMS


Expand Down
Binary file modified icons/mob/humans/onmob/helmet_garb.dmi
Binary file not shown.

0 comments on commit 040cfbc

Please sign in to comment.