diff --git a/code/game/gamemodes/clock_cult/clock_ratvar.dm b/code/game/gamemodes/clock_cult/clock_ratvar.dm index 2c326ad4d73..52b57e95766 100644 --- a/code/game/gamemodes/clock_cult/clock_ratvar.dm +++ b/code/game/gamemodes/clock_cult/clock_ratvar.dm @@ -29,10 +29,13 @@ var/second_sound_played = FALSE var/third_sound_played = FALSE var/obj/effect/clockwork/gateway_glow/glow + var/obj/effect/countdown/clockworkgate/countdown /obj/structure/clockwork/massive/celestial_gateway/New() ..() glow = new(get_turf(src)) + countdown = new(src) + countdown.start() SSshuttle.emergencyNoEscape = TRUE SSobj.processing += src var/area/gate_area = get_area(src) @@ -56,9 +59,12 @@ world << sound(null, 0, channel = 8) qdel(glow) glow = null + qdel(countdown) + countdown = null return ..() /obj/structure/clockwork/massive/celestial_gateway/destroyed() + countdown.stop() visible_message("The [src] begins to pulse uncontrollably... you might want to run!") world << sound('sound/effects/clockcult_gateway_disrupted.ogg', 0, channel = 8, volume = 50) make_glow() @@ -105,6 +111,7 @@ glow.icon_state = "clockwork_gateway_closing" if(GATEWAY_RATVAR_ARRIVAL to INFINITY) if(!purpose_fulfilled) + countdown.stop() takes_damage = FALSE purpose_fulfilled = TRUE make_glow() diff --git a/code/modules/countdown/countdown.dm b/code/modules/countdown/countdown.dm index 4a78b7e173a..8e669b595d4 100644 --- a/code/modules/countdown/countdown.dm +++ b/code/modules/countdown/countdown.dm @@ -108,3 +108,16 @@ else if(D.gang && D.gang.dom_timer) var/timer = D.gang.dom_timer return timer + +/obj/effect/countdown/clockworkgate + name = "gateway countdown" + text_size = 1 + text_color = "#BE8700" + layer = POINT_LAYER + +/obj/effect/countdown/clockworkgate/get_value() + var/obj/structure/clockwork/massive/celestial_gateway/G = attached_to + if(!istype(G)) + return + else if(G.health && !G.purpose_fulfilled) + return "
[GATEWAY_RATVAR_ARRIVAL - G.progress_in_seconds]
"