mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 00:47:31 +01:00
b3b4f4b9c6
Fixes https://github.com/Aurorastation/Aurora.3/issues/18951 Fixes https://github.com/Aurorastation/Aurora.3/issues/19447 Fixes https://github.com/Aurorastation/Aurora.3/issues/20283 Fixes https://github.com/Aurorastation/Aurora.3/issues/21395 Overhauls a wide variety of INDRA behaviors and related gas/material properties. changes: - balance: "Fusion reaction modifications. Higher radiation and temperature output, comparable power output." - balance: "Increased rad resistance modifier of Borosilicate Windows from 1 -> 4 and (closed) Blast Doors from 1 -> 6." - balance: "INDRA Field Strength minima/maxima changed from 1-100 -> 20-120. Power costs increased significantly." - balance: "INDRA instability increase per tick now limited, similar to Supermatter (prevents sudden instability spike from instantly nuking it)." - balance: "APC cell charge rate increased 10x." - balance: "Rebalanced contents of INDRA hard storage compartment." - balance: "SMES coils capacities halved, throughputs doubled." - balance: "SMES unit maximum coil capacity increased from 6 -> 8." - balance: "TEG maximum power output increased from 500000 -> 2500000." - balance: "Power wasted from exceeding TEG maximum power output decreased from 50% to 33%." - balance: "Portable generators of all types have had their power generation capacity doubled." - rscadd: "New 'Fusion Codex' app added for all crew with ACCESS_ENGINE that details all available nuclear fusion chains." - rscadd: "Boron added as a singleton/reagent. Poisonous to vaurca, still usable in nuclear fusion as fuel assembly rods." - rscadd: "INDRA Field Strength now scales plasma temperature entropy, power output from temperature multiplier, and instability increase per tick." - refactor: "'Boron' gas renamed to 'Helium-3'. Boron is not a gas. Deal with it." - refactor: "'Steam' gas renamed to 'Water Vapor'." - code_imp: "Descriptions added to gas singletons for future use." - qol: "Minor remap of INDRA control room for usability." - qol: "Standardized gas canister naming conventions." - qol: "INDRA and APC TGUI interfaces now use use kW, MW abbreviations for high wattages." - bugfix: "INDRA Kinetic Harvester no longer rapidly deselects materials for harvest when too many are being generated at once." - bugfix: "INDRA EM Field effect no longer considers the camera within its reactor chamber a destabilizing influence." - bugfix: "INDRA reactor core now produces radiation as intended." - bugfix: "Deuterium and Tritium canisters no longer contain 50% standard hydrogen (inheritance issue)." --------- Signed-off-by: Batrachophreno <Batrochophreno@gmail.com> Co-authored-by: Matt Atlas <mattiathebest2000@hotmail.it> Co-authored-by: Geeves <22774890+Geevies@users.noreply.github.com>
181 lines
6.4 KiB
Plaintext
181 lines
6.4 KiB
Plaintext
|
|
SUBSYSTEM_DEF(codex)
|
|
name = "Codex"
|
|
flags = SS_NO_FIRE
|
|
init_order = INIT_ORDER_CODEX
|
|
|
|
/// List of cooking recipes and associated data.
|
|
var/list/cooking_codex_data = list()
|
|
|
|
/// List of chemistry/reagent reactions and associated data.
|
|
var/list/chemistry_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)
|
|
|
|
/// List of fusion reactions and associated data.
|
|
var/list/fusion_codex_data = list()
|
|
|
|
/datum/controller/subsystem/codex/Initialize()
|
|
//We don't build the codex in fastboot, it's slow and kind of pointless for tests
|
|
if(GLOB.config.fastboot)
|
|
log_subsystem_codex("SScodex: Fastboot detected, skipping codex generation.")
|
|
|
|
else
|
|
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;")
|
|
|
|
return SS_INIT_SUCCESS
|
|
|
|
/datum/controller/subsystem/codex/proc/generate_cooking_codex()
|
|
var/list/available_recipes = GET_SINGLETON_SUBTYPE_MAP(/singleton/recipe)
|
|
for (var/reaction_path in available_recipes)
|
|
var/singleton/recipe/recipe = GET_SINGLETON(reaction_path)
|
|
var/list/cookingRecipeData = list()
|
|
|
|
// result
|
|
var/obj/item/recipe_result = recipe.result
|
|
cookingRecipeData["result"] = initial(recipe_result.name)
|
|
|
|
// result image
|
|
var/icon/result_icon = icon(
|
|
icon=initial(recipe_result.icon),
|
|
icon_state=initial(recipe_result.icon_state),
|
|
frame=1,
|
|
)
|
|
cookingRecipeData["result_image"] = icon2base64(result_icon)
|
|
|
|
// ingredients
|
|
cookingRecipeData["ingredients"] = list()
|
|
|
|
// ingredients, items
|
|
if(recipe.items)
|
|
for(var/ingredient_path in recipe.items)
|
|
var/obj/item/ingredient = ingredient_path
|
|
cookingRecipeData["ingredients"] += initial(ingredient.name)
|
|
|
|
// ingredients, fruits
|
|
if(recipe.fruit)
|
|
for(var/fruit_name in recipe.fruit)
|
|
var/count = recipe.fruit[fruit_name]
|
|
cookingRecipeData["ingredients"] += "[count]x [fruit_name]"
|
|
|
|
// ingredients, reagents
|
|
if(recipe.reagents)
|
|
for(var/reagent_path in recipe.reagents)
|
|
var/count = recipe.reagents[reagent_path]
|
|
var/singleton/reagent/reagent = GET_SINGLETON(reagent_path)
|
|
cookingRecipeData["ingredients"] += "[count]u [reagent.name]"
|
|
|
|
// coating
|
|
if(recipe.coating)
|
|
var/singleton/reagent/reagent = GET_SINGLETON(recipe.coating)
|
|
cookingRecipeData["ingredients"] += "[reagent.name] coating"
|
|
|
|
// kitchen appliance
|
|
if(recipe.appliance)
|
|
cookingRecipeData["appliances"] = recipe.get_appliance_names()
|
|
|
|
// fin
|
|
cookingRecipeData["ingredients"] = english_list(cookingRecipeData["ingredients"])
|
|
cooking_codex_data += list(cookingRecipeData)
|
|
|
|
/datum/controller/subsystem/codex/proc/generate_chemistry_codex()
|
|
chemistry_codex_data = list()
|
|
for(var/chem_path in SSchemistry.chemical_reactions_clean)
|
|
if(chemistry_codex_ignored_reaction_path && is_path_in_list(chem_path, chemistry_codex_ignored_reaction_path))
|
|
continue
|
|
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 = CR.id)
|
|
chemistryReactionData["result"] = list(
|
|
name = R.name,
|
|
description = R.description,
|
|
amount = CR.result_amount
|
|
)
|
|
|
|
chemistryReactionData["reagents"] = list()
|
|
for(var/reagent in CR.required_reagents)
|
|
var/singleton/reagent/required_reagent = reagent
|
|
chemistryReactionData["reagents"] += list(list(
|
|
name = initial(required_reagent.name),
|
|
amount = CR.required_reagents[reagent]
|
|
))
|
|
|
|
chemistryReactionData["catalysts"] = list()
|
|
for(var/reagent_path in CR.catalysts)
|
|
var/singleton/reagent/required_reagent = reagent_path
|
|
chemistryReactionData["catalysts"] += list(list(
|
|
name = initial(required_reagent.name),
|
|
amount = CR.catalysts[reagent_path]
|
|
))
|
|
|
|
chemistryReactionData["inhibitors"] = list()
|
|
for(var/reagent_path in CR.inhibitors)
|
|
var/singleton/reagent/required_reagent = reagent_path
|
|
var/inhibitor_amount = CR.inhibitors[reagent_path] ? CR.inhibitors[reagent_path] : "Any"
|
|
chemistryReactionData["inhibitors"] += list(list(
|
|
name = initial(required_reagent.name),
|
|
amount = inhibitor_amount
|
|
))
|
|
|
|
chemistryReactionData["temp_min"] = CR.required_temperature_min
|
|
|
|
chemistryReactionData["temp_max"] = CR.required_temperature_max
|
|
|
|
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()
|
|
fusion_codex_data = list()
|
|
var/list/available_fusion_reactions = GET_SINGLETON_SUBTYPE_MAP(/singleton/fusion_reaction)
|
|
for (var/reaction_path in available_fusion_reactions)
|
|
var/singleton/fusion_reaction/fusion_reaction = GET_SINGLETON(reaction_path)
|
|
var/list/fusionReactionData = list()
|
|
|
|
var/reaction_name = fusion_reaction.name
|
|
if(!reaction_name)
|
|
reaction_name = capitalize_first_letters(fusion_reaction.p_react) + "-" + capitalize_first_letters(fusion_reaction.s_react)
|
|
|
|
fusionReactionData["name"] = reaction_name
|
|
|
|
fusionReactionData["reactants"] = list()
|
|
|
|
if(fusion_reaction.p_react == fusion_reaction.s_react)
|
|
fusionReactionData["reactants"] += list(list(
|
|
name = capitalize_first_letters(fusion_reaction.p_react),
|
|
amount = 2
|
|
))
|
|
|
|
else
|
|
fusionReactionData["reactants"] += list(list(
|
|
name = capitalize_first_letters(fusion_reaction.p_react),
|
|
amount = 1
|
|
))
|
|
fusionReactionData["reactants"] += list(list(
|
|
name = capitalize_first_letters(fusion_reaction.s_react),
|
|
amount = 1
|
|
))
|
|
|
|
fusionReactionData["minimum_temp"] += fusion_reaction.minimum_energy_level
|
|
|
|
fusionReactionData["energy_consumption"] += fusion_reaction.energy_consumption
|
|
fusionReactionData["energy_production"] += fusion_reaction.energy_production
|
|
|
|
fusionReactionData["radiation"] += fusion_reaction.radiation
|
|
fusionReactionData["instability"] += fusion_reaction.instability
|
|
|
|
fusionReactionData["products"] = list()
|
|
for(var/product in fusion_reaction.products)
|
|
fusionReactionData["products"] += list(list(
|
|
name = capitalize_first_letters(product),
|
|
amount = fusion_reaction.products[product]
|
|
))
|
|
|
|
fusion_codex_data += list(fusionReactionData)
|