mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Fixes #9744.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user