From beca82e3c2d029a4d73993d031643f79f0f74caa Mon Sep 17 00:00:00 2001 From: Wolfie13 Date: Thu, 30 Apr 2015 12:22:12 +0100 Subject: [PATCH] Fixes #9097 https://github.com/tgstation/-tg-station/issues/9097 --- .../modules/mob/living/silicon/robot/robot.dm | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index df8ebcfd28d..d43f4ce0dd0 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -401,28 +401,31 @@ var/obj/item/weapon/weldingtool/WT = W if (src == user) user << "You lack the reach to be able to repair yourself!" - return 1 + return if (src.health >= src.maxHealth) user << "[src] is already in good condition!" - return 1 - if (WT.remove_fuel(0, user)) + return + if (WT.remove_fuel(0, user)) //The welder has 1u of fuel consumed by it's afterattack, so we don't need to worry about taking any away. adjustBruteLoss(-30) updatehealth() add_fingerprint(user) visible_message("[user] has fixed some of the dents on [src].") - return 0 + return else user << "The welder must be on for this task!" - return 1 + return else if(istype(W, /obj/item/stack/cable_coil) && wiresexposed) var/obj/item/stack/cable_coil/coil = W - if (coil.use(1)) - adjustFireLoss(-30) - updatehealth() - user.visible_message("[user] has fixed some of the burnt wires on [src].", "You fix some of the burnt wires on [src].") + if (fireloss > 0) + if (coil.use(1)) + adjustFireLoss(-30) + updatehealth() + user.visible_message("[user] has fixed some of the burnt wires on [src].", "You fix some of the burnt wires on [src].") + else + user << "You need more cable to repair [src]!" else - user << "You need one length of cable to repair [src]!" + user << "The wires seem fine, there's no need to fix them." else if (istype(W, /obj/item/weapon/crowbar)) // crowbar means open or close the cover if(opened) @@ -447,7 +450,6 @@ W.loc = src cell = W user << "You insert the power cell." -// chargecount = 0 update_icons() else if (istype(W, /obj/item/weapon/wirecutters) || istype(W, /obj/item/device/multitool) || istype(W, /obj/item/device/assembly/signaler)) @@ -1039,4 +1041,4 @@ if(2) //New Module connected_ai << "

NOTICE - Cyborg module change detected: [name] has loaded the [designation] module.
" if(3) //New Name - connected_ai << "

NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].
" \ No newline at end of file + connected_ai << "

NOTICE - Cyborg reclassification detected: [oldname] is now designated as [newname].
"