From 0a7a8fcf90746ceba3ba3ec61533e84ee03a3c6b Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Tue, 8 Aug 2017 15:04:21 -0500 Subject: [PATCH] Fixes repairing jumpsuits. --- code/modules/clothing/clothing.dm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 013fbd8bc4..bd6ffe5f67 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -538,13 +538,15 @@ BLIND // can't see anything if(accessory_overlay) . += accessory_overlay -/obj/item/clothing/under/attackby(obj/item/W, mob/user, params) - if((has_sensor == BROKEN_SENSORS) && istype(W, /obj/item/stack/cable_coil)) - var/obj/item/stack/cable_coil/C = W +/obj/item/clothing/under/attackby(obj/item/I, mob/user, params) + if((has_sensor == BROKEN_SENSORS) && istype(I, /obj/item/stack/cable_coil)) + var/obj/item/stack/cable_coil/C = I C.use(1) has_sensor = HAS_SENSORS to_chat(user,"You repair the suit sensors on [src] with [C].") return 1 + if(!attach_accessory(I, user)) + return ..() /obj/item/clothing/under/update_clothes_damaged_state(damaging = TRUE) ..() @@ -591,10 +593,6 @@ BLIND // can't see anything ..() -/obj/item/clothing/under/attackby(obj/item/I, mob/user, params) - if(!attach_accessory(I, user)) - ..() - /obj/item/clothing/under/proc/attach_accessory(obj/item/I, mob/user, notifyAttach = 1) . = FALSE if(istype(I, /obj/item/clothing/accessory))