From 80ad643ddc5bfccdb84ecdd23df4b8010ed663c4 Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Thu, 18 Aug 2016 17:08:36 -0400 Subject: [PATCH 1/2] Robotic Limb Repair now consumes cables Repairing burn damage on a robotic limb / IPC now consumes cables in the process. The heal ratio is 3 burn damage per length of cable. Repairing will cap at 15 damage (5 cables) per use, which is the amount that was previously healed with every use. If you have less than 15 damage, it will use the number of cables necessary to fully repair the damage. If you have fewer than 5 cables, it will attempt to repair as much damage as possible with the amount provided. A full cable coil (30 lengths) will now heal a total of 90 burn damage, instead of being an infinite healing source as long as you have at least one piece. This makes cable coils more comparable to the advanced burn kits in medical for organic patients, which have only 6 uses that always heal 25 damage. Technically a balance PR, but also can be considered an exploit fix since robotic limbs literally had pocket-sized infinite healing sources readily available across maint while organic limbs didn't have that luxury. --- code/modules/power/cable.dm | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index d2d2c619882..5dbc7ee74ce 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -517,7 +517,19 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( if(S.burn_dam) if(S.burn_dam < ROBOLIMB_SELF_REPAIR_CAP) - S.heal_damage(0,15,0,1) + if(S.burn_dam >= 15 && amount >= 5) + S.heal_damage(0, 15, 0, 1) + use(5) + else + var/cable_to_use = 0 + var/dam_left = S.burn_dam + while(dam_left > 0) + cable_to_use += 1 + dam_left -= 3 + if(cable_to_use >= amount) //make sure we don't use more cable than we have + cable_to_use = amount //in case we have a lot of damage but not a lot of cable + use(cable_to_use) + S.heal_damage(0, (cable_to_use * 3), 0, 1) user.visible_message("\The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].") else if(S.open != 2) to_chat(user, "The damage is far too severe to patch over externally.") From e939f6b5911b5a990110359b2676e1e7ad5f0a4e Mon Sep 17 00:00:00 2001 From: FalseIncarnate Date: Fri, 19 Aug 2016 21:34:39 -0400 Subject: [PATCH 2/2] Delays and Welder Repair Tweaks Welders now consume 1 fuel to heal 15 points of brute damage when repairing robotic limbs / IPCs Welders must now be ON to repair robotic limbs / IPCs (seriously, who dropped the ball on this one?) Welders and Cable Coils now incur a 1 second delay when being used to self-repair robotic limbs / IPCs - This is HALF the delay organics have to suffer when using trauma kits, and rather easy to not even notice. --- code/game/objects/items/weapons/tools.dm | 16 ++++++++++++---- code/modules/power/cable.dm | 22 +++++++++------------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 1452273573a..176108b8f08 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -241,12 +241,20 @@ if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP || S.open == 2) return ..() + if(!isOn()) //why wasn't this being checked already? + to_chat(user, "Turn on [src] before attempting repairs!") + return 1 + if(S.brute_dam) if(S.brute_dam < ROBOLIMB_SELF_REPAIR_CAP) - if(remove_fuel(0,null)) - playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) - S.heal_damage(15,0,0,1) - user.visible_message("\The [user] patches some dents on \the [M]'s [S.name] with \the [src].") + if(get_fuel() >= 1) + if(H == user) + if(!do_mob(user, H, 10)) + return 1 + if(remove_fuel(1,null)) + playsound(src.loc, 'sound/items/Welder2.ogg', 50, 1) + S.heal_damage(15,0,0,1) + user.visible_message("\The [user] patches some dents on \the [M]'s [S.name] with \the [src].") else if(S.open != 2) to_chat(user, "Need more welding fuel!") return 1 diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 5dbc7ee74ce..0bbc04c08d8 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -517,19 +517,15 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( if(S.burn_dam) if(S.burn_dam < ROBOLIMB_SELF_REPAIR_CAP) - if(S.burn_dam >= 15 && amount >= 5) - S.heal_damage(0, 15, 0, 1) - use(5) - else - var/cable_to_use = 0 - var/dam_left = S.burn_dam - while(dam_left > 0) - cable_to_use += 1 - dam_left -= 3 - if(cable_to_use >= amount) //make sure we don't use more cable than we have - cable_to_use = amount //in case we have a lot of damage but not a lot of cable - use(cable_to_use) - S.heal_damage(0, (cable_to_use * 3), 0, 1) + if(H == user) + if(!do_mob(user, H, 10)) + return 1 + var/cable_to_use = 0 + for(cable_to_use in 1 to 5) + if(cable_to_use == amount || (cable_to_use * 3) >= S.burn_dam) + break + use(cable_to_use) + S.heal_damage(0, (cable_to_use * 3), 0, 1) user.visible_message("\The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].") else if(S.open != 2) to_chat(user, "The damage is far too severe to patch over externally.")