Mechs now require fuel to repair (#33225)

This commit is contained in:
Ashe Higgs
2017-12-04 05:54:32 -05:00
committed by CitadelStationBot
parent 985c8ea86b
commit 3689b3d5fd
+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>")