[MIRROR] Vines get destroyed on bud's Destroy() (#3388)

* Vines get destroyed on bud's Destroy() (#56902)

Simple fix for #56879 caused by qdelling the bud without clearing up the vines.

* Vines get destroyed on bud's Destroy()

Co-authored-by: Hadzabadza <hadzabadza@yandex.ru>
This commit is contained in:
SkyratBot
2021-02-14 20:14:53 +00:00
committed by GitHub
co-authored by Hadzabadza
parent 333470784d
commit 09c5452208
@@ -28,6 +28,8 @@
/// The countdown ghosts see to when the plant will hatch
var/obj/effect/countdown/flower_bud/countdown
var/list/vines = list()
/obj/structure/alien/resin/flower_bud/Initialize()
. = ..()
countdown = new(src)
@@ -38,12 +40,16 @@
anchors += locate(x+2,y-2,z)
for(var/turf/T in anchors)
Beam(T, "vine", maxdistance=5, beam_type=/obj/effect/ebeam/vine)
vines += Beam(T, "vine", maxdistance=5, beam_type=/obj/effect/ebeam/vine)
finish_time = world.time + growth_time
addtimer(CALLBACK(src, .proc/bear_fruit), growth_time)
addtimer(CALLBACK(src, .proc/progress_growth), growth_time/4)
countdown.start()
/obj/structure/alien/resin/flower_bud/Destroy()
QDEL_LIST(vines)
return ..()
/**
* Spawns a venus human trap, then qdels itself.
*