diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 5d76d91f57c..bcab6bc3bb5 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -93,21 +93,28 @@ return ..() /obj/item/clothing/attackby(obj/item/W, mob/user, params) - if(damaged_clothes && istype(W, repairable_by)) - var/obj/item/stack/S = W - switch(damaged_clothes) - if(CLOTHING_DAMAGED) - S.use(1) - repair(user, params) - if(CLOTHING_SHREDDED) - if(S.amount < 3) - to_chat(user, "You require 3 [S.name] to repair [src].") - return - to_chat(user, "You begin fixing the damage to [src] with [S]...") - if(do_after(user, 6 SECONDS, TRUE, src)) - if(S.use(3)) - repair(user, params) - return 1 + if(!istype(W, repairable_by)) + return ..() + + switch(damaged_clothes) + if(CLOTHING_PRISTINE) + return..() + if(CLOTHING_DAMAGED) + var/obj/item/stack/cloth_repair = W + cloth_repair.use(1) + repair(user, params) + return TRUE + if(CLOTHING_SHREDDED) + var/obj/item/stack/cloth_repair = W + if(cloth_repair.amount < 3) + to_chat(user, "You require 3 [cloth_repair.name] to repair [src].") + return TRUE + to_chat(user, "You begin fixing the damage to [src] with [cloth_repair]...") + if(!do_after(user, 6 SECONDS, TRUE, src) || !cloth_repair.use(3)) + return TRUE + repair(user, params) + return TRUE + return ..() /// Set the clothing's integrity back to 100%, remove all damage to bodyparts, and generally fix it up