Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poncho fix - hides belts beneath poncho #223

Closed
wants to merge 8 commits into from
Closed
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
10 changes: 5 additions & 5 deletions code/__DEFINES/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@
#define MEDICAL_LAYER 31

#define SUIT_LAYER 30
#define SUIT_GARB_LAYER 29
#define SUIT_SQUAD_LAYER 28
#define GLASSES_LAYER 27
#define BELT_LAYER 26
#define SUIT_STORE_LAYER 25
#define SUIT_SQUAD_LAYER 29
#define BELT_LAYER 28
#define SUIT_GARB_LAYER 27
#define SUIT_STORE_LAYER 26
#define GLASSES_LAYER 25
#define BACK_LAYER 24
#define HAIR_LAYER 23
#define HAIR_GRADIENT_LAYER 22
Expand Down
12 changes: 12 additions & 0 deletions code/modules/clothing/under/ties.dm
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,18 @@
inv_overlay = image("icon" = 'icons/obj/items/clothing/ties_overlay.dmi', "icon_state" = "[icon_state]")
update_icon()

/obj/item/clothing/accessory/poncho/on_attached(obj/item/clothing/suit/storage/marine/S, mob/living/user, silent)
. =..()
if(.)
S.armor_overlays["poncho"] = src

/obj/item/clothing/accessory/poncho/on_removed(mob/living/user, obj/item/clothing/C)
if(!has_suit)
return
var/obj/item/clothing/suit/storage/marine/suit = has_suit
S.armor_overlays -= "poncho"

Check failure on line 431 in code/modules/clothing/under/ties.dm

View workflow job for this annotation

GitHub Actions / Run Linters

undefined var: "S"

Check warning on line 431 in code/modules/clothing/under/ties.dm

View workflow job for this annotation

GitHub Actions / Run Linters

field access requires static type: "armor_overlays"
. = ..()

/obj/item/clothing/accessory/poncho/green
icon_state = "poncho"
has_variation = FALSE
Expand Down
15 changes: 13 additions & 2 deletions code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,20 @@ Applied by gun suicide and high impact bullet executions, removed by rejuvenate,
K = marine_armor.armor_overlays[i]
if(K)
if(!IMG)
IMG = image(K.icon,src,K.icon_state, "layer"= -SUIT_GARB_LAYER)
if(istype(K, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/A = K
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

IMG = A.get_mob_overlay(src, WEAR_JACKET)
IMG.layer = -SUIT_GARB_LAYER
else
IMG = image(K.icon,src,K.icon_state, -SUIT_GARB_LAYER)
else
IMG.overlays += image(K.icon,src,K.icon_state, "layer"= -SUIT_GARB_LAYER)
if(istype(K, /obj/item/clothing/accessory))
var/obj/item/clothing/accessory/A = K
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

var/image/I2 = A.get_mob_overlay(src, WEAR_JACKET)
I2.layer = -SUIT_GARB_LAYER
IMG.overlays += I2
else
IMG.overlays += image(K.icon,src,K.icon_state, -SUIT_GARB_LAYER)
if(IMG)
overlays_standing[SUIT_GARB_LAYER] = IMG
apply_overlay(SUIT_GARB_LAYER)
Expand Down
Loading