diff --git a/tgui/packages/tgui/interfaces/ChemMaster.js b/tgui/packages/tgui/interfaces/ChemMaster.js
index 1997b3b9b6..da89ee5c9d 100644
--- a/tgui/packages/tgui/interfaces/ChemMaster.js
+++ b/tgui/packages/tgui/interfaces/ChemMaster.js
@@ -1,11 +1,26 @@
-import { Component, Fragment } from 'inferno';
-import { act } from '../byond';
+import { Fragment } from 'inferno';
+import { useBackend, useSharedState } from '../backend';
import { AnimatedNumber, Box, Button, ColorBox, LabeledList, NumberInput, Section, Table } from '../components';
+import { Window } from '../layouts';
-export const ChemMaster = props => {
- const { state } = props;
- const { config, data } = state;
- const { ref } = config;
+export const ChemMaster = (props, context) => {
+ const { data } = useBackend(context);
+ const { screen } = data;
+ return (
+
+
+ {screen === 'analyze' && (
+
+ ) || (
+
+ )}
+
+
+ );
+};
+
+const ChemMasterContent = (props, context) => {
+ const { act, data } = useBackend(context);
const {
screen,
beakerContents = [],
@@ -17,7 +32,9 @@ export const ChemMaster = props => {
pillBottleCurrentAmount,
pillBottleMaxAmount,
} = data;
-
+ if (screen === 'analyze') {
+ return ;
+ }
return (
{
)}>
{!isBeakerLoaded && (
@@ -50,7 +67,6 @@ export const ChemMaster = props => {
{beakerContents.map(chemical => (
))}
@@ -67,7 +83,7 @@ export const ChemMaster = props => {
color={data.mode ? 'good' : 'bad'}
icon={data.mode ? 'exchange-alt' : 'times'}
content={data.mode ? 'Transfer' : 'Destroy'}
- onClick={() => act(ref, 'toggleMode')} />
+ onClick={() => act('toggleMode')} />
)}>
{bufferContents.length === 0 && (
@@ -79,7 +95,6 @@ export const ChemMaster = props => {
{bufferContents.map(chemical => (
))}
@@ -87,7 +102,7 @@ export const ChemMaster = props => {
{!!isPillBottleLoaded && (
{