[MIRROR] Flower Buds now have a countdown for ghosts for when they're going to hatch (#923)

* Flower Buds now have a countdown for ghosts for when they're going to hatch (#53648)

They're two minute timers with no indication, which makes kudzu kinda annoying to spectate.

* Flower Buds now have a countdown for ghosts for when they're going to hatch

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-09-23 02:14:52 +01:00
committed by GitHub
co-authored by tralezab
parent 76e19dd9dd
commit 453c775b48
2 changed files with 19 additions and 0 deletions
@@ -19,9 +19,14 @@
smoothing_flags = NONE
/// The amount of time it takes to create a venus human trap.
var/growth_time = 120 SECONDS
/// Used by countdown to check time, this is when the timer will complete and the venus trap will spawn.
var/finish_time
/// The countdown ghosts see to when the plant will hatch
var/obj/effect/countdown/flower_bud/countdown
/obj/structure/alien/resin/flower_bud_enemy/Initialize()
. = ..()
countdown = new(src)
var/list/anchors = list()
anchors += locate(x-2,y+2,z)
anchors += locate(x+2,y+2,z)
@@ -31,7 +36,9 @@
for(var/turf/T in anchors)
var/datum/beam/B = Beam(T, "vine", time=INFINITY, maxdistance=5, beam_type=/obj/effect/ebeam/vine)
B.sleep_time = 10 //these shouldn't move, so let's slow down updates to 1 second (any slower and the deletion of the vines would be too slow)
finish_time = world.time + growth_time
addtimer(CALLBACK(src, .proc/bear_fruit), growth_time)
countdown.start()
/**
* Spawns a venus human trap, then qdels itself.