Welding tools now use overlays for fuel gauges, rather than icons (#1994)

This commit is contained in:
CitadelStationBot
2017-07-14 05:13:55 -05:00
committed by kevinz000
parent 798050317f
commit 5e079fa54f
2 changed files with 4 additions and 8 deletions

View File

@@ -344,16 +344,14 @@
heat = 3800
toolspeed = 1
/obj/item/weapon/weldingtool/New()
..()
/obj/item/weapon/weldingtool/Initialize()
. = ..()
create_reagents(max_fuel)
reagents.add_reagent("welding_fuel", max_fuel)
update_icon()
return
/obj/item/weapon/weldingtool/proc/update_torch()
cut_overlays()
if(welding)
add_overlay("[initial(icon_state)]-on")
item_state = "[initial(item_state)]1"
@@ -362,13 +360,11 @@
/obj/item/weapon/weldingtool/update_icon()
cut_overlays()
if(change_icons)
var/ratio = get_fuel() / max_fuel
ratio = Ceiling(ratio*4) * 25
if(ratio == 100)
icon_state = initial(icon_state)
else
icon_state = "[initial(icon_state)][ratio]"
add_overlay("[initial(icon_state)][ratio]")
update_torch()
return