moving unused tguis + minor refactors

This commit is contained in:
sarcoph
2022-02-27 11:58:18 -09:00
parent 5d96c13de2
commit ba4c250479
38 changed files with 116 additions and 118 deletions
@@ -14,7 +14,7 @@
ui_y = 630
available_on_ntnet = 0
requires_ntnet = 0
tgui_id = "ntos_configuration"
tgui_id = "NtosConfiguration"
var/obj/item/modular_computer/movable = null
@@ -10,7 +10,7 @@
requires_ntnet_feature = NTNET_SOFTWAREDOWNLOAD
available_on_ntnet = 0
ui_header = "downloader_finished.gif"
tgui_id = "ntos_net_downloader"
tgui_id = "NtosNetDownloader"
var/datum/computer_file/program/downloaded_file = null
var/hacked_download = 0
@@ -9,7 +9,7 @@
network_destination = "NTNRC server"
ui_header = "ntnrc_idle.gif"
available_on_ntnet = 1
tgui_id = "ntos_net_chat"
tgui_id = "NtosNetChat"
ui_x = 900
ui_y = 675
@@ -11,7 +11,7 @@
requires_ntnet = 0
network_destination = "power monitoring system"
size = 9
tgui_id = "ntos_power_monitor"
tgui_id = "PowerMonitor"
ui_style = "ntos"
ui_x = 550
ui_y = 700
@@ -8,7 +8,7 @@
transfer_access = ACCESS_CONSTRUCTION
network_destination = "supermatter monitoring system"
size = 5
tgui_id = "ntos_supermatter_monitor"
tgui_id = "NtosSupermatterMonitor"
ui_style = "ntos"
ui_x = 600
ui_y = 350
@@ -803,7 +803,7 @@ The reactor CHEWS through moderator. It does not do this slowly. Be very careful
transfer_access = ACCESS_CONSTRUCTION
network_destination = "rbmk monitoring system"
size = 2
tgui_id = "ntosrbmkstats"
tgui_id = "NtosRbmkStats"
ui_x = 350
ui_y = 550
var/active = TRUE //Easy process throttle
@@ -1,5 +1,5 @@
import { useBackend } from '../backend';
import { Box, Button } from '../components';
import { Box, Button } from '.';
import { refocusLayout } from '../refocus';
export const NtosWrapper = (props, context) => {
@@ -1,5 +1,5 @@
import { useBackend } from '../backend';
import { Box, Icon, Table, Tabs } from '../components';
import { useBackend } from '../../backend';
import { Box, Icon, Table, Tabs } from '../../components';
export const Achievements = (props, context) => {
const { data } = useBackend(context);
@@ -1,6 +1,6 @@
import { useBackend } from '../backend';
import { Box, Button, Grid, LabeledList, NumberInput, Section } from '../components';
import { Window } from '../layouts';
import { useBackend } from '../../backend';
import { Box, Button, Grid, LabeledList, NumberInput, Section } from '../../components';
import { Window } from '../../layouts';
export const Bepis = (props, context) => {
const { config, data, act } = useBackend(context);
@@ -1,7 +1,6 @@
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Button, LabeledList, NumberInput, Section } from '../components';
import { Window } from '../layouts';
import { useBackend } from '../../backend';
import { Button, LabeledList, NumberInput, Section } from '../../components';
import { Window } from '../../layouts';
export const ChemAcclimator = (props, context) => {
const { act, data } = useBackend(context);
@@ -1,7 +1,7 @@
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { AnimatedNumber, Box, Button, LabeledList, NumberInput, Section } from '../components';
import { Window } from '../layouts';
import { useBackend } from '../../backend';
import { AnimatedNumber, Box, Button, LabeledList, NumberInput, Section } from '../../components';
import { Window } from '../../layouts';
export const ChemDebugSynthesizer = (props, context) => {
const { act, data } = useBackend(context);
@@ -1,6 +1,6 @@
import { Component, Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Button, Grid, Section, Input } from '../components';
import { useBackend } from '../../backend';
import { Button, Grid, Section, Input } from '../../components';
export class ChemFilter extends Component {
constructor() {
@@ -1,6 +1,6 @@
import { useBackend } from '../backend';
import { Box, Button, Input, LabeledList, NumberInput, Section } from '../components';
import { Window } from '../layouts';
import { useBackend } from '../../backend';
import { Box, Button, Input, LabeledList, NumberInput, Section } from '../../components';
import { Window } from '../../layouts';
export const ChemPress = (props, context) => {
const { act, data } = useBackend(context);
@@ -1,8 +1,8 @@
import { Component } from 'inferno';
import { Box, Button, LabeledList, NumberInput, Section, Input } from '../components';
import { Box, Button, LabeledList, NumberInput, Section, Input } from '../../components';
import { map } from 'common/collections';
import { classes } from 'common/react';
import { useBackend } from '../backend';
import { useBackend } from '../../backend';
export class ChemReactionChamber extends Component {
@@ -1,7 +1,7 @@
import { toFixed } from 'common/math';
import { useBackend } from '../backend';
import { LabeledList, NumberInput, Section } from '../components';
import { Window } from '../layouts';
import { useBackend } from '../../backend';
import { LabeledList, NumberInput, Section } from '../../components';
import { Window } from '../../layouts';
export const ChemSplitter = (props, context) => {
const { act, data } = useBackend(context);
@@ -1,6 +1,6 @@
import { useBackend } from '../backend';
import { Button, Section } from '../components';
import { Window } from '../layouts';
import { useBackend } from '../../backend';
import { Button, Section } from '../../components';
import { Window } from '../../layouts';
export const DecalPainter = (props, context) => {
const { act, data } = useBackend(context);
@@ -1,7 +1,7 @@
import { multiline } from 'common/string';
import { useBackend } from '../backend';
import { AnimatedNumber, Box, Button, LabeledList, ProgressBar, Section, Tabs } from '../components';
import { Window } from '../layouts';
import { useBackend } from '../../backend';
import { AnimatedNumber, Box, Button, LabeledList, ProgressBar, Section, Tabs } from '../../components';
import { Window } from '../../layouts';
export const MedicalKiosk = (props, context) => {
const { act, data } = useBackend(context);
@@ -1,12 +1,12 @@
import { useBackend } from '../backend';
import { AnimatedNumber, Box, Button, Grid, LabeledList, ProgressBar, Section } from '../components';
import { Window } from '../layouts';
import { useBackend } from '../../backend';
import { AnimatedNumber, Box, Button, Grid, LabeledList, ProgressBar, Section } from '../../components';
import { NtosWindow, Window } from '../../layouts';
export const NtosArcade = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window.Content>
<NtosWindow>
<NtosWindow.Content>
<Section
title="Outbomb Cuban Pete Ultra"
textAlign="center">
@@ -55,8 +55,8 @@ export const NtosArcade = (props, context) => {
Earned Tickets: {data.TicketCount}
</Box>
</Section>
</Window.Content>
</Window>
</NtosWindow.Content>
</NtosWindow>
);
};
@@ -1,7 +1,7 @@
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Box, Button, LabeledList, NumberInput, Section } from '../components';
import { InterfaceLockNoticeBox } from './common/InterfaceLockNoticeBox';
import { useBackend } from '../../backend';
import { Box, Button, LabeledList, NumberInput, Section } from '../../components';
import { InterfaceLockNoticeBox } from '../common/InterfaceLockNoticeBox';
const DISEASE_THEASHOLD_LIST = [
'Positive',
@@ -1,7 +1,7 @@
import { Box, Button, Section, Dimmer, Table, Icon, NoticeBox, Tabs, Grid, LabeledList } from "../components";
import { useBackend } from "../backend";
import { Box, Button, Section, Dimmer, Table, Icon, NoticeBox, Tabs, Grid, LabeledList } from "../../components";
import { useBackend } from "../../backend";
import { Fragment, Component } from "inferno";
import { Window } from "../layouts";
import { Window } from "../../layouts";
export const SyndContractor = (props, context) => {
const { data, act } = useBackend(context);
@@ -1,7 +1,7 @@
import { toFixed } from 'common/math';
import { useBackend } from '../backend';
import { Button, LabeledList, ProgressBar, Section } from '../components';
import { Window } from '../layouts';
import { useBackend } from '../../backend';
import { Button, LabeledList, ProgressBar, Section } from '../../components';
import { Window } from '../../layouts';
export const VaultController = (props, context) => {
const { act, data } = useBackend(context);
@@ -1,7 +1,7 @@
import { Section, Box, Button, Table } from '../components';
import { Section, Box, Button, Table } from '../../components';
import { classes } from 'common/react';
import { Window } from '../layouts';
import { useBackend } from '../backend';
import { Window } from '../../layouts';
import { useBackend } from '../../backend';
export const Vending = (props, context) => {
const { config, data, act } = useBackend(context);
@@ -1,10 +1,10 @@
import { classes } from 'common/react';
import { createSearch } from 'common/string';
import { Fragment } from 'inferno';
import { useBackend, useLocalState } from '../backend';
import { Box, Button, Dimmer, Flex, Icon, Input, NoticeBox, NumberInput, Section, Table, Tabs } from '../components';
import { formatMoney } from '../format';
import { Window } from '../layouts';
import { useBackend, useLocalState } from '../../backend';
import { Box, Button, Dimmer, Flex, Icon, Input, NoticeBox, NumberInput, Section, Table, Tabs } from '../../components';
import { formatMoney } from '../../format';
import { Window } from '../../layouts';
const MAX_SEARCH_RESULTS = 25;
+18 -16
View File
@@ -4,6 +4,23 @@ import { Box } from '../components';
import { Window } from '../layouts';
export const Canvas = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window.Content>
<Box textAlign="center">
<PaintCanvas
value={data.grid}
onCanvasClick={(x, y) => act("paint", { x, y })} />
<Box>{data.name}</Box>
</Box>
</Window.Content>
</Window>
);
};
class PaintCanvas extends Component {
constructor(props) {
super(props);
@@ -76,19 +93,4 @@ class PaintCanvas extends Component {
</canvas>
);
}
}
export const Canvas = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window.Content>
<Box textAlign="center">
<PaintCanvas
value={data.grid}
onCanvasClick={(x, y) => act("paint", { x, y })} />
<Box>{data.name}</Box>
</Box>
</Window.Content>
</Window>
);
};
}
@@ -1,4 +1,3 @@
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Button, Icon, LabeledList, Section } from '../components';
import { Window } from '../layouts';
@@ -1,6 +1,5 @@
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Button, LabeledList, NumberInput, Section, NoticeBox, Input, Table } from '../components';
import { Button, Input, LabeledList, NoticeBox, NumberInput, Section, Table } from '../components';
import { Window } from '../layouts';
export const NaniteRemote = (props, context) => {
@@ -1,7 +1,7 @@
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Box, Button, LabeledList, ProgressBar, Section } from '../components';
import { Window } from '../layouts';
import { NtosWindow, Window } from '../layouts';
export const NtosConfiguration = (props, context) => {
const { act, data } = useBackend(context);
@@ -16,8 +16,8 @@ export const NtosConfiguration = (props, context) => {
} = data;
return (
<Window>
<Window.Content>
<NtosWindow>
<NtosWindow.Content>
<Section
title="Power Supply"
buttons={(
@@ -87,7 +87,7 @@ export const NtosConfiguration = (props, context) => {
</Section>
))}
</Section>
</Window.Content>
</Window>
</NtosWindow.Content>
</NtosWindow>
);
};
+5 -5
View File
@@ -1,6 +1,6 @@
import { useBackend } from '../backend';
import { Button, ColorBox, Section, Table } from '../components';
import { Window } from '../layouts';
import { NtosWindow, Window } from '../layouts';
const PROGRAM_ICONS = {
compconfig: 'cog',
@@ -24,8 +24,8 @@ export const NtosMain = (props, context) => {
comp_light_color,
} = data;
return (
<Window>
<Window.Content>
<NtosWindow>
<NtosWindow.Content>
{!!has_light && (
<Section>
<Button
@@ -75,7 +75,7 @@ export const NtosMain = (props, context) => {
))}
</Table>
</Section>
</Window.Content>
</Window>
</NtosWindow.Content>
</NtosWindow>
);
};
+5 -5
View File
@@ -1,7 +1,7 @@
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Box, Button, Icon, Input, Section, Table } from '../components';
import { Window } from '../layouts';
import { NtosWindow, Window } from '../layouts';
import { createLogger } from '../logging';
const logger = createLogger('ntos chat');
@@ -24,8 +24,8 @@ export const NtosNetChat = (props, context) => {
const authorized = (authed || adminmode);
return (
<Window>
<Window.Content>
<NtosWindow>
<NtosWindow.Content>
<Section
height="600px">
<Table
@@ -148,8 +148,8 @@ export const NtosNetChat = (props, context) => {
</Table.Row>
</Table>
</Section>
</Window.Content>
</Window>
</NtosWindow.Content>
</NtosWindow>
);
};
@@ -1,6 +1,6 @@
import { useBackend } from '../backend';
import { Box, Button, Flex, Icon, LabeledList, NoticeBox, ProgressBar, Section } from '../components';
import { Window } from '../layouts';
import { NtosWindow, Window } from '../layouts';
export const NtosNetDownloader = (props, context) => {
const { state } = props;
@@ -14,8 +14,8 @@ export const NtosNetDownloader = (props, context) => {
hackedavailable,
} = data;
return (
<Window>
<Window.Content>
<NtosWindow>
<NtosWindow.Content>
{!!error && (
<NoticeBox>
<Box mb={1}>
@@ -60,8 +60,8 @@ export const NtosNetDownloader = (props, context) => {
))}
</Section>
)}
</Window.Content>
</Window>
</NtosWindow.Content>
</NtosWindow>
);
};
@@ -1,6 +1,6 @@
import { useBackend } from '../backend';
import { Button, Chart, ProgressBar, Section } from '../components';
import { Window } from '../layouts';
import { NtosWindow, Window } from '../layouts';
export const NtosRbmkStats = (props, context) => {
@@ -11,8 +11,8 @@ export const NtosRbmkStats = (props, context) => {
const tempInputData = data.tempInputData.map((value, i) => [i, value]);
const tempOutputdata = data.tempOutputdata.map((value, i) => [i, value]);
return (
<Window>
<Window.Content>
<NtosWindow>
<NtosWindow.Content>
<Section title="Reactor Management">
<Section title="Legend:" buttons={
<Button
@@ -83,7 +83,7 @@ export const NtosRbmkStats = (props, context) => {
fillColor="rgba(255, 0, 0 , 0.1)" />
</Section>
</Section>
</Window.Content>
</Window>
</NtosWindow.Content>
</NtosWindow>
);
};
@@ -4,7 +4,7 @@ import { toFixed } from 'common/math';
import { useBackend } from '../backend';
import { Box, Button, Flex, LabeledList, ProgressBar, Section, Table } from '../components';
import { getGasColor, getGasLabel } from '../constants';
import { Window } from '../layouts';
import { NtosWindow, Window } from '../layouts';
const logScale = value => Math.log2(16 + Math.max(0, value)) - 4;
@@ -25,8 +25,8 @@ export const NtosSupermatterMonitor = (props, context) => {
])(data.gases || []);
const gasMaxAmount = Math.max(1, ...gases.map(gas => gas.amount));
return (
<Window>
<Window.Content>
<NtosWindow>
<NtosWindow.Content>
<Flex spacing={1}>
<Flex.Item width="270px">
<Section title="Metrics">
@@ -62,8 +62,8 @@ export const NtosSupermatterMonitor = (props, context) => {
</Section>
</Flex.Item>
</Flex>
</Window.Content>
</Window>
</NtosWindow.Content>
</NtosWindow>
);
};
@@ -4,7 +4,7 @@ import { toFixed } from 'common/math';
import { pureComponentHooks } from 'common/react';
import { Component, Fragment } from 'inferno';
import { Box, Button, Chart, ColorBox, Flex, Icon, LabeledList, ProgressBar, Section, Table } from '../components';
import { Window } from '../layouts';
import { NtosWindow, Window } from '../layouts';
const PEAK_DRAW = 500000;
@@ -46,8 +46,8 @@ export class PowerMonitor extends Component {
area => -parseFloat(area.load)),
])(data.areas);
return (
<Window>
<Window.Content>
<NtosWindow>
<NtosWindow.Content>
<Flex spacing={1}>
<Flex.Item width="200px">
<Section>
@@ -146,8 +146,8 @@ export class PowerMonitor extends Component {
))}
</Table>
</Section>
</Window.Content>
</Window>
</NtosWindow.Content>
</NtosWindow>
);
}
}
@@ -1,6 +1,5 @@
import { useBackend } from '../backend';
import { Fragment } from 'inferno';
import { AnimatedNumber, Box, Button, LabeledList, ProgressBar, NoticeBox, Section } from '../components';
import { AnimatedNumber, Box, Button, LabeledList, ProgressBar, Section } from '../components';
import { Window } from '../layouts';
export const SmokeMachine = (props, context) => {
@@ -5,7 +5,7 @@ import { RADIO_CHANNELS } from '../constants';
import { Button, LabeledList, NumberInput, NoticeBox, Section, Input } from '../components';
import { Window } from '../layouts';
export const TeleInteract = (props, context) => {
export const TelecommsInteraction = (props, context) => {
const { act, data } = useBackend(context);
const {
notice = "",
@@ -3,7 +3,7 @@ import { useBackend } from '../backend';
import { Button, LabeledList, NoticeBox, Section, Tabs, Input } from '../components';
import { Window } from '../layouts';
export const TeleLogBrowser = (props, context) => {
export const TelecommsLogBrowser = (props, context) => {
const { act, data } = useBackend(context);
const {
notice,
@@ -5,7 +5,7 @@ import { Box, Button, LabeledList, NoticeBox, Section, Tabs, Input } from '../co
import { Window } from '../layouts';
export const Telemonitor = (props, context) => {
export const TelecommsMonitor = (props, context) => {
const { act, data } = useBackend(context);
const {
notice,
@@ -4,7 +4,7 @@ import { act as _act } from '../byond';
import { Button, LabeledList, NoticeBox, Section, Tabs, Input } from '../components';
import { Window } from '../layouts';
export const TelePDALog = (props, context) => {
export const TelecommsPDALog = (props, context) => {
const { act, data } = useBackend(context);
const {
network,