From d1d3774e1a7e9df4fa67156a8628a8cf7be37f8a Mon Sep 17 00:00:00 2001 From: Artur Date: Thu, 14 May 2020 14:13:54 +0300 Subject: [PATCH] Fucked up a little --- .../packages/tgui/interfaces/ClockworkSlab.js | 259 ++++++++++-------- tgui/packages/tgui/interfaces/Sleeper.js | 5 +- 2 files changed, 148 insertions(+), 116 deletions(-) diff --git a/tgui/packages/tgui/interfaces/ClockworkSlab.js b/tgui/packages/tgui/interfaces/ClockworkSlab.js index 3246a8b067..55674ff211 100644 --- a/tgui/packages/tgui/interfaces/ClockworkSlab.js +++ b/tgui/packages/tgui/interfaces/ClockworkSlab.js @@ -1,124 +1,157 @@ +import { Window } from 'inferno'; import { useBackend } from '../backend'; -import { Box, Section, LabeledList, Button, ProgressBar } from '../components'; -import { Fragment } from 'inferno'; -import { Window } from '../layouts'; +import { Button, LabeledList, Section, Tabs, Input } from '../components'; -export const Sleeper = (props, context) => { - const { act, data } = useBackend(context); +export const ClockworkSlab = props => { + const { act, data } = useBackend(props); const { - open, - occupant = {}, - occupied, + recollection, + rec_text, + recollection_categories, + rec_section, + rec_binds, } = data; - const preSortChems = data.chems || []; - const chems = preSortChems.sort((a, b) => { - const descA = a.name.toLowerCase(); - const descB = b.name.toLowerCase(); - if (descA < descB) { - return -1; - } - if (descA > descB) { - return 1; - } - return 0; - }); - - const damageTypes = [ - { - label: 'Brute', - type: 'bruteLoss', - }, - { - label: 'Burn', - type: 'fireLoss', - }, - { - label: 'Toxin', - type: 'toxLoss', - }, - { - label: 'Oxygen', - type: 'oxyLoss', - }, - ]; - return ( - - -
- {occupant.stat} - - )}> - {!!occupied && ( - - - - - {damageTypes.map(type => ( - - - - ))} - - {occupant.cloneLoss ? 'Damaged' : 'Healthy'} - - - {occupant.brainLoss ? 'Abnormal' : 'Healthy'} - - - - )} + +
+
+ {!!recollection && ( +
+ {rec_text} + {recollection_categories.map(categories => { + return ( + +
+
-
act('door')} /> - )}> - {chems.map(chem => ( -
- + )} + {recollection && ( + +
+ {data.power} +
+
+ {data.tier_info} + {data.scripturecolors} + + + {() => ( +
+ + {data.scripture.driver.map(script => { // HEY! Make sure the data gets built byondside! + return ( + +
+ )} +
+ + {() => ( +
+ + {data.scripture.script.map(script => { // HEY! Make sure the data gets built byondside! + return ( + +
+ )} +
+ + {() => ( +
+ + {data.scripture.application.map(script => { // HEY! Make sure the data gets built byondside! + return ( + +
+ )} +
+
+
+
+ )}
); }; diff --git a/tgui/packages/tgui/interfaces/Sleeper.js b/tgui/packages/tgui/interfaces/Sleeper.js index a01167039b..5e6d2958e7 100644 --- a/tgui/packages/tgui/interfaces/Sleeper.js +++ b/tgui/packages/tgui/interfaces/Sleeper.js @@ -1,6 +1,5 @@ import { useBackend } from '../backend'; import { Box, Section, LabeledList, Button, ProgressBar, AnimatedNumber } from '../components'; -import { Fragment } from 'inferno'; import { Window } from '../layouts'; export const Sleeper = props => { @@ -70,7 +69,7 @@ export const Sleeper = props => { )}> {!!occupied && ( - + { {occupant.brainLoss ? 'Abnormal' : 'Healthy'} - + )}