diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 06ee0308d..f386f2cec 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -68,6 +68,7 @@ var/detail_color var/boobed_detail = TRUE var/sleeved_detail = TRUE + var/list/original_armor //For restoring broken armor /obj/item/clothing/New() ..() @@ -319,6 +320,7 @@ /obj/item/clothing/obj_break(damage_flag) if(!damaged_clothes) update_clothes_damaged_state(TRUE) + original_armor = armor var/brokemessage = FALSE for(var/x in armor) if(armor[x] > 0) @@ -329,6 +331,11 @@ to_chat(M, "ARMOR BROKEN..!") ..() +/obj/item/clothing/proc/obj_fix(damage_flag) + obj_broken = FALSE + if(damaged_clothes) + update_clothes_damaged_state(FALSE) + armor = original_armor /obj/item/clothing/proc/update_clothes_damaged_state(damaging = TRUE) var/index = "[REF(initial(icon))]-[initial(icon_state)]" var/static/list/damaged_clothes_icons = list()