mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13.git
synced 2026-08-26 11:17:01 +01:00
update
This commit is contained in:
@@ -135,7 +135,7 @@ export const SampleInterface = (props) => {
|
||||
color,
|
||||
} = data;
|
||||
return (
|
||||
<Window resizable>
|
||||
<Window >
|
||||
<Window.Content scrollable>
|
||||
<Section title="Health status">
|
||||
<LabeledList>
|
||||
@@ -261,7 +261,7 @@ import { Window } from '../layouts';
|
||||
|
||||
export const SampleInterface = (props) => {
|
||||
return (
|
||||
<Window resizable>
|
||||
<Window >
|
||||
<Window.Content scrollable>
|
||||
<HealthStatus user="Jerry" />
|
||||
</Window.Content>
|
||||
@@ -338,7 +338,7 @@ export const SampleInterface = (props) => {
|
||||
color,
|
||||
} = data;
|
||||
return (
|
||||
<Window resizable>
|
||||
<Window >
|
||||
<Window.Content scrollable>
|
||||
<Section title="Health status">
|
||||
<LabeledList>
|
||||
|
||||
@@ -32,13 +32,12 @@ export const AIAnnouncement = (props) => {
|
||||
<Window
|
||||
width={630}
|
||||
height={175}
|
||||
resizable
|
||||
title="Vox Announcement">
|
||||
<Window.Content>
|
||||
<Section fill overflow="auto">
|
||||
<Stack vertical>
|
||||
<Stack.Item>
|
||||
<font color="red">WARNING:</font> Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'
|
||||
<span color="red">WARNING:</span> Misuse of this verb can result in you being job banned. More help is available in 'Announcement Help'
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
<Tabs fluid textAlign="center">
|
||||
@@ -61,8 +60,8 @@ export const AIAnnouncement = (props) => {
|
||||
fluid
|
||||
value={last_announcement}
|
||||
placeholder="Announce something..."
|
||||
onInput={(e, value) => set_announcement_input(value)}
|
||||
onEnter={(e, value) => act("announce", {
|
||||
onChange={(value) => set_announcement_input(value)}
|
||||
onEnter={(value) => act("announce", {
|
||||
"vox_type": Object.keys(vox_types)[current_page],
|
||||
"to_speak": value,
|
||||
})}
|
||||
@@ -78,7 +77,7 @@ export const AIAnnouncement = (props) => {
|
||||
</Stack.Item>
|
||||
<Stack.Item>
|
||||
{missing_words.length
|
||||
? <div>These words are not available on the announcement system: <font color="red">{missing_words.join(" ")}</font></div> : null}
|
||||
? <div>These words are not available on the announcement system: <span color="red">{missing_words.join(" ")}</span></div> : null}
|
||||
</Stack.Item>
|
||||
</Stack>
|
||||
</Section>
|
||||
|
||||
@@ -27,7 +27,7 @@ type AdventureBrowserData = AdventureDataProvider & {
|
||||
const AdventureEntry = (props) => {
|
||||
const { data, act } = useBackend<AdventureBrowserData>();
|
||||
const { entry_ref, close }: { entry_ref: string, close: () => void } = props;
|
||||
const entry = data.adventures.find(x => x.ref === entry_ref);
|
||||
const entry: any = data.adventures.find(x => x.ref === entry_ref);
|
||||
return (
|
||||
<Section>
|
||||
<LabeledList>
|
||||
|
||||
@@ -115,7 +115,7 @@ const AIR_ALARM_ROUTES = {
|
||||
};
|
||||
|
||||
const AirAlarmControl = (props) => {
|
||||
const [screen, setScreen] = useLocalState('screen');
|
||||
const [screen, setScreen] = useLocalState('screen', 'home');
|
||||
const route = AIR_ALARM_ROUTES[screen] || AIR_ALARM_ROUTES.home;
|
||||
const Component = route.component();
|
||||
return (
|
||||
@@ -125,7 +125,7 @@ const AirAlarmControl = (props) => {
|
||||
<Button
|
||||
icon="arrow-left"
|
||||
content="Back"
|
||||
onClick={() => setScreen()} />
|
||||
onClick={() => setScreen('home')} />
|
||||
)}>
|
||||
<Component />
|
||||
</Section>
|
||||
@@ -138,7 +138,7 @@ const AirAlarmControl = (props) => {
|
||||
|
||||
const AirAlarmControlHome = (props) => {
|
||||
const { act, data } = useBackend<any>();
|
||||
const [screen, setScreen] = useLocalState('screen');
|
||||
const [screen, setScreen] = useLocalState('screen', 'home');
|
||||
const {
|
||||
mode,
|
||||
atmos_alarm,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { map, sortBy } from 'common/collections';
|
||||
import { flow } from 'common/fp';
|
||||
import { pureComponentHooks } from 'tgui-core/react';
|
||||
import { useBackend, useLocalState } from '../backend';
|
||||
import { Box, Button, Dimmer, Flex, Icon, Table, Tabs } from 'tgui-core/components';
|
||||
import { Window } from '../layouts';
|
||||
@@ -301,5 +300,3 @@ const statusChange = status => {
|
||||
return status === 0 ? 2 : status === 2 ? 3 : 0;
|
||||
};
|
||||
|
||||
AreaStatusColorButton.defaultHooks = pureComponentHooks;
|
||||
|
||||
|
||||
@@ -86,9 +86,6 @@ export const AtmosControlConsole = (props) => {
|
||||
minValue={0}
|
||||
maxValue={data.maxOutputPressure}
|
||||
step={10}
|
||||
// This takes an exceptionally long time to update
|
||||
// due to being an async signal
|
||||
suppressFlicker={2000}
|
||||
onChange={(value) => act('pressure', {
|
||||
pressure: value,
|
||||
})} />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useBackend } from '../backend';
|
||||
import { Button, LabeledList, NumberInput, Section } from 'tgui-core/components';
|
||||
import { getGasLabel } from '../constants';
|
||||
import { Window } from '../layouts';
|
||||
import { getGasLabel } from 'tgui-core/constants';
|
||||
|
||||
export const AtmosFilter = (props) => {
|
||||
const { act, data } = useBackend<any>();
|
||||
@@ -22,6 +22,7 @@ export const AtmosFilter = (props) => {
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Transfer Rate">
|
||||
<NumberInput
|
||||
step={0.1}
|
||||
animated
|
||||
value={parseFloat(data.rate)}
|
||||
width="63px"
|
||||
|
||||
@@ -22,6 +22,7 @@ export const AtmosPump = (props) => {
|
||||
<LabeledList.Item label="Transfer Rate">
|
||||
<NumberInput
|
||||
animated
|
||||
step={0.1}
|
||||
value={parseFloat(data.rate)}
|
||||
width="63px"
|
||||
unit="L/s"
|
||||
|
||||
@@ -175,12 +175,11 @@ export const Autolathe = (props) => {
|
||||
<Table.Cell>
|
||||
<Button.Input
|
||||
content={"[Max:" + design.maxmult + ']'}
|
||||
maxValue={design.maxmult}
|
||||
disabled={design.buildable}
|
||||
backgroundColor={design.buildable ? '#999999' : 'default'}
|
||||
onCommit={(e, value) => act('make', {
|
||||
onCommit={(value) => act('make', {
|
||||
id: design.id,
|
||||
multiplier: value,
|
||||
multiplier: Number(value),
|
||||
})} />
|
||||
</Table.Cell>
|
||||
{design.cost}
|
||||
|
||||
@@ -72,7 +72,7 @@ export const AuxBaseConsoleContent = (props) => {
|
||||
No connected turrets
|
||||
</NoticeBox>
|
||||
) : (
|
||||
<Table cellpadding="3" textAlign="center">
|
||||
<Table style={{ padding: "3px" }} textAlign="center">
|
||||
<Table.Row header>
|
||||
<Table.Cell>Unit</Table.Cell>
|
||||
<Table.Cell>Condition</Table.Cell>
|
||||
|
||||
@@ -5,7 +5,10 @@ import { Window } from '../layouts';
|
||||
|
||||
const PX_PER_UNIT = 24;
|
||||
|
||||
class PaintCanvas extends Component {
|
||||
class PaintCanvas extends Component<any, any> {
|
||||
canvasRef: any;
|
||||
onCVClick: any;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.canvasRef = createRef();
|
||||
@@ -51,8 +54,8 @@ class PaintCanvas extends Component {
|
||||
const y_size = this.props.value[0].length;
|
||||
const x_scale = this.canvasRef.current.width / x_size;
|
||||
const y_scale = this.canvasRef.current.height / y_size;
|
||||
const x = Math.floor(event.offsetX / x_scale)+1;
|
||||
const y = Math.floor(event.offsetY / y_scale)+1;
|
||||
const x = Math.floor(event.offsetX / x_scale) + 1;
|
||||
const y = Math.floor(event.offsetY / y_scale) + 1;
|
||||
this.onCVClick(x, y);
|
||||
}
|
||||
|
||||
|
||||
@@ -752,7 +752,7 @@ type AdventureScreenProps = {
|
||||
hide_status?: boolean
|
||||
}
|
||||
|
||||
export const AdventureScreen = (props: AdventureScreenProps, context) => {
|
||||
export const AdventureScreen = (props: AdventureScreenProps) => {
|
||||
const { act, data } = useBackend<AdventureDataProvider>();
|
||||
const {
|
||||
adventure_data,
|
||||
|
||||
@@ -10,7 +10,7 @@ export const RbmkControlRods = (props) => {
|
||||
const desiredK = data.desiredK;
|
||||
return (
|
||||
<Window
|
||||
resizable
|
||||
|
||||
theme="ntos"
|
||||
width={300}
|
||||
height={300}>
|
||||
|
||||
Reference in New Issue
Block a user