Minor plant controller refactor.

This commit is contained in:
MistakeNot4892
2021-03-26 12:20:50 +11:00
parent cccb2a159f
commit a799725c24
3 changed files with 5 additions and 8 deletions

View File

@@ -18,6 +18,8 @@ SUBSYSTEM_DEF(atoms)
var/list/BadInitializeCalls = list() var/list/BadInitializeCalls = list()
/datum/controller/subsystem/atoms/Initialize(timeofday) /datum/controller/subsystem/atoms/Initialize(timeofday)
if(!plant_controller) // Initialize seed repo for /obj/item/seed and /obj/item/weapon/grown
plant_controller = new
setupgenetics() //to set the mutations' place in structural enzymes, so initializers know where to put mutations. setupgenetics() //to set the mutations' place in structural enzymes, so initializers know where to put mutations.
initialized = INITIALIZATION_INNEW_MAPLOAD initialized = INITIALIZATION_INNEW_MAPLOAD
to_world_log("Initializing objects") to_world_log("Initializing objects")

View File

@@ -33,9 +33,6 @@
log_unit_test("If you did not intend to enable this please check code/__defines/unit_testing.dm") log_unit_test("If you did not intend to enable this please check code/__defines/unit_testing.dm")
#endif #endif
// Set up roundstart seed list.
plant_controller = new()
// This is kinda important. Set up details of what the hell things are made of. // This is kinda important. Set up details of what the hell things are made of.
populate_material_list() populate_material_list()

View File

@@ -8,13 +8,11 @@
var/plantname var/plantname
var/potency = 1 var/potency = 1
/obj/item/weapon/grown/New(newloc,planttype) /obj/item/weapon/grown/Initialize(ml, planttype)
..() . = ..()
var/datum/reagents/R = new/datum/reagents(50) create_reagents(50)
reagents = R
R.my_atom = src
//Handle some post-spawn var stuff. //Handle some post-spawn var stuff.
if(planttype) if(planttype)