From 540b1e16ac879e9601867a47c80ea50d22beff89 Mon Sep 17 00:00:00 2001 From: vuonojenmustaturska Date: Sun, 19 Nov 2017 02:09:29 +0200 Subject: [PATCH] glowshroom fix --- code/game/objects/effects/glowshroom.dm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/code/game/objects/effects/glowshroom.dm b/code/game/objects/effects/glowshroom.dm index 3553384bb9c..8dab6e42461 100644 --- a/code/game/objects/effects/glowshroom.dm +++ b/code/game/objects/effects/glowshroom.dm @@ -59,8 +59,11 @@ obj_integrity = myseed.endurance max_integrity = myseed.endurance var/datum/plant_gene/trait/glow/G = myseed.get_gene(/datum/plant_gene/trait/glow) - if(G) - set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color) + if(ispath(G)) // Seeds were ported to initialize so their genes are still typepaths here, luckily their initializer is smart enough to handle us doing this + myseed.genes -= G + G = new G + myseed.genes += G + set_light(G.glow_range(myseed), G.glow_power(myseed), G.glow_color) setDir(CalcDir()) var/base_icon_state = initial(icon_state) if(!floor)