Fixes Runtime in chemsmoke.dm,177: Cannot read null.seed_name

- This was caused by create_spores() being called on seeds which were not registered with the plant_controller (becuase they had never been harvested)
- Instead of registering them, we can just pass the seed datum itself, that is all the chemsmoke needs anyway.
This commit is contained in:
Leshana
2020-03-30 19:21:34 -04:00
parent 7f18d508ea
commit 75d9bee4a0
2 changed files with 5 additions and 6 deletions
+4 -5
View File
@@ -29,11 +29,10 @@
show_log = 0
var/datum/seed/seed
/datum/effect/effect/system/smoke_spread/chem/spores/New(seed_name)
if(seed_name && plant_controller)
seed = plant_controller.seeds[seed_name]
if(!seed)
qdel(src)
/datum/effect/effect/system/smoke_spread/chem/spores/New(_seed)
seed = _seed
if(!istype(seed))
CRASH("Invalid seed datum passed! [seed] ([seed?.type])")
..()
/datum/effect/effect/system/smoke_spread/chem/New()