Merge pull request #3017 from Leshana/lathe-lid-animations

Finally fixes the autolathe/protolate lid animations.
This commit is contained in:
Anewbe
2017-02-24 21:39:41 -06:00
committed by GitHub
4 changed files with 13 additions and 4 deletions
+11 -4
View File
@@ -261,13 +261,13 @@
if(!isnull(stored_material[material]))
stored_material[material] = max(0, stored_material[material] - round(making.resources[material] * mat_efficiency) * multiplier)
//Fancy autolathe animation.
flick("autolathe_n", src)
update_icon() // So lid closes
sleep(build_time)
busy = 0
update_use_power(1)
update_icon() // So lid opens
//Sanity check.
if(!making || !src) return
@@ -281,7 +281,14 @@
updateUsrDialog()
/obj/machinery/autolathe/update_icon()
icon_state = (panel_open ? "autolathe_t" : "autolathe")
if(panel_open)
icon_state = "autolathe_t"
else if(busy)
icon_state = "autolathe_n"
else
if(icon_state == "autolathe_n")
flick("autolathe_u", src) // If lid WAS closed, show opening animation
icon_state = "autolathe"
//Updates overall lathe storage size.
/obj/machinery/autolathe/RefreshParts()
+2
View File
@@ -85,6 +85,8 @@
else if(busy)
icon_state = "protolathe_n"
else
if(icon_state == "protolathe_n")
flick("protolathe_u", src) // If lid WAS closed, show opening animation
icon_state = "protolathe"
/obj/machinery/r_n_d/protolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

After

Width:  |  Height:  |  Size: 96 KiB