mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
[tgui] Linter fixes 2 (#91953)
Part of a series of linter auto fixes from biome. These change typescript imports to specify `type`. It's a safe fix: https://biomejs.dev/linter/rules/use-import-type/ Get [Biome](https://biomejs.dev/guides/manual-installation/) (the executable, at least) `biome lint --write --only "useImportType"` Moving us to a simple linter/formatter and shaving off a number of packages, tech debt
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { describe, expect, it } from 'bun:test';
|
||||
|
||||
import {
|
||||
Action,
|
||||
type Action,
|
||||
applyMiddleware,
|
||||
combineReducers,
|
||||
createAction,
|
||||
createStore,
|
||||
Reducer,
|
||||
type Reducer,
|
||||
} from './redux';
|
||||
|
||||
// Dummy Reducer
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
import { exec } from 'node:child_process';
|
||||
import { promisify } from 'node:util';
|
||||
|
||||
import axios, { AxiosInstance, AxiosResponse } from 'axios';
|
||||
import axios, { type AxiosInstance, type AxiosResponse } from 'axios';
|
||||
|
||||
import { createLogger } from './logging';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { inspect } from 'node:util';
|
||||
|
||||
import { ServerWebSocket } from 'bun';
|
||||
import type { ServerWebSocket } from 'bun';
|
||||
|
||||
import { createLogger, directLog } from '../logging';
|
||||
import { retrace } from './retrace';
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { Store } from 'common/redux';
|
||||
import type { Store } from 'common/redux';
|
||||
import { storage } from 'common/storage';
|
||||
import DOMPurify from 'dompurify';
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
updateMessageCount,
|
||||
} from './actions';
|
||||
import { canPageAcceptType, createMainPage } from './model';
|
||||
import { Page } from './types';
|
||||
import type { Page } from './types';
|
||||
|
||||
const mainPage = createMainPage();
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ import './styles/main.scss';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { dragStartHandler } from 'tgui/drag';
|
||||
import { isEscape, KEY } from 'tgui-core/keys';
|
||||
import { BooleanLike, classes } from 'tgui-core/react';
|
||||
import { type BooleanLike, classes } from 'tgui-core/react';
|
||||
|
||||
import { Channel, ChannelIterator } from './ChannelIterator';
|
||||
import { type Channel, ChannelIterator } from './ChannelIterator';
|
||||
import { ChatHistory } from './ChatHistory';
|
||||
import { LineLength, RADIO_PREFIXES, WindowSize } from './constants';
|
||||
import { getPrefix, windowClose, windowOpen, windowSet } from './helpers';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Channel } from './ChannelIterator';
|
||||
import type { Channel } from './ChannelIterator';
|
||||
import { RADIO_PREFIXES, WindowSize } from './constants';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { createRoot, Root } from 'react-dom/client';
|
||||
import { createRoot, type Root } from 'react-dom/client';
|
||||
|
||||
import { TguiSay } from './TguiSay';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { debounce, throttle } from 'tgui-core/timer';
|
||||
|
||||
import { Channel } from './ChannelIterator';
|
||||
import type { Channel } from './ChannelIterator';
|
||||
|
||||
const SECONDS = 1000;
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
import { Dispatch } from 'common/redux';
|
||||
import type { Dispatch } from 'common/redux';
|
||||
|
||||
import { Action, AnyAction, Middleware } from '../common/redux';
|
||||
import type { Action, AnyAction, Middleware } from '../common/redux';
|
||||
|
||||
const EXCLUDED_PATTERNS = [/v4shim/i];
|
||||
const loadedMappings: Record<string, string> = {};
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
import { perf } from 'common/perf';
|
||||
import { createAction } from 'common/redux';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { setupDrag } from './drag';
|
||||
import { focusMap } from './focus';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
import { storage } from 'common/storage';
|
||||
import { vecAdd, vecMultiply, vecScale, vecSubtract } from 'common/vector';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { createLogger } from './logging';
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@ import {
|
||||
Section,
|
||||
Tabs,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend, useSharedState } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { GenericUplink, Item } from './Uplink/GenericUplink';
|
||||
import { GenericUplink, type Item } from './Uplink/GenericUplink';
|
||||
|
||||
type AbductorConsoleData = {
|
||||
categories: { name: string; items: ConsoleItem[] }[];
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
Stack,
|
||||
Tabs,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
Tabs,
|
||||
Tooltip,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Section,
|
||||
TextArea,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Stack,
|
||||
TextArea,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -3,7 +3,7 @@ import { formatTime } from 'tgui-core/format';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { AdventureDataProvider, AdventureScreen } from './ExodroneConsole';
|
||||
import { type AdventureDataProvider, AdventureScreen } from './ExodroneConsole';
|
||||
|
||||
type Adventure = {
|
||||
ref: string;
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
ProgressBar,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
LabeledList,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -6,7 +6,7 @@ import { AirAlarmControlModes } from './screens/Modes';
|
||||
import { AirAlarmControlScrubbers } from './screens/Scrubbers';
|
||||
import { AirAlarmControlThresholds } from './screens/Thresholds';
|
||||
import { AirAlarmControlVents } from './screens/Vents';
|
||||
import { AlarmScreen } from './types';
|
||||
import type { AlarmScreen } from './types';
|
||||
|
||||
export const AIR_ALARM_ROUTES = {
|
||||
home: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Box, Button, Modal, NumberInput, Section } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { AirAlarmData, EditingModalProps } from './types';
|
||||
import type { AirAlarmData, EditingModalProps } from './types';
|
||||
|
||||
export function AlarmEditingModal(props: EditingModalProps) {
|
||||
const { act } = useBackend<AirAlarmData>();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { LabeledList, Section } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { AirAlarmData } from './types';
|
||||
import type { AirAlarmData } from './types';
|
||||
|
||||
const dangerMap = {
|
||||
0: {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { InterfaceLockNoticeBox } from '../common/InterfaceLockNoticeBox';
|
||||
import { AirAlarmControl } from './AlarmControl';
|
||||
import { AlarmEditingModal } from './AlarmModal';
|
||||
import { AirAlarmStatus } from './AlarmStatus';
|
||||
import { ActiveModal, AirAlarmData } from './types';
|
||||
import type { ActiveModal, AirAlarmData } from './types';
|
||||
import { ModalContext } from './useModal';
|
||||
|
||||
export function AirAlarm(props) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Dispatch, SetStateAction } from 'react';
|
||||
import type { Dispatch, SetStateAction } from 'react';
|
||||
import { useBackend } from 'tgui/backend';
|
||||
import { Button, Stack } from 'tgui-core/components';
|
||||
|
||||
import { AirAlarmData, AlarmScreen } from '../types';
|
||||
import type { AirAlarmData, AlarmScreen } from '../types';
|
||||
|
||||
type Props = {
|
||||
setScreen?: Dispatch<SetStateAction<AlarmScreen>>;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useBackend } from 'tgui/backend';
|
||||
import { Button, NoticeBox, Stack } from 'tgui-core/components';
|
||||
|
||||
import { AirAlarmData } from '../types';
|
||||
import type { AirAlarmData } from '../types';
|
||||
|
||||
export function AirAlarmControlModes(props) {
|
||||
const { act, data } = useBackend<AirAlarmData>();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useBackend } from 'tgui/backend';
|
||||
import { NoticeBox, VirtualList } from 'tgui-core/components';
|
||||
|
||||
import { Scrubber } from '../../common/AtmosControls';
|
||||
import { AirAlarmData } from '../types';
|
||||
import type { AirAlarmData } from '../types';
|
||||
|
||||
export function AirAlarmControlScrubbers(props) {
|
||||
const { data } = useBackend<AirAlarmData>();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useBackend } from 'tgui/backend';
|
||||
import { NoticeBox, VirtualList } from 'tgui-core/components';
|
||||
|
||||
import { Vent } from '../../common/AtmosControls';
|
||||
import { AirAlarmData } from '../types';
|
||||
import type { AirAlarmData } from '../types';
|
||||
|
||||
export function AirAlarmControlVents(props) {
|
||||
const { data } = useBackend<AirAlarmData>();
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { ScrubberProps } from '../common/AtmosControls';
|
||||
import { VentProps } from '../common/AtmosControls';
|
||||
import { AIR_ALARM_ROUTES } from './AlarmControl';
|
||||
import type { ScrubberProps } from '../common/AtmosControls';
|
||||
import type { VentProps } from '../common/AtmosControls';
|
||||
import type { AIR_ALARM_ROUTES } from './AlarmControl';
|
||||
|
||||
type AlarmStatus = 0 | 1 | 2;
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { createContext, Dispatch, SetStateAction, useContext } from 'react';
|
||||
import {
|
||||
createContext,
|
||||
type Dispatch,
|
||||
type SetStateAction,
|
||||
useContext,
|
||||
} from 'react';
|
||||
|
||||
import { ActiveModal } from './types';
|
||||
import type { ActiveModal } from './types';
|
||||
|
||||
type ModalContextType = [ActiveModal, Dispatch<SetStateAction<ActiveModal>>];
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Button, NoticeBox, Section, Stack } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -5,11 +5,11 @@ import {
|
||||
Section,
|
||||
Stack,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { AccessConfig, Region } from './common/AccessConfig';
|
||||
import { AccessConfig, type Region } from './common/AccessConfig';
|
||||
|
||||
type Data = {
|
||||
accesses: string[];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { KeyboardEvent, useState } from 'react';
|
||||
import { type KeyboardEvent, useState } from 'react';
|
||||
import { Autofocus, Box, Button, Section, Stack } from 'tgui-core/components';
|
||||
import { isEscape, KEY } from 'tgui-core/keys';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -9,8 +9,8 @@ import {
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Rules } from './AntagInfoRules'; // SKYRAT EDIT ADDITION
|
||||
import { Objective } from './common/Objectives';
|
||||
import { Rules } from './AntagInfoRules'; // BUBBER EDIT ADDITION
|
||||
import type { Objective } from './common/Objectives';
|
||||
|
||||
type Data = {
|
||||
color: string;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Box, Icon, Section, Stack } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Objective, ObjectivePrintout } from './common/Objectives';
|
||||
import { type Objective, ObjectivePrintout } from './common/Objectives';
|
||||
|
||||
type Data = {
|
||||
objectives: Objective[];
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Section, Stack } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Objective, ObjectivePrintout } from './common/Objectives';
|
||||
import { type Objective, ObjectivePrintout } from './common/Objectives';
|
||||
|
||||
type Info = {
|
||||
antag_name: string;
|
||||
|
||||
@@ -7,13 +7,13 @@ import {
|
||||
Section,
|
||||
Stack,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Rules } from './AntagInfoRules'; // SKYRAT EDIT ADDITION
|
||||
import {
|
||||
Objective,
|
||||
type Objective,
|
||||
ObjectivePrintout,
|
||||
ReplaceObjectivesButton,
|
||||
} from './common/Objectives';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Box, Section, Stack } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Objective, ObjectivePrintout } from './common/Objectives';
|
||||
import { type Objective, ObjectivePrintout } from './common/Objectives';
|
||||
|
||||
const jauntstyle = {
|
||||
color: 'lightblue',
|
||||
|
||||
@@ -2,8 +2,8 @@ import { Section, Stack } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Rules } from './AntagInfoRules'; // SKYRAT EDIT ADDITION
|
||||
import { Objective, ObjectivePrintout } from './common/Objectives';
|
||||
import { Rules } from './AntagInfoRules'; // BUBBER EDIT ADDITION
|
||||
import { type Objective, ObjectivePrintout } from './common/Objectives';
|
||||
|
||||
type Info = {
|
||||
antag_name: string;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Section, Stack } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Objective } from './common/Objectives';
|
||||
import type { Objective } from './common/Objectives';
|
||||
|
||||
type Data = {
|
||||
antag_name: string;
|
||||
|
||||
@@ -8,13 +8,13 @@ import {
|
||||
Stack,
|
||||
Tabs,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Rules } from './AntagInfoRules'; // SKYRAT EDIT ADDITION
|
||||
import {
|
||||
Objective,
|
||||
type Objective,
|
||||
ObjectivePrintout,
|
||||
ReplaceObjectivesButton,
|
||||
} from './common/Objectives';
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { useState } from 'react';
|
||||
import { BlockQuote, Button, Section, Stack, Tabs } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Rules } from './AntagInfoRules'; // SKYRAT EDIT ADDITION
|
||||
import { MalfAiModules } from './common/MalfAiModules';
|
||||
import {
|
||||
Objective,
|
||||
type Objective,
|
||||
ObjectivePrintout,
|
||||
ReplaceObjectivesButton,
|
||||
} from './common/Objectives';
|
||||
import { Item } from './Uplink/GenericUplink';
|
||||
import type { Item } from './Uplink/GenericUplink';
|
||||
|
||||
const allystyle = {
|
||||
fontWeight: 'bold',
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Icon, Section, Stack } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Rules } from './AntagInfoRules'; // SKYRAT EDIT ADDITION
|
||||
import {
|
||||
Objective,
|
||||
type Objective,
|
||||
ObjectivePrintout,
|
||||
ReplaceObjectivesButton,
|
||||
} from './common/Objectives';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Icon, Section, Stack } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Objective, ObjectivePrintout } from './common/Objectives';
|
||||
import { type Objective, ObjectivePrintout } from './common/Objectives';
|
||||
|
||||
type Info = {
|
||||
objectives: Objective[];
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Section, Stack } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import {
|
||||
Objective,
|
||||
type Objective,
|
||||
ObjectivePrintout,
|
||||
ReplaceObjectivesButton,
|
||||
} from './common/Objectives';
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { BlockQuote, Button, Section, Stack } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Rules } from './AntagInfoRules'; // SKYRAT EDIT ADDITION
|
||||
import { Objective, ObjectivePrintout } from './common/Objectives';
|
||||
import { Rules } from './AntagInfoRules'; // BUBBER EDIT ADDITION
|
||||
import { type Objective, ObjectivePrintout } from './common/Objectives';
|
||||
|
||||
const allystyle = {
|
||||
fontWeight: 'bold',
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Box, Section, Stack } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Rules } from './AntagInfoRules'; // SKYRAT EDIT ADDITION
|
||||
import {
|
||||
Objective,
|
||||
type Objective,
|
||||
ObjectivePrintout,
|
||||
ReplaceObjectivesButton,
|
||||
} from './common/Objectives';
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
Table,
|
||||
Tabs,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
Stack,
|
||||
Tooltip,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
import { capitalizeFirst } from 'tgui-core/string';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
AtmosHandbookContent,
|
||||
atmosHandbookHooks,
|
||||
} from './common/AtmosHandbook';
|
||||
import { Gasmix, GasmixParser } from './common/GasmixParser';
|
||||
import { type Gasmix, GasmixParser } from './common/GasmixParser';
|
||||
|
||||
type Chamber = {
|
||||
id: string;
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
NumberInput,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { getGasLabel } from '../constants';
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
NumberInput,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
NumberInput,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
NumberInput,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
NumberInput,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -9,15 +9,15 @@ import {
|
||||
Stack,
|
||||
Tooltip,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike, classes } from 'tgui-core/react';
|
||||
import { type BooleanLike, classes } from 'tgui-core/react';
|
||||
import { capitalize } from 'tgui-core/string';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { DesignBrowser } from './Fabrication/DesignBrowser';
|
||||
import { MaterialCostSequence } from './Fabrication/MaterialCostSequence';
|
||||
import { Design, MaterialMap } from './Fabrication/Types';
|
||||
import { Material } from './Fabrication/Types';
|
||||
import type { Design, MaterialMap } from './Fabrication/Types';
|
||||
import type { Material } from './Fabrication/Types';
|
||||
|
||||
type AutolatheDesign = Design & {
|
||||
customMaterials: BooleanLike;
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
Stack,
|
||||
Table,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState } from 'react';
|
||||
import { Button, NoticeBox, Section, Table, Tabs } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { formatMoney } from 'tgui-core/format';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
Stack,
|
||||
Table,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
Table,
|
||||
Tabs,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike, classes } from 'tgui-core/react';
|
||||
import { type BooleanLike, classes } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Box, Button, Divider, Section, Stack } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
NoticeBox,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
Stack,
|
||||
} from 'tgui-core/components';
|
||||
import { toFixed } from 'tgui-core/math';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { getGasColor } from '../constants';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
Table,
|
||||
} from 'tgui-core/components';
|
||||
import { toFixed } from 'tgui-core/math';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { getGasColor } from '../constants';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Button, Section } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Box, Button, Flex, Section, Stack } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
Section,
|
||||
Stack,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike, classes } from 'tgui-core/react';
|
||||
import { type BooleanLike, classes } from 'tgui-core/react';
|
||||
import { createSearch } from 'tgui-core/string';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
} from 'tgui-core/components';
|
||||
import { formatSiUnit } from 'tgui-core/format';
|
||||
import { toFixed } from 'tgui-core/math';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, createRef, RefObject, useState } from 'react';
|
||||
import { Component, createRef, type RefObject, useState } from 'react';
|
||||
import { Color } from 'tgui-core/color';
|
||||
import {
|
||||
Box,
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Box, Button } from 'tgui-core/components';
|
||||
import { formatMoney } from 'tgui-core/format';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { CargoData } from './types';
|
||||
import type { CargoData } from './types';
|
||||
|
||||
export function CargoCartButtons(props) {
|
||||
const { act, data } = useBackend<CargoData>();
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
import { formatMoney } from 'tgui-core/format';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { CargoData } from './types';
|
||||
import type { CargoData } from './types';
|
||||
|
||||
export function CargoCart(props) {
|
||||
const { act, data } = useBackend<CargoData>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { sortBy } from 'es-toolkit';
|
||||
import { Dispatch, SetStateAction, useMemo, useState } from 'react';
|
||||
import { type Dispatch, type SetStateAction, useMemo, useState } from 'react';
|
||||
import {
|
||||
BlockQuote,
|
||||
Button,
|
||||
@@ -16,7 +16,7 @@ import { formatMoney } from 'tgui-core/format';
|
||||
import { useBackend, useSharedState } from '../../backend';
|
||||
import { SearchBar } from '../common/SearchBar';
|
||||
import { searchForSupplies } from './helpers';
|
||||
import { CargoData, Supply, SupplyCategory } from './types';
|
||||
import type { CargoData, Supply, SupplyCategory } from './types';
|
||||
|
||||
type Props = {
|
||||
express?: boolean;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { formatMoney } from 'tgui-core/format';
|
||||
import { decodeHtmlEntities } from 'tgui-core/string';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { CargoData } from './types';
|
||||
import type { CargoData } from './types';
|
||||
|
||||
export function CargoRequests(props) {
|
||||
const { act, data } = useBackend<CargoData>();
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
import { formatMoney } from 'tgui-core/format';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { CargoData } from './types';
|
||||
import type { CargoData } from './types';
|
||||
|
||||
export function CargoStatus(props) {
|
||||
const { act, data } = useBackend<CargoData>();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { filter } from 'es-toolkit/compat';
|
||||
import { flow } from 'tgui-core/fp';
|
||||
|
||||
import { Supply, SupplyCategory } from './types';
|
||||
import type { Supply, SupplyCategory } from './types';
|
||||
|
||||
/**
|
||||
* Take entire supplies tree
|
||||
|
||||
@@ -9,7 +9,7 @@ import { CargoCatalog } from './CargoCatalog';
|
||||
import { CargoHelp } from './CargoHelp';
|
||||
import { CargoRequests } from './CargoRequests';
|
||||
import { CargoStatus } from './CargoStatus';
|
||||
import { CargoData } from './types';
|
||||
import type { CargoData } from './types';
|
||||
|
||||
enum TAB {
|
||||
Catalog = 'catalog',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
export type CargoData = {
|
||||
amount_by_name: Record<string, number> | undefined;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
Section,
|
||||
Stack,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
LabeledList,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Knob, LabeledControls } from 'tgui-core/components';
|
||||
import { toFixed } from 'tgui-core/math';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { PodDelay, PodLauncherData } from './types';
|
||||
import type { PodDelay, PodLauncherData } from './types';
|
||||
|
||||
type Props = {
|
||||
delay_list: PodDelay[];
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Button, Section } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { BAYS } from './constants';
|
||||
import { PodLauncherData } from './types';
|
||||
import type { PodLauncherData } from './types';
|
||||
|
||||
export function PodBays(props) {
|
||||
const { act, data } = useBackend<PodLauncherData>();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Box, Button } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { useCompact } from './hooks';
|
||||
import { PodLauncherData } from './types';
|
||||
import type { PodLauncherData } from './types';
|
||||
|
||||
export function PodLaunch(props) {
|
||||
const { act, data } = useBackend<PodLauncherData>();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Button, Section } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { SOUNDS } from './constants';
|
||||
import { PodLauncherData } from './types';
|
||||
import type { PodLauncherData } from './types';
|
||||
|
||||
export function PodSounds(props) {
|
||||
const { act, data } = useBackend<PodLauncherData>();
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Box, Button, Section, Stack } from 'tgui-core/components';
|
||||
import { useBackend } from '../../backend';
|
||||
import { EFFECTS_ALL, POD_GREY } from './constants';
|
||||
import { useCompact } from './hooks';
|
||||
import { PodEffect, PodLauncherData } from './types';
|
||||
import type { PodEffect, PodLauncherData } from './types';
|
||||
|
||||
export function PodStatusPage(props) {
|
||||
const [compact] = useCompact();
|
||||
|
||||
@@ -12,7 +12,7 @@ import { createUuid } from 'tgui-core/uuid';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { POD_GREY } from './constants';
|
||||
import { PodLauncherData } from './types';
|
||||
import type { PodLauncherData } from './types';
|
||||
|
||||
type Preset = {
|
||||
hue: number;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Section, Stack } from 'tgui-core/components';
|
||||
import { useBackend } from '../../backend';
|
||||
import { REVERSE_OPTIONS } from './constants';
|
||||
import { useTab } from './hooks';
|
||||
import { PodLauncherData } from './types';
|
||||
import type { PodLauncherData } from './types';
|
||||
|
||||
export function ReverseMenu(props) {
|
||||
const { act, data } = useBackend<PodLauncherData>();
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Box, Button, Section } from 'tgui-core/components';
|
||||
import { classes } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { PodLauncherData } from './types';
|
||||
import type { PodLauncherData } from './types';
|
||||
|
||||
export function StylePage(props) {
|
||||
const { act, data } = useBackend<PodLauncherData>();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Box, Button } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../../backend';
|
||||
import { PodLauncherData } from './types';
|
||||
import type { PodLauncherData } from './types';
|
||||
|
||||
export function TabPod(props) {
|
||||
return (
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Divider, Section } from 'tgui-core/components';
|
||||
import { useBackend } from '../../backend';
|
||||
import { DELAYS, REV_DELAYS } from './constants';
|
||||
import { DelayHelper } from './DelayHelper';
|
||||
import { PodLauncherData } from './types';
|
||||
import type { PodLauncherData } from './types';
|
||||
|
||||
export function Timing(props) {
|
||||
const { act, data } = useBackend<PodLauncherData>();
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, ByondUi, Section, Stack } from 'tgui-core/components';
|
||||
import { useBackend } from '../../backend';
|
||||
import { POD_GREY, TABPAGES } from './constants';
|
||||
import { useTab } from './hooks';
|
||||
import { PodLauncherData } from './types';
|
||||
import type { PodLauncherData } from './types';
|
||||
|
||||
export function ViewTabHolder(props) {
|
||||
const { act, data } = useBackend<PodLauncherData>();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { TabBay, TabDrop, TabPod } from './Tabs';
|
||||
import { PodDelay, PodEffect } from './types';
|
||||
import type { PodDelay, PodEffect } from './types';
|
||||
|
||||
export const POD_GREY = {
|
||||
color: 'grey',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ComponentProps } from 'react';
|
||||
import { Floating } from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { ComponentProps } from 'react';
|
||||
import type { Floating } from 'tgui-core/components';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
export type PodLauncherData = {
|
||||
bayNumber: string;
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
NumberInput,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Button, NumberInput, Section } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Beaker, BeakerDisplay } from './common/BeakerDisplay';
|
||||
import { type Beaker, BeakerDisplay } from './common/BeakerDisplay';
|
||||
|
||||
type Data = {
|
||||
amount: number;
|
||||
|
||||
@@ -7,12 +7,12 @@ import {
|
||||
ProgressBar,
|
||||
Section,
|
||||
} from 'tgui-core/components';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
import { toTitleCase } from 'tgui-core/string';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { Beaker, BeakerDisplay } from './common/BeakerDisplay';
|
||||
import { type Beaker, BeakerDisplay } from './common/BeakerDisplay';
|
||||
|
||||
type DispensableReagent = {
|
||||
title: string;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Fragment } from 'react';
|
||||
import { Button, Section, Stack } from 'tgui-core/components';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { CssColor } from '../constants';
|
||||
import type { CssColor } from '../constants';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
type Data = {
|
||||
|
||||
@@ -11,12 +11,12 @@ import {
|
||||
Table,
|
||||
} from 'tgui-core/components';
|
||||
import { round, toFixed } from 'tgui-core/math';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { COLORS } from '../constants';
|
||||
import { Window } from '../layouts';
|
||||
import { Beaker, BeakerSectionDisplay } from './common/BeakerDisplay';
|
||||
import { type Beaker, BeakerSectionDisplay } from './common/BeakerDisplay';
|
||||
|
||||
export type ActiveReaction = {
|
||||
name: string;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
Stack,
|
||||
} from 'tgui-core/components';
|
||||
import { round, toFixed } from 'tgui-core/math';
|
||||
import { BooleanLike } from 'tgui-core/react';
|
||||
import type { BooleanLike } from 'tgui-core/react';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
@@ -13,7 +13,7 @@ import { round, toFixed } from 'tgui-core/math';
|
||||
|
||||
import { useBackend } from '../backend';
|
||||
import { Window } from '../layouts';
|
||||
import { MixingData, Reagent } from './ChemMixingChamber';
|
||||
import type { MixingData, Reagent } from './ChemMixingChamber';
|
||||
|
||||
type ReactingData = MixingData & {
|
||||
ph: number;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user