mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-10 22:55:22 +01:00
Ports Chemistry/NanoUI Fixes Early
Direct port of https://github.com/PolarisSS13/Polaris/pull/6039
This commit is contained in:
@@ -4,6 +4,7 @@ PROCESSING_SUBSYSTEM_DEF(chemistry)
|
||||
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING
|
||||
init_order = INIT_ORDER_CHEMISTRY
|
||||
var/list/chemical_reactions = list()
|
||||
var/list/chemical_reactions_by_reagent = list()
|
||||
var/list/chemical_reagents = list()
|
||||
|
||||
/datum/controller/subsystem/processing/chemistry/Recover()
|
||||
@@ -22,15 +23,16 @@ PROCESSING_SUBSYSTEM_DEF(chemistry)
|
||||
// more than one chemical it will still only appear in only one of the sublists.
|
||||
/datum/controller/subsystem/processing/chemistry/proc/initialize_chemical_reactions()
|
||||
var/paths = typesof(/datum/chemical_reaction) - /datum/chemical_reaction
|
||||
SSchemistry.chemical_reactions = list()
|
||||
chemical_reactions = list()
|
||||
chemical_reactions_by_reagent = list()
|
||||
|
||||
for(var/path in paths)
|
||||
var/datum/chemical_reaction/D = new path()
|
||||
var/datum/chemical_reaction/D = new path
|
||||
chemical_reactions += D
|
||||
if(D.required_reagents && D.required_reagents.len)
|
||||
var/reagent_id = D.required_reagents[1]
|
||||
if(!chemical_reactions[reagent_id])
|
||||
chemical_reactions[reagent_id] = list()
|
||||
chemical_reactions[reagent_id] += D
|
||||
LAZYINITLIST(chemical_reactions_by_reagent[reagent_id])
|
||||
chemical_reactions_by_reagent[reagent_id] += D
|
||||
|
||||
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
|
||||
/datum/controller/subsystem/processing/chemistry/proc/initialize_chemical_reagents()
|
||||
|
||||
Reference in New Issue
Block a user