Skip to content
Open
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
15 changes: 8 additions & 7 deletions code/modules/clothing/_clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,19 @@

// Clothing does not generally align with each other's world icons, so we just use the mob overlay in this case.
if(should_use_combined_accessory_appearance())
var/image/I = get_mob_overlay(ismob(loc) ? loc : null, get_fallback_slot())
if(I?.icon) // Null or invisible overlay, we don't want to make our clothing invisible just because it has an accessory.
icon = I.icon
icon_state = I.icon_state
underlays = I.underlays.Copy()
var/image/overlay_image = get_mob_overlay(ismob(loc) ? loc : null, get_fallback_slot())
if(overlay_image?.icon) // Null or invisible overlay, we don't want to make our clothing invisible just because it has an accessory.
icon = overlay_image.icon
icon_state = overlay_image.icon_state
underlays = overlay_image.underlays.Copy()
// we need to use the managed overlays system or else they will end up overwritten
set_overlays(I.overlays.Copy())
set_overlays(overlay_image.overlays.Copy())
set_dir(SOUTH)
update_clothing_icon()
return

icon_state = JOINTEXT(list(get_world_inventory_state(), get_clothing_state_modifier()))
set_icon(initial(icon)) // this is not going to work correctly for custom icons
set_icon_state(JOINTEXT(list(get_world_inventory_state(), get_clothing_state_modifier())))
if(markings_state_modifier && markings_color)
add_overlay(mutable_appearance(icon, "[icon_state][markings_state_modifier]", markings_color))
update_clothing_icon()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/clothing/suits/_suit_hood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// but that may change in the future
/obj/item/clothing/suit/get_contained_external_atoms()
. = ..()
if(istype(hood)) // this is considered a component rather than a contained item
if(islist(.) && istype(hood)) // this is considered a component rather than a contained item
. -= hood

/obj/item/clothing/suit/Initialize()
Expand Down
Loading