Finish porting bay's timer SS (#12978)

This commit is contained in:
Matt Atlas
2022-01-29 13:07:51 -03:00
committed by GitHub
parent edb1c08178
commit 2842f4e39f
18 changed files with 381 additions and 303 deletions
-4
View File
@@ -13,11 +13,9 @@
var/open = FALSE
var/power_output = 1
has_special_power_checks = TRUE
var/datum/looping_sound/generator/soundloop
/obj/machinery/power/port_gen/Initialize()
. = ..()
soundloop = new(list(src), active)
/obj/machinery/power/port_gen/proc/IsBroken()
return (stat & (BROKEN|EMPED))
@@ -51,11 +49,9 @@
/obj/machinery/power/port_gen/attack_hand(mob/user)
if(..())
update_icon()
soundloop.stop()
return
if(!anchored)
update_icon()
soundloop.start()
return
/obj/machinery/power/port_gen/update_icon()