Skip to content

Commit

Permalink
Update clothing.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
Lhars committed Sep 26, 2024
1 parent 64555d2 commit 162effe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions code/modules/clothing/clothing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
..()
Expand Down Expand Up @@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit 162effe

Please sign in to comment.