mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-05 23:11:52 +00:00
Adds click cooldowns to common healing and repair actions
This commit is contained in:
@@ -115,6 +115,7 @@
|
||||
else if (istype(I, /obj/item/weapon/wrench))
|
||||
if (src.health < maxhealth)
|
||||
src.health = min(maxhealth, src.health+25)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message(
|
||||
"<span class='notice'>\The [user] repairs \the [src]!</span>",
|
||||
"<span class='notice'>You repair \the [src]!</span>"
|
||||
@@ -127,6 +128,7 @@
|
||||
user.visible_message("<span class='warning'>[user] knocks [load] off [src] with \the [I]!</span>", "<span class='warning'>You knock [load] off [src] with \the [I]!</span>")
|
||||
else
|
||||
user << "You hit [src] with \the [I] but to no effect."
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -803,10 +803,12 @@
|
||||
if (hasInternalDamage(MECHA_INT_TANK_BREACH))
|
||||
clearInternalDamage(MECHA_INT_TANK_BREACH)
|
||||
user << "<span class='notice'>You repair the damaged gas tank.</span>"
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
else
|
||||
return
|
||||
if(src.health<initial(src.health))
|
||||
user << "<span class='notice'>You repair some damage to [src.name].</span>"
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
src.health += min(10, initial(src.health)-src.health)
|
||||
else
|
||||
user << "The [src.name] is at full integrity"
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
if (istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if (R.getBruteLoss() || R.getFireLoss() )
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
R.adjustBruteLoss(-15)
|
||||
R.adjustFireLoss(-15)
|
||||
R.updatehealth()
|
||||
@@ -30,6 +31,7 @@
|
||||
if(S.open == 1)
|
||||
if (S && (S.status & ORGAN_ROBOT))
|
||||
if(S.get_damage())
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
S.heal_damage(15, 15, robo_repair = 1)
|
||||
H.updatehealth()
|
||||
use(1)
|
||||
|
||||
@@ -435,6 +435,7 @@
|
||||
if(S.brute_dam)
|
||||
if(S.brute_dam < ROBOLIMB_SELF_REPAIR_CAP)
|
||||
S.heal_damage(15,0,0,1)
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message("<span class='notice'>\The [user] patches some dents on \the [M]'s [S.name] with \the [src].</span>")
|
||||
else if(S.open != 2)
|
||||
user << "<span class='danger'>The damage is far too severe to patch over externally.</span>"
|
||||
|
||||
@@ -452,6 +452,7 @@
|
||||
return
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if (WT.remove_fuel(0))
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
adjustBruteLoss(-30)
|
||||
updatehealth()
|
||||
add_fingerprint(user)
|
||||
@@ -467,6 +468,7 @@
|
||||
return
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if (coil.use(1))
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
adjustFireLoss(-30)
|
||||
updatehealth()
|
||||
for(var/mob/O in viewers(user, null))
|
||||
|
||||
@@ -525,7 +525,8 @@ obj/structure/cable/proc/cableColor(var/colorC)
|
||||
if(S.burn_dam)
|
||||
if(S.burn_dam < ROBOLIMB_SELF_REPAIR_CAP)
|
||||
S.heal_damage(0,15,0,1)
|
||||
user.visible_message("<span class='danger'>\The [user] repairs some burn damage on \the [M]'s [S.name] with \the [src].</span>")
|
||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||
user.visible_message("<span class='danger'>\The [user] patches some damaged wiring on \the [M]'s [S.name] with \the [src].</span>")
|
||||
else if(S.open != 2)
|
||||
user << "<span class='danger'>The damage is far too severe to patch over externally.</span>"
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user