mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
[MIRROR] Crystallizer Hotfix (mistakes were made) (#3724)
* fex (#57256) Fixed crystallizer, now working properly, the GUI was broken when i changed name of a var, now the gui works again, also the internal gasmixture wasn't initialized anymore for some reason Zaukerite and SM shard cost a bit less now (was intended to be changed in the main PR but i forgot) * Crystallizer Hotfix (mistakes were made) Co-authored-by: Ghilker <42839747+Ghilker@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -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)
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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 (
|
||||
<Window
|
||||
@@ -30,10 +30,10 @@ export const Crystallizer = (props, context) => {
|
||||
onClick={() => act('power')} />
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Recipe">
|
||||
{recipeTypes.map(recipe => (
|
||||
{selectedRecipes.map(recipe => (
|
||||
<Button
|
||||
key={recipe.id}
|
||||
selected={recipe.id === selected_recipe}
|
||||
selected={recipe.id === selected}
|
||||
content={recipe.name}
|
||||
onClick={() => act('recipe', {
|
||||
mode: recipe.id,
|
||||
|
||||
Reference in New Issue
Block a user