mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Adds Bartending Codex & Chem Codex touch-up (#22860)
Title Also touches up the Chem Codex, by having catalysts, inhibitors and temperature show up only if used by the reaction. This should reduce a lot of dead space and info. <img width="844" height="1033" alt="image" src="https://github.com/user-attachments/assets/bb78c2a3-e9e4-4b95-9a86-64f2d14c8d8e" />
This commit is contained in:
@@ -9,6 +9,7 @@ SUBSYSTEM_DEF(codex)
|
||||
|
||||
/// List of chemistry/reagent reactions and associated data.
|
||||
var/list/chemistry_codex_data = list()
|
||||
var/list/bartending_codex_data = list()
|
||||
var/list/chemistry_codex_ignored_reaction_path = list(/datum/chemical_reaction/slime)
|
||||
var/list/chemistry_codex_ignored_result_path = list(/singleton/reagent/drink, /singleton/reagent/alcohol)
|
||||
|
||||
@@ -24,7 +25,7 @@ SUBSYSTEM_DEF(codex)
|
||||
generate_cooking_codex()
|
||||
generate_chemistry_codex()
|
||||
generate_fusion_codex()
|
||||
log_subsystem_codex("SScodex: [length(cooking_codex_data)] cooking recipes; [length(chemistry_codex_data)] chemistry recipes; [length(fusion_codex_data)] fusion recipes;")
|
||||
log_subsystem_codex("SScodex: [length(cooking_codex_data)] cooking recipes; [length(bartending_codex_data)] bartending recipes; [length(chemistry_codex_data)] chemistry recipes; [length(fusion_codex_data)] fusion recipes;")
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
@@ -94,8 +95,6 @@ SUBSYSTEM_DEF(codex)
|
||||
var/datum/chemical_reaction/CR = new chem_path
|
||||
if(!CR.result)
|
||||
continue
|
||||
if(chemistry_codex_ignored_result_path && is_path_in_list(CR.result, chemistry_codex_ignored_result_path))
|
||||
continue
|
||||
var/singleton/reagent/R = GET_SINGLETON(CR.result)
|
||||
var/chemistryReactionData = list(id = "[chem_path]")
|
||||
chemistryReactionData["result"] = list(
|
||||
@@ -133,7 +132,10 @@ SUBSYSTEM_DEF(codex)
|
||||
|
||||
chemistryReactionData["temp_max"] = CR.required_temperature_max
|
||||
|
||||
chemistry_codex_data += list(chemistryReactionData)
|
||||
if(chemistry_codex_ignored_result_path && is_path_in_list(CR.result, chemistry_codex_ignored_result_path))
|
||||
bartending_codex_data += list(chemistryReactionData) // What is bartending, but a dimunitive form of chemistry?
|
||||
else
|
||||
chemistry_codex_data += list(chemistryReactionData)
|
||||
|
||||
/// Generate a list of all fusion reaction fusion_reactions, then populate the codex from that list.
|
||||
/datum/controller/subsystem/codex/proc/generate_fusion_codex()
|
||||
|
||||
Reference in New Issue
Block a user