From d597551def552a08f0c5a598f91f9c1908134a15 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 10 Aug 2020 18:32:30 +0200 Subject: [PATCH] [MIRROR] Fixes clothing fixing one more time (#255) * Fixes clothing fixing one more time (#52789) * this better be the last time i s2g * sensor * remove return * cap it * Fixes clothing fixing one more time Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com> --- code/modules/clothing/clothing.dm | 4 ++-- code/modules/clothing/under/_under.dm | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 373841da20c..1fbd1e329f6 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -358,8 +358,8 @@ to_chat(M, "[src] start[p_s()] to fall apart!") //This mostly exists so subtypes can call appriopriate update icon calls on the wearer. -/obj/item/clothing/proc/update_clothes_damaged_state() - return +/obj/item/clothing/proc/update_clothes_damaged_state(damaged_state = CLOTHING_DAMAGED) + damaged_clothes = damaged_state /obj/item/clothing/update_overlays() . = ..() diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index 974183b9d28..783f8beadb3 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -47,8 +47,10 @@ if(ismob(loc)) var/mob/M = loc M.update_inv_w_uniform() - if(has_sensor > NO_SENSORS) + if(damaged_state == CLOTHING_SHREDDED && has_sensor > NO_SENSORS) has_sensor = BROKEN_SENSORS + else if(damaged_state == CLOTHING_PRISTINE && has_sensor == BROKEN_SENSORS) + has_sensor = HAS_SENSORS /obj/item/clothing/under/Initialize() . = ..()