From 4f8848cfb829533d7c126de430276f77ff869bab Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Fri, 12 Nov 2021 19:09:14 +0100 Subject: [PATCH] more info chem master and chem analyzer now state who can actually process a chem --- .../reagents/chemistry/machinery/chem_master.dm | 13 +++++++++++-- .../code/modules/reagents/objects/items.dm | 11 ++++++++++- tgui/packages/tgui/interfaces/ChemMaster.js | 3 +++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index 285ef70433..c85c0fcfad 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -398,14 +398,23 @@ state = "Gas" var/const/P = 3 //The number of seconds between life ticks var/T = initial(R.metabolization_rate) * (60 / P) + var/processtype + if(CHECK_MULTIPLE_BITFIELDS(R.chemical_flags, (REAGENT_ROBOTIC_PROCESS | REAGENT_ORGANIC_PROCESS))) + processtype = "Both robots and organics" + else if(R.chemical_flags & REAGENT_ROBOTIC_PROCESS) + processtype = "Robots only" + else if(R.chemical_flags & REAGENT_ORGANIC_PROCESS) + processtype = "Organics only" + else + processtype = "Noone?! (Report this to Nanotrasen's spacetime department immediately)" if(istype(R, /datum/reagent/fermi)) fermianalyze = TRUE var/datum/chemical_reaction/Rcr = get_chemical_reaction(reagent) var/pHpeakCache = (Rcr.OptimalpHMin + Rcr.OptimalpHMax)/2 - analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = R.purity, "inverseRatioF" = initial(R.inverse_chem_val), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache) + analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "processType" = processtype, "purityF" = R.purity, "inverseRatioF" = initial(R.inverse_chem_val), "purityE" = initial(Rcr.PurityMin), "minTemp" = initial(Rcr.OptimalTempMin), "maxTemp" = initial(Rcr.OptimalTempMax), "eTemp" = initial(Rcr.ExplodeTemp), "pHpeak" = pHpeakCache) else fermianalyze = FALSE - analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "purityF" = R.purity) + analyzeVars = list("name" = initial(R.name), "state" = state, "color" = initial(R.color), "description" = initial(R.description), "metaRate" = T, "overD" = initial(R.overdose_threshold), "addicD" = initial(R.addiction_threshold), "processType" = processtype, "purityF" = R.purity) screen = "analyze" return TRUE diff --git a/modular_citadel/code/modules/reagents/objects/items.dm b/modular_citadel/code/modules/reagents/objects/items.dm index f4316b3c58..fa8b98f432 100644 --- a/modular_citadel/code/modules/reagents/objects/items.dm +++ b/modular_citadel/code/modules/reagents/objects/items.dm @@ -140,7 +140,16 @@ out_message += "A reaction appears to be occuring currently.\n" out_message += "Chemicals found in the beaker:\n" for(var/datum/reagent/R in cont.reagents.reagent_list) - out_message += "[R.volume]u of [R.name], Purity: [R.purity], [(scanmode?"[(R.overdose_threshold?"Overdose: [R.overdose_threshold]u, ":"")][(R.addiction_threshold?"Addiction: [R.addiction_threshold]u, ":"")]Base pH: [R.pH].":".")]\n" + var/processtype + if(CHECK_MULTIPLE_BITFIELDS(R.chemical_flags, (REAGENT_ROBOTIC_PROCESS | REAGENT_ORGANIC_PROCESS))) + processtype = "Both robots and organics" + else if(R.chemical_flags & REAGENT_ROBOTIC_PROCESS) + processtype = "Robots only" + else if(R.chemical_flags & REAGENT_ORGANIC_PROCESS) + processtype = "Organics only" + else + processtype = "Noone?! (Report this to Nanotrasen's spacetime department immediately)" + out_message += "[R.volume]u of [R.name], Purity: [R.purity], [(scanmode?"[(R.overdose_threshold?"Overdose: [R.overdose_threshold]u, ":"")][(R.addiction_threshold?"Addiction: [R.addiction_threshold]u, ":"")]Metabolized by: [processtype], Base pH: [R.pH].":".")]\n" if(scanmode) out_message += "Analysis: [R.description]\n" to_chat(user, "[out_message]") diff --git a/tgui/packages/tgui/interfaces/ChemMaster.js b/tgui/packages/tgui/interfaces/ChemMaster.js index 1cf66ae0e4..a6595540d6 100644 --- a/tgui/packages/tgui/interfaces/ChemMaster.js +++ b/tgui/packages/tgui/interfaces/ChemMaster.js @@ -400,6 +400,9 @@ const AnalysisResults = (props, context) => { {analyzeVars.addicD} + + {analyzeVars.processType} + {analyzeVars.purityF}