mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 11:05:16 +01:00
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.
This commit is contained in:
@@ -157,3 +157,15 @@
|
||||
var/obj/machinery/computer/arena/C = A.get_controller()
|
||||
var/time_left = max(0, (C.start_time - world.time) / 10)
|
||||
return round(time_left)
|
||||
|
||||
/obj/effect/countdown/flower_bud
|
||||
name = "flower bud countdown"
|
||||
|
||||
/obj/effect/countdown/flower_bud/get_value()
|
||||
var/obj/structure/alien/resin/flower_bud_enemy/bud = attached_to
|
||||
if(!istype(bud))
|
||||
return
|
||||
if(!bud.finish_time)
|
||||
return -1
|
||||
var/time_left = max(0, (bud.finish_time - world.time) / 10)
|
||||
return time_left
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user