This commit is contained in:
unknown
2015-06-10 21:50:48 -05:00
parent 8d799293ba
commit fe2ce02f54

View File

@@ -261,6 +261,8 @@
//Removes fuel from the welding tool. If a mob is passed, it will perform an eyecheck on the mob. This should probably be renamed to use()
/obj/item/weapon/weldingtool/proc/remove_fuel(var/amount = 1, var/mob/M = null)
if(!welding)
return 0
if(get_fuel() >= amount)
reagents.remove_reagent("fuel", amount)
if(M)
@@ -291,7 +293,7 @@
var/turf/T = get_turf(src)
//If we're turning it on
if(set_welding && !welding)
if (remove_fuel(1))
if (get_fuel() > 0)
if(M)
M << "<span class='notice'>You switch the [src] on.</span>"
else if(T)