From aae2e667553aa8c0ba91e4f0cba615c81a04bcd5 Mon Sep 17 00:00:00 2001 From: Cameron Lennox Date: Sat, 31 Aug 2019 14:30:58 -0400 Subject: [PATCH 1/2] Fixed an issue where boot/shoe overlays would magically be cleaned by putting in a knife and stepping on blood. --- code/game/objects/effects/decals/Cleanable/humans.dm | 3 +-- code/modules/clothing/clothing.dm | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/code/game/objects/effects/decals/Cleanable/humans.dm b/code/game/objects/effects/decals/Cleanable/humans.dm index 3b1584ca19..8b8bba5a9d 100644 --- a/code/game/objects/effects/decals/Cleanable/humans.dm +++ b/code/game/objects/effects/decals/Cleanable/humans.dm @@ -53,7 +53,7 @@ var/global/list/image/splatter_cache=list() blood_DNA |= B.blood_DNA.Copy() qdel(B) drytime = world.time + DRYING_TIME * (amount+1) - START_PROCESSING(SSobj, src) + START_PROCESSING(SSobj, src) /obj/effect/decal/cleanable/blood/process() if(world.time > drytime) @@ -93,7 +93,6 @@ var/global/list/image/splatter_cache=list() S.overlays += S.blood_overlay if(S.blood_overlay && S.blood_overlay.color != basecolor) S.blood_overlay.color = basecolor - S.overlays.Cut() S.overlays += S.blood_overlay S.blood_DNA |= blood_DNA.Copy() perp.update_inv_shoes() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 1428fd3804..687f1fc7cf 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -502,6 +502,7 @@ if(usr.put_in_hands(holding)) usr.visible_message("\The [usr] pulls a knife out of their boot!") holding = null + overlays -= image(icon, "[icon_state]_knife") else usr << "Your need an empty, unbroken hand to do that." holding.forceMove(src) @@ -546,7 +547,6 @@ update_icon() /obj/item/clothing/shoes/update_icon() - overlays.Cut() if(holding) overlays += image(icon, "[icon_state]_knife") if(ismob(usr)) From 960afd41218acd4d58ebaa1db021055018bc9d66 Mon Sep 17 00:00:00 2001 From: Cameron Lennox Date: Tue, 3 Sep 2019 01:34:43 -0400 Subject: [PATCH 2/2] Fixes the washing bug with boots. --- code/game/atoms.dm | 3 ++- code/game/objects/items.dm | 8 ++++---- code/modules/clothing/clothing.dm | 5 +++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 674b1c9b5e..1765d05e9f 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -388,7 +388,8 @@ blood_DNA = list() was_bloodied = 1 - blood_color = "#A10808" + if(!blood_color) + blood_color = "#A10808" if(istype(M)) if (!istype(M.dna, /datum/dna)) M.dna = new /datum/dna(null) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 591da02757..24ba0b9f42 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -581,10 +581,9 @@ var/list/global/slot_flags_enumeration = list( if( !blood_overlay ) generate_blood_overlay() - //apply the blood-splatter overlay if it isn't already in there - if(!blood_DNA.len) - blood_overlay.color = blood_color - overlays += blood_overlay + //Make the blood_overlay have the proper color then apply it. + blood_overlay.color = blood_color + overlays += blood_overlay //if this blood isn't already in the list, add it if(istype(M)) @@ -593,6 +592,7 @@ var/list/global/slot_flags_enumeration = list( blood_DNA[M.dna.unique_enzymes] = M.dna.b_type return 1 //we applied blood to the item + /obj/item/proc/generate_blood_overlay() if(blood_overlay) return diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 687f1fc7cf..09289c4b6f 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -547,8 +547,13 @@ update_icon() /obj/item/clothing/shoes/update_icon() + overlays.Cut() //This removes all the overlays on the sprite and then goes down a checklist adding them as required. + if(blood_DNA) + add_blood() if(holding) overlays += image(icon, "[icon_state]_knife") + if(contaminated) + overlays += contamination_overlay if(ismob(usr)) var/mob/M = usr M.update_inv_shoes()