Code cleaning; countdown for transformer

🆑 coiax
rscadd: Observers now have a visible countdown for borg factories,
silicons can examine the factory to determine how long it has remaining
until it is ready.
/🆑

- Removes a bunch of spawns and trailing returns
This commit is contained in:
Jack Edge
2016-06-25 11:40:03 +01:00
parent 0af5b15efc
commit 87016bc6cd
16 changed files with 61 additions and 57 deletions
+11
View File
@@ -121,3 +121,14 @@
return
else if(G.health && !G.purpose_fulfilled)
return "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'>[GATEWAY_RATVAR_ARRIVAL - G.progress_in_seconds]</div>"
/obj/effect/countdown/transformer
name = "transformer countdown"
/obj/effect/countdown/transformer/get_value()
var/obj/machinery/transformer/T = attached_to
if(!istype(T))
return
else if(T.cooldown)
var/seconds_left = (T.cooldown_timer - world.time) / 10
return "[max(seconds_left, 0)]"