diff --git a/code/modules/atmospherics/machinery/components/gas_recipe_machines/atmos_machines_recipes.dm b/code/modules/atmospherics/machinery/components/gas_recipe_machines/atmos_machines_recipes.dm index ce143132c85..46e3a916bf0 100644 --- a/code/modules/atmospherics/machinery/components/gas_recipe_machines/atmos_machines_recipes.dm +++ b/code/modules/atmospherics/machinery/components/gas_recipe_machines/atmos_machines_recipes.dm @@ -96,7 +96,7 @@ GLOBAL_LIST_INIT(gas_recipe_meta, gas_recipes_list()) reaction_type = EXOTHERMIC_REACTION energy_release = 1500000 dangerous = TRUE - requirements = list(/datum/gas/hypernoblium = 1500, /datum/gas/antinoblium = 1500, /datum/gas/bz = 2000, /datum/gas/plasma = 5000, /datum/gas/oxygen = 4500) + requirements = list(/datum/gas/hypernoblium = 250, /datum/gas/antinoblium = 250, /datum/gas/bz = 200, /datum/gas/plasma = 5000, /datum/gas/oxygen = 4500) products = list(/obj/machinery/power/supermatter_crystal/shard = 1) /datum/gas_recipe/crystallizer/n2o_crystal @@ -146,5 +146,5 @@ GLOBAL_LIST_INIT(gas_recipe_meta, gas_recipes_list()) max_temp = 20 reaction_type = EXOTHERMIC_REACTION energy_release = 29000 - requirements = list(/datum/gas/antinoblium = 100, /datum/gas/zauker = 500, /datum/gas/bz = 75) + requirements = list(/datum/gas/antinoblium = 5, /datum/gas/zauker = 20, /datum/gas/bz = 7.5) products = list(/obj/item/stack/sheet/mineral/zaukerite = 2) diff --git a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm index c59a2d6bd42..d1f8a7fed96 100644 --- a/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm +++ b/code/modules/atmospherics/machinery/components/gas_recipe_machines/crystallizer.dm @@ -30,6 +30,10 @@ ///Stores the total amount of moles needed for the current recipe var/total_recipe_moles = 0 +/obj/machinery/atmospherics/components/binary/crystallizer/Initialize() + . = ..() + internal = new + /obj/machinery/atmospherics/components/binary/crystallizer/attackby(obj/item/I, mob/user, params) if(!on) if(default_deconstruction_screwdriver(user, "[base_icon]-open", "[base_icon]-off", I)) @@ -256,9 +260,9 @@ data["on"] = on if(selected_recipe) - data["selected_recipe"] = selected_recipe.id + data["selected"] = selected_recipe.id else - data["selected_recipe"] = null + data["selected"] = null var/list/internal_gas_data = list() if(internal.total_moles()) @@ -315,12 +319,12 @@ dump_gases() quality_loss = 0 progress_bar = 0 - if(selected_recipe) + if(recipe) selected_recipe = recipe recipe_name = recipe.name update_parents() //prevent the machine from stopping because of the recipe change and the pipenet not updating moles_calculations() - investigate_log("was set to recipe [recipe_name] by [key_name(usr)]", INVESTIGATE_ATMOS) + investigate_log("was set to recipe [recipe_name ? recipe_name : "null"] by [key_name(usr)]", INVESTIGATE_ATMOS) . = TRUE if("gas_input") var/_gas_input = params["gas_input"] diff --git a/tgui/packages/tgui/interfaces/Crystallizer.js b/tgui/packages/tgui/interfaces/Crystallizer.js index 2a7d48a0644..ab207e8edd6 100644 --- a/tgui/packages/tgui/interfaces/Crystallizer.js +++ b/tgui/packages/tgui/interfaces/Crystallizer.js @@ -6,14 +6,14 @@ import { Window } from '../layouts'; export const Crystallizer = (props, context) => { const { act, data } = useBackend(context); - const recipeTypes = data.recipe_types || []; + const selectedRecipes = data.selected_recipes || []; const gasTypes = data.internal_gas_data || []; const { requirements, internal_temperature, progress_bar, gas_input, - selected_recipe, + selected, } = data; return ( { onClick={() => act('power')} /> - {recipeTypes.map(recipe => ( + {selectedRecipes.map(recipe => (