Merge pull request #4207 from Citadel-Station-13/upstream-merge-33225

[MIRROR] Fixes mechs needing no fuel to repair, and tweaks repair messages
This commit is contained in:
deathride58
2017-12-04 21:07:25 +00:00
committed by GitHub
+5 -3
View File
@@ -242,15 +242,17 @@
user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/weldingtool/WT = W
if(obj_integrity<max_integrity)
if (WT.remove_fuel(0,user))
if(WT.remove_fuel(1, user))
if (internal_damage & MECHA_INT_TANK_BREACH)
clearInternalDamage(MECHA_INT_TANK_BREACH)
to_chat(user, "<span class='notice'>You repair the damaged gas tank.</span>")
else
user.visible_message("<span class='notice'>[user] repairs some damage to [name].</span>")
user.visible_message("<span class='notice'>[user] repairs some damage to [name].</span>", "<span class='notice'>You repair some damage to [src].</span>")
obj_integrity += min(10, max_integrity-obj_integrity)
if(obj_integrity == max_integrity)
to_chat(user, "<span class='notice'>It looks to be fully repaired now.</span>")
else
to_chat(user, "<span class='warning'>The welder must be on for this task!</span>")
to_chat(user, "<span class='warning'>[WT] needs to be on for this task!</span>")
return 1
else
to_chat(user, "<span class='warning'>The [name] is at full integrity!</span>")