From 97e061b39c4fcd7de96ea8a27c91d0b74ec03bd0 Mon Sep 17 00:00:00 2001 From: Darlantan Date: Sat, 11 Jun 2022 17:15:36 -0400 Subject: [PATCH] More branch switching --- .../dispenser/chem_synthesizer_ch.dm | 3 + .../tgui/interfaces/ChemSynthesizer.js | 260 ++++++++++++++---- 2 files changed, 204 insertions(+), 59 deletions(-) diff --git a/modular_chomp/code/modules/reagents/machinery/dispenser/chem_synthesizer_ch.dm b/modular_chomp/code/modules/reagents/machinery/dispenser/chem_synthesizer_ch.dm index 1c49303711..3a56972c0f 100644 --- a/modular_chomp/code/modules/reagents/machinery/dispenser/chem_synthesizer_ch.dm +++ b/modular_chomp/code/modules/reagents/machinery/dispenser/chem_synthesizer_ch.dm @@ -302,6 +302,9 @@ // Opens/closes the panel. if(!busy) panel_open = !panel_open + if("mode_toggle") + // Toggles production mode. + production_mode = !production_mode if("add_recipe") // Allows the user to add a recipe. Kinda vital for this machine to do anything useful. if(recipes.len >= SYNTHESIZER_MAX_RECIPES) diff --git a/tgui/packages/tgui/interfaces/ChemSynthesizer.js b/tgui/packages/tgui/interfaces/ChemSynthesizer.js index 5e2a2f68e8..859e52c97e 100644 --- a/tgui/packages/tgui/interfaces/ChemSynthesizer.js +++ b/tgui/packages/tgui/interfaces/ChemSynthesizer.js @@ -1,6 +1,6 @@ import { Fragment } from 'inferno'; import { useBackend } from "../backend"; -import { Box, Button, Flex, Icon, LabeledList, Section } from "../components"; +import { Box, Button, Flex, LabeledList, Section } from "../components"; import { Window } from "../layouts"; import { BeakerContents } from './common/BeakerContents'; @@ -47,8 +47,8 @@ const ChemSynthesizerQueueRecipes = (props, context) => { - - } + + + } ); } - return ( - - - - ); - }) || ( - - Queue Empty. - - )} - + return ( + + + + ); + }) || ( + + Queue Empty. + + )} + ); }; @@ -151,23 +148,168 @@ const ChemSynthesizerRecipeList = (props, context) => { busy, } = data; - return = ( - - {recipes.length && recipes.map(item => { - + return ( + + {recipes.map(item => ( + - - }) || ( - - No Recipes. - - )} - + color="bad" + icon="minus" + disabled={!!busy} + onClick={() => act("rem_recipe", { + rm_index: item.name, + })} /> +