mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
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.
This commit is contained in:
@@ -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, "<span class='warning'>Turn on [src] before attempting repairs!</span>")
|
||||
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("<span class='alert'>\The [user] patches some dents on \the [M]'s [S.name] with \the [src].</span>")
|
||||
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("<span class='alert'>\The [user] patches some dents on \the [M]'s [S.name] with \the [src].</span>")
|
||||
else if(S.open != 2)
|
||||
to_chat(user, "<span class='warning'>Need more welding fuel!</span>")
|
||||
return 1
|
||||
|
||||
@@ -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("<span class='alert'>\The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].</span>")
|
||||
else if(S.open != 2)
|
||||
to_chat(user, "<span class='danger'>The damage is far too severe to patch over externally.</span>")
|
||||
|
||||
Reference in New Issue
Block a user