Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alsoandanswer committed Jan 9, 2025
1 parent 3e7f06a commit 630c900
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 13 deletions.
6 changes: 3 additions & 3 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@
A.accessory_mob_overlay.ClearOverlays()
else
for(var/obj/item/clothing/accessory/A in accessories)
var/image/accessory_image = A.get_accessory_mob_overlay(H)
var/image/accessory_image = A.get_accessory_mob_overlay(H, FALSE, src)
I.AddOverlays(accessory_image)

if(blood_DNA && slot != slot_l_hand_str && slot != slot_r_hand_str)
Expand Down Expand Up @@ -1079,7 +1079,7 @@
A.accessory_mob_overlay.ClearOverlays()
else
for(var/obj/item/clothing/accessory/A in accessories)
var/image/accessory_image = A.get_accessory_mob_overlay(H)
var/image/accessory_image = A.get_accessory_mob_overlay(H, FALSE, src)
I.AddOverlays(accessory_image)

if(blood_DNA && slot != slot_l_hand_str && slot != slot_r_hand_str)
Expand Down Expand Up @@ -1183,7 +1183,7 @@
A.accessory_mob_overlay.ClearOverlays()
else
for(var/obj/item/clothing/accessory/A in accessories)
var/image/accessory_image = A.get_accessory_mob_overlay(H)
var/image/accessory_image = A.get_accessory_mob_overlay(H, FALSE, src)
I.AddOverlays(accessory_image)

if(blood_DNA && slot != slot_l_hand_str && slot != slot_r_hand_str)
Expand Down
7 changes: 4 additions & 3 deletions code/modules/clothing/pants/pants.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ABSTRACT_TYPE(/obj/item/clothing/pants)
name = "pants parent item"
desc = DESC_PARENT
icon = 'icons/obj/item/clothing/pants/pants.dmi'
species_sprite_adaption_type = WORN_PANTS
slot_flags = SLOT_PANTS
contained_sprite = TRUE
body_parts_covered = LOWER_TORSO | LEGS
Expand All @@ -25,7 +26,7 @@ ABSTRACT_TYPE(/obj/item/clothing/pants)
A.accessory_mob_overlay.ClearOverlays()
else
for(var/obj/item/clothing/accessory/A in accessories)
var/image/accessory_image = A.get_accessory_mob_overlay(H)
var/image/accessory_image = A.get_accessory_mob_overlay(H, FALSE, src)
I.AddOverlays(accessory_image)

if(blood_DNA && slot != slot_l_hand_str && slot != slot_r_hand_str)
Expand Down Expand Up @@ -93,7 +94,7 @@ ABSTRACT_TYPE(/obj/item/clothing/pants)
/obj/item/clothing/pants/highvis/get_mob_overlay(mob/living/carbon/human/H, mob_icon, mob_state, slot)
var/image/I = ..()
if(slot == slot_w_uniform_str)
var/image/emissive_overlay = emissive_appearance(mob_icon, "pants_highvis_un-emis", alpha = src.alpha)
var/image/emissive_overlay = emissive_appearance(mob_icon, "[icon_state][species_sprite_adaption_type]-emis", alpha = src.alpha)
I.AddOverlays(emissive_overlay)
return I

Expand All @@ -107,7 +108,7 @@ ABSTRACT_TYPE(/obj/item/clothing/pants)
/obj/item/clothing/pants/highvis_alt/get_mob_overlay(mob/living/carbon/human/H, mob_icon, mob_state, slot)
var/image/I = ..()
if(slot == slot_w_uniform_str)
var/image/emissive_overlay = emissive_appearance(mob_icon, "pants_highvis_alt_un-emis", alpha = src.alpha)
var/image/emissive_overlay = emissive_appearance(mob_icon, "[icon_state][species_sprite_adaption_type]-emis", alpha = src.alpha)
I.AddOverlays(emissive_overlay)
return I

Expand Down
14 changes: 7 additions & 7 deletions code/modules/clothing/under/accessories/accessory.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
. = ..()
update_icon()

/obj/item/clothing/accessory/proc/get_inv_overlay(var/mob/M, var/force = FALSE)
/obj/item/clothing/accessory/proc/get_inv_overlay(var/mob/M, var/force = FALSE, var/obj/item/clothing/attached_to)
if(!accessory_mob_overlay)
get_accessory_mob_overlay(M, force)
var/I = accessory_mob_overlay.icon
var/tmp_icon_state = "[overlay_state? "[overlay_state]" : "[icon_state]"]"
if(!inv_overlay || force)
if(icon_override)
if(contained_sprite)
tmp_icon_state = "[tmp_icon_state]_w"
tmp_icon_state = "[tmp_icon_state][attached_to? "[attached_to.species_sprite_adaption_type]" : "[WORN_UNDER]"]"
else if("[tmp_icon_state]_tie" in icon_states(icon_override))
tmp_icon_state = "[tmp_icon_state]_tie"
else if(contained_sprite)
tmp_icon_state = "[tmp_icon_state]_w"
tmp_icon_state = "[tmp_icon_state][attached_to? "[attached_to.species_sprite_adaption_type]" : "[WORN_UNDER]"]"
inv_overlay = image(icon = I, icon_state = tmp_icon_state, dir = SOUTH)
if(color)
inv_overlay.color = color
Expand All @@ -54,7 +54,7 @@
inv_overlay.AddOverlays(overlay_image(I, "[tmp_icon_state]_[worn_overlay]", flags=RESET_COLOR)) //add the overlay w/o coloration of the original sprite
return inv_overlay

/obj/item/clothing/accessory/proc/get_accessory_mob_overlay(var/mob/living/carbon/human/H, var/force = FALSE)
/obj/item/clothing/accessory/proc/get_accessory_mob_overlay(var/mob/living/carbon/human/H, var/force = FALSE, var/obj/item/clothing/attached_to)
var/I
if(icon_override)
I = icon_override
Expand All @@ -70,12 +70,12 @@
if(icon_override)
if(contained_sprite)
auto_adapt_species(H)
tmp_icon_state = "[UNDERSCORE_OR_NULL(src.icon_species_tag)][src.item_state][WORN_UNDER]"
tmp_icon_state = "[UNDERSCORE_OR_NULL(src.icon_species_tag)][src.item_state][attached_to? "[attached_to.species_sprite_adaption_type]" : "[WORN_UNDER]"]"
else if("[tmp_icon_state]_mob" in icon_states(I))
tmp_icon_state = "[tmp_icon_state]_mob"
else if(contained_sprite)
auto_adapt_species(H)
tmp_icon_state = "[UNDERSCORE_OR_NULL(src.icon_species_tag)][src.item_state][WORN_UNDER]"
tmp_icon_state = "[UNDERSCORE_OR_NULL(src.icon_species_tag)][src.item_state][attached_to? "[attached_to.species_sprite_adaption_type]" : "[WORN_UNDER]"]"
accessory_mob_overlay = image("icon" = I, "icon_state" = "[tmp_icon_state]")
if(build_from_parts || has_accents)
accessory_mob_overlay.ClearOverlays()
Expand All @@ -98,7 +98,7 @@
return
has_suit = S
loc = has_suit
has_suit.AddOverlays(get_inv_overlay())
has_suit.AddOverlays(get_inv_overlay(user, FALSE, has_suit))
if(user)
to_chat(user, SPAN_NOTICE("You attach \the [src] to \the [has_suit]."))
src.add_fingerprint(user)
Expand Down
Binary file modified icons/clothing/accessories/kneepads.dmi
Binary file not shown.

0 comments on commit 630c900

Please sign in to comment.