From 697ae2142bbb9fa58d08ccb4b959661e771dd442 Mon Sep 17 00:00:00 2001 From: Jeremiah <42397676+jlsnow301@users.noreply.github.com> Date: Fri, 14 Jun 2024 17:45:40 -0700 Subject: [PATCH] tgui: another giant pr: eslint changes (#981) * linter change * sorts --- tgui/.eslintrc.yml | 225 +----------------- tgui/package.json | 2 + tgui/packages/tgui-bench/entrypoint.tsx | 4 +- tgui/packages/tgui-dev-server/dreamseeker.js | 1 + tgui/packages/tgui-dev-server/index.js | 2 +- tgui/packages/tgui-dev-server/link/retrace.js | 1 + tgui/packages/tgui-dev-server/link/server.js | 1 + tgui/packages/tgui-dev-server/reloader.js | 1 + tgui/packages/tgui-dev-server/util.js | 1 + tgui/packages/tgui-dev-server/webpack.js | 1 + tgui/packages/tgui-dev-server/winreg.js | 1 + tgui/packages/tgui-panel/Panel.tsx | 1 + .../tgui-panel/audio/NowPlayingWidget.jsx | 1 + tgui/packages/tgui-panel/audio/hooks.js | 1 + .../tgui-panel/chat/ChatPageSettings.jsx | 1 + tgui/packages/tgui-panel/chat/ChatPanel.jsx | 1 + tgui/packages/tgui-panel/chat/ChatTabs.jsx | 7 +- tgui/packages/tgui-panel/chat/actions.js | 1 + tgui/packages/tgui-panel/chat/middleware.js | 3 +- tgui/packages/tgui-panel/chat/model.js | 3 +- tgui/packages/tgui-panel/chat/reducer.js | 2 +- tgui/packages/tgui-panel/chat/renderer.jsx | 7 +- tgui/packages/tgui-panel/game/hooks.js | 1 + tgui/packages/tgui-panel/game/middleware.js | 2 +- tgui/packages/tgui-panel/index.jsx | 5 +- .../tgui-panel/ping/PingIndicator.jsx | 1 + tgui/packages/tgui-panel/ping/reducer.js | 1 + .../tgui-panel/settings/SettingsPanel.jsx | 1 + tgui/packages/tgui-panel/settings/hooks.js | 3 +- .../tgui-panel/settings/middleware.js | 3 +- tgui/packages/tgui-panel/themes.js | 2 +- tgui/packages/tgui/backend.ts | 25 +- tgui/packages/tgui/components/BlockQuote.jsx | 1 + .../tgui/components/BodyZoneSelector.tsx | 11 +- tgui/packages/tgui/components/Button.jsx | 1 + tgui/packages/tgui/components/ByondUi.jsx | 1 + tgui/packages/tgui/components/Collapsible.jsx | 1 + tgui/packages/tgui/components/ColorBox.jsx | 1 + tgui/packages/tgui/components/DMIcon.tsx | 2 +- tgui/packages/tgui/components/Dimmer.jsx | 1 + .../tgui/components/DraggableControl.jsx | 1 + tgui/packages/tgui/components/Dropdown.jsx | 1 + tgui/packages/tgui/components/FitText.tsx | 4 +- tgui/packages/tgui/components/Flex.tsx | 11 +- tgui/packages/tgui/components/Icon.jsx | 1 + .../tgui/components/InfinitePlane.jsx | 7 +- tgui/packages/tgui/components/Input.jsx | 3 +- tgui/packages/tgui/components/KeyListener.tsx | 1 + tgui/packages/tgui/components/Knob.jsx | 1 + tgui/packages/tgui/components/LabeledList.tsx | 11 +- tgui/packages/tgui/components/Modal.jsx | 1 + tgui/packages/tgui/components/NoticeBox.jsx | 1 + tgui/packages/tgui/components/NumberInput.jsx | 1 + tgui/packages/tgui/components/Popper.tsx | 4 +- tgui/packages/tgui/components/ProgressBar.jsx | 5 +- .../tgui/components/RestrictedInput.jsx | 5 +- tgui/packages/tgui/components/RoundGauge.jsx | 1 + tgui/packages/tgui/components/Section.tsx | 7 +- tgui/packages/tgui/components/Slider.jsx | 1 + tgui/packages/tgui/components/Stack.tsx | 3 +- tgui/packages/tgui/components/Table.jsx | 1 + tgui/packages/tgui/components/Tabs.jsx | 1 + tgui/packages/tgui/components/TextArea.jsx | 3 +- tgui/packages/tgui/components/TimeDisplay.jsx | 3 +- tgui/packages/tgui/components/Tooltip.tsx | 2 +- .../tgui/components/TrackOutsideClicks.tsx | 2 +- tgui/packages/tgui/components/index.ts | 6 +- tgui/packages/tgui/debug/hooks.js | 1 + tgui/packages/tgui/debug/middleware.js | 1 + tgui/packages/tgui/drag.js | 3 +- tgui/packages/tgui/hotkeys.ts | 1 + tgui/packages/tgui/index.jsx | 5 +- .../tgui/interfaces/AccountingConsole.jsx | 4 +- tgui/packages/tgui/interfaces/Adminhelp.tsx | 5 +- .../tgui/interfaces/AdventureBrowser.tsx | 24 +- .../tgui/interfaces/AiVoiceChanger.jsx | 2 +- tgui/packages/tgui/interfaces/AirAlarm.jsx | 1 + tgui/packages/tgui/interfaces/AlertModal.tsx | 4 +- .../tgui/interfaces/AnomalyRefinery.jsx | 4 +- .../tgui/interfaces/AntagInfoBrainwashed.tsx | 9 +- .../tgui/interfaces/AntagInfoBrother.tsx | 11 +- .../tgui/interfaces/AntagInfoChangeling.tsx | 4 +- .../tgui/interfaces/AntagInfoDemon.tsx | 11 +- .../tgui/interfaces/AntagInfoGangmember.tsx | 2 +- .../tgui/interfaces/AntagInfoGeneric.tsx | 9 +- .../tgui/interfaces/AntagInfoHeretic.tsx | 21 +- .../tgui/interfaces/AntagInfoMalf.tsx | 19 +- .../tgui/interfaces/AntagInfoSeparatist.tsx | 4 +- .../tgui/interfaces/AntagInfoThief.tsx | 9 +- .../tgui/interfaces/AntagInfoTraitor.tsx | 19 +- .../tgui/interfaces/AntagInfoWizard.tsx | 9 +- tgui/packages/tgui/interfaces/ApcControl.jsx | 1 + .../tgui/interfaces/AtmosControlConsole.tsx | 8 +- .../tgui/interfaces/AtmosControlPanel.jsx | 1 + tgui/packages/tgui/interfaces/AtmosFilter.jsx | 4 +- tgui/packages/tgui/interfaces/AtmosMixer.jsx | 4 +- tgui/packages/tgui/interfaces/AtmosPump.jsx | 4 +- tgui/packages/tgui/interfaces/Autolathe.jsx | 17 +- .../packages/tgui/interfaces/Biogenerator.jsx | 1 + .../tgui/interfaces/BluespaceSender.jsx | 3 +- .../tgui/interfaces/BluespaceVendor.jsx | 1 + tgui/packages/tgui/interfaces/BountyBoard.jsx | 4 +- tgui/packages/tgui/interfaces/CTFPanel.jsx | 2 +- .../tgui/interfaces/CameraConsole.jsx | 1 + tgui/packages/tgui/interfaces/Canister.jsx | 1 + tgui/packages/tgui/interfaces/Canvas.tsx | 25 +- tgui/packages/tgui/interfaces/Cargo.jsx | 3 +- .../tgui/interfaces/CellularEmporium.tsx | 12 +- .../tgui/interfaces/CentcomPodLauncher.jsx | 1 + .../tgui/interfaces/ChameleonCard.jsx | 2 +- tgui/packages/tgui/interfaces/Changelog.jsx | 9 +- tgui/packages/tgui/interfaces/ChemFilter.jsx | 1 + tgui/packages/tgui/interfaces/ChemHeater.jsx | 1 + .../tgui/interfaces/ChemReactionChamber.jsx | 5 +- .../tgui/interfaces/ChemRecipeDebug.jsx | 1 + .../packages/tgui/interfaces/ChemSplitter.jsx | 1 + .../tgui/interfaces/ChemSynthesizer.jsx | 1 + .../tgui/interfaces/CircuitAccessChecker.jsx | 2 +- .../tgui/interfaces/CircuitAdminPanel.tsx | 5 +- .../tgui/interfaces/CircuitModule.jsx | 2 +- .../tgui/interfaces/CircuitSignalHandler.tsx | 19 +- tgui/packages/tgui/interfaces/Clipboard.jsx | 2 +- .../tgui/interfaces/ColorMatrixEditor.jsx | 9 +- .../tgui/interfaces/CommunicationsConsole.jsx | 1 + .../tgui/interfaces/ComponentPrinter.tsx | 11 +- tgui/packages/tgui/interfaces/CrewConsole.jsx | 3 +- .../packages/tgui/interfaces/CrewManifest.jsx | 1 + tgui/packages/tgui/interfaces/Cryo.jsx | 2 +- .../packages/tgui/interfaces/Crystallizer.jsx | 7 +- tgui/packages/tgui/interfaces/DebugHealth.tsx | 7 +- .../packages/tgui/interfaces/DecalPainter.tsx | 20 +- .../tgui/interfaces/DepartmentOrders.tsx | 7 +- .../tgui/interfaces/DestinationTagger.tsx | 7 +- .../DnaConsole/DnaConsoleEnzymes.jsx | 2 +- .../DnaConsole/DnaConsoleSequencer.jsx | 3 +- .../DnaConsole/DnaConsoleStorage.jsx | 5 +- .../interfaces/DnaConsole/MutationInfo.jsx | 1 + .../tgui/interfaces/DnaConsole/index.jsx | 8 +- .../tgui/interfaces/EightBallVote.jsx | 5 +- tgui/packages/tgui/interfaces/Electropack.jsx | 1 + .../tgui/interfaces/EngravedMessage.jsx | 1 + .../tgui/interfaces/ExodroneConsole.tsx | 71 +++--- .../tgui/interfaces/ExoscannerConsole.tsx | 30 +-- .../tgui/interfaces/ExosuitControlConsole.jsx | 1 + .../tgui/interfaces/ExosuitFabricator.jsx | 7 +- tgui/packages/tgui/interfaces/FaxMachine.jsx | 2 +- tgui/packages/tgui/interfaces/Filteriffic.jsx | 1 + tgui/packages/tgui/interfaces/FishCatalog.jsx | 3 +- .../tgui/interfaces/ForbiddenLore.jsx | 1 + tgui/packages/tgui/interfaces/GasAnalyzer.tsx | 6 +- tgui/packages/tgui/interfaces/Gps.jsx | 1 + .../tgui/interfaces/GreyscaleModifyMenu.tsx | 24 +- tgui/packages/tgui/interfaces/HoloPay.tsx | 2 +- tgui/packages/tgui/interfaces/HotkeysHelp.tsx | 6 +- .../tgui/interfaces/Hypertorus/Gases.jsx | 1 + .../tgui/interfaces/Hypertorus/Parameters.jsx | 1 + .../tgui/interfaces/Hypertorus/index.jsx | 1 + tgui/packages/tgui/interfaces/IVDrip.jsx | 2 +- .../tgui/interfaces/InfraredEmitter.jsx | 2 +- .../IntegratedCircuit/BasicInput.jsx | 2 +- .../IntegratedCircuit/CircuitInfo.jsx | 2 +- .../IntegratedCircuit/ComponentMenu.jsx | 9 +- .../IntegratedCircuit/Connections.jsx | 2 +- .../IntegratedCircuit/DisplayName.jsx | 2 +- .../IntegratedCircuit/FundamentalTypes.jsx | 2 +- .../IntegratedCircuit/ObjectComponent.jsx | 3 +- .../interfaces/IntegratedCircuit/Port.jsx | 7 +- .../IntegratedCircuit/VariableMenu.jsx | 11 +- .../interfaces/IntegratedCircuit/index.jsx | 11 +- tgui/packages/tgui/interfaces/Interview.jsx | 8 +- .../tgui/interfaces/InterviewManager.jsx | 2 +- tgui/packages/tgui/interfaces/Jukebox.jsx | 3 +- .../tgui/interfaces/LaborClaimConsole.jsx | 1 + .../tgui/interfaces/LibraryConsole.jsx | 5 +- .../tgui/interfaces/LibraryScanner.jsx | 2 +- .../tgui/interfaces/LibraryVisitor.jsx | 1 + .../tgui/interfaces/ListInputModal.tsx | 10 +- .../tgui/interfaces/LoadoutManager.jsx | 2 +- tgui/packages/tgui/interfaces/MODpaint.jsx | 11 +- tgui/packages/tgui/interfaces/MODsuit.jsx | 16 +- tgui/packages/tgui/interfaces/MafiaPanel.jsx | 1 + .../tgui/interfaces/MassDriverControl.jsx | 2 +- .../tgui/interfaces/Mecha/AlertPane.tsx | 4 +- .../tgui/interfaces/Mecha/ArmPane.tsx | 5 +- .../tgui/interfaces/Mecha/ArmorPane.tsx | 5 +- .../tgui/interfaces/Mecha/MaintMode.tsx | 4 +- .../tgui/interfaces/Mecha/MechStatPane.tsx | 11 +- .../tgui/interfaces/Mecha/OperatorMode.tsx | 12 +- .../interfaces/Mecha/PowerModulesPane.tsx | 3 +- .../tgui/interfaces/Mecha/RadioPane.tsx | 5 +- .../interfaces/Mecha/UtilityModulesPane.tsx | 2 +- tgui/packages/tgui/interfaces/Mecha/data.ts | 56 ++--- .../packages/tgui/interfaces/MiningVendor.jsx | 1 + tgui/packages/tgui/interfaces/Newscaster.jsx | 9 +- .../interfaces/NotificationPreferences.jsx | 2 +- tgui/packages/tgui/interfaces/NtnetRelay.jsx | 2 +- .../tgui/interfaces/NtosBountyBoard.jsx | 2 +- tgui/packages/tgui/interfaces/NtosCargo.jsx | 2 +- .../tgui/interfaces/NtosCrewManifest.jsx | 1 + .../tgui/interfaces/NtosJobManager.jsx | 2 +- .../tgui/interfaces/NtosNetDownloader.jsx | 7 +- tgui/packages/tgui/interfaces/NtosNotepad.jsx | 4 +- .../tgui/interfaces/NtosPhysScanner.jsx | 2 +- .../tgui/interfaces/NtosPortraitPrinter.jsx | 2 +- tgui/packages/tgui/interfaces/NtosRadar.jsx | 1 + tgui/packages/tgui/interfaces/NtosRecords.jsx | 1 + .../tgui/interfaces/NtosRevelation.jsx | 2 +- .../packages/tgui/interfaces/NtosScipaper.jsx | 8 +- .../packages/tgui/interfaces/NtosSecurEye.jsx | 2 +- .../packages/tgui/interfaces/NtosSignaler.jsx | 2 +- .../tgui/interfaces/NtosSkillTracker.jsx | 6 +- tgui/packages/tgui/interfaces/NtosStatus.jsx | 2 +- tgui/packages/tgui/interfaces/NuclearBomb.jsx | 1 + .../tgui/interfaces/NumberInputModal.tsx | 4 +- tgui/packages/tgui/interfaces/Orbit.jsx | 1 + tgui/packages/tgui/interfaces/OreBox.jsx | 3 +- .../tgui/interfaces/OreRedemptionMachine.jsx | 1 + tgui/packages/tgui/interfaces/PaiCard.tsx | 2 +- .../packages/tgui/interfaces/PaiInterface.tsx | 4 +- .../tgui/interfaces/PaintingAdminPanel.tsx | 17 +- .../tgui/interfaces/PaintingMachine.jsx | 2 +- tgui/packages/tgui/interfaces/Pandemic.tsx | 30 +-- tgui/packages/tgui/interfaces/PaperSheet.jsx | 7 +- .../interfaces/ParticleEdit/EntriesBasic.tsx | 8 +- .../ParticleEdit/EntriesGenerators.tsx | 8 +- .../interfaces/ParticleEdit/Generators.tsx | 4 +- .../tgui/interfaces/ParticleEdit/Tutorial.tsx | 4 +- .../tgui/interfaces/ParticleEdit/data.ts | 56 ++--- .../tgui/interfaces/ParticleEdit/index.tsx | 8 +- tgui/packages/tgui/interfaces/Photocopier.jsx | 1 + .../tgui/interfaces/PipeDispenser.jsx | 2 +- .../tgui/interfaces/PortableChemMixer.jsx | 1 + .../tgui/interfaces/PortraitPicker.jsx | 2 +- .../packages/tgui/interfaces/PowerMonitor.jsx | 1 + .../interfaces/PreferencesMenu/AntagsPage.tsx | 1 + .../CharacterPreferenceWindow.tsx | 9 +- .../PreferencesMenu/GamePreferenceWindow.tsx | 9 +- .../PreferencesMenu/GamePreferencesPage.tsx | 3 +- .../interfaces/PreferencesMenu/JobsPage.tsx | 7 +- .../PreferencesMenu/KeybindingsPage.tsx | 17 +- .../interfaces/PreferencesMenu/MainPage.tsx | 33 +-- .../interfaces/PreferencesMenu/PageButton.tsx | 7 +- .../interfaces/PreferencesMenu/QuirksPage.tsx | 4 +- .../PreferencesMenu/RandomizationButton.tsx | 3 +- .../ServerPreferencesFetcher.tsx | 1 + .../PreferencesMenu/SpeciesPage.tsx | 3 +- .../interfaces/PreferencesMenu/TabbedMenu.tsx | 1 + .../PreferencesMenu/antagonists/base.ts | 6 +- .../tgui/interfaces/PreferencesMenu/data.ts | 90 +++---- .../tgui/interfaces/PreferencesMenu/index.tsx | 3 +- .../tgui/interfaces/PreferencesMenu/names.tsx | 1 + .../preferences/features/base.tsx | 13 +- .../features/game_preferences/admin.tsx | 2 +- .../features/game_preferences/ghost.tsx | 4 +- .../game_preferences/legacy_chat_toggles.tsx | 2 +- .../game_preferences/legacy_toggles.tsx | 2 +- .../features/game_preferences/ooc.tsx | 2 +- .../features/game_preferences/screentips.tsx | 2 +- .../features/game_preferences/ui_style.tsx | 3 +- .../preferences/features/species_features.tsx | 4 +- .../PreferencesMenu/preferences/gender.ts | 2 +- .../packages/tgui/interfaces/ProcCallMenu.tsx | 13 +- tgui/packages/tgui/interfaces/Radio.jsx | 1 + .../tgui/interfaces/RadioactiveMicrolaser.jsx | 2 +- .../tgui/interfaces/RapidPipeDispenser.jsx | 1 + .../tgui/interfaces/RemoteRobotControl.jsx | 3 +- .../tgui/interfaces/RequestManager.jsx | 1 + tgui/packages/tgui/interfaces/Roulette.jsx | 1 + tgui/packages/tgui/interfaces/Safe.jsx | 1 + tgui/packages/tgui/interfaces/ScannerGate.jsx | 2 +- tgui/packages/tgui/interfaces/Secrets.jsx | 1 + .../tgui/interfaces/SeedExtractor.jsx | 1 + .../tgui/interfaces/SelectEquipment.jsx | 1 + .../tgui/interfaces/SentienceFunBalloon.jsx | 4 +- .../tgui/interfaces/ServerMonitor.jsx | 12 +- .../tgui/interfaces/ShuttleManipulator.jsx | 1 + tgui/packages/tgui/interfaces/Signaler.jsx | 1 + tgui/packages/tgui/interfaces/SimpleBot.tsx | 6 +- .../packages/tgui/interfaces/SkillStation.jsx | 1 + .../tgui/interfaces/SlimeBodySwapper.jsx | 2 +- tgui/packages/tgui/interfaces/SmartVend.jsx | 1 + .../tgui/interfaces/SparringContract.tsx | 11 +- .../packages/tgui/interfaces/SpawnersMenu.tsx | 4 +- tgui/packages/tgui/interfaces/Stack.jsx | 9 +- .../tgui/interfaces/StationAlertConsole.jsx | 1 + .../tgui/interfaces/StationTraitsPanel.tsx | 1 + tgui/packages/tgui/interfaces/StripMenu.tsx | 5 +- .../tgui/interfaces/SupermatterMonitor.jsx | 1 + .../tgui/interfaces/SurgeryInitiator.tsx | 3 +- .../tgui/interfaces/SyndContractor.jsx | 1 + tgui/packages/tgui/interfaces/Tank.jsx | 1 + .../tgui/interfaces/TankCompressor.jsx | 4 +- tgui/packages/tgui/interfaces/Telecomms.jsx | 8 +- .../tgui/interfaces/TextInputModal.tsx | 6 +- .../tgui/interfaces/ThermoMachine.jsx | 1 + tgui/packages/tgui/interfaces/Thermometer.jsx | 1 + .../tgui/interfaces/TrackedPlaytime.jsx | 1 + .../tgui/interfaces/TraitorObjectiveDebug.tsx | 12 +- .../tgui/interfaces/TurbineComputer.jsx | 6 +- .../tgui/interfaces/Uplink/GenericUplink.tsx | 19 +- .../tgui/interfaces/Uplink/ObjectiveMenu.tsx | 57 ++--- .../Uplink/calculateReputationLevel.tsx | 2 +- .../packages/tgui/interfaces/Uplink/index.tsx | 59 ++--- .../tgui/interfaces/VaultController.jsx | 1 + tgui/packages/tgui/interfaces/Vending.tsx | 48 ++-- tgui/packages/tgui/interfaces/Vote.jsx | 10 +- tgui/packages/tgui/interfaces/Wires.jsx | 2 +- .../tgui/interfaces/common/AccessConfig.jsx | 3 +- .../tgui/interfaces/common/AccessList.jsx | 1 + .../tgui/interfaces/common/AtmosControls.jsx | 1 + .../tgui/interfaces/common/AtmosHandbook.tsx | 17 +- .../tgui/interfaces/common/GasmixParser.tsx | 15 +- .../tgui/interfaces/common/Loader.tsx | 3 +- .../tgui/interfaces/common/Materials.tsx | 13 +- tgui/packages/tgui/layouts/Layout.jsx | 1 + tgui/packages/tgui/layouts/Pane.jsx | 1 + tgui/packages/tgui/layouts/Window.jsx | 1 + tgui/packages/tgui/renderer.ts | 3 +- tgui/packages/tgui/store.js | 1 + .../packages/tgui/stories/Storage.stories.jsx | 1 + tgui/yarn.lock | 138 ++++++++++- 321 files changed, 1179 insertions(+), 1041 deletions(-) diff --git a/tgui/.eslintrc.yml b/tgui/.eslintrc.yml index b105439e540a..573a3b417e04 100644 --- a/tgui/.eslintrc.yml +++ b/tgui/.eslintrc.yml @@ -13,6 +13,8 @@ plugins: - sonarjs - react - unused-imports + - eslint-plugin-simple-import-sort + - eslint-plugin-typescript-sort-keys settings: react: version: '18.3.1' @@ -289,222 +291,6 @@ rules: ## Disallow the use of variables before they are defined # no-use-before-define: error - ## Code style - ## ---------------------------------------- - ## Enforce linebreaks after opening and before closing array brackets - array-bracket-newline: [error, consistent] - ## Enforce consistent spacing inside array brackets - array-bracket-spacing: [error, never] - ## Enforce line breaks after each array element - # array-element-newline: error - ## Disallow or enforce spaces inside of blocks after opening block and - ## before closing block - block-spacing: [error, always] - ## Enforce consistent brace style for blocks - # brace-style: [error, stroustrup, { allowSingleLine: false }] - ## Enforce camelcase naming convention - # camelcase: error - ## Enforce or disallow capitalization of the first letter of a comment - # capitalized-comments: error - ## Require or disallow trailing commas - comma-dangle: [ - error, - { - arrays: always-multiline, - objects: always-multiline, - imports: always-multiline, - exports: always-multiline, - functions: only-multiline, ## Optional on functions - }, - ] - ## Enforce consistent spacing before and after commas - comma-spacing: [error, { before: false, after: true }] - ## Enforce consistent comma style - comma-style: [error, last] - ## Enforce consistent spacing inside computed property brackets - computed-property-spacing: [error, never] - ## Enforce consistent naming when capturing the current execution context - # consistent-this: error - ## Require or disallow newline at the end of files - # eol-last: error - ## Require or disallow spacing between function identifiers and their - ## invocations - func-call-spacing: [error, never] - ## Require function names to match the name of the variable or property - ## to which they are assigned - # func-name-matching: error - ## Require or disallow named function expressions - # func-names: error - ## Enforce the consistent use of either function declarations or expressions - func-style: [error, expression] - ## Enforce line breaks between arguments of a function call - # function-call-argument-newline: error - ## Enforce consistent line breaks inside function parentheses - ## NOTE: This rule does not honor a newline on opening paren. - # function-paren-newline: [error, never] - ## Disallow specified identifiers - # id-blacklist: error - ## Enforce minimum and maximum identifier lengths - # id-length: error - ## Require identifiers to match a specified regular expression - # id-match: error - ## Enforce the location of arrow function bodies - # implicit-arrow-linebreak: error - ## Enforce consistent indentation - #indent: [error, 2, { SwitchCase: 1 }] - ## Enforce the consistent use of either double or single quotes in JSX - ## attributes - # jsx-quotes: [error, prefer-double] - ## Enforce consistent spacing between keys and values in object literal - ## properties - key-spacing: [error, { beforeColon: false, afterColon: true }] - ## Enforce consistent spacing before and after keywords - keyword-spacing: [error, { before: true, after: true }] - ## Enforce position of line comments - # line-comment-position: error - ## Enforce consistent linebreak style - # linebreak-style: error - ## Require empty lines around comments - # lines-around-comment: error - ## Require or disallow an empty line between class members - # lines-between-class-members: error - ## Enforce a maximum depth that blocks can be nested - # max-depth: error - ## Enforce a maximum line length - max-len: [ - error, - { - code: 200, - ## Ignore imports - ignorePattern: '^(import\s.+\sfrom\s|.*require\()', - ignoreUrls: true, - ignoreRegExpLiterals: true, - ignoreStrings: true, - }, - ] - ## Enforce a maximum number of lines per file - # max-lines: error - ## Enforce a maximum number of line of code in a function - # max-lines-per-function: error - ## Enforce a maximum depth that callbacks can be nested - # max-nested-callbacks: error - ## Enforce a maximum number of parameters in function definitions - # max-params: error - ## Enforce a maximum number of statements allowed in function blocks - # max-statements: error - ## Enforce a maximum number of statements allowed per line - # max-statements-per-line: error - ## Enforce a particular style for multiline comments - # multiline-comment-style: error - ## Enforce newlines between operands of ternary expressions - # multiline-ternary: [error, always-multiline] - ## Require constructor names to begin with a capital letter - # new-cap: error - ## Enforce or disallow parentheses when invoking a constructor with no - ## arguments - # new-parens: error - ## Require a newline after each call in a method chain - # newline-per-chained-call: error - ## Disallow Array constructors - # no-array-constructor: error - ## Disallow bitwise operators - # no-bitwise: error - ## Disallow continue statements - # no-continue: error - ## Disallow inline comments after code - # no-inline-comments: error - ## Disallow if statements as the only statement in else blocks - # no-lonely-if: error - ## Disallow mixed binary operators - # no-mixed-operators: error - ## Disallow mixed spaces and tabs for indentation - # no-mixed-spaces-and-tabs: error - ## Disallow use of chained assignment expressions - # no-multi-assign: error - ## Disallow multiple empty lines - # no-multiple-empty-lines: error - ## Disallow negated conditions - # no-negated-condition: error - ## Disallow nested ternary expressions - # no-nested-ternary: error - ## Disallow Object constructors - # no-new-object: error - ## Disallow the unary operators ++ and -- - # no-plusplus: error - ## Disallow specified syntax - # no-restricted-syntax: error - ## Disallow all tabs - # no-tabs: error - ## Disallow ternary operators - # no-ternary: error - ## Disallow trailing whitespace at the end of lines - # no-trailing-spaces: error - ## Disallow dangling underscores in identifiers - # no-underscore-dangle: error - ## Disallow ternary operators when simpler alternatives exist - # no-unneeded-ternary: error - ## Disallow whitespace before properties - # no-whitespace-before-property: error - ## Enforce the location of single-line statements - # nonblock-statement-body-position: error - ## Enforce consistent line breaks inside braces - # object-curly-newline: [error, { multiline: true }] - ## Enforce consistent spacing inside braces - #object-curly-spacing: [error, always] - ## Enforce placing object properties on separate lines - # object-property-newline: error - ## Enforce variables to be declared either together or separately in - ## functions - # one-var: error - ## Require or disallow newlines around variable declarations - # one-var-declaration-per-line: error - ## Require or disallow assignment operator shorthand where possible - # operator-assignment: error - ## Enforce consistent linebreak style for operators - #operator-linebreak: [error, before] - ## Require or disallow padding within blocks - # padded-blocks: error - ## Require or disallow padding lines between statements - # padding-line-between-statements: error - ## Disallow using Object.assign with an object literal as the first - ## argument and prefer the use of object spread instead. - # prefer-object-spread: error - ## Require quotes around object literal property names - # quote-props: error - ## Enforce the consistent use of either backticks, double, or single quotes - # quotes: [error, single] - ## Require or disallow semicolons instead of ASI - semi: error - ## Enforce consistent spacing before and after semicolons - semi-spacing: [error, { before: false, after: true }] - ## Enforce location of semicolons - semi-style: [error, last] - ## Require object keys to be sorted - # sort-keys: error - ## Require variables within the same declaration block to be sorted - # sort-vars: error - ## Enforce consistent spacing before blocks - #space-before-blocks: [error, always] - ## Enforce consistent spacing before function definition opening parenthesis - #space-before-function-paren: - # [error, { anonymous: always, named: never, asyncArrow: always }] - ## Enforce consistent spacing inside parentheses - #space-in-parens: [error, never] - ## Require spacing around infix operators - # space-infix-ops: error - ## Enforce consistent spacing before or after unary operators - # space-unary-ops: error - ## Enforce consistent spacing after the // or /* in a comment - spaced-comment: [error, always] - ## Enforce spacing around colons of switch statements - switch-colon-spacing: [error, { before: false, after: true }] - ## Require or disallow spacing between template tags and their literals - template-tag-spacing: [error, never] - ## Require or disallow Unicode byte order mark (BOM) - # unicode-bom: [error, never] - ## Require parenthesis around regex literals - # wrap-regex: error - ## ES6 ## ---------------------------------------- ## Require braces around arrow function bodies @@ -760,4 +546,11 @@ rules: ## Prevents the use of unused imports. ## This could be done by enabling no-unused-vars, but we're doing this for now unused-imports/no-unused-imports: error + + # Sorting + simple-import-sort/imports: error + simple-import-sort/exports: error + typescript-sort-keys/interface: error + typescript-sort-keys/string-enum: error + extends: prettier diff --git a/tgui/package.json b/tgui/package.json index 95ccbf95c082..354ffbd757ce 100644 --- a/tgui/package.json +++ b/tgui/package.json @@ -36,7 +36,9 @@ "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-react": "^7.34.2", + "eslint-plugin-simple-import-sort": "^12.1.0", "eslint-plugin-sonarjs": "^1.0.3", + "eslint-plugin-typescript-sort-keys": "^3.2.0", "eslint-plugin-unused-imports": "^3.2.0", "file-loader": "^6.2.0", "jest": "^29.7.0", diff --git a/tgui/packages/tgui-bench/entrypoint.tsx b/tgui/packages/tgui-bench/entrypoint.tsx index 377848fe3ae0..48dcd3dcce11 100644 --- a/tgui/packages/tgui-bench/entrypoint.tsx +++ b/tgui/packages/tgui-bench/entrypoint.tsx @@ -4,8 +4,10 @@ * @license MIT */ -import { setupGlobalEvents } from 'tgui/events'; import 'tgui/styles/main.scss'; + +import { setupGlobalEvents } from 'tgui/events'; + import Benchmark from './lib/benchmark'; const sendMessage = (obj: any) => { diff --git a/tgui/packages/tgui-dev-server/dreamseeker.js b/tgui/packages/tgui-dev-server/dreamseeker.js index fcb939e46cc0..741a7e71960d 100644 --- a/tgui/packages/tgui-dev-server/dreamseeker.js +++ b/tgui/packages/tgui-dev-server/dreamseeker.js @@ -6,6 +6,7 @@ import { exec } from 'child_process'; import { promisify } from 'util'; + import { createLogger } from './logging.js'; import { require } from './require.js'; diff --git a/tgui/packages/tgui-dev-server/index.js b/tgui/packages/tgui-dev-server/index.js index 199e93d83632..85489ebb0499 100644 --- a/tgui/packages/tgui-dev-server/index.js +++ b/tgui/packages/tgui-dev-server/index.js @@ -4,8 +4,8 @@ * @license MIT */ -import { createCompiler } from './webpack.js'; import { reloadByondCache } from './reloader.js'; +import { createCompiler } from './webpack.js'; const noHot = process.argv.includes('--no-hot'); const noTmp = process.argv.includes('--no-tmp'); diff --git a/tgui/packages/tgui-dev-server/link/retrace.js b/tgui/packages/tgui-dev-server/link/retrace.js index b7f4d4eacfb9..083ddb37d1c1 100644 --- a/tgui/packages/tgui-dev-server/link/retrace.js +++ b/tgui/packages/tgui-dev-server/link/retrace.js @@ -6,6 +6,7 @@ import fs from 'fs'; import { basename } from 'path'; + import { createLogger } from '../logging.js'; import { require } from '../require.js'; import { resolveGlob } from '../util.js'; diff --git a/tgui/packages/tgui-dev-server/link/server.js b/tgui/packages/tgui-dev-server/link/server.js index 81ede9e6efc2..a5d9a225f513 100644 --- a/tgui/packages/tgui-dev-server/link/server.js +++ b/tgui/packages/tgui-dev-server/link/server.js @@ -6,6 +6,7 @@ import http from 'http'; import { inspect } from 'util'; + import { createLogger, directLog } from '../logging.js'; import { require } from '../require.js'; import { loadSourceMaps, retrace } from './retrace.js'; diff --git a/tgui/packages/tgui-dev-server/reloader.js b/tgui/packages/tgui-dev-server/reloader.js index 91c5e6c90e4f..f9c1a31a6ca8 100644 --- a/tgui/packages/tgui-dev-server/reloader.js +++ b/tgui/packages/tgui-dev-server/reloader.js @@ -7,6 +7,7 @@ import fs from 'fs'; import os from 'os'; import { basename } from 'path'; + import { DreamSeeker } from './dreamseeker.js'; import { createLogger } from './logging.js'; import { resolveGlob, resolvePath } from './util.js'; diff --git a/tgui/packages/tgui-dev-server/util.js b/tgui/packages/tgui-dev-server/util.js index 54d806a629df..13fbef3b21b7 100644 --- a/tgui/packages/tgui-dev-server/util.js +++ b/tgui/packages/tgui-dev-server/util.js @@ -6,6 +6,7 @@ import fs from 'fs'; import path from 'path'; + import { require } from './require.js'; const globPkg = require('glob'); diff --git a/tgui/packages/tgui-dev-server/webpack.js b/tgui/packages/tgui-dev-server/webpack.js index 139610b79ce9..e4fbdeb9f1e2 100644 --- a/tgui/packages/tgui-dev-server/webpack.js +++ b/tgui/packages/tgui-dev-server/webpack.js @@ -7,6 +7,7 @@ import fs from 'fs'; import { createRequire } from 'module'; import { dirname } from 'path'; + import { loadSourceMaps, setupLink } from './link/server.js'; import { createLogger } from './logging.js'; import { reloadByondCache } from './reloader.js'; diff --git a/tgui/packages/tgui-dev-server/winreg.js b/tgui/packages/tgui-dev-server/winreg.js index b61fddc1a255..4f66d715950b 100644 --- a/tgui/packages/tgui-dev-server/winreg.js +++ b/tgui/packages/tgui-dev-server/winreg.js @@ -8,6 +8,7 @@ import { exec } from 'child_process'; import { promisify } from 'util'; + import { createLogger } from './logging.js'; const logger = createLogger('winreg'); diff --git a/tgui/packages/tgui-panel/Panel.tsx b/tgui/packages/tgui-panel/Panel.tsx index 04182f5eb6ed..2813b636574d 100644 --- a/tgui/packages/tgui-panel/Panel.tsx +++ b/tgui/packages/tgui-panel/Panel.tsx @@ -6,6 +6,7 @@ import { Button, Section, Stack } from 'tgui/components'; import { Pane } from 'tgui/layouts'; + import { NowPlayingWidget, useAudio } from './audio'; import { ChatPanel, ChatTabs } from './chat'; import { useGame } from './game'; diff --git a/tgui/packages/tgui-panel/audio/NowPlayingWidget.jsx b/tgui/packages/tgui-panel/audio/NowPlayingWidget.jsx index 8fd6d0bc4f98..f3d7417cd1af 100644 --- a/tgui/packages/tgui-panel/audio/NowPlayingWidget.jsx +++ b/tgui/packages/tgui-panel/audio/NowPlayingWidget.jsx @@ -7,6 +7,7 @@ import { toFixed } from 'common/math'; import { useDispatch, useSelector } from 'tgui/backend'; import { Button, Flex, Knob } from 'tgui/components'; + import { useSettings } from '../settings'; import { selectAudio } from './selectors'; diff --git a/tgui/packages/tgui-panel/audio/hooks.js b/tgui/packages/tgui-panel/audio/hooks.js index b828c1fa950a..2e9d830cb777 100644 --- a/tgui/packages/tgui-panel/audio/hooks.js +++ b/tgui/packages/tgui-panel/audio/hooks.js @@ -5,6 +5,7 @@ */ import { useDispatch, useSelector } from 'tgui/backend'; + import { selectAudio } from './selectors'; export const useAudio = () => { diff --git a/tgui/packages/tgui-panel/chat/ChatPageSettings.jsx b/tgui/packages/tgui-panel/chat/ChatPageSettings.jsx index d380979dbd31..67028168f8e8 100644 --- a/tgui/packages/tgui-panel/chat/ChatPageSettings.jsx +++ b/tgui/packages/tgui-panel/chat/ChatPageSettings.jsx @@ -13,6 +13,7 @@ import { Section, Stack, } from 'tgui/components'; + import { removeChatPage, toggleAcceptedType, updateChatPage } from './actions'; import { MESSAGE_TYPES } from './constants'; import { selectCurrentChatPage } from './selectors'; diff --git a/tgui/packages/tgui-panel/chat/ChatPanel.jsx b/tgui/packages/tgui-panel/chat/ChatPanel.jsx index 36e86876f509..845c16127565 100644 --- a/tgui/packages/tgui-panel/chat/ChatPanel.jsx +++ b/tgui/packages/tgui-panel/chat/ChatPanel.jsx @@ -7,6 +7,7 @@ import { shallowDiffers } from 'common/react'; import { Component, createRef } from 'react'; import { Button } from 'tgui/components'; + import { chatRenderer } from './renderer'; export class ChatPanel extends Component { diff --git a/tgui/packages/tgui-panel/chat/ChatTabs.jsx b/tgui/packages/tgui-panel/chat/ChatTabs.jsx index ed3a285c204f..2031f6a255b0 100644 --- a/tgui/packages/tgui-panel/chat/ChatTabs.jsx +++ b/tgui/packages/tgui-panel/chat/ChatTabs.jsx @@ -5,10 +5,11 @@ */ import { useDispatch, useSelector } from 'tgui/backend'; -import { Box, Tabs, Flex, Button } from 'tgui/components'; -import { changeChatPage, addChatPage } from './actions'; -import { selectChatPages, selectCurrentChatPage } from './selectors'; +import { Box, Button, Flex, Tabs } from 'tgui/components'; + import { openChatSettings } from '../settings/actions'; +import { addChatPage, changeChatPage } from './actions'; +import { selectChatPages, selectCurrentChatPage } from './selectors'; const UnreadCountWidget = ({ value }) => ( type.startsWith(MESSAGE_TYPE_INTERNAL) || page.acceptedTypes[type]; diff --git a/tgui/packages/tgui-panel/chat/reducer.js b/tgui/packages/tgui-panel/chat/reducer.js index e75fbd06e43e..7a7681ada741 100644 --- a/tgui/packages/tgui-panel/chat/reducer.js +++ b/tgui/packages/tgui-panel/chat/reducer.js @@ -7,12 +7,12 @@ import { addChatPage, changeChatPage, + changeScrollTracking, loadChat, removeChatPage, toggleAcceptedType, updateChatPage, updateMessageCount, - changeScrollTracking, } from './actions'; import { canPageAcceptType, createMainPage } from './model'; diff --git a/tgui/packages/tgui-panel/chat/renderer.jsx b/tgui/packages/tgui-panel/chat/renderer.jsx index 45b9654613d6..5fc71b2e96b6 100644 --- a/tgui/packages/tgui-panel/chat/renderer.jsx +++ b/tgui/packages/tgui-panel/chat/renderer.jsx @@ -6,7 +6,10 @@ import { EventEmitter } from 'common/events'; import { classes } from 'common/react'; +import { createRoot } from 'react-dom/client'; +import { Tooltip } from 'tgui/components'; import { createLogger } from 'tgui/logging'; + import { COMBINE_MAX_MESSAGES, COMBINE_MAX_TIME_WINDOW, @@ -16,16 +19,14 @@ import { MAX_PERSISTED_MESSAGES, MAX_VISIBLE_MESSAGES, MESSAGE_PRUNE_INTERVAL, - MESSAGE_TYPES, MESSAGE_TYPE_COMBAT, MESSAGE_TYPE_INTERNAL, MESSAGE_TYPE_LOCALCHAT, MESSAGE_TYPE_UNKNOWN, + MESSAGE_TYPES, } from './constants'; import { canPageAcceptType, createMessage, isSameMessage } from './model'; import { highlightNode, linkifyNode } from './replaceInTextNode'; -import { Tooltip } from 'tgui/components'; -import { createRoot } from 'react-dom/client'; const logger = createLogger('chatRenderer'); diff --git a/tgui/packages/tgui-panel/game/hooks.js b/tgui/packages/tgui-panel/game/hooks.js index c3e7c062847e..40a74ff44a06 100644 --- a/tgui/packages/tgui-panel/game/hooks.js +++ b/tgui/packages/tgui-panel/game/hooks.js @@ -5,6 +5,7 @@ */ import { useSelector } from 'tgui/backend'; + import { selectGame } from './selectors'; export const useGame = () => { diff --git a/tgui/packages/tgui-panel/game/middleware.js b/tgui/packages/tgui-panel/game/middleware.js index 53dd45bb46e0..1cf80a7ac63a 100644 --- a/tgui/packages/tgui-panel/game/middleware.js +++ b/tgui/packages/tgui-panel/game/middleware.js @@ -6,8 +6,8 @@ import { pingSoft, pingSuccess } from '../ping/actions'; import { connectionLost, connectionRestored, roundRestarted } from './actions'; -import { selectGame } from './selectors'; import { CONNECTION_LOST_AFTER } from './constants'; +import { selectGame } from './selectors'; const withTimestamp = (action) => ({ ...action, diff --git a/tgui/packages/tgui-panel/index.jsx b/tgui/packages/tgui-panel/index.jsx index e626553727ae..94d17a16f8d0 100644 --- a/tgui/packages/tgui-panel/index.jsx +++ b/tgui/packages/tgui-panel/index.jsx @@ -10,11 +10,13 @@ import './styles/themes/light.scss'; import { perf } from 'common/perf'; import { combineReducers } from 'common/redux'; -import { setupHotReloading } from 'tgui-dev-server/link/client.cjs'; +import { setGlobalStore } from 'tgui/backend'; import { setupGlobalEvents } from 'tgui/events'; import { captureExternalLinks } from 'tgui/links'; import { createRenderer } from 'tgui/renderer'; import { configureStore } from 'tgui/store'; +import { setupHotReloading } from 'tgui-dev-server/link/client.cjs'; + import { audioMiddleware, audioReducer } from './audio'; import { chatMiddleware, chatReducer } from './chat'; import { gameMiddleware, gameReducer } from './game'; @@ -22,7 +24,6 @@ import { setupPanelFocusHacks } from './panelFocus'; import { pingMiddleware, pingReducer } from './ping'; import { settingsMiddleware, settingsReducer } from './settings'; import { telemetryMiddleware } from './telemetry'; -import { setGlobalStore } from 'tgui/backend'; perf.mark('inception', window.performance?.timing?.navigationStart); perf.mark('init'); diff --git a/tgui/packages/tgui-panel/ping/PingIndicator.jsx b/tgui/packages/tgui-panel/ping/PingIndicator.jsx index b2355820e58a..549cd09cf74a 100644 --- a/tgui/packages/tgui-panel/ping/PingIndicator.jsx +++ b/tgui/packages/tgui-panel/ping/PingIndicator.jsx @@ -8,6 +8,7 @@ import { Color } from 'common/color'; import { toFixed } from 'common/math'; import { useSelector } from 'tgui/backend'; import { Box } from 'tgui/components'; + import { selectPing } from './selectors'; export const PingIndicator = (props) => { diff --git a/tgui/packages/tgui-panel/ping/reducer.js b/tgui/packages/tgui-panel/ping/reducer.js index 49b9522c06fc..01a78c46139c 100644 --- a/tgui/packages/tgui-panel/ping/reducer.js +++ b/tgui/packages/tgui-panel/ping/reducer.js @@ -5,6 +5,7 @@ */ import { clamp01, scale } from 'common/math'; + import { pingFail, pingSuccess } from './actions'; import { PING_MAX_FAILS, diff --git a/tgui/packages/tgui-panel/settings/SettingsPanel.jsx b/tgui/packages/tgui-panel/settings/SettingsPanel.jsx index 8ea92756f005..7aa96ec437a2 100644 --- a/tgui/packages/tgui-panel/settings/SettingsPanel.jsx +++ b/tgui/packages/tgui-panel/settings/SettingsPanel.jsx @@ -22,6 +22,7 @@ import { Tabs, TextArea, } from 'tgui/components'; + import { ChatPageSettings } from '../chat'; import { rebuildChat, saveChatToDisk } from '../chat/actions'; import { changeSettingsTab, updateSettings } from './actions'; diff --git a/tgui/packages/tgui-panel/settings/hooks.js b/tgui/packages/tgui-panel/settings/hooks.js index 5ea91c860674..b37b49a22c80 100644 --- a/tgui/packages/tgui-panel/settings/hooks.js +++ b/tgui/packages/tgui-panel/settings/hooks.js @@ -5,7 +5,8 @@ */ import { useDispatch, useSelector } from 'tgui/backend'; -import { updateSettings, toggleSettings } from './actions'; + +import { toggleSettings, updateSettings } from './actions'; import { selectSettings } from './selectors'; export const useSettings = () => { diff --git a/tgui/packages/tgui-panel/settings/middleware.js b/tgui/packages/tgui-panel/settings/middleware.js index 3d7c82e1bc82..ad8a12dc461e 100644 --- a/tgui/packages/tgui-panel/settings/middleware.js +++ b/tgui/packages/tgui-panel/settings/middleware.js @@ -5,10 +5,11 @@ */ import { storage } from 'common/storage'; + import { setClientTheme } from '../themes'; import { loadSettings, updateSettings } from './actions'; +import { DEFAULT_THEME, FONTS_DISABLED } from './constants'; import { selectSettings } from './selectors'; -import { FONTS_DISABLED, DEFAULT_THEME } from './constants'; const setGlobalFontSize = (fontSize) => { document.documentElement.style.setProperty('font-size', fontSize + 'px'); diff --git a/tgui/packages/tgui-panel/themes.js b/tgui/packages/tgui-panel/themes.js index 0a980cdd2de9..95dec78be321 100644 --- a/tgui/packages/tgui-panel/themes.js +++ b/tgui/packages/tgui-panel/themes.js @@ -4,7 +4,7 @@ * @license MIT */ -import { THEME_LIGHT, THEME_DARK } from './settings/constants'; +import { THEME_DARK, THEME_LIGHT } from './settings/constants'; const COLOR_DARK_BG = '#222020'; const COLOR_DARK_BG_DARKER = '#171717'; diff --git a/tgui/packages/tgui/backend.ts b/tgui/packages/tgui/backend.ts index 290f48ac74f1..9a4a423fa445 100644 --- a/tgui/packages/tgui/backend.ts +++ b/tgui/packages/tgui/backend.ts @@ -13,6 +13,7 @@ import { perf } from 'common/perf'; import { createAction } from 'common/redux'; + import { setupDrag } from './drag'; import { focusMap } from './focus'; import { createLogger } from './logging'; @@ -230,30 +231,30 @@ export const sendAct = (action: string, payload: object = {}) => { type BackendState = { config: { - title: string; - status: number; - interface: string; - refreshing: boolean; - window: { - key: string; - size: [number, number]; - fancy: boolean; - locked: boolean; - }; client: { - ckey: string; address: string; + ckey: string; computer_id: string; }; + interface: string; + refreshing: boolean; + status: number; + title: string; user: { name: string; observer: number; }; + window: { + fancy: boolean; + key: string; + locked: boolean; + size: [number, number]; + }; }; data: TData; shared: Record; - suspending: boolean; suspended: boolean; + suspending: boolean; }; /** diff --git a/tgui/packages/tgui/components/BlockQuote.jsx b/tgui/packages/tgui/components/BlockQuote.jsx index 8c0f53a46a1e..22508d4b885c 100644 --- a/tgui/packages/tgui/components/BlockQuote.jsx +++ b/tgui/packages/tgui/components/BlockQuote.jsx @@ -5,6 +5,7 @@ */ import { classes } from 'common/react'; + import { Box } from './Box'; export const BlockQuote = (props) => { diff --git a/tgui/packages/tgui/components/BodyZoneSelector.tsx b/tgui/packages/tgui/components/BodyZoneSelector.tsx index 4ddfabba8939..449feb64a4ed 100644 --- a/tgui/packages/tgui/components/BodyZoneSelector.tsx +++ b/tgui/packages/tgui/components/BodyZoneSelector.tsx @@ -1,16 +1,17 @@ import { Component, createRef } from 'react'; + import { DmIcon } from './DMIcon'; export enum BodyZone { - Head = 'head', Chest = 'chest', + Eyes = 'eyes', + Groin = 'groin', + Head = 'head', LeftArm = 'l_arm', - RightArm = 'r_arm', LeftLeg = 'l_leg', - RightLeg = 'r_leg', - Eyes = 'eyes', Mouth = 'mouth', - Groin = 'groin', + RightArm = 'r_arm', + RightLeg = 'r_leg', } const bodyZonePixelToZone: (x: number, y: number) => BodyZone | null = ( diff --git a/tgui/packages/tgui/components/Button.jsx b/tgui/packages/tgui/components/Button.jsx index ecf74129e2cc..99e8132e6f5d 100644 --- a/tgui/packages/tgui/components/Button.jsx +++ b/tgui/packages/tgui/components/Button.jsx @@ -7,6 +7,7 @@ import { KEY_ENTER, KEY_ESCAPE, KEY_SPACE } from 'common/keycodes'; import { classes } from 'common/react'; import { Component, createRef } from 'react'; + import { createLogger } from '../logging'; import { Box, computeBoxClassName, computeBoxProps } from './Box'; import { Icon } from './Icon'; diff --git a/tgui/packages/tgui/components/ByondUi.jsx b/tgui/packages/tgui/components/ByondUi.jsx index 2e751645e57d..2ec43aa23800 100644 --- a/tgui/packages/tgui/components/ByondUi.jsx +++ b/tgui/packages/tgui/components/ByondUi.jsx @@ -7,6 +7,7 @@ import { shallowDiffers } from 'common/react'; import { debounce } from 'common/timer'; import { Component, createRef } from 'react'; + import { createLogger } from '../logging'; import { computeBoxProps } from './Box'; diff --git a/tgui/packages/tgui/components/Collapsible.jsx b/tgui/packages/tgui/components/Collapsible.jsx index 9fda360b0aa0..12f8fe799b83 100644 --- a/tgui/packages/tgui/components/Collapsible.jsx +++ b/tgui/packages/tgui/components/Collapsible.jsx @@ -5,6 +5,7 @@ */ import { Component } from 'react'; + import { Box } from './Box'; import { Button } from './Button'; diff --git a/tgui/packages/tgui/components/ColorBox.jsx b/tgui/packages/tgui/components/ColorBox.jsx index 045fae311a9d..14f2eacc48a6 100644 --- a/tgui/packages/tgui/components/ColorBox.jsx +++ b/tgui/packages/tgui/components/ColorBox.jsx @@ -5,6 +5,7 @@ */ import { classes } from 'common/react'; + import { computeBoxClassName, computeBoxProps } from './Box'; export const ColorBox = (props) => { diff --git a/tgui/packages/tgui/components/DMIcon.tsx b/tgui/packages/tgui/components/DMIcon.tsx index c3471beb0d4e..ee6de5d3858d 100644 --- a/tgui/packages/tgui/components/DMIcon.tsx +++ b/tgui/packages/tgui/components/DMIcon.tsx @@ -1,8 +1,8 @@ import { Component, ReactNode } from 'react'; -import { logger } from '../logging'; import { resolveAsset } from '../assets'; import { fetchRetry } from '../http'; +import { logger } from '../logging'; import { BoxProps } from './Box'; import { Image } from './Image'; diff --git a/tgui/packages/tgui/components/Dimmer.jsx b/tgui/packages/tgui/components/Dimmer.jsx index 85e046ca0dbd..5e92ea84fc19 100644 --- a/tgui/packages/tgui/components/Dimmer.jsx +++ b/tgui/packages/tgui/components/Dimmer.jsx @@ -5,6 +5,7 @@ */ import { classes } from 'common/react'; + import { Box } from './Box'; export const Dimmer = (props) => { diff --git a/tgui/packages/tgui/components/DraggableControl.jsx b/tgui/packages/tgui/components/DraggableControl.jsx index c02c73444f26..b8001e78dfb0 100644 --- a/tgui/packages/tgui/components/DraggableControl.jsx +++ b/tgui/packages/tgui/components/DraggableControl.jsx @@ -6,6 +6,7 @@ import { clamp } from 'common/math'; import { Component, createRef } from 'react'; + import { AnimatedNumber } from './AnimatedNumber'; const DEFAULT_UPDATE_RATE = 400; diff --git a/tgui/packages/tgui/components/Dropdown.jsx b/tgui/packages/tgui/components/Dropdown.jsx index 1bfe83568d9d..cd4e5254b519 100644 --- a/tgui/packages/tgui/components/Dropdown.jsx +++ b/tgui/packages/tgui/components/Dropdown.jsx @@ -6,6 +6,7 @@ import { classes } from 'common/react'; import { Component } from 'react'; + import { Box } from './Box'; import { Icon } from './Icon'; diff --git a/tgui/packages/tgui/components/FitText.tsx b/tgui/packages/tgui/components/FitText.tsx index 1d70096ac136..05a2a7b2fba1 100644 --- a/tgui/packages/tgui/components/FitText.tsx +++ b/tgui/packages/tgui/components/FitText.tsx @@ -11,10 +11,10 @@ const DEFAULT_ACCEPTABLE_DIFFERENCE = 5; export class FitText extends Component< { acceptableDifference?: number; - maxWidth: number; + children: ReactNode; maxFontSize: number; + maxWidth: number; native?: HTMLAttributes; - children: ReactNode; }, { fontSize: number; diff --git a/tgui/packages/tgui/components/Flex.tsx b/tgui/packages/tgui/components/Flex.tsx index 28a8b1e763af..ffdca12c1843 100644 --- a/tgui/packages/tgui/components/Flex.tsx +++ b/tgui/packages/tgui/components/Flex.tsx @@ -5,15 +5,16 @@ */ import { BooleanLike, classes } from 'common/react'; + import { BoxProps, computeBoxClassName, computeBoxProps, unit } from './Box'; export type FlexProps = BoxProps & { - direction?: string | BooleanLike; - wrap?: string | BooleanLike; align?: string | BooleanLike; - justify?: string | BooleanLike; + direction?: string | BooleanLike; inline?: BooleanLike; + justify?: string | BooleanLike; scrollable?: BooleanLike; + wrap?: string | BooleanLike; }; export const computeFlexClassName = (props: FlexProps) => { @@ -49,11 +50,11 @@ export const Flex = (props) => { }; export type FlexItemProps = BoxProps & { + align?: string | BooleanLike; + basis?: string | BooleanLike; grow?: number | true; order?: number; shrink?: number | true; - basis?: string | BooleanLike; - align?: string | BooleanLike; }; export const computeFlexItemClassName = (props: FlexItemProps) => { diff --git a/tgui/packages/tgui/components/Icon.jsx b/tgui/packages/tgui/components/Icon.jsx index 2798615c332c..28ec0a4d122a 100644 --- a/tgui/packages/tgui/components/Icon.jsx +++ b/tgui/packages/tgui/components/Icon.jsx @@ -7,6 +7,7 @@ */ import { classes } from 'common/react'; + import { computeBoxClassName, computeBoxProps } from './Box'; const FA_OUTLINE_REGEX = /-o$/; diff --git a/tgui/packages/tgui/components/InfinitePlane.jsx b/tgui/packages/tgui/components/InfinitePlane.jsx index 3f2bf598c234..5277f2ad7968 100644 --- a/tgui/packages/tgui/components/InfinitePlane.jsx +++ b/tgui/packages/tgui/components/InfinitePlane.jsx @@ -1,8 +1,9 @@ +import { Component } from 'react'; + import { computeBoxProps } from './Box'; -import { Stack } from './Stack'; -import { ProgressBar } from './ProgressBar'; import { Button } from './Button'; -import { Component } from 'react'; +import { ProgressBar } from './ProgressBar'; +import { Stack } from './Stack'; const ZOOM_MIN_VAL = 0.5; const ZOOM_MAX_VAL = 1.5; diff --git a/tgui/packages/tgui/components/Input.jsx b/tgui/packages/tgui/components/Input.jsx index 7b55afa1e1cf..f4bb8dae6433 100644 --- a/tgui/packages/tgui/components/Input.jsx +++ b/tgui/packages/tgui/components/Input.jsx @@ -4,10 +4,11 @@ * @license MIT */ +import { KEY_ENTER, KEY_ESCAPE } from 'common/keycodes'; import { classes } from 'common/react'; import { Component, createRef } from 'react'; + import { Box } from './Box'; -import { KEY_ESCAPE, KEY_ENTER } from 'common/keycodes'; export const toInputValue = (value) => typeof value !== 'number' && typeof value !== 'string' ? '' : String(value); diff --git a/tgui/packages/tgui/components/KeyListener.tsx b/tgui/packages/tgui/components/KeyListener.tsx index d401642a3cff..566026f0cb3c 100644 --- a/tgui/packages/tgui/components/KeyListener.tsx +++ b/tgui/packages/tgui/components/KeyListener.tsx @@ -1,4 +1,5 @@ import { Component } from 'react'; + import { KeyEvent } from '../events'; import { listenForKeyEvents } from '../hotkeys'; diff --git a/tgui/packages/tgui/components/Knob.jsx b/tgui/packages/tgui/components/Knob.jsx index 5702c16129a1..e9067fc71d69 100644 --- a/tgui/packages/tgui/components/Knob.jsx +++ b/tgui/packages/tgui/components/Knob.jsx @@ -6,6 +6,7 @@ import { keyOfMatchingRange, scale } from 'common/math'; import { classes } from 'common/react'; + import { computeBoxClassName, computeBoxProps } from './Box'; import { DraggableControl } from './DraggableControl'; diff --git a/tgui/packages/tgui/components/LabeledList.tsx b/tgui/packages/tgui/components/LabeledList.tsx index 5a8df5ab781b..ecf4e3b4895c 100644 --- a/tgui/packages/tgui/components/LabeledList.tsx +++ b/tgui/packages/tgui/components/LabeledList.tsx @@ -6,6 +6,7 @@ import { BooleanLike, classes } from 'common/react'; import { ReactNode } from 'react'; + import { Box, unit } from './Box'; import { Divider } from './Divider'; @@ -19,15 +20,15 @@ export const LabeledList = (props: LabeledListProps) => { }; type LabeledListItemProps = { + buttons?: ReactNode; + children?: ReactNode; className?: string | BooleanLike; - label?: string | ReactNode | BooleanLike; - labelColor?: string | BooleanLike; color?: string | BooleanLike; - textAlign?: string | BooleanLike; - buttons?: ReactNode; /** @deprecated */ content?: any; - children?: ReactNode; + label?: string | ReactNode | BooleanLike; + labelColor?: string | BooleanLike; + textAlign?: string | BooleanLike; verticalAlign?: string; }; diff --git a/tgui/packages/tgui/components/Modal.jsx b/tgui/packages/tgui/components/Modal.jsx index 0e0181acee64..da17c6e5c846 100644 --- a/tgui/packages/tgui/components/Modal.jsx +++ b/tgui/packages/tgui/components/Modal.jsx @@ -5,6 +5,7 @@ */ import { classes } from 'common/react'; + import { computeBoxClassName, computeBoxProps } from './Box'; import { Dimmer } from './Dimmer'; diff --git a/tgui/packages/tgui/components/NoticeBox.jsx b/tgui/packages/tgui/components/NoticeBox.jsx index 09e205b46bef..de36715cc2e8 100644 --- a/tgui/packages/tgui/components/NoticeBox.jsx +++ b/tgui/packages/tgui/components/NoticeBox.jsx @@ -5,6 +5,7 @@ */ import { classes } from 'common/react'; + import { Box } from './Box'; export const NoticeBox = (props) => { diff --git a/tgui/packages/tgui/components/NumberInput.jsx b/tgui/packages/tgui/components/NumberInput.jsx index 20b50c733ec2..8846cd951a52 100644 --- a/tgui/packages/tgui/components/NumberInput.jsx +++ b/tgui/packages/tgui/components/NumberInput.jsx @@ -7,6 +7,7 @@ import { clamp } from 'common/math'; import { classes } from 'common/react'; import { Component, createRef } from 'react'; + import { AnimatedNumber } from './AnimatedNumber'; import { Box } from './Box'; diff --git a/tgui/packages/tgui/components/Popper.tsx b/tgui/packages/tgui/components/Popper.tsx index a11905b3cccc..dfec788ea94b 100644 --- a/tgui/packages/tgui/components/Popper.tsx +++ b/tgui/packages/tgui/components/Popper.tsx @@ -11,9 +11,9 @@ import { import { findDOMNode, render } from 'react-dom'; type PopperProps = { - popperContent: ReactElement> | false; - options?: ArgumentsOf[2]; additionalStyles?: CSSProperties; + options?: ArgumentsOf[2]; + popperContent: ReactElement> | false; } & PropsWithChildren; export class Popper extends Component { diff --git a/tgui/packages/tgui/components/ProgressBar.jsx b/tgui/packages/tgui/components/ProgressBar.jsx index a2cbd596cd14..701aa50169bc 100644 --- a/tgui/packages/tgui/components/ProgressBar.jsx +++ b/tgui/packages/tgui/components/ProgressBar.jsx @@ -4,10 +4,11 @@ * @license MIT */ -import { clamp01, scale, keyOfMatchingRange, toFixed } from 'common/math'; +import { clamp01, keyOfMatchingRange, scale, toFixed } from 'common/math'; import { classes } from 'common/react'; -import { computeBoxClassName, computeBoxProps } from './Box'; + import { CSS_COLORS } from '../constants'; +import { computeBoxClassName, computeBoxProps } from './Box'; export const ProgressBar = (props) => { const { diff --git a/tgui/packages/tgui/components/RestrictedInput.jsx b/tgui/packages/tgui/components/RestrictedInput.jsx index a53471e1e549..a3342c9e6797 100644 --- a/tgui/packages/tgui/components/RestrictedInput.jsx +++ b/tgui/packages/tgui/components/RestrictedInput.jsx @@ -1,8 +1,9 @@ -import { classes } from 'common/react'; +import { KEY_ENTER, KEY_ESCAPE } from 'common/keycodes'; import { clamp } from 'common/math'; +import { classes } from 'common/react'; import { Component, createRef } from 'react'; + import { Box } from './Box'; -import { KEY_ESCAPE, KEY_ENTER } from 'common/keycodes'; const DEFAULT_MIN = 0; const DEFAULT_MAX = 10000; diff --git a/tgui/packages/tgui/components/RoundGauge.jsx b/tgui/packages/tgui/components/RoundGauge.jsx index 92de363f060d..bbbdde423e77 100644 --- a/tgui/packages/tgui/components/RoundGauge.jsx +++ b/tgui/packages/tgui/components/RoundGauge.jsx @@ -6,6 +6,7 @@ import { clamp01, keyOfMatchingRange, scale } from 'common/math'; import { classes } from 'common/react'; + import { AnimatedNumber } from './AnimatedNumber'; import { Box, computeBoxClassName, computeBoxProps } from './Box'; diff --git a/tgui/packages/tgui/components/Section.tsx b/tgui/packages/tgui/components/Section.tsx index 707a745088f7..10cd2ba0843d 100644 --- a/tgui/packages/tgui/components/Section.tsx +++ b/tgui/packages/tgui/components/Section.tsx @@ -6,20 +6,21 @@ import { canRender, classes } from 'common/react'; import { Component, createRef, ReactNode, RefObject } from 'react'; + import { addScrollableNode, removeScrollableNode } from '../events'; import { BoxProps, computeBoxClassName, computeBoxProps } from './Box'; interface SectionProps extends BoxProps { - className?: string; - title?: ReactNode; buttons?: ReactNode; + className?: string; fill?: boolean; fitted?: boolean; - scrollable?: boolean; /** @deprecated This property no longer works, please remove it. */ level?: boolean; /** @deprecated Please use `scrollable` property */ overflowY?: any; + scrollable?: boolean; + title?: ReactNode; } export class Section extends Component { diff --git a/tgui/packages/tgui/components/Slider.jsx b/tgui/packages/tgui/components/Slider.jsx index e38b94ebcc23..a8447694bf8b 100644 --- a/tgui/packages/tgui/components/Slider.jsx +++ b/tgui/packages/tgui/components/Slider.jsx @@ -6,6 +6,7 @@ import { clamp01, keyOfMatchingRange, scale } from 'common/math'; import { classes } from 'common/react'; + import { computeBoxClassName, computeBoxProps } from './Box'; import { DraggableControl } from './DraggableControl'; diff --git a/tgui/packages/tgui/components/Stack.tsx b/tgui/packages/tgui/components/Stack.tsx index 74e1bf8309cb..c3e145d22899 100644 --- a/tgui/packages/tgui/components/Stack.tsx +++ b/tgui/packages/tgui/components/Stack.tsx @@ -6,6 +6,7 @@ import { classes } from 'common/react'; import { RefObject } from 'react'; + import { computeFlexClassName, computeFlexItemClassName, @@ -16,8 +17,8 @@ import { } from './Flex'; type StackProps = FlexProps & { - vertical?: boolean; fill?: boolean; + vertical?: boolean; zebra?: boolean; }; diff --git a/tgui/packages/tgui/components/Table.jsx b/tgui/packages/tgui/components/Table.jsx index f9a59b36c7ff..31a0a82d041c 100644 --- a/tgui/packages/tgui/components/Table.jsx +++ b/tgui/packages/tgui/components/Table.jsx @@ -5,6 +5,7 @@ */ import { classes } from 'common/react'; + import { computeBoxClassName, computeBoxProps } from './Box'; export const Table = (props) => { diff --git a/tgui/packages/tgui/components/Tabs.jsx b/tgui/packages/tgui/components/Tabs.jsx index e5b1ea183582..769ab50354b0 100644 --- a/tgui/packages/tgui/components/Tabs.jsx +++ b/tgui/packages/tgui/components/Tabs.jsx @@ -5,6 +5,7 @@ */ import { canRender, classes } from 'common/react'; + import { computeBoxClassName, computeBoxProps } from './Box'; import { Icon } from './Icon'; diff --git a/tgui/packages/tgui/components/TextArea.jsx b/tgui/packages/tgui/components/TextArea.jsx index d24a2e4ce5b4..4a3a5145ff93 100644 --- a/tgui/packages/tgui/components/TextArea.jsx +++ b/tgui/packages/tgui/components/TextArea.jsx @@ -5,11 +5,12 @@ * @license MIT */ +import { KEY_ESCAPE } from 'common/keycodes'; import { classes } from 'common/react'; import { Component, createRef } from 'react'; + import { Box } from './Box'; import { toInputValue } from './Input'; -import { KEY_ESCAPE } from 'common/keycodes'; export class TextArea extends Component { constructor(props) { diff --git a/tgui/packages/tgui/components/TimeDisplay.jsx b/tgui/packages/tgui/components/TimeDisplay.jsx index bbdd747701cc..390dbc93af93 100644 --- a/tgui/packages/tgui/components/TimeDisplay.jsx +++ b/tgui/packages/tgui/components/TimeDisplay.jsx @@ -1,6 +1,7 @@ -import { formatTime } from '../format'; import { Component } from 'react'; +import { formatTime } from '../format'; + // AnimatedNumber Copypaste const isSafeNumber = (value) => { return ( diff --git a/tgui/packages/tgui/components/Tooltip.tsx b/tgui/packages/tgui/components/Tooltip.tsx index 0ab3e8fca93e..eb0b619e5cb1 100644 --- a/tgui/packages/tgui/components/Tooltip.tsx +++ b/tgui/packages/tgui/components/Tooltip.tsx @@ -1,5 +1,5 @@ import { createPopper, Placement, VirtualElement } from '@popperjs/core'; -import { ReactNode, Component } from 'react'; +import { Component, ReactNode } from 'react'; // eslint-disable-next-line react/no-deprecated import { findDOMNode, render } from 'react-dom'; diff --git a/tgui/packages/tgui/components/TrackOutsideClicks.tsx b/tgui/packages/tgui/components/TrackOutsideClicks.tsx index 68665a3eb31d..97889b1114d9 100644 --- a/tgui/packages/tgui/components/TrackOutsideClicks.tsx +++ b/tgui/packages/tgui/components/TrackOutsideClicks.tsx @@ -1,8 +1,8 @@ import { Component, createRef } from 'react'; export class TrackOutsideClicks extends Component<{ - onOutsideClick: () => void; children: React.ReactNode; + onOutsideClick: () => void; }> { ref = createRef(); diff --git a/tgui/packages/tgui/components/index.ts b/tgui/packages/tgui/components/index.ts index 121d2bfa4e21..27632b09b3f6 100644 --- a/tgui/packages/tgui/components/index.ts +++ b/tgui/packages/tgui/components/index.ts @@ -18,8 +18,8 @@ export { Dimmer } from './Dimmer'; export { Divider } from './Divider'; export { DraggableControl } from './DraggableControl'; export { Dropdown } from './Dropdown'; -export { Flex } from './Flex'; export { FitText } from './FitText'; +export { Flex } from './Flex'; export { Grid } from './Grid'; export { Icon } from './Icon'; export { InfinitePlane } from './InfinitePlane'; @@ -31,8 +31,8 @@ export { LabeledList } from './LabeledList'; export { Modal } from './Modal'; export { NoticeBox } from './NoticeBox'; export { NumberInput } from './NumberInput'; -export { ProgressBar } from './ProgressBar'; export { Popper } from './Popper'; +export { ProgressBar } from './ProgressBar'; export { RestrictedInput } from './RestrictedInput'; export { RoundGauge } from './RoundGauge'; export { Section } from './Section'; @@ -42,5 +42,5 @@ export { Table } from './Table'; export { Tabs } from './Tabs'; export { TextArea } from './TextArea'; export { TimeDisplay } from './TimeDisplay'; -export { TrackOutsideClicks } from './TrackOutsideClicks'; export { Tooltip } from './Tooltip'; +export { TrackOutsideClicks } from './TrackOutsideClicks'; diff --git a/tgui/packages/tgui/debug/hooks.js b/tgui/packages/tgui/debug/hooks.js index 2ef8664fd480..4fc201bacc1f 100644 --- a/tgui/packages/tgui/debug/hooks.js +++ b/tgui/packages/tgui/debug/hooks.js @@ -5,6 +5,7 @@ */ import { useSelector } from 'tgui/backend'; + import { selectDebug } from './selectors'; export const useDebug = () => useSelector(selectDebug); diff --git a/tgui/packages/tgui/debug/middleware.js b/tgui/packages/tgui/debug/middleware.js index 28df806dd4d0..4febcb11c346 100644 --- a/tgui/packages/tgui/debug/middleware.js +++ b/tgui/packages/tgui/debug/middleware.js @@ -5,6 +5,7 @@ */ import { KEY_BACKSPACE, KEY_F10, KEY_F11, KEY_F12 } from 'common/keycodes'; + import { globalEvents } from '../events'; import { acquireHotKey } from '../hotkeys'; import { diff --git a/tgui/packages/tgui/drag.js b/tgui/packages/tgui/drag.js index ec9bb44855e0..a9f6e0c025df 100644 --- a/tgui/packages/tgui/drag.js +++ b/tgui/packages/tgui/drag.js @@ -5,7 +5,8 @@ */ import { storage } from 'common/storage'; -import { vecAdd, vecSubtract, vecMultiply, vecScale } from 'common/vector'; +import { vecAdd, vecMultiply, vecScale, vecSubtract } from 'common/vector'; + import { createLogger } from './logging'; const logger = createLogger('drag'); diff --git a/tgui/packages/tgui/hotkeys.ts b/tgui/packages/tgui/hotkeys.ts index dd1f92864349..cbc014f40020 100644 --- a/tgui/packages/tgui/hotkeys.ts +++ b/tgui/packages/tgui/hotkeys.ts @@ -5,6 +5,7 @@ */ import * as keycodes from 'common/keycodes'; + import { globalEvents, KeyEvent } from './events'; import { createLogger } from './logging'; diff --git a/tgui/packages/tgui/index.jsx b/tgui/packages/tgui/index.jsx index b6cc8a5db2b3..026717372d68 100644 --- a/tgui/packages/tgui/index.jsx +++ b/tgui/packages/tgui/index.jsx @@ -25,12 +25,13 @@ import './styles/themes/admin.scss'; import { perf } from 'common/perf'; import { setupHotReloading } from 'tgui-dev-server/link/client.cjs'; + +import { setGlobalStore } from './backend'; +import { setupGlobalEvents } from './events'; import { setupHotKeys } from './hotkeys'; import { captureExternalLinks } from './links'; import { createRenderer } from './renderer'; import { configureStore } from './store'; -import { setupGlobalEvents } from './events'; -import { setGlobalStore } from './backend'; perf.mark('inception', window.performance?.timing?.navigationStart); perf.mark('init'); diff --git a/tgui/packages/tgui/interfaces/AccountingConsole.jsx b/tgui/packages/tgui/interfaces/AccountingConsole.jsx index 88886d5497c3..2e8740e200c2 100644 --- a/tgui/packages/tgui/interfaces/AccountingConsole.jsx +++ b/tgui/packages/tgui/interfaces/AccountingConsole.jsx @@ -1,3 +1,5 @@ +import { useBackend } from '../backend'; +import { useLocalState } from '../backend'; import { BlockQuote, Collapsible, @@ -6,8 +8,6 @@ import { Section, Tabs, } from '../components'; -import { useBackend } from '../backend'; -import { useLocalState } from '../backend'; import { Window } from '../layouts'; export const AccountingConsole = (props) => { diff --git a/tgui/packages/tgui/interfaces/Adminhelp.tsx b/tgui/packages/tgui/interfaces/Adminhelp.tsx index 51ba58ffd75a..4a14b4168255 100644 --- a/tgui/packages/tgui/interfaces/Adminhelp.tsx +++ b/tgui/packages/tgui/interfaces/Adminhelp.tsx @@ -1,12 +1,13 @@ import { BooleanLike } from 'common/react'; + import { useBackend, useLocalState } from '../backend'; -import { TextArea, Stack, Button, NoticeBox, Input, Box } from '../components'; +import { Box, Button, Input, NoticeBox, Stack, TextArea } from '../components'; import { Window } from '../layouts'; type AdminhelpData = { adminCount: number; - urgentAhelpEnabled: BooleanLike; bannedFromUrgentAhelp: BooleanLike; + urgentAhelpEnabled: BooleanLike; urgentAhelpPromptMessage: string; }; diff --git a/tgui/packages/tgui/interfaces/AdventureBrowser.tsx b/tgui/packages/tgui/interfaces/AdventureBrowser.tsx index 49fe86ee090e..a571d69b6e10 100644 --- a/tgui/packages/tgui/interfaces/AdventureBrowser.tsx +++ b/tgui/packages/tgui/interfaces/AdventureBrowser.tsx @@ -1,39 +1,39 @@ import { useBackend, useLocalState } from '../backend'; import { + Box, Button, LabeledList, - Section, - Box, NoticeBox, + Section, Table, } from '../components'; +import { formatTime } from '../format'; import { Window } from '../layouts'; import { AdventureDataProvider, AdventureScreen } from './ExodroneConsole'; -import { formatTime } from '../format'; type Adventure = { - ref: string; - name: string; - id: string; approved: boolean; + id: string; + json_status: string; + name: string; + ref: string; + timestamp: string; uploader: string; version: number; - timestamp: string; - json_status: string; }; type AdventureBrowserData = AdventureDataProvider & { + adventure_data: any; adventures: Array; + delay_message: string; + delay_time: number; feedback_message: string; play_mode: boolean; - adventure_data: any; - delay_time: number; - delay_message: string; }; const AdventureEntry = (props) => { const { data, act } = useBackend(); - const { entry_ref, close }: { entry_ref: string; close: () => void } = props; + const { entry_ref, close }: { close: () => void; entry_ref: string } = props; const entry = data.adventures.find((x) => x.ref === entry_ref); if (!entry) { diff --git a/tgui/packages/tgui/interfaces/AiVoiceChanger.jsx b/tgui/packages/tgui/interfaces/AiVoiceChanger.jsx index c16973cb4d76..7fdac46ab777 100644 --- a/tgui/packages/tgui/interfaces/AiVoiceChanger.jsx +++ b/tgui/packages/tgui/interfaces/AiVoiceChanger.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Button, Section, Input, Dropdown, LabeledList } from '../components'; +import { Button, Dropdown, Input, LabeledList, Section } from '../components'; import { Window } from '../layouts'; export const AiVoiceChanger = (props) => { diff --git a/tgui/packages/tgui/interfaces/AirAlarm.jsx b/tgui/packages/tgui/interfaces/AirAlarm.jsx index 583e4fc1bd1b..b9c062cb8955 100644 --- a/tgui/packages/tgui/interfaces/AirAlarm.jsx +++ b/tgui/packages/tgui/interfaces/AirAlarm.jsx @@ -1,5 +1,6 @@ import { toFixed } from 'common/math'; import { Fragment } from 'react'; + import { useBackend, useLocalState } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/AlertModal.tsx b/tgui/packages/tgui/interfaces/AlertModal.tsx index c8238c029aaa..23932774bcb6 100644 --- a/tgui/packages/tgui/interfaces/AlertModal.tsx +++ b/tgui/packages/tgui/interfaces/AlertModal.tsx @@ -1,5 +1,3 @@ -import { Loader } from './common/Loader'; -import { useBackend, useLocalState } from '../backend'; import { KEY_ENTER, KEY_ESCAPE, @@ -8,8 +6,10 @@ import { KEY_SPACE, KEY_TAB, } from '../../common/keycodes'; +import { useBackend, useLocalState } from '../backend'; import { Autofocus, Box, Button, Flex, Section, Stack } from '../components'; import { Window } from '../layouts'; +import { Loader } from './common/Loader'; type AlertModalData = { autofocus: boolean; diff --git a/tgui/packages/tgui/interfaces/AnomalyRefinery.jsx b/tgui/packages/tgui/interfaces/AnomalyRefinery.jsx index 577cbbe18389..953def364929 100644 --- a/tgui/packages/tgui/interfaces/AnomalyRefinery.jsx +++ b/tgui/packages/tgui/interfaces/AnomalyRefinery.jsx @@ -1,12 +1,12 @@ import { useBackend, useSharedState } from '../backend'; import { + Box, Button, Icon, + LabeledList, Modal, Section, Stack, - LabeledList, - Box, } from '../components'; import { Window } from '../layouts'; import { GasmixParser } from './common/GasmixParser'; diff --git a/tgui/packages/tgui/interfaces/AntagInfoBrainwashed.tsx b/tgui/packages/tgui/interfaces/AntagInfoBrainwashed.tsx index b7afd878110c..126f46cb28a0 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoBrainwashed.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoBrainwashed.tsx @@ -1,15 +1,16 @@ +import { BooleanLike } from 'common/react'; + import { useBackend } from '../backend'; import { Icon, Section, Stack } from '../components'; -import { BooleanLike } from 'common/react'; import { Window } from '../layouts'; type Objective = { + complete: BooleanLike; count: number; - name: string; explanation: string; - complete: BooleanLike; - was_uncompleted: BooleanLike; + name: string; reward: number; + was_uncompleted: BooleanLike; }; type Info = { diff --git a/tgui/packages/tgui/interfaces/AntagInfoBrother.tsx b/tgui/packages/tgui/interfaces/AntagInfoBrother.tsx index dd3879fe7912..aede823f814e 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoBrother.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoBrother.tsx @@ -1,21 +1,22 @@ +import { BooleanLike } from 'common/react'; + import { useBackend } from '../backend'; import { Section, Stack } from '../components'; -import { BooleanLike } from 'common/react'; import { Window } from '../layouts'; type Objective = { + complete: BooleanLike; count: number; - name: string; explanation: string; - complete: BooleanLike; - was_uncompleted: BooleanLike; + name: string; reward: number; + was_uncompleted: BooleanLike; }; type Info = { antag_name: string; - objectives: Objective[]; brothers: string; + objectives: Objective[]; }; export const AntagInfoBrother = (props) => { diff --git a/tgui/packages/tgui/interfaces/AntagInfoChangeling.tsx b/tgui/packages/tgui/interfaces/AntagInfoChangeling.tsx index 6ee574bd4512..ffca488cb3a8 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoChangeling.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoChangeling.tsx @@ -29,8 +29,8 @@ const storestyle = { type Objective = { count: number; - name: string; explanation: string; + name: string; }; type Memory = { @@ -40,9 +40,9 @@ type Memory = { type Info = { hive_name: string; - stolen_antag_info: string; memories: Memory[]; objectives: Objective[]; + stolen_antag_info: string; }; const ObjectivePrintout = (props) => { diff --git a/tgui/packages/tgui/interfaces/AntagInfoDemon.tsx b/tgui/packages/tgui/interfaces/AntagInfoDemon.tsx index f52847ee8305..ba476644f821 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoDemon.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoDemon.tsx @@ -1,6 +1,7 @@ +import { BooleanLike } from 'common/react'; + import { useBackend } from '../backend'; import { Box, Section, Stack } from '../components'; -import { BooleanLike } from 'common/react'; import { Window } from '../layouts'; const jauntstyle = { @@ -12,17 +13,17 @@ const injurestyle = { }; type Objective = { + complete: BooleanLike; count: number; - name: string; explanation: string; - complete: BooleanLike; - was_uncompleted: BooleanLike; + name: string; reward: number; + was_uncompleted: BooleanLike; }; type Info = { - fluff: string; explain_attack: BooleanLike; + fluff: string; objectives: Objective[]; }; diff --git a/tgui/packages/tgui/interfaces/AntagInfoGangmember.tsx b/tgui/packages/tgui/interfaces/AntagInfoGangmember.tsx index 09c87b444bd8..9c8eadfccb08 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoGangmember.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoGangmember.tsx @@ -4,9 +4,9 @@ import { Window } from '../layouts'; type Info = { antag_name: string; + gang_clothes: string[]; gang_name: string; gang_objective: string; - gang_clothes: string[]; }; export const AntagInfoGangmember = (props) => { diff --git a/tgui/packages/tgui/interfaces/AntagInfoGeneric.tsx b/tgui/packages/tgui/interfaces/AntagInfoGeneric.tsx index 428250eea4f7..ddce8586aa87 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoGeneric.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoGeneric.tsx @@ -1,15 +1,16 @@ +import { BooleanLike } from 'common/react'; + import { useBackend } from '../backend'; import { Section, Stack } from '../components'; -import { BooleanLike } from 'common/react'; import { Window } from '../layouts'; type Objective = { + complete: BooleanLike; count: number; - name: string; explanation: string; - complete: BooleanLike; - was_uncompleted: BooleanLike; + name: string; reward: number; + was_uncompleted: BooleanLike; }; type Info = { diff --git a/tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx b/tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx index 605028e600af..f419b33860af 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoHeretic.tsx @@ -1,7 +1,8 @@ +import { BooleanLike } from 'common/react'; + import { useBackend, useLocalState } from '../backend'; -import { Section, Stack, Box, Tabs, Button, BlockQuote } from '../components'; +import { BlockQuote, Box, Button, Section, Stack, Tabs } from '../components'; import { Window } from '../layouts'; -import { BooleanLike } from 'common/react'; const hereticRed = { color: '#e03c3c', @@ -28,14 +29,14 @@ const hereticYellow = { }; type Knowledge = { - path: string; - name: string; - desc: string; - gainFlavor: string; + color: string; cost: number; + desc: string; disabled: boolean; + gainFlavor: string; hereticPath: string; - color: string; + name: string; + path: string; }; type KnowledgeInfo = { @@ -45,15 +46,15 @@ type KnowledgeInfo = { type Objective = { count: number; - name: string; explanation: string; + name: string; }; type Info = { - charges: number; - total_sacrifices: number; ascended: BooleanLike; + charges: number; objectives: Objective[]; + total_sacrifices: number; }; const IntroductionSection = () => { diff --git a/tgui/packages/tgui/interfaces/AntagInfoMalf.tsx b/tgui/packages/tgui/interfaces/AntagInfoMalf.tsx index 8f4f523d814e..4bf71af965d9 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoMalf.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoMalf.tsx @@ -1,8 +1,9 @@ +import { BooleanLike } from 'common/react'; + import { useBackend, useLocalState } from '../backend'; -import { GenericUplink, Item } from './Uplink/GenericUplink'; import { BlockQuote, Button, Section, Stack, Tabs } from '../components'; -import { BooleanLike } from 'common/react'; import { Window } from '../layouts'; +import { GenericUplink, Item } from './Uplink/GenericUplink'; const allystyle = { fontWeight: 'bold', @@ -21,21 +22,21 @@ const goalstyle = { type Objective = { count: number; - name: string; explanation: string; + name: string; }; type Info = { - has_codewords: BooleanLike; - phrases: string; - responses: string; - theme: string; allies: string; + categories: any[]; goal: string; + has_codewords: BooleanLike; intro: string; - processingTime: string; objectives: Objective[]; - categories: any[]; + phrases: string; + processingTime: string; + responses: string; + theme: string; }; const ObjectivePrintout = (props) => { diff --git a/tgui/packages/tgui/interfaces/AntagInfoSeparatist.tsx b/tgui/packages/tgui/interfaces/AntagInfoSeparatist.tsx index 3444e5c5dc14..13518f58387d 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoSeparatist.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoSeparatist.tsx @@ -4,14 +4,14 @@ import { Window } from '../layouts'; type Objective = { count: number; - name: string; explanation: string; + name: string; }; type Info = { - objectives: Objective[]; nation: string; nationColor: string; + objectives: Objective[]; }; export const AntagInfoSeparatist = (props) => { diff --git a/tgui/packages/tgui/interfaces/AntagInfoThief.tsx b/tgui/packages/tgui/interfaces/AntagInfoThief.tsx index 6c7b3bcc68e2..118805e2dc51 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoThief.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoThief.tsx @@ -1,20 +1,21 @@ import { BooleanLike } from 'common/react'; + import { useBackend } from '../backend'; import { Section, Stack } from '../components'; import { Window } from '../layouts'; type Objective = { count: number; - name: string; explanation: string; + name: string; }; type Info = { - objectives: Objective[]; goal: string; - intro: string; - honor: BooleanLike; hideout: string; + honor: BooleanLike; + intro: string; + objectives: Objective[]; policy: string; }; diff --git a/tgui/packages/tgui/interfaces/AntagInfoTraitor.tsx b/tgui/packages/tgui/interfaces/AntagInfoTraitor.tsx index 35e0dbbc3266..0b95b6d0e863 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoTraitor.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoTraitor.tsx @@ -1,6 +1,7 @@ +import { BooleanLike } from 'common/react'; + import { useBackend } from '../backend'; import { BlockQuote, Button, Dimmer, Section, Stack } from '../components'; -import { BooleanLike } from 'common/react'; import { Window } from '../layouts'; const allystyle = { @@ -20,24 +21,24 @@ const goalstyle = { type Objective = { count: number; - name: string; explanation: string; + name: string; }; type Info = { - has_codewords: BooleanLike; - phrases: string; - responses: string; - theme: string; allies: string; - goal: string; - intro: string; code: string; failsafe_code: string; + goal: string; + has_codewords: BooleanLike; has_uplink: BooleanLike; + intro: string; + objectives: Objective[]; + phrases: string; + responses: string; + theme: string; uplink_intro: string; uplink_unlock_info: string; - objectives: Objective[]; }; const ObjectivePrintout = (props) => { diff --git a/tgui/packages/tgui/interfaces/AntagInfoWizard.tsx b/tgui/packages/tgui/interfaces/AntagInfoWizard.tsx index c88d0dfbe032..64e807f522e0 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoWizard.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoWizard.tsx @@ -1,6 +1,7 @@ +import { BooleanLike } from 'common/react'; + import { useBackend } from '../backend'; import { Section, Stack } from '../components'; -import { BooleanLike } from 'common/react'; import { Window } from '../layouts'; const teleportstyle = { @@ -32,12 +33,12 @@ const ritualstyle = { }; type Objective = { + complete: BooleanLike; count: number; - name: string; explanation: string; - complete: BooleanLike; - was_uncompleted: BooleanLike; + name: string; reward: number; + was_uncompleted: BooleanLike; }; type Info = { diff --git a/tgui/packages/tgui/interfaces/ApcControl.jsx b/tgui/packages/tgui/interfaces/ApcControl.jsx index 64a5e4d12900..efc537896c1f 100644 --- a/tgui/packages/tgui/interfaces/ApcControl.jsx +++ b/tgui/packages/tgui/interfaces/ApcControl.jsx @@ -1,5 +1,6 @@ import { map, sortBy } from 'common/collections'; import { flow } from 'common/fp'; + import { useBackend, useLocalState } from '../backend'; import { Box, Button, Dimmer, Flex, Icon, Table, Tabs } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/AtmosControlConsole.tsx b/tgui/packages/tgui/interfaces/AtmosControlConsole.tsx index bb343017e1e0..956a7f69cb75 100644 --- a/tgui/packages/tgui/interfaces/AtmosControlConsole.tsx +++ b/tgui/packages/tgui/interfaces/AtmosControlConsole.tsx @@ -2,9 +2,9 @@ import { useBackend, useLocalState } from '../backend'; import { Box, Button, + Dropdown, LabeledList, NumberInput, - Dropdown, Section, Stack, } from '../components'; @@ -12,20 +12,20 @@ import { Window } from '../layouts'; import { Gasmix, GasmixParser } from './common/GasmixParser'; type Chamber = { - id: string; - name: string; gasmix?: Gasmix; + id: string; input_info?: { active: boolean; amount: number }; + name: string; output_info?: { active: boolean; amount: number }; }; export const AtmosControlConsole = (props) => { const { act, data } = useBackend<{ chambers: Chamber[]; + control: boolean; maxInput: number; maxOutput: number; reconnecting: boolean; - control: boolean; }>(); const chambers = data.chambers || []; const [chamberId, setChamberId] = useLocalState('chamberId', chambers[0]?.id); diff --git a/tgui/packages/tgui/interfaces/AtmosControlPanel.jsx b/tgui/packages/tgui/interfaces/AtmosControlPanel.jsx index 491aec5a5607..84d0ff08def3 100644 --- a/tgui/packages/tgui/interfaces/AtmosControlPanel.jsx +++ b/tgui/packages/tgui/interfaces/AtmosControlPanel.jsx @@ -1,5 +1,6 @@ import { map, sortBy } from 'common/collections'; import { flow } from 'common/fp'; + import { useBackend } from '../backend'; import { Box, Button, Flex, Section, Table } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/AtmosFilter.jsx b/tgui/packages/tgui/interfaces/AtmosFilter.jsx index 5c110e3e77f2..f53a05a9f08f 100644 --- a/tgui/packages/tgui/interfaces/AtmosFilter.jsx +++ b/tgui/packages/tgui/interfaces/AtmosFilter.jsx @@ -1,13 +1,13 @@ import { useBackend } from '../backend'; -import { formatSiUnit } from '../format'; import { Button, LabeledList, NumberInput, - Section, ProgressBar, + Section, } from '../components'; import { getGasLabel } from '../constants'; +import { formatSiUnit } from '../format'; import { Window } from '../layouts'; export const AtmosFilter = (props) => { diff --git a/tgui/packages/tgui/interfaces/AtmosMixer.jsx b/tgui/packages/tgui/interfaces/AtmosMixer.jsx index dde3325ec2b3..c5fe268721f0 100644 --- a/tgui/packages/tgui/interfaces/AtmosMixer.jsx +++ b/tgui/packages/tgui/interfaces/AtmosMixer.jsx @@ -1,12 +1,12 @@ import { useBackend } from '../backend'; -import { formatSiUnit } from '../format'; import { Button, LabeledList, NumberInput, - Section, ProgressBar, + Section, } from '../components'; +import { formatSiUnit } from '../format'; import { Window } from '../layouts'; export const AtmosMixer = (props) => { diff --git a/tgui/packages/tgui/interfaces/AtmosPump.jsx b/tgui/packages/tgui/interfaces/AtmosPump.jsx index f8ed42bb59ae..fd4ae09fe1d0 100644 --- a/tgui/packages/tgui/interfaces/AtmosPump.jsx +++ b/tgui/packages/tgui/interfaces/AtmosPump.jsx @@ -1,12 +1,12 @@ import { useBackend } from '../backend'; -import { formatSiUnit } from '../format'; import { Button, LabeledList, NumberInput, - Section, ProgressBar, + Section, } from '../components'; +import { formatSiUnit } from '../format'; import { Window } from '../layouts'; export const AtmosPump = (props) => { diff --git a/tgui/packages/tgui/interfaces/Autolathe.jsx b/tgui/packages/tgui/interfaces/Autolathe.jsx index 2c8690070093..320dbb813eaa 100644 --- a/tgui/packages/tgui/interfaces/Autolathe.jsx +++ b/tgui/packages/tgui/interfaces/Autolathe.jsx @@ -1,19 +1,20 @@ +import { capitalize } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; import { - Button, - LabeledList, - Section, - ProgressBar, - Flex, Box, - Table, + Button, Collapsible, - Input, Dimmer, + Flex, Icon, + Input, + LabeledList, + ProgressBar, + Section, + Table, } from '../components'; import { Window } from '../layouts'; -import { capitalize } from 'common/string'; export const Autolathe = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Biogenerator.jsx b/tgui/packages/tgui/interfaces/Biogenerator.jsx index bb8541b905df..0b861fc3b51f 100644 --- a/tgui/packages/tgui/interfaces/Biogenerator.jsx +++ b/tgui/packages/tgui/interfaces/Biogenerator.jsx @@ -1,5 +1,6 @@ import { classes } from 'common/react'; import { createSearch } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/BluespaceSender.jsx b/tgui/packages/tgui/interfaces/BluespaceSender.jsx index d064ecfb448d..4d4010a7d090 100644 --- a/tgui/packages/tgui/interfaces/BluespaceSender.jsx +++ b/tgui/packages/tgui/interfaces/BluespaceSender.jsx @@ -1,8 +1,10 @@ import { filter, sortBy } from 'common/collections'; import { flow } from 'common/fp'; import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { + Box, Button, Divider, LabeledList, @@ -10,7 +12,6 @@ import { ProgressBar, Section, Stack, - Box, } from '../components'; import { getGasColor, getGasLabel } from '../constants'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/BluespaceVendor.jsx b/tgui/packages/tgui/interfaces/BluespaceVendor.jsx index c7192b23c5ce..958a79262bf0 100644 --- a/tgui/packages/tgui/interfaces/BluespaceVendor.jsx +++ b/tgui/packages/tgui/interfaces/BluespaceVendor.jsx @@ -1,6 +1,7 @@ import { filter, sortBy } from 'common/collections'; import { flow } from 'common/fp'; import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { Button, diff --git a/tgui/packages/tgui/interfaces/BountyBoard.jsx b/tgui/packages/tgui/interfaces/BountyBoard.jsx index 6f93a5af3a58..907c98444143 100644 --- a/tgui/packages/tgui/interfaces/BountyBoard.jsx +++ b/tgui/packages/tgui/interfaces/BountyBoard.jsx @@ -1,5 +1,4 @@ import { useBackend } from '../backend'; -import { UserDetails } from './Vending'; import { BlockQuote, Box, @@ -13,6 +12,7 @@ import { } from '../components'; import { formatMoney } from '../format'; import { Window } from '../layouts'; +import { UserDetails } from './Vending'; export const BountyBoard = (props) => { return ( @@ -94,7 +94,7 @@ export const BountyBoardContent = (props) => { {applicants?.map( (applicant) => applicant.request_id === request.acc_number && ( - + { diff --git a/tgui/packages/tgui/interfaces/CameraConsole.jsx b/tgui/packages/tgui/interfaces/CameraConsole.jsx index 89b469941362..03b823f5a1a1 100644 --- a/tgui/packages/tgui/interfaces/CameraConsole.jsx +++ b/tgui/packages/tgui/interfaces/CameraConsole.jsx @@ -2,6 +2,7 @@ import { filter, sortBy } from 'common/collections'; import { flow } from 'common/fp'; import { classes } from 'common/react'; import { createSearch } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; import { Button, ByondUi, Flex, Input, Section } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/Canister.jsx b/tgui/packages/tgui/interfaces/Canister.jsx index a06997f7ad91..0ecf5bb49f4a 100644 --- a/tgui/packages/tgui/interfaces/Canister.jsx +++ b/tgui/packages/tgui/interfaces/Canister.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/Canvas.tsx b/tgui/packages/tgui/interfaces/Canvas.tsx index 894b07c6f63c..797d82f8b92f 100644 --- a/tgui/packages/tgui/interfaces/Canvas.tsx +++ b/tgui/packages/tgui/interfaces/Canvas.tsx @@ -1,25 +1,26 @@ import { Color } from 'common/color'; import { decodeHtmlEntities } from 'common/string'; import { Component, createRef, RefObject } from 'react'; + import { useBackend } from '../backend'; import { Box, Button, Flex } from '../components'; import { Window } from '../layouts'; type PaintCanvasProps = Partial<{ + drawing_color: string | null; + editable: boolean; + height: number; + imageHeight: number; + imageWidth: number; onCanvasModifiedHandler: (data: PointData[]) => void; value: string[][]; width: number; - height: number; - imageWidth: number; - imageHeight: number; - editable: boolean; - drawing_color: string | null; }>; type PointData = { + color: Color; x: number; y: number; - color: Color; }; const fromDM = (data: string[][]) => { @@ -193,17 +194,17 @@ type PaletteColor = { }; type CanvasData = { - grid: string[][]; - px_per_unit: number; + author: string | null; + date: string | null; + editable: boolean; finalized: boolean; + grid: string[][]; + medium: string | null; name: string; - editable: boolean; paint_tool_color: string | null; paint_tool_palette: PaletteColor[] | null; - author: string | null; - medium: string | null; patron: string | null; - date: string | null; + px_per_unit: number; show_plaque: boolean; }; diff --git a/tgui/packages/tgui/interfaces/Cargo.jsx b/tgui/packages/tgui/interfaces/Cargo.jsx index 38a2613c7fce..617a60f35cec 100644 --- a/tgui/packages/tgui/interfaces/Cargo.jsx +++ b/tgui/packages/tgui/interfaces/Cargo.jsx @@ -1,5 +1,6 @@ -import { flow } from 'common/fp'; import { filter, sortBy } from 'common/collections'; +import { flow } from 'common/fp'; + import { useBackend, useSharedState } from '../backend'; import { AnimatedNumber, diff --git a/tgui/packages/tgui/interfaces/CellularEmporium.tsx b/tgui/packages/tgui/interfaces/CellularEmporium.tsx index eddba57b3b33..4d9e82948bfc 100644 --- a/tgui/packages/tgui/interfaces/CellularEmporium.tsx +++ b/tgui/packages/tgui/interfaces/CellularEmporium.tsx @@ -1,12 +1,12 @@ import { useBackend } from '../backend'; import { + Box, Button, - Section, Icon, - Stack, LabeledList, - Box, NoticeBox, + Section, + Stack, } from '../components'; import { Window } from '../layouts'; @@ -17,13 +17,13 @@ type CellularEmporiumContext = { }; type Ability = { - name: string; + can_purchase: boolean; desc: string; - path: string; dna_cost: number; helptext: string; + name: string; owned: boolean; - can_purchase: boolean; + path: string; }; export const CellularEmporium = (props) => { diff --git a/tgui/packages/tgui/interfaces/CentcomPodLauncher.jsx b/tgui/packages/tgui/interfaces/CentcomPodLauncher.jsx index 9dcb1b89d96a..9c08bc456fa5 100644 --- a/tgui/packages/tgui/interfaces/CentcomPodLauncher.jsx +++ b/tgui/packages/tgui/interfaces/CentcomPodLauncher.jsx @@ -3,6 +3,7 @@ import { classes } from 'common/react'; import { storage } from 'common/storage'; import { createUuid } from 'common/uuid'; import { Component, Fragment } from 'react'; + import { useBackend, useLocalState } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/ChameleonCard.jsx b/tgui/packages/tgui/interfaces/ChameleonCard.jsx index 5969d926601a..42faa04df39c 100644 --- a/tgui/packages/tgui/interfaces/ChameleonCard.jsx +++ b/tgui/packages/tgui/interfaces/ChameleonCard.jsx @@ -1,6 +1,6 @@ import { useBackend } from '../backend'; -import { AccessList } from './common/AccessList'; import { Window } from '../layouts'; +import { AccessList } from './common/AccessList'; export const ChameleonCard = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Changelog.jsx b/tgui/packages/tgui/interfaces/Changelog.jsx index 8ffe8071a2ae..d247924c74cc 100644 --- a/tgui/packages/tgui/interfaces/Changelog.jsx +++ b/tgui/packages/tgui/interfaces/Changelog.jsx @@ -1,6 +1,10 @@ import { classes } from 'common/react'; -import { useBackend } from '../backend'; +import dateformat from 'dateformat'; +import yaml from 'js-yaml'; import { Component, Fragment } from 'react'; + +import { resolveAsset } from '../assets'; +import { useBackend } from '../backend'; import { Box, Button, @@ -11,9 +15,6 @@ import { Table, } from '../components'; import { Window } from '../layouts'; -import { resolveAsset } from '../assets'; -import dateformat from 'dateformat'; -import yaml from 'js-yaml'; const icons = { bugfix: { icon: 'bug', color: 'green' }, diff --git a/tgui/packages/tgui/interfaces/ChemFilter.jsx b/tgui/packages/tgui/interfaces/ChemFilter.jsx index e7ac91e12575..230538af33a5 100644 --- a/tgui/packages/tgui/interfaces/ChemFilter.jsx +++ b/tgui/packages/tgui/interfaces/ChemFilter.jsx @@ -1,4 +1,5 @@ import { Fragment } from 'react'; + import { useBackend, useLocalState } from '../backend'; import { Button, Input, Section, Stack } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/ChemHeater.jsx b/tgui/packages/tgui/interfaces/ChemHeater.jsx index 60c9d6d71196..21fe23c79d23 100644 --- a/tgui/packages/tgui/interfaces/ChemHeater.jsx +++ b/tgui/packages/tgui/interfaces/ChemHeater.jsx @@ -1,4 +1,5 @@ import { round, toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { AnimatedNumber, diff --git a/tgui/packages/tgui/interfaces/ChemReactionChamber.jsx b/tgui/packages/tgui/interfaces/ChemReactionChamber.jsx index efe7e6a86c12..d9bb7cda2f39 100644 --- a/tgui/packages/tgui/interfaces/ChemReactionChamber.jsx +++ b/tgui/packages/tgui/interfaces/ChemReactionChamber.jsx @@ -1,3 +1,5 @@ +import { round, toFixed } from 'common/math'; + import { useBackend, useLocalState } from '../backend'; import { AnimatedNumber, @@ -6,12 +8,11 @@ import { Input, LabeledList, NumberInput, - Section, RoundGauge, + Section, Stack, } from '../components'; import { Window } from '../layouts'; -import { round, toFixed } from 'common/math'; export const ChemReactionChamber = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/ChemRecipeDebug.jsx b/tgui/packages/tgui/interfaces/ChemRecipeDebug.jsx index 8bea7024d528..9a0e2e2c40b8 100644 --- a/tgui/packages/tgui/interfaces/ChemRecipeDebug.jsx +++ b/tgui/packages/tgui/interfaces/ChemRecipeDebug.jsx @@ -1,4 +1,5 @@ import { round } from 'common/math'; + import { useBackend } from '../backend'; import { AnimatedNumber, diff --git a/tgui/packages/tgui/interfaces/ChemSplitter.jsx b/tgui/packages/tgui/interfaces/ChemSplitter.jsx index 077742c986d8..2efa2d6863ec 100644 --- a/tgui/packages/tgui/interfaces/ChemSplitter.jsx +++ b/tgui/packages/tgui/interfaces/ChemSplitter.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { LabeledList, NumberInput, Section } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/ChemSynthesizer.jsx b/tgui/packages/tgui/interfaces/ChemSynthesizer.jsx index ea00f85e7929..19d7faee72e1 100644 --- a/tgui/packages/tgui/interfaces/ChemSynthesizer.jsx +++ b/tgui/packages/tgui/interfaces/ChemSynthesizer.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { Box, Button, Section } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/CircuitAccessChecker.jsx b/tgui/packages/tgui/interfaces/CircuitAccessChecker.jsx index ca75f6742873..cc1d6eda44ce 100644 --- a/tgui/packages/tgui/interfaces/CircuitAccessChecker.jsx +++ b/tgui/packages/tgui/interfaces/CircuitAccessChecker.jsx @@ -1,6 +1,6 @@ import { useBackend } from '../backend'; +import { Button, LabeledList } from '../components'; import { Window } from '../layouts'; -import { LabeledList, Button } from '../components'; import { AccessConfig } from './common/AccessConfig'; export const CircuitAccessChecker = (props) => { diff --git a/tgui/packages/tgui/interfaces/CircuitAdminPanel.tsx b/tgui/packages/tgui/interfaces/CircuitAdminPanel.tsx index 20ebc2710d74..c42c30e19b1a 100644 --- a/tgui/packages/tgui/interfaces/CircuitAdminPanel.tsx +++ b/tgui/packages/tgui/interfaces/CircuitAdminPanel.tsx @@ -1,14 +1,15 @@ import { BooleanLike } from 'common/react'; + import { useBackend } from '../backend'; import { Button, Table } from '../components'; import { Window } from '../layouts'; type CircuitAdminPanelData = { circuits: { - ref: string; - name: string; creator: string; has_inserter: BooleanLike; + name: string; + ref: string; }[]; }; diff --git a/tgui/packages/tgui/interfaces/CircuitModule.jsx b/tgui/packages/tgui/interfaces/CircuitModule.jsx index 1f06316b5744..799fea9d15ff 100644 --- a/tgui/packages/tgui/interfaces/CircuitModule.jsx +++ b/tgui/packages/tgui/interfaces/CircuitModule.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Stack, Section, Input, Button, Dropdown } from '../components'; +import { Button, Dropdown, Input, Section, Stack } from '../components'; import { Window } from '../layouts'; export const CircuitModule = (props) => { diff --git a/tgui/packages/tgui/interfaces/CircuitSignalHandler.tsx b/tgui/packages/tgui/interfaces/CircuitSignalHandler.tsx index c7b947f863d2..f093aec5226f 100644 --- a/tgui/packages/tgui/interfaces/CircuitSignalHandler.tsx +++ b/tgui/packages/tgui/interfaces/CircuitSignalHandler.tsx @@ -1,23 +1,24 @@ import { Component } from 'react'; + import { useBackend } from '../backend'; -import { Box, Stack, Section, Input, Button, Dropdown } from '../components'; +import { Box, Button, Dropdown, Input, Section, Stack } from '../components'; import { Window } from '../layouts'; type Response = { - name: string; bitflag: number; + name: string; }; type Parameter = { - name: string; datatype: string; + name: string; }; type CircuitSignalHandlerState = { - signal_id: string; - responseList: Response[]; - parameterList: Parameter[]; global: Boolean; + parameterList: Parameter[]; + responseList: Response[]; + signal_id: string; }; type CircuitSignalHandlerData = { @@ -191,11 +192,11 @@ export class CircuitSignalHandler extends Component< } type EntryProps = { - onRemove: (e: MouseEvent) => any; + current_option: string; + name: string; onEnter: (e: MouseEvent, value: string) => any; + onRemove: (e: MouseEvent) => any; onSetOption?: (type: string) => any; - name: string; - current_option: string; options?: string[]; }; diff --git a/tgui/packages/tgui/interfaces/Clipboard.jsx b/tgui/packages/tgui/interfaces/Clipboard.jsx index e758959509af..5aa6d3deb233 100644 --- a/tgui/packages/tgui/interfaces/Clipboard.jsx +++ b/tgui/packages/tgui/interfaces/Clipboard.jsx @@ -3,8 +3,8 @@ import { Box, Button, Divider, - LabeledList, Flex, + LabeledList, Section, } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/ColorMatrixEditor.jsx b/tgui/packages/tgui/interfaces/ColorMatrixEditor.jsx index a616bc135b5a..3fab9f381f0f 100644 --- a/tgui/packages/tgui/interfaces/ColorMatrixEditor.jsx +++ b/tgui/packages/tgui/interfaces/ColorMatrixEditor.jsx @@ -1,12 +1,13 @@ -import { useBackend } from '../backend'; import { toFixed } from 'common/math'; + +import { useBackend } from '../backend'; import { Box, - Stack, - Section, + Button, ByondUi, NumberInput, - Button, + Section, + Stack, } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/CommunicationsConsole.jsx b/tgui/packages/tgui/interfaces/CommunicationsConsole.jsx index b35d2e29cdd3..b0215a04c5d3 100644 --- a/tgui/packages/tgui/interfaces/CommunicationsConsole.jsx +++ b/tgui/packages/tgui/interfaces/CommunicationsConsole.jsx @@ -1,5 +1,6 @@ import { sortBy } from 'common/collections'; import { capitalize } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; import { Blink, diff --git a/tgui/packages/tgui/interfaces/ComponentPrinter.tsx b/tgui/packages/tgui/interfaces/ComponentPrinter.tsx index f56ada79d505..70404f430792 100644 --- a/tgui/packages/tgui/interfaces/ComponentPrinter.tsx +++ b/tgui/packages/tgui/interfaces/ComponentPrinter.tsx @@ -1,14 +1,15 @@ import { createSearch } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; +import { Box, Button, Input, Section, Stack, Tabs } from '../components'; +import { Window } from '../layouts'; import { Material, + MATERIAL_KEYS, MaterialAmount, MaterialFormatting, Materials, - MATERIAL_KEYS, } from './common/Materials'; -import { Window } from '../layouts'; -import { Box, Button, Input, Section, Stack, Tabs } from '../components'; const CATEGORY_ALL = 'All'; @@ -20,10 +21,10 @@ const getCategory = (category: string[]) => { }; type Design = { - name: string; + categories: string[]; description: string; materials: Record; - categories: string[]; + name: string; }; type ComponentPrinterData = { diff --git a/tgui/packages/tgui/interfaces/CrewConsole.jsx b/tgui/packages/tgui/interfaces/CrewConsole.jsx index 40b4f90286f2..0626fe7440bb 100644 --- a/tgui/packages/tgui/interfaces/CrewConsole.jsx +++ b/tgui/packages/tgui/interfaces/CrewConsole.jsx @@ -1,6 +1,7 @@ import { sortBy } from 'common/collections'; + import { useBackend } from '../backend'; -import { Button, Section, Table, Icon } from '../components'; +import { Button, Icon, Section, Table } from '../components'; import { COLORS } from '../constants'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/CrewManifest.jsx b/tgui/packages/tgui/interfaces/CrewManifest.jsx index fdc2a5ec8581..1e776076e29c 100644 --- a/tgui/packages/tgui/interfaces/CrewManifest.jsx +++ b/tgui/packages/tgui/interfaces/CrewManifest.jsx @@ -1,4 +1,5 @@ import { classes } from 'common/react'; + import { useBackend } from '../backend'; import { Icon, Section, Table, Tooltip } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/Cryo.jsx b/tgui/packages/tgui/interfaces/Cryo.jsx index 631d585d6ae6..b5d01ae467a0 100644 --- a/tgui/packages/tgui/interfaces/Cryo.jsx +++ b/tgui/packages/tgui/interfaces/Cryo.jsx @@ -6,8 +6,8 @@ import { ProgressBar, Section, } from '../components'; -import { BeakerContents } from './common/BeakerContents'; import { Window } from '../layouts'; +import { BeakerContents } from './common/BeakerContents'; const damageTypes = [ { diff --git a/tgui/packages/tgui/interfaces/Crystallizer.jsx b/tgui/packages/tgui/interfaces/Crystallizer.jsx index a10a587aaf15..3ffc714be2d8 100644 --- a/tgui/packages/tgui/interfaces/Crystallizer.jsx +++ b/tgui/packages/tgui/interfaces/Crystallizer.jsx @@ -1,14 +1,15 @@ +import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { + Box, Button, LabeledList, + NumberInput, ProgressBar, Section, - NumberInput, - Box, } from '../components'; import { getGasColor, getGasLabel } from '../constants'; -import { toFixed } from 'common/math'; import { Window } from '../layouts'; const logScale = (value) => Math.log2(16 + Math.max(0, value)) - 4; diff --git a/tgui/packages/tgui/interfaces/DebugHealth.tsx b/tgui/packages/tgui/interfaces/DebugHealth.tsx index 0577324eefd0..9fbfb452bc6e 100644 --- a/tgui/packages/tgui/interfaces/DebugHealth.tsx +++ b/tgui/packages/tgui/interfaces/DebugHealth.tsx @@ -1,5 +1,6 @@ +import { toTitleCase } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; -import { Window } from '../layouts'; import { Button, Collapsible, @@ -10,8 +11,8 @@ import { Tabs, Tooltip, } from '../components'; -import { toTitleCase } from 'common/string'; import { TableCell, TableRow } from '../components/Table'; +import { Window } from '../layouts'; export const DebugHealth = (props) => { const { data } = useBackend>(); @@ -83,7 +84,7 @@ const ExpandableSection = (props: { data: Record }) => { ); }; -const ArrayDisplay = (props: { label: string; items: any[] }) => { +const ArrayDisplay = (props: { items: any[]; label: string }) => { const { label, items = [] } = props; return ( diff --git a/tgui/packages/tgui/interfaces/DecalPainter.tsx b/tgui/packages/tgui/interfaces/DecalPainter.tsx index bb5d43812fb2..197948f670f7 100644 --- a/tgui/packages/tgui/interfaces/DecalPainter.tsx +++ b/tgui/packages/tgui/interfaces/DecalPainter.tsx @@ -3,31 +3,31 @@ import { Button, ColorBox, Flex, Section } from '../components'; import { Window } from '../layouts'; type DecalInfo = { - name: string; decal: string; + name: string; }; type ColorInfo = { - name: string; color: string; + name: string; }; type DirInfo = { - name: string; dir: number; + name: string; }; type DecalPainterData = { - icon_prefix: string; - decal_list: DecalInfo[]; color_list: ColorInfo[]; + current_color: string; + current_custom_color: string; + current_decal: string; + current_dir: number; + decal_list: DecalInfo[]; dir_list: DirInfo[]; + icon_prefix: string; nondirectional_decals: string[]; supports_custom_color: number; - current_decal: string; - current_color: string; - current_dir: number; - current_custom_color: string; }; export const DecalPainter = (props) => { @@ -124,9 +124,9 @@ export const DecalPainter = (props) => { }; type IconButtonParams = { + color: string; decal: string; dir: number; - color: string; label: string; selected: boolean; }; diff --git a/tgui/packages/tgui/interfaces/DepartmentOrders.tsx b/tgui/packages/tgui/interfaces/DepartmentOrders.tsx index 2cba1be75ae7..ff3e42d65571 100644 --- a/tgui/packages/tgui/interfaces/DepartmentOrders.tsx +++ b/tgui/packages/tgui/interfaces/DepartmentOrders.tsx @@ -1,4 +1,5 @@ import { BooleanLike } from 'common/react'; + import { useBackend, useLocalState } from '../backend'; import { Box, @@ -17,11 +18,11 @@ import { Window } from '../layouts'; const COST_UPPER_BOUND = 3000; type Pack = { - name: string; cost: number; - id: string; desc: string; goody: string; + id: string; + name: string; }; type Category = { @@ -31,8 +32,8 @@ type Category = { type Info = { can_override: BooleanLike; - time_left: number; supplies: Category[]; + time_left: number; }; const CooldownEstimate = (props) => { diff --git a/tgui/packages/tgui/interfaces/DestinationTagger.tsx b/tgui/packages/tgui/interfaces/DestinationTagger.tsx index 04ae61aec018..fb79c9679792 100644 --- a/tgui/packages/tgui/interfaces/DestinationTagger.tsx +++ b/tgui/packages/tgui/interfaces/DestinationTagger.tsx @@ -1,12 +1,13 @@ -import { flow } from 'common/fp'; import { map, sortBy } from 'common/collections'; +import { flow } from 'common/fp'; + import { useBackend } from '../backend'; +import { Button, Section, Stack } from '../components'; import { Window } from '../layouts'; -import { Stack, Section, Button } from '../components'; type DestinationTaggerData = { - locations: string[]; currentTag: number; + locations: string[]; }; /** diff --git a/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleEnzymes.jsx b/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleEnzymes.jsx index 38baaab8af13..244add6939e4 100644 --- a/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleEnzymes.jsx +++ b/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleEnzymes.jsx @@ -11,8 +11,8 @@ import { Section, Stack, } from '../../components'; -import { GeneticMakeupInfo } from './GeneticMakeupInfo'; import { PULSE_DURATION_MAX, PULSE_STRENGTH_MAX } from './constants'; +import { GeneticMakeupInfo } from './GeneticMakeupInfo'; const GeneticMakeupBufferInfo = (props) => { const { index, makeup } = props; diff --git a/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleSequencer.jsx b/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleSequencer.jsx index 1a0a74db2592..a5d4b5d47b08 100644 --- a/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleSequencer.jsx +++ b/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleSequencer.jsx @@ -1,8 +1,8 @@ import { classes } from 'common/react'; + import { resolveAsset } from '../../assets'; import { useBackend } from '../../backend'; import { Box, Button, Section, Stack } from '../../components'; -import { MutationInfo } from './MutationInfo'; import { CLEAR_GENE, GENE_COLORS, @@ -12,6 +12,7 @@ import { SUBJECT_DEAD, SUBJECT_TRANSFORMING, } from './constants'; +import { MutationInfo } from './MutationInfo'; const GenomeImage = (props) => { const { url, selected, onClick } = props; diff --git a/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx b/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx index 29a493b34394..d43e71124299 100644 --- a/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx +++ b/tgui/packages/tgui/interfaces/DnaConsole/DnaConsoleStorage.jsx @@ -1,5 +1,6 @@ import { uniqBy } from 'common/collections'; import { capitalize } from 'common/string'; + import { useBackend } from '../../backend'; import { Box, @@ -10,8 +11,6 @@ import { LabeledList, Section, } from '../../components'; -import { GeneticMakeupInfo } from './GeneticMakeupInfo'; -import { MutationInfo } from './MutationInfo'; import { STORAGE_CONS_SUBMODE_CHROMOSOMES, STORAGE_CONS_SUBMODE_MUTATIONS, @@ -21,6 +20,8 @@ import { STORAGE_MODE_CONSOLE, STORAGE_MODE_DISK, } from './constants'; +import { GeneticMakeupInfo } from './GeneticMakeupInfo'; +import { MutationInfo } from './MutationInfo'; const DnaConsoleAdvancedInjectors = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/DnaConsole/MutationInfo.jsx b/tgui/packages/tgui/interfaces/DnaConsole/MutationInfo.jsx index fdc656df839e..203136981ac0 100644 --- a/tgui/packages/tgui/interfaces/DnaConsole/MutationInfo.jsx +++ b/tgui/packages/tgui/interfaces/DnaConsole/MutationInfo.jsx @@ -1,5 +1,6 @@ import { filter, uniqBy } from 'common/collections'; import { flow } from 'common/fp'; + import { useBackend } from '../../backend'; import { Box, Button, Divider, Dropdown, LabeledList } from '../../components'; import { diff --git a/tgui/packages/tgui/interfaces/DnaConsole/index.jsx b/tgui/packages/tgui/interfaces/DnaConsole/index.jsx index d8dabc2ad35f..fa7266efc7f5 100644 --- a/tgui/packages/tgui/interfaces/DnaConsole/index.jsx +++ b/tgui/packages/tgui/interfaces/DnaConsole/index.jsx @@ -8,10 +8,6 @@ import { Section, } from '../../components'; import { Window } from '../../layouts'; -import { DnaConsoleEnzymes } from './DnaConsoleEnzymes'; -import { DnaConsoleSequencer } from './DnaConsoleSequencer'; -import { DnaConsoleStorage } from './DnaConsoleStorage'; -import { DnaScanner } from './DnaScanner'; import { CONSOLE_MODE_ENZYMES, CONSOLE_MODE_FEATURES, @@ -19,6 +15,10 @@ import { CONSOLE_MODE_STORAGE, STORAGE_MODE_CONSOLE, } from './constants'; +import { DnaConsoleEnzymes } from './DnaConsoleEnzymes'; +import { DnaConsoleSequencer } from './DnaConsoleSequencer'; +import { DnaConsoleStorage } from './DnaConsoleStorage'; +import { DnaScanner } from './DnaScanner'; const DnaConsoleCommands = (props) => { const { data, act } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/EightBallVote.jsx b/tgui/packages/tgui/interfaces/EightBallVote.jsx index a96193403828..242527adcd58 100644 --- a/tgui/packages/tgui/interfaces/EightBallVote.jsx +++ b/tgui/packages/tgui/interfaces/EightBallVote.jsx @@ -1,6 +1,7 @@ -import { useBackend } from '../backend'; -import { Box, Button, Grid, Section, NoticeBox } from '../components'; import { toTitleCase } from 'common/string'; + +import { useBackend } from '../backend'; +import { Box, Button, Grid, NoticeBox, Section } from '../components'; import { Window } from '../layouts'; export const EightBallVote = (props) => { diff --git a/tgui/packages/tgui/interfaces/Electropack.jsx b/tgui/packages/tgui/interfaces/Electropack.jsx index 3eb52ab89469..4b0a14e8b029 100644 --- a/tgui/packages/tgui/interfaces/Electropack.jsx +++ b/tgui/packages/tgui/interfaces/Electropack.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { Button, LabeledList, NumberInput, Section } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/EngravedMessage.jsx b/tgui/packages/tgui/interfaces/EngravedMessage.jsx index d66f33b086b3..91a2b3b458fb 100644 --- a/tgui/packages/tgui/interfaces/EngravedMessage.jsx +++ b/tgui/packages/tgui/interfaces/EngravedMessage.jsx @@ -1,4 +1,5 @@ import { decodeHtmlEntities } from 'common/string'; + import { useBackend } from '../backend'; import { Box, Button, LabeledList, Section, Stack } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/ExodroneConsole.tsx b/tgui/packages/tgui/interfaces/ExodroneConsole.tsx index d2166b3c79bd..529ce3c0832c 100644 --- a/tgui/packages/tgui/interfaces/ExodroneConsole.tsx +++ b/tgui/packages/tgui/interfaces/ExodroneConsole.tsx @@ -1,3 +1,8 @@ +import { capitalize } from 'common/string'; +import { Fragment } from 'react'; + +import { resolveAsset } from '../assets'; +import nt_logo from '../assets/bg-nanotrasen.svg'; import { useBackend, useLocalState } from '../backend'; import { BlockQuote, @@ -11,13 +16,9 @@ import { Section, Stack, } from '../components'; -import { Window } from '../layouts'; -import { resolveAsset } from '../assets'; -import { formatTime } from '../format'; -import { capitalize } from 'common/string'; -import nt_logo from '../assets/bg-nanotrasen.svg'; -import { Fragment } from 'react'; import { Image } from '../components/Image'; +import { formatTime } from '../format'; +import { Window } from '../layouts'; type ExplorationEventData = { name: string; @@ -25,13 +26,13 @@ type ExplorationEventData = { }; type FullEventData = { - image: string; - description: string; action_enabled: boolean; action_text: string; - skippable: boolean; + description: string; ignore_text: string; + image: string; ref: string; + skippable: boolean; }; type ChoiceData = { @@ -40,48 +41,48 @@ type ChoiceData = { }; type AdventureData = { + choices: Array; description: string; image: string; raw_image: string; - choices: Array; }; type SiteData = { - name: string; - ref: string; - description: string; - coordinates: string; - distance: number; band_info: Record; - revealed: boolean; - point_scan_complete: boolean; + coordinates: string; deep_scan_complete: boolean; + description: string; + distance: number; events: Array; + name: string; + point_scan_complete: boolean; + ref: string; + revealed: boolean; }; enum DroneStatusEnum { - Idle = 'idle', - Travel = 'travel', - Exploration = 'exploration', Adventure = 'adventure', Busy = 'busy', + Exploration = 'exploration', + Idle = 'idle', + Travel = 'travel', } enum CargoType { - Tool = 'tool', Cargo = 'cargo', Empty = 'empty', + Tool = 'tool', } type CargoData = { - type: CargoType; name: string; + type: CargoType; }; type DroneBasicData = { - name: string; - description: string; controlled: boolean; + description: string; + name: string; ref: string; }; @@ -94,34 +95,34 @@ type DroneAdventure = AdventureDataProvider & { }; type DroneData = { - drone_name: string; + can_travel: boolean; + cargo: Array; + configurable: boolean; drone_integrity: number; + drone_log: Array; drone_max_integrity: number; + drone_name: string; drone_travel_coefficent: number; - drone_log: Array; - configurable: boolean; - cargo: Array; - can_travel: boolean; travel_error: string; }; type DroneBusy = { drone_status: DroneStatusEnum.Busy; - wait_time_left: number; wait_message: string; + wait_time_left: number; }; type DroneExploration = { drone_status: DroneStatusEnum.Exploration; - sites: Array; - site: SiteData; event?: FullEventData; + site: SiteData; + sites: Array; }; type DroneIdle = { drone_status: DroneStatusEnum.Idle; - sites: Array; site: null; + sites: Array; }; type DroneTravel = { @@ -138,11 +139,11 @@ type ActiveDrone = | DroneTravel; type ExodroneConsoleData = { - signal_lost: boolean; + all_bands: Record; // ui_static_data all_tools: Record; - all_bands: Record; + signal_lost: boolean; } & ( | (({ drone: true; diff --git a/tgui/packages/tgui/interfaces/ExoscannerConsole.tsx b/tgui/packages/tgui/interfaces/ExoscannerConsole.tsx index ed3ae629901f..c673caaf0698 100644 --- a/tgui/packages/tgui/interfaces/ExoscannerConsole.tsx +++ b/tgui/packages/tgui/interfaces/ExoscannerConsole.tsx @@ -4,30 +4,30 @@ import { Box, Button, Icon, - Modal, - Section, LabeledList, + Modal, NoticeBox, + Section, Stack, } from '../components'; -import { Window } from '../layouts'; import { formatTime } from '../format'; +import { Window } from '../layouts'; type SiteData = { - name: string; - ref: string; + band_info: Record; description: string; distance: number; - band_info: Record; + name: string; + ref: string; revealed: boolean; }; type ScanData = { - scan_power: number; - point_scan_eta: number; + deep_scan_complete: boolean; deep_scan_eta: number; point_scan_complete: boolean; - deep_scan_complete: boolean; + point_scan_eta: number; + scan_power: number; site_data: SiteData; }; @@ -141,9 +141,9 @@ const ScanSelectionSection = (_) => { }; type ScanInProgressData = { - scan_time: number; - scan_power: number; scan_description: string; + scan_power: number; + scan_time: number; }; const ScanInProgressModal = (_) => { @@ -178,13 +178,13 @@ const ScanInProgressModal = (_) => { }; type ExoscannerConsoleData = { + failed: boolean; + possible_sites: Array; + scan_conditions: Array; scan_in_progress: boolean; scan_power: number; - possible_sites: Array; - wide_scan_eta: number; selected_site: string; - failed: boolean; - scan_conditions: Array; + wide_scan_eta: number; }; export const ExoscannerConsole = (_) => { diff --git a/tgui/packages/tgui/interfaces/ExosuitControlConsole.jsx b/tgui/packages/tgui/interfaces/ExosuitControlConsole.jsx index 2fe72ef4a4c2..1987005cfca8 100644 --- a/tgui/packages/tgui/interfaces/ExosuitControlConsole.jsx +++ b/tgui/packages/tgui/interfaces/ExosuitControlConsole.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { AnimatedNumber, diff --git a/tgui/packages/tgui/interfaces/ExosuitFabricator.jsx b/tgui/packages/tgui/interfaces/ExosuitFabricator.jsx index 4d2a05378c41..fb02957ea393 100644 --- a/tgui/packages/tgui/interfaces/ExosuitFabricator.jsx +++ b/tgui/packages/tgui/interfaces/ExosuitFabricator.jsx @@ -1,6 +1,7 @@ import { uniqBy } from 'common/collections'; import { createSearch } from 'common/string'; import { Fragment } from 'react'; + import { useBackend, useSharedState } from '../backend'; import { Box, @@ -11,13 +12,13 @@ import { Section, Stack, } from '../components'; +import { formatMoney } from '../format'; +import { Window } from '../layouts'; import { - Materials, MaterialAmount, MaterialFormatting, + Materials, } from './common/Materials'; -import { formatMoney } from '../format'; -import { Window } from '../layouts'; const COLOR_NONE = 0; const COLOR_AVERAGE = 1; diff --git a/tgui/packages/tgui/interfaces/FaxMachine.jsx b/tgui/packages/tgui/interfaces/FaxMachine.jsx index 514dfd85ba4f..5101ac22d8a3 100644 --- a/tgui/packages/tgui/interfaces/FaxMachine.jsx +++ b/tgui/packages/tgui/interfaces/FaxMachine.jsx @@ -1,4 +1,4 @@ -import { useBackend, useSharedState, useLocalState } from '../backend'; +import { useBackend, useLocalState, useSharedState } from '../backend'; import { BlockQuote, Box, diff --git a/tgui/packages/tgui/interfaces/Filteriffic.jsx b/tgui/packages/tgui/interfaces/Filteriffic.jsx index 19f954b3df02..6aa43a389600 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic.jsx +++ b/tgui/packages/tgui/interfaces/Filteriffic.jsx @@ -1,5 +1,6 @@ import { map } from 'common/collections'; import { toFixed } from 'common/math'; + import { numberOfDecimalDigits } from '../../common/math'; import { useBackend, useLocalState } from '../backend'; import { diff --git a/tgui/packages/tgui/interfaces/FishCatalog.jsx b/tgui/packages/tgui/interfaces/FishCatalog.jsx index 7491b4349955..ada3c829d1ac 100644 --- a/tgui/packages/tgui/interfaces/FishCatalog.jsx +++ b/tgui/packages/tgui/interfaces/FishCatalog.jsx @@ -1,10 +1,11 @@ import { sortBy } from 'common/collections'; import { flow } from 'common/fp'; import { classes } from 'common/react'; +import { capitalize } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; import { Box, Button, LabeledList, Section, Stack } from '../components'; import { Window } from '../layouts'; -import { capitalize } from 'common/string'; export const FishCatalog = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/ForbiddenLore.jsx b/tgui/packages/tgui/interfaces/ForbiddenLore.jsx index da2c62c22625..636d985b86b5 100644 --- a/tgui/packages/tgui/interfaces/ForbiddenLore.jsx +++ b/tgui/packages/tgui/interfaces/ForbiddenLore.jsx @@ -1,5 +1,6 @@ import { sortBy } from 'common/collections'; import { flow } from 'common/fp'; + import { useBackend } from '../backend'; import { Box, Button, Section } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/GasAnalyzer.tsx b/tgui/packages/tgui/interfaces/GasAnalyzer.tsx index 33289334e45b..bf8842f23a2c 100644 --- a/tgui/packages/tgui/interfaces/GasAnalyzer.tsx +++ b/tgui/packages/tgui/interfaces/GasAnalyzer.tsx @@ -1,8 +1,8 @@ import { useBackend } from '../backend'; -import { GasmixParser } from './common/GasmixParser'; -import type { Gasmix } from './common/GasmixParser'; -import { Window } from '../layouts'; import { Section } from '../components'; +import { Window } from '../layouts'; +import type { Gasmix } from './common/GasmixParser'; +import { GasmixParser } from './common/GasmixParser'; export const GasAnalyzerContent = (props) => { const { act, data } = useBackend<{ gasmixes: Gasmix[] }>(); diff --git a/tgui/packages/tgui/interfaces/Gps.jsx b/tgui/packages/tgui/interfaces/Gps.jsx index 5695fa9217e5..662335fcdc3b 100644 --- a/tgui/packages/tgui/interfaces/Gps.jsx +++ b/tgui/packages/tgui/interfaces/Gps.jsx @@ -2,6 +2,7 @@ import { map, sortBy } from 'common/collections'; import { flow } from 'common/fp'; import { clamp } from 'common/math'; import { vecLength, vecSubtract } from 'common/vector'; + import { useBackend } from '../backend'; import { Box, Button, Icon, LabeledList, Section, Table } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/GreyscaleModifyMenu.tsx b/tgui/packages/tgui/interfaces/GreyscaleModifyMenu.tsx index d1e52862f061..dbb18b3564bf 100644 --- a/tgui/packages/tgui/interfaces/GreyscaleModifyMenu.tsx +++ b/tgui/packages/tgui/interfaces/GreyscaleModifyMenu.tsx @@ -3,14 +3,14 @@ import { Box, Button, ColorBox, + Divider, Flex, - Stack, Icon, Input, LabeledList, Section, + Stack, Table, - Divider, } from '../components'; import { Image } from '../components/Image'; import { Window } from '../layouts'; @@ -21,39 +21,39 @@ type ColorEntry = { }; type SpriteData = { - icon_states: string[]; finished: string; + icon_states: string[]; steps: SpriteEntry[]; time_spent: Number; }; type SpriteEntry = { + config_name: string; layer: string; result: string; - config_name: string; }; type GreyscaleMenuData = { - greyscale_config: string; colors: ColorEntry[]; - sprites: SpriteData; generate_full_preview: boolean; - unlocked: boolean; - monitoring_files: boolean; - sprites_dir: string; + greyscale_config: string; icon_state: string; + monitoring_files: boolean; refreshing: boolean; + sprites: SpriteData; + sprites_dir: string; + unlocked: boolean; }; enum Direction { + East = 'east', North = 'north', NorthEast = 'northeast', - East = 'east', - SouthEast = 'southeast', + NorthWest = 'northwest', South = 'south', + SouthEast = 'southeast', SouthWest = 'southwest', West = 'west', - NorthWest = 'northwest', } const DirectionAbbreviation: Record = { diff --git a/tgui/packages/tgui/interfaces/HoloPay.tsx b/tgui/packages/tgui/interfaces/HoloPay.tsx index 68e1fffeeb1d..02a56e2246af 100644 --- a/tgui/packages/tgui/interfaces/HoloPay.tsx +++ b/tgui/packages/tgui/interfaces/HoloPay.tsx @@ -23,7 +23,7 @@ type HoloPayData = { name: string; owner: string; shop_logo: string; - user: { name: string; balance: number }; + user: { balance: number; name: string }; }; const COPYRIGHT_SCROLLER = `Nanotrasen (c) 2525-2562. All sales final. diff --git a/tgui/packages/tgui/interfaces/HotkeysHelp.tsx b/tgui/packages/tgui/interfaces/HotkeysHelp.tsx index 1d90e40d414b..00884e1f1822 100644 --- a/tgui/packages/tgui/interfaces/HotkeysHelp.tsx +++ b/tgui/packages/tgui/interfaces/HotkeysHelp.tsx @@ -3,13 +3,13 @@ import { Box, Section, Table, Tooltip } from '../components'; import { Window } from '../layouts'; type BindingInfo = { - name: string; desc: string; + name: string; }; type HotkeyInfo = { - key: string; bindings: BindingInfo[]; + key: string; }; type HotkeysHelpData = { @@ -21,8 +21,8 @@ type KeyBindingBoxProps = { }; type ModkeyProps = { - text: string; color: string; + text: string; }; const shiftRegex = /(.*)(Shift)(.*)/; diff --git a/tgui/packages/tgui/interfaces/Hypertorus/Gases.jsx b/tgui/packages/tgui/interfaces/Hypertorus/Gases.jsx index a03712295237..dd02d2de7905 100644 --- a/tgui/packages/tgui/interfaces/Hypertorus/Gases.jsx +++ b/tgui/packages/tgui/interfaces/Hypertorus/Gases.jsx @@ -1,6 +1,7 @@ import { filter, sortBy } from 'common/collections'; import { flow } from 'common/fp'; import { toFixed } from 'common/math'; + import { useBackend } from '../../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/Hypertorus/Parameters.jsx b/tgui/packages/tgui/interfaces/Hypertorus/Parameters.jsx index b02e1405b99f..179c7aaaff4d 100644 --- a/tgui/packages/tgui/interfaces/Hypertorus/Parameters.jsx +++ b/tgui/packages/tgui/interfaces/Hypertorus/Parameters.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../../backend'; import { Flex, LabeledControls, RoundGauge, Section } from '../../components'; import { formatSiUnit } from '../../format'; diff --git a/tgui/packages/tgui/interfaces/Hypertorus/index.jsx b/tgui/packages/tgui/interfaces/Hypertorus/index.jsx index 52fd3b0ac6ca..c0187fa59b54 100644 --- a/tgui/packages/tgui/interfaces/Hypertorus/index.jsx +++ b/tgui/packages/tgui/interfaces/Hypertorus/index.jsx @@ -1,6 +1,7 @@ import { useBackend } from 'tgui/backend'; import { Button, Collapsible, Flex, Section, Stack } from 'tgui/components'; import { Window } from 'tgui/layouts'; + import { HypertorusSecondaryControls, HypertorusWasteRemove } from './Controls'; import { HypertorusGases } from './Gases'; import { HypertorusParameters } from './Parameters'; diff --git a/tgui/packages/tgui/interfaces/IVDrip.jsx b/tgui/packages/tgui/interfaces/IVDrip.jsx index 2a1777d4669e..3759c421c58f 100644 --- a/tgui/packages/tgui/interfaces/IVDrip.jsx +++ b/tgui/packages/tgui/interfaces/IVDrip.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Box, Button, NumberInput, LabeledList, Section } from '../components'; +import { Box, Button, LabeledList, NumberInput, Section } from '../components'; import { Window } from '../layouts'; export const IVDrip = (props) => { diff --git a/tgui/packages/tgui/interfaces/InfraredEmitter.jsx b/tgui/packages/tgui/interfaces/InfraredEmitter.jsx index 7abc089c22bc..ab97ccee27ad 100644 --- a/tgui/packages/tgui/interfaces/InfraredEmitter.jsx +++ b/tgui/packages/tgui/interfaces/InfraredEmitter.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Button, Section, LabeledList } from '../components'; +import { Button, LabeledList, Section } from '../components'; import { Window } from '../layouts'; export const InfraredEmitter = (props) => { diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/BasicInput.jsx b/tgui/packages/tgui/interfaces/IntegratedCircuit/BasicInput.jsx index 74cc9a2157f6..a4e898c3a34d 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/BasicInput.jsx +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/BasicInput.jsx @@ -1,4 +1,4 @@ -import { Stack, Button } from '../../components'; +import { Button, Stack } from '../../components'; export const BasicInput = (props) => { const { children, name, setValue, defaultValue, value } = props; diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/CircuitInfo.jsx b/tgui/packages/tgui/interfaces/IntegratedCircuit/CircuitInfo.jsx index 7e932c0eb9e2..607e22d920e0 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/CircuitInfo.jsx +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/CircuitInfo.jsx @@ -1,4 +1,4 @@ -import { Button, Stack, Box } from '../../components'; +import { Box, Button, Stack } from '../../components'; export const CircuitInfo = (props) => { const { name, desc, notices, ...rest } = props; diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/ComponentMenu.jsx b/tgui/packages/tgui/interfaces/IntegratedCircuit/ComponentMenu.jsx index 44ea18920790..9777d9ae5ca9 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/ComponentMenu.jsx +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/ComponentMenu.jsx @@ -1,10 +1,11 @@ -import { Section, Button, Dropdown, Stack, Box, Input } from '../../components'; -import { Component } from 'react'; import { shallowDiffers } from 'common/react'; -import { fetchRetry } from '../../http'; +import { Component } from 'react'; + import { resolveAsset } from '../../assets'; -import { Port } from './Port'; +import { Box, Button, Dropdown, Input, Section, Stack } from '../../components'; +import { fetchRetry } from '../../http'; import { DEFAULT_COMPONENT_MENU_LIMIT, noop } from './constants'; +import { Port } from './Port'; // Cache response so it's only sent once let fetchServerData; diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/Connections.jsx b/tgui/packages/tgui/interfaces/IntegratedCircuit/Connections.jsx index 3eb73f754c42..9cf4e5df080a 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/Connections.jsx +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/Connections.jsx @@ -1,6 +1,6 @@ +import { classes } from '../../../common/react'; import { CSS_COLORS } from '../../constants'; import { SVG_CURVE_INTENSITY } from './constants'; -import { classes } from '../../../common/react'; export const Connections = (props) => { const { connections } = props; diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/DisplayName.jsx b/tgui/packages/tgui/interfaces/IntegratedCircuit/DisplayName.jsx index 41ca890c6d33..7ac36a9ab379 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/DisplayName.jsx +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/DisplayName.jsx @@ -1,7 +1,7 @@ import { Box, Button, Flex } from '../../components'; import { - FUNDAMENTAL_DATA_TYPES, DATATYPE_DISPLAY_HANDLERS, + FUNDAMENTAL_DATA_TYPES, } from './FundamentalTypes'; export const DisplayName = (props) => { diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/FundamentalTypes.jsx b/tgui/packages/tgui/interfaces/IntegratedCircuit/FundamentalTypes.jsx index e6e3cf967570..abad9a620663 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/FundamentalTypes.jsx +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/FundamentalTypes.jsx @@ -1,5 +1,5 @@ +import { Button, Dropdown, Input, NumberInput, Stack } from '../../components'; import { BasicInput } from './BasicInput'; -import { NumberInput, Button, Stack, Input, Dropdown } from '../../components'; import { OPTION_DROPDOWN_LARGE_CHAR_AMOUNT } from './constants'; export const FUNDAMENTAL_DATA_TYPES = { diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/ObjectComponent.jsx b/tgui/packages/tgui/interfaces/IntegratedCircuit/ObjectComponent.jsx index 804bec3641a6..d51c39714efc 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/ObjectComponent.jsx +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/ObjectComponent.jsx @@ -1,6 +1,7 @@ -import { Box, Stack, Button } from '../../components'; import { Component } from 'react'; + import { shallowDiffers } from '../../../common/react'; +import { Box, Button, Stack } from '../../components'; import { ABSOLUTE_Y_OFFSET, noop } from './constants'; import { Port } from './Port'; diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/Port.jsx b/tgui/packages/tgui/interfaces/IntegratedCircuit/Port.jsx index 780e8414f925..1034602a5236 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/Port.jsx +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/Port.jsx @@ -1,8 +1,9 @@ -import { Stack, Box } from '../../components'; -import { Component, createRef } from 'react'; -import { DisplayName } from './DisplayName'; import { classes } from 'common/react'; +import { Component, createRef } from 'react'; + +import { Box, Stack } from '../../components'; import { noop } from './constants'; +import { DisplayName } from './DisplayName'; export class Port extends Component { constructor(props) { diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/VariableMenu.jsx b/tgui/packages/tgui/interfaces/IntegratedCircuit/VariableMenu.jsx index b058d2afde50..df9fb5b660bc 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/VariableMenu.jsx +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/VariableMenu.jsx @@ -1,14 +1,15 @@ +import { shallowDiffers } from 'common/react'; +import { Component } from 'react'; + import { Box, - Stack, - Section, Button, - Input, Dropdown, Icon, + Input, + Section, + Stack, } from '../../components'; -import { Component } from 'react'; -import { shallowDiffers } from 'common/react'; export class VariableMenu extends Component { constructor(props) { diff --git a/tgui/packages/tgui/interfaces/IntegratedCircuit/index.jsx b/tgui/packages/tgui/interfaces/IntegratedCircuit/index.jsx index 752b98ec791b..caaa89e93e1a 100644 --- a/tgui/packages/tgui/interfaces/IntegratedCircuit/index.jsx +++ b/tgui/packages/tgui/interfaces/IntegratedCircuit/index.jsx @@ -1,18 +1,19 @@ -import { useBackend } from '../../backend'; -import { Input, InfinitePlane, Stack, Box, Button } from '../../components'; import { Component } from 'react'; -import { Window } from '../../layouts'; + import { resolveAsset } from '../../assets'; +import { useBackend } from '../../backend'; +import { Box, Button, InfinitePlane, Input, Stack } from '../../components'; +import { Window } from '../../layouts'; import { CircuitInfo } from './CircuitInfo'; +import { ComponentMenu } from './ComponentMenu'; +import { Connections } from './Connections'; import { ABSOLUTE_Y_OFFSET, MOUSE_BUTTON_LEFT, TIME_UNTIL_PORT_RELEASE_WORKS, } from './constants'; -import { Connections } from './Connections'; import { ObjectComponent } from './ObjectComponent'; import { VariableMenu } from './VariableMenu'; -import { ComponentMenu } from './ComponentMenu'; export class IntegratedCircuit extends Component { constructor(props) { diff --git a/tgui/packages/tgui/interfaces/Interview.jsx b/tgui/packages/tgui/interfaces/Interview.jsx index 514850474d2d..ea45cf0ef96d 100644 --- a/tgui/packages/tgui/interfaces/Interview.jsx +++ b/tgui/packages/tgui/interfaces/Interview.jsx @@ -1,12 +1,12 @@ +import { useBackend } from '../backend'; import { - Button, - TextArea, - Section, BlockQuote, + Button, NoticeBox, + Section, + TextArea, } from '../components'; import { Window } from '../layouts'; -import { useBackend } from '../backend'; export const Interview = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/InterviewManager.jsx b/tgui/packages/tgui/interfaces/InterviewManager.jsx index 2b8e43b3f3d0..0e92d662f3f5 100644 --- a/tgui/packages/tgui/interfaces/InterviewManager.jsx +++ b/tgui/packages/tgui/interfaces/InterviewManager.jsx @@ -1,6 +1,6 @@ +import { useBackend } from '../backend'; import { Button, Section } from '../components'; import { Window } from '../layouts'; -import { useBackend } from '../backend'; export const InterviewManager = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Jukebox.jsx b/tgui/packages/tgui/interfaces/Jukebox.jsx index 551050296b71..2a01d964b396 100644 --- a/tgui/packages/tgui/interfaces/Jukebox.jsx +++ b/tgui/packages/tgui/interfaces/Jukebox.jsx @@ -1,14 +1,15 @@ import { sortBy } from 'common/collections'; import { flow } from 'common/fp'; + import { useBackend } from '../backend'; import { Box, Button, Dropdown, - Section, Knob, LabeledControls, LabeledList, + Section, } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/LaborClaimConsole.jsx b/tgui/packages/tgui/interfaces/LaborClaimConsole.jsx index f1857597bc96..27b3cc0e05f9 100644 --- a/tgui/packages/tgui/interfaces/LaborClaimConsole.jsx +++ b/tgui/packages/tgui/interfaces/LaborClaimConsole.jsx @@ -1,4 +1,5 @@ import { toTitleCase } from 'common/string'; + import { useBackend } from '../backend'; import { Box, Button, LabeledList, Section, Table } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/LibraryConsole.jsx b/tgui/packages/tgui/interfaces/LibraryConsole.jsx index 0bb766c73a19..833139dfd036 100644 --- a/tgui/packages/tgui/interfaces/LibraryConsole.jsx +++ b/tgui/packages/tgui/interfaces/LibraryConsole.jsx @@ -1,19 +1,20 @@ import { map, sortBy } from 'common/collections'; import { flow } from 'common/fp'; import { classes } from 'common/react'; + import { useBackend, useLocalState } from '../backend'; import { Box, Button, Dropdown, + Flex, Input, + LabeledList, Modal, NoticeBox, NumberInput, - LabeledList, Section, Stack, - Flex, Table, } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/LibraryScanner.jsx b/tgui/packages/tgui/interfaces/LibraryScanner.jsx index 35737194019d..efa7156abfbe 100644 --- a/tgui/packages/tgui/interfaces/LibraryScanner.jsx +++ b/tgui/packages/tgui/interfaces/LibraryScanner.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Button, Stack, NoticeBox, Section } from '../components'; +import { Button, NoticeBox, Section, Stack } from '../components'; import { Window } from '../layouts'; export const LibraryScanner = (props) => { diff --git a/tgui/packages/tgui/interfaces/LibraryVisitor.jsx b/tgui/packages/tgui/interfaces/LibraryVisitor.jsx index e1132c5e1938..da0267916fdf 100644 --- a/tgui/packages/tgui/interfaces/LibraryVisitor.jsx +++ b/tgui/packages/tgui/interfaces/LibraryVisitor.jsx @@ -1,5 +1,6 @@ import { map, sortBy } from 'common/collections'; import { flow } from 'common/fp'; + import { useBackend } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/ListInputModal.tsx b/tgui/packages/tgui/interfaces/ListInputModal.tsx index b67295826ec4..259c24f26ac2 100644 --- a/tgui/packages/tgui/interfaces/ListInputModal.tsx +++ b/tgui/packages/tgui/interfaces/ListInputModal.tsx @@ -1,16 +1,16 @@ -import { Loader } from './common/Loader'; -import { InputButtons } from './common/InputButtons'; -import { Button, Input, Section, Stack } from '../components'; -import { useBackend, useLocalState } from '../backend'; import { KEY_A, KEY_DOWN, - KEY_ESCAPE, KEY_ENTER, + KEY_ESCAPE, KEY_UP, KEY_Z, } from '../../common/keycodes'; +import { useBackend, useLocalState } from '../backend'; +import { Button, Input, Section, Stack } from '../components'; import { Window } from '../layouts'; +import { InputButtons } from './common/InputButtons'; +import { Loader } from './common/Loader'; type ListInputData = { init_value: string; diff --git a/tgui/packages/tgui/interfaces/LoadoutManager.jsx b/tgui/packages/tgui/interfaces/LoadoutManager.jsx index c09341cd9ea5..75edfece2f40 100644 --- a/tgui/packages/tgui/interfaces/LoadoutManager.jsx +++ b/tgui/packages/tgui/interfaces/LoadoutManager.jsx @@ -1,5 +1,5 @@ import { useBackend, useSharedState } from '../backend'; -import { Box, Button, Section, Stack, Dropdown } from '../components'; +import { Box, Button, Dropdown, Section, Stack } from '../components'; import { Window } from '../layouts'; export const LoadoutManager = (props) => { diff --git a/tgui/packages/tgui/interfaces/MODpaint.jsx b/tgui/packages/tgui/interfaces/MODpaint.jsx index 1cd842bb9378..7a047b384260 100644 --- a/tgui/packages/tgui/interfaces/MODpaint.jsx +++ b/tgui/packages/tgui/interfaces/MODpaint.jsx @@ -1,15 +1,16 @@ +import { capitalize } from 'common/string'; + import { useBackend } from '../backend'; import { Box, - Stack, - Section, + Button, ByondUi, - Slider, Flex, - Button, + Section, + Slider, + Stack, } from '../components'; import { Window } from '../layouts'; -import { capitalize } from 'common/string'; const colorToMatrix = (param) => { switch (param) { diff --git a/tgui/packages/tgui/interfaces/MODsuit.jsx b/tgui/packages/tgui/interfaces/MODsuit.jsx index fa99395b1045..e47d25bcd220 100644 --- a/tgui/packages/tgui/interfaces/MODsuit.jsx +++ b/tgui/packages/tgui/interfaces/MODsuit.jsx @@ -1,20 +1,20 @@ import { useBackend, useLocalState } from '../backend'; import { + AnimatedNumber, + Box, Button, + Collapsible, ColorBox, + Dimmer, + Dropdown, + Flex, + Icon, LabeledList, + NumberInput, ProgressBar, Section, - Collapsible, - Box, - Icon, Stack, Table, - Dimmer, - NumberInput, - Flex, - AnimatedNumber, - Dropdown, } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/MafiaPanel.jsx b/tgui/packages/tgui/interfaces/MafiaPanel.jsx index ae52c5a81314..5b40c0feb9cf 100644 --- a/tgui/packages/tgui/interfaces/MafiaPanel.jsx +++ b/tgui/packages/tgui/interfaces/MafiaPanel.jsx @@ -1,4 +1,5 @@ import { classes } from 'common/react'; + import { useBackend } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/MassDriverControl.jsx b/tgui/packages/tgui/interfaces/MassDriverControl.jsx index 91e7cc04d301..d7be26c671ee 100644 --- a/tgui/packages/tgui/interfaces/MassDriverControl.jsx +++ b/tgui/packages/tgui/interfaces/MassDriverControl.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Box, Button, Section, LabeledList, NumberInput } from '../components'; +import { Box, Button, LabeledList, NumberInput, Section } from '../components'; import { Window } from '../layouts'; export const MassDriverControl = (props) => { diff --git a/tgui/packages/tgui/interfaces/Mecha/AlertPane.tsx b/tgui/packages/tgui/interfaces/Mecha/AlertPane.tsx index 3e97eb3a50a8..82e0fe9cb6c1 100644 --- a/tgui/packages/tgui/interfaces/Mecha/AlertPane.tsx +++ b/tgui/packages/tgui/interfaces/Mecha/AlertPane.tsx @@ -1,9 +1,9 @@ import { useBackend } from '../../backend'; -import { Stack, Button, Box } from '../../components'; +import { Box, Button, Stack } from '../../components'; import { - OperatorData, InternalDamageToDamagedDesc, InternalDamageToNormalDesc, + OperatorData, } from './data'; export const AlertPane = (props) => { diff --git a/tgui/packages/tgui/interfaces/Mecha/ArmPane.tsx b/tgui/packages/tgui/interfaces/Mecha/ArmPane.tsx index 378a47fb7bad..7e459ecdf6bb 100644 --- a/tgui/packages/tgui/interfaces/Mecha/ArmPane.tsx +++ b/tgui/packages/tgui/interfaces/Mecha/ArmPane.tsx @@ -1,11 +1,12 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../../backend'; import { Button, LabeledList, - Stack, - Section, ProgressBar, + Section, + Stack, } from '../../components'; import { MechWeapon, OperatorData } from './data'; diff --git a/tgui/packages/tgui/interfaces/Mecha/ArmorPane.tsx b/tgui/packages/tgui/interfaces/Mecha/ArmorPane.tsx index 79c92f2db546..b4fbfeff46b3 100644 --- a/tgui/packages/tgui/interfaces/Mecha/ArmorPane.tsx +++ b/tgui/packages/tgui/interfaces/Mecha/ArmorPane.tsx @@ -1,7 +1,8 @@ +import { classes } from 'common/react'; + import { useBackend } from '../../backend'; -import { Stack, Button, Box } from '../../components'; +import { Box, Button, Stack } from '../../components'; import { OperatorData } from './data'; -import { classes } from 'common/react'; export const ArmorPane = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Mecha/MaintMode.tsx b/tgui/packages/tgui/interfaces/Mecha/MaintMode.tsx index fff6e9fb9f7b..9eeb2779a840 100644 --- a/tgui/packages/tgui/interfaces/Mecha/MaintMode.tsx +++ b/tgui/packages/tgui/interfaces/Mecha/MaintMode.tsx @@ -1,6 +1,6 @@ -import { MaintData } from './data'; import { useBackend, useLocalState } from '../../backend'; -import { Stack, Button, Box } from '../../components'; +import { Box, Button, Stack } from '../../components'; +import { MaintData } from './data'; const MECHA_MAINT_PANELS = { main: { diff --git a/tgui/packages/tgui/interfaces/Mecha/MechStatPane.tsx b/tgui/packages/tgui/interfaces/Mecha/MechStatPane.tsx index e09f6d9bfc87..196efaa5e602 100644 --- a/tgui/packages/tgui/interfaces/Mecha/MechStatPane.tsx +++ b/tgui/packages/tgui/interfaces/Mecha/MechStatPane.tsx @@ -1,14 +1,15 @@ +import { toFixed } from 'common/math'; + import { useBackend } from '../../backend'; import { - Stack, - Button, - Section, Box, - ProgressBar, + Button, LabeledList, + ProgressBar, + Section, + Stack, } from '../../components'; import { KelvinZeroCelcius, OperatorData } from './data'; -import { toFixed } from 'common/math'; export const MechStatPane = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Mecha/OperatorMode.tsx b/tgui/packages/tgui/interfaces/Mecha/OperatorMode.tsx index f36247b9297c..fd4b9a61f9ce 100644 --- a/tgui/packages/tgui/interfaces/Mecha/OperatorMode.tsx +++ b/tgui/packages/tgui/interfaces/Mecha/OperatorMode.tsx @@ -1,13 +1,13 @@ import { useBackend } from '../../backend'; -import { ByondUi, Stack, Section } from '../../components'; -import { OperatorData } from './data'; -import { RadioPane } from './RadioPane'; +import { ByondUi, Section, Stack } from '../../components'; import { AlertPane } from './AlertPane'; -import { MechStatPane } from './MechStatPane'; import { ArmorPane } from './ArmorPane'; -import { UtilityModulesPane } from './UtilityModulesPane'; -import { PowerModulesPane } from './PowerModulesPane'; import { ArmPane } from './ArmPane'; +import { OperatorData } from './data'; +import { MechStatPane } from './MechStatPane'; +import { PowerModulesPane } from './PowerModulesPane'; +import { RadioPane } from './RadioPane'; +import { UtilityModulesPane } from './UtilityModulesPane'; export const OperatorMode = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Mecha/PowerModulesPane.tsx b/tgui/packages/tgui/interfaces/Mecha/PowerModulesPane.tsx index 413b079b3f57..7e19179ef96d 100644 --- a/tgui/packages/tgui/interfaces/Mecha/PowerModulesPane.tsx +++ b/tgui/packages/tgui/interfaces/Mecha/PowerModulesPane.tsx @@ -1,7 +1,8 @@ +import { toFixed } from 'common/math'; + import { useBackend } from '../../backend'; import { Button, LabeledList } from '../../components'; import { OperatorData } from './data'; -import { toFixed } from 'common/math'; export const PowerModulesPane = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Mecha/RadioPane.tsx b/tgui/packages/tgui/interfaces/Mecha/RadioPane.tsx index 038cf7c87071..484c6bd15146 100644 --- a/tgui/packages/tgui/interfaces/Mecha/RadioPane.tsx +++ b/tgui/packages/tgui/interfaces/Mecha/RadioPane.tsx @@ -1,7 +1,8 @@ +import { toFixed } from 'common/math'; + import { useBackend } from '../../backend'; -import { Button, NumberInput, LabeledList } from '../../components'; +import { Button, LabeledList, NumberInput } from '../../components'; import { OperatorData } from './data'; -import { toFixed } from 'common/math'; export const RadioPane = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Mecha/UtilityModulesPane.tsx b/tgui/packages/tgui/interfaces/Mecha/UtilityModulesPane.tsx index 0b245ac66224..7f48fed13d17 100644 --- a/tgui/packages/tgui/interfaces/Mecha/UtilityModulesPane.tsx +++ b/tgui/packages/tgui/interfaces/Mecha/UtilityModulesPane.tsx @@ -1,6 +1,6 @@ import { useBackend } from '../../backend'; import { Button, LabeledList, ProgressBar } from '../../components'; -import { OperatorData, MechaUtility } from './data'; +import { MechaUtility, OperatorData } from './data'; export const UtilityModulesPane = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Mecha/data.ts b/tgui/packages/tgui/interfaces/Mecha/data.ts index 198117f1ccf2..d7005085f87d 100644 --- a/tgui/packages/tgui/interfaces/Mecha/data.ts +++ b/tgui/packages/tgui/interfaces/Mecha/data.ts @@ -20,27 +20,27 @@ export type AccessData = { }; type MechElectronics = { - microphone: boolean; - speaker: boolean; frequency: number; - minfreq: number; maxfreq: number; + microphone: boolean; + minfreq: number; + speaker: boolean; }; export type MechWeapon = { - name: string; + ammo_type: string | null; desc: string; - ref: string; - isballisticweapon: boolean; - integrity: number; - energy_per_use: number; // null when not ballistic weapon disabledreload: boolean | null; - projectiles: number | null; + energy_per_use: number; + integrity: number; + isballisticweapon: boolean; max_magazine: number | null; + name: string; + projectiles: number | null; projectiles_cache: number | null; projectiles_cache_max: number | null; - ammo_type: string | null; + ref: string; // first entry is always "snowflake_id"=snowflake_id if snowflake snowflake: any; }; @@ -50,40 +50,40 @@ export type MainData = { }; export type MaintData = { - name: string; + capacitor: string; + cell: string; + idcard_access: AccessData[]; + internal_tank_valve: number; mecha_flags: number; mechflag_keys: string[]; - internal_tank_valve: number; - cell: string; - scanning: string; - capacitor: string; + name: string; operation_req_access: AccessData[]; - idcard_access: AccessData[]; + scanning: string; }; export type OperatorData = { - name: string; - integrity: number; - power_level: number | null; - power_max: number | null; - mecha_flags: number; - internal_damage: number; - internal_damage_keys: string[]; air_source: string; - mechflag_keys: string[]; - cabin_dangerous_highpressure: number; airtank_pressure: number | null; airtank_temp: number | null; - port_connected: boolean | null; + cabin_dangerous_highpressure: number; cabin_pressure: number; cabin_temp: number; dna_lock: string | null; - mech_electronics: MechElectronics; - right_arm_weapon: MechWeapon | null; + integrity: number; + internal_damage: number; + internal_damage_keys: string[]; left_arm_weapon: MechWeapon | null; + mech_electronics: MechElectronics; mech_equipment: string[]; mech_view: string; + mecha_flags: number; + mechflag_keys: string[]; mineral_material_amount: number; + name: string; + port_connected: boolean | null; + power_level: number | null; + power_max: number | null; + right_arm_weapon: MechWeapon | null; }; export type MechaUtility = { diff --git a/tgui/packages/tgui/interfaces/MiningVendor.jsx b/tgui/packages/tgui/interfaces/MiningVendor.jsx index 72a4aefeb776..07188452ca8d 100644 --- a/tgui/packages/tgui/interfaces/MiningVendor.jsx +++ b/tgui/packages/tgui/interfaces/MiningVendor.jsx @@ -1,4 +1,5 @@ import { classes } from 'common/react'; + import { useBackend } from '../backend'; import { Box, Button, Section, Table } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/Newscaster.jsx b/tgui/packages/tgui/interfaces/Newscaster.jsx index e77fdf9e2e6d..7fdd5a71b1e3 100644 --- a/tgui/packages/tgui/interfaces/Newscaster.jsx +++ b/tgui/packages/tgui/interfaces/Newscaster.jsx @@ -6,9 +6,9 @@ */ import { decodeHtmlEntities } from 'common/string'; -import { useBackend, useSharedState, useLocalState } from '../backend'; -import { BountyBoardContent } from './BountyBoard'; -import { UserDetails } from './Vending'; +import { marked } from 'marked'; + +import { useBackend, useLocalState, useSharedState } from '../backend'; import { BlockQuote, Box, @@ -21,8 +21,9 @@ import { Tabs, TextArea, } from '../components'; -import { marked } from 'marked'; import { sanitizeText } from '../sanitize'; +import { BountyBoardContent } from './BountyBoard'; +import { UserDetails } from './Vending'; const CENSOR_MESSAGE = 'This channel has been deemed as threatening to \ diff --git a/tgui/packages/tgui/interfaces/NotificationPreferences.jsx b/tgui/packages/tgui/interfaces/NotificationPreferences.jsx index 51b2fa794c01..aebe53bb94ca 100644 --- a/tgui/packages/tgui/interfaces/NotificationPreferences.jsx +++ b/tgui/packages/tgui/interfaces/NotificationPreferences.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Section, Button } from '../components'; +import { Button, Section } from '../components'; import { Window } from '../layouts'; export const NotificationPreferences = (props) => { diff --git a/tgui/packages/tgui/interfaces/NtnetRelay.jsx b/tgui/packages/tgui/interfaces/NtnetRelay.jsx index 19c50bba1b5c..bb44f0fe4772 100644 --- a/tgui/packages/tgui/interfaces/NtnetRelay.jsx +++ b/tgui/packages/tgui/interfaces/NtnetRelay.jsx @@ -1,10 +1,10 @@ import { useBackend } from '../backend'; import { + AnimatedNumber, Box, Button, ProgressBar, Section, - AnimatedNumber, } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/NtosBountyBoard.jsx b/tgui/packages/tgui/interfaces/NtosBountyBoard.jsx index adad36a35a56..b1bbe418ce7f 100644 --- a/tgui/packages/tgui/interfaces/NtosBountyBoard.jsx +++ b/tgui/packages/tgui/interfaces/NtosBountyBoard.jsx @@ -1,5 +1,5 @@ -import { BountyBoardContent } from './BountyBoard'; import { NtosWindow } from '../layouts'; +import { BountyBoardContent } from './BountyBoard'; export const NtosBountyBoard = (props) => { return ( diff --git a/tgui/packages/tgui/interfaces/NtosCargo.jsx b/tgui/packages/tgui/interfaces/NtosCargo.jsx index c087b94893b9..19e36180f4bc 100644 --- a/tgui/packages/tgui/interfaces/NtosCargo.jsx +++ b/tgui/packages/tgui/interfaces/NtosCargo.jsx @@ -1,5 +1,5 @@ -import { CargoContent } from './Cargo'; import { NtosWindow } from '../layouts'; +import { CargoContent } from './Cargo'; export const NtosCargo = (props) => { return ( diff --git a/tgui/packages/tgui/interfaces/NtosCrewManifest.jsx b/tgui/packages/tgui/interfaces/NtosCrewManifest.jsx index fb861af1912a..889ef4119f46 100644 --- a/tgui/packages/tgui/interfaces/NtosCrewManifest.jsx +++ b/tgui/packages/tgui/interfaces/NtosCrewManifest.jsx @@ -1,4 +1,5 @@ import { map } from 'common/collections'; + import { useBackend } from '../backend'; import { Button, Section, Table } from '../components'; import { NtosWindow } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/NtosJobManager.jsx b/tgui/packages/tgui/interfaces/NtosJobManager.jsx index e02d4a4efa34..53f2ea2b220b 100644 --- a/tgui/packages/tgui/interfaces/NtosJobManager.jsx +++ b/tgui/packages/tgui/interfaces/NtosJobManager.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Button, Section, Table, NoticeBox, Dimmer, Box } from '../components'; +import { Box, Button, Dimmer, NoticeBox, Section, Table } from '../components'; import { NtosWindow } from '../layouts'; export const NtosJobManager = (props) => { diff --git a/tgui/packages/tgui/interfaces/NtosNetDownloader.jsx b/tgui/packages/tgui/interfaces/NtosNetDownloader.jsx index 555baf2cf759..fbfb9a2f0c22 100644 --- a/tgui/packages/tgui/interfaces/NtosNetDownloader.jsx +++ b/tgui/packages/tgui/interfaces/NtosNetDownloader.jsx @@ -1,18 +1,19 @@ +import { filter, sortBy } from 'common/collections'; +import { flow } from 'common/fp'; import { scale, toFixed } from 'common/math'; + import { useBackend, useLocalState } from '../backend'; import { Box, Button, - Stack, Icon, LabeledList, NoticeBox, ProgressBar, Section, + Stack, Tabs, } from '../components'; -import { flow } from 'common/fp'; -import { filter, sortBy } from 'common/collections'; import { NtosWindow } from '../layouts'; export const NtosNetDownloader = (props) => { diff --git a/tgui/packages/tgui/interfaces/NtosNotepad.jsx b/tgui/packages/tgui/interfaces/NtosNotepad.jsx index 7820f8acb67d..53c332dd2b07 100644 --- a/tgui/packages/tgui/interfaces/NtosNotepad.jsx +++ b/tgui/packages/tgui/interfaces/NtosNotepad.jsx @@ -1,6 +1,6 @@ -import { NtosWindow } from '../layouts'; import { useBackend } from '../backend'; -import { Stack, Input, Section } from '../components'; +import { Input, Section, Stack } from '../components'; +import { NtosWindow } from '../layouts'; export const NtosNotepad = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/NtosPhysScanner.jsx b/tgui/packages/tgui/interfaces/NtosPhysScanner.jsx index d49981255f1b..05f226efc6e3 100644 --- a/tgui/packages/tgui/interfaces/NtosPhysScanner.jsx +++ b/tgui/packages/tgui/interfaces/NtosPhysScanner.jsx @@ -1,6 +1,6 @@ import { useBackend } from '../backend'; +import { Box, Dropdown, Section } from '../components'; import { NtosWindow } from '../layouts'; -import { Section, Box, Dropdown } from '../components'; import { sanitizeText } from '../sanitize'; export const NtosPhysScanner = (props) => { diff --git a/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx b/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx index 14124d2da49e..7ddd1d779531 100644 --- a/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx +++ b/tgui/packages/tgui/interfaces/NtosPortraitPrinter.jsx @@ -1,6 +1,6 @@ import { resolveAsset } from '../assets'; import { useBackend, useLocalState } from '../backend'; -import { Button, NoticeBox, Section, Stack, Input } from '../components'; +import { Button, Input, NoticeBox, Section, Stack } from '../components'; import { NtosWindow } from '../layouts'; export const NtosPortraitPrinter = (props) => { diff --git a/tgui/packages/tgui/interfaces/NtosRadar.jsx b/tgui/packages/tgui/interfaces/NtosRadar.jsx index ed36c2eca7b3..12ede38c834c 100644 --- a/tgui/packages/tgui/interfaces/NtosRadar.jsx +++ b/tgui/packages/tgui/interfaces/NtosRadar.jsx @@ -1,4 +1,5 @@ import { classes } from 'common/react'; + import { resolveAsset } from '../assets'; import { useBackend } from '../backend'; import { Box, Button, Flex, Icon, NoticeBox, Section } from '../components'; diff --git a/tgui/packages/tgui/interfaces/NtosRecords.jsx b/tgui/packages/tgui/interfaces/NtosRecords.jsx index fd690d9f44af..8cc01f8fd4e9 100644 --- a/tgui/packages/tgui/interfaces/NtosRecords.jsx +++ b/tgui/packages/tgui/interfaces/NtosRecords.jsx @@ -1,4 +1,5 @@ import { createSearch } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; import { Box, Icon, Input, Section } from '../components'; import { NtosWindow } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/NtosRevelation.jsx b/tgui/packages/tgui/interfaces/NtosRevelation.jsx index 2767896b9784..9852c7f1addb 100644 --- a/tgui/packages/tgui/interfaces/NtosRevelation.jsx +++ b/tgui/packages/tgui/interfaces/NtosRevelation.jsx @@ -1,5 +1,5 @@ -import { Section, Button, LabeledList } from '../components'; import { useBackend } from '../backend'; +import { Button, LabeledList, Section } from '../components'; import { NtosWindow } from '../layouts'; export const NtosRevelation = (props) => { diff --git a/tgui/packages/tgui/interfaces/NtosScipaper.jsx b/tgui/packages/tgui/interfaces/NtosScipaper.jsx index 5d7bfdbc8c80..2b08947363b7 100644 --- a/tgui/packages/tgui/interfaces/NtosScipaper.jsx +++ b/tgui/packages/tgui/interfaces/NtosScipaper.jsx @@ -1,19 +1,19 @@ import { useBackend } from '../backend'; import { BlockQuote, + Box, Button, Collapsible, Dropdown, + Icon, Input, LabeledList, + NoticeBox, Section, Stack, - Tabs, - Box, Table, - NoticeBox, + Tabs, Tooltip, - Icon, } from '../components'; import { TableCell, TableRow } from '../components/Table'; import { NtosWindow } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/NtosSecurEye.jsx b/tgui/packages/tgui/interfaces/NtosSecurEye.jsx index d9f1b1f264ca..6b8ce63477ce 100644 --- a/tgui/packages/tgui/interfaces/NtosSecurEye.jsx +++ b/tgui/packages/tgui/interfaces/NtosSecurEye.jsx @@ -2,9 +2,9 @@ import { useBackend } from '../backend'; import { Button, ByondUi } from '../components'; import { NtosWindow } from '../layouts'; import { + CameraConsoleContent, prevNextCamera, selectCameras, - CameraConsoleContent, } from './CameraConsole'; export const NtosSecurEye = (props) => { diff --git a/tgui/packages/tgui/interfaces/NtosSignaler.jsx b/tgui/packages/tgui/interfaces/NtosSignaler.jsx index e4455fabaa24..c04ee3c7e36e 100644 --- a/tgui/packages/tgui/interfaces/NtosSignaler.jsx +++ b/tgui/packages/tgui/interfaces/NtosSignaler.jsx @@ -1,5 +1,5 @@ -import { SignalerContent } from './Signaler'; import { NtosWindow } from '../layouts'; +import { SignalerContent } from './Signaler'; export const NtosSignaler = (props) => { return ( diff --git a/tgui/packages/tgui/interfaces/NtosSkillTracker.jsx b/tgui/packages/tgui/interfaces/NtosSkillTracker.jsx index e63776a4444a..fd42d35ae746 100644 --- a/tgui/packages/tgui/interfaces/NtosSkillTracker.jsx +++ b/tgui/packages/tgui/interfaces/NtosSkillTracker.jsx @@ -1,11 +1,11 @@ import { useBackend } from '../backend'; import { + AnimatedNumber, + BlockQuote, Button, + ProgressBar, Section, Table, - BlockQuote, - ProgressBar, - AnimatedNumber, } from '../components'; import { NtosWindow } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/NtosStatus.jsx b/tgui/packages/tgui/interfaces/NtosStatus.jsx index e119d06b1087..9b54f2b69657 100644 --- a/tgui/packages/tgui/interfaces/NtosStatus.jsx +++ b/tgui/packages/tgui/interfaces/NtosStatus.jsx @@ -1,6 +1,6 @@ import { useBackend } from '../backend'; +import { Button, Input, Section } from '../components'; import { NtosWindow } from '../layouts'; -import { Input, Section, Button } from '../components'; export const NtosStatus = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/NuclearBomb.jsx b/tgui/packages/tgui/interfaces/NuclearBomb.jsx index c2d42d8f8164..2cb3b2a69e64 100644 --- a/tgui/packages/tgui/interfaces/NuclearBomb.jsx +++ b/tgui/packages/tgui/interfaces/NuclearBomb.jsx @@ -1,4 +1,5 @@ import { classes } from 'common/react'; + import { useBackend } from '../backend'; import { Box, Button, Flex, Grid, Icon } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/NumberInputModal.tsx b/tgui/packages/tgui/interfaces/NumberInputModal.tsx index a50fc23a8eb9..2fe2165a7bce 100644 --- a/tgui/packages/tgui/interfaces/NumberInputModal.tsx +++ b/tgui/packages/tgui/interfaces/NumberInputModal.tsx @@ -1,9 +1,9 @@ -import { Loader } from './common/Loader'; -import { InputButtons } from './common/InputButtons'; import { KEY_ENTER, KEY_ESCAPE } from '../../common/keycodes'; import { useBackend, useLocalState } from '../backend'; import { Box, Button, RestrictedInput, Section, Stack } from '../components'; import { Window } from '../layouts'; +import { InputButtons } from './common/InputButtons'; +import { Loader } from './common/Loader'; type NumberInputData = { init_value: number; diff --git a/tgui/packages/tgui/interfaces/Orbit.jsx b/tgui/packages/tgui/interfaces/Orbit.jsx index b13a5e6e5375..af87dd93dd39 100644 --- a/tgui/packages/tgui/interfaces/Orbit.jsx +++ b/tgui/packages/tgui/interfaces/Orbit.jsx @@ -1,4 +1,5 @@ import { createSearch } from 'common/string'; + import { resolveAsset } from '../assets'; import { useBackend, useLocalState } from '../backend'; import { diff --git a/tgui/packages/tgui/interfaces/OreBox.jsx b/tgui/packages/tgui/interfaces/OreBox.jsx index 8382a90a9ba0..57b77c42dccd 100644 --- a/tgui/packages/tgui/interfaces/OreBox.jsx +++ b/tgui/packages/tgui/interfaces/OreBox.jsx @@ -1,6 +1,7 @@ import { toTitleCase } from 'common/string'; -import { Box, Button, Section, Table } from '../components'; + import { useBackend } from '../backend'; +import { Box, Button, Section, Table } from '../components'; import { Window } from '../layouts'; export const OreBox = (props) => { diff --git a/tgui/packages/tgui/interfaces/OreRedemptionMachine.jsx b/tgui/packages/tgui/interfaces/OreRedemptionMachine.jsx index c27e93e408fe..5da81a5897c6 100644 --- a/tgui/packages/tgui/interfaces/OreRedemptionMachine.jsx +++ b/tgui/packages/tgui/interfaces/OreRedemptionMachine.jsx @@ -1,4 +1,5 @@ import { toTitleCase } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; import { BlockQuote, diff --git a/tgui/packages/tgui/interfaces/PaiCard.tsx b/tgui/packages/tgui/interfaces/PaiCard.tsx index 7a2144d36959..6f1ed29491cc 100644 --- a/tgui/packages/tgui/interfaces/PaiCard.tsx +++ b/tgui/packages/tgui/interfaces/PaiCard.tsx @@ -29,8 +29,8 @@ type Pai = { laws: string; master: string; name: string; - transmit: BooleanLike; receive: BooleanLike; + transmit: BooleanLike; }; export const PaiCard = (_) => { diff --git a/tgui/packages/tgui/interfaces/PaiInterface.tsx b/tgui/packages/tgui/interfaces/PaiInterface.tsx index 2bd944b6b64b..39ee5c0e57ee 100644 --- a/tgui/packages/tgui/interfaces/PaiInterface.tsx +++ b/tgui/packages/tgui/interfaces/PaiInterface.tsx @@ -2,8 +2,8 @@ import { useBackend, useLocalState } from '../backend'; import { Box, Button, - LabeledList, Icon, + LabeledList, NoticeBox, ProgressBar, Section, @@ -35,8 +35,8 @@ type Available = { }; type Master = { - name: string; dna: string; + name: string; }; type PDA = { diff --git a/tgui/packages/tgui/interfaces/PaintingAdminPanel.tsx b/tgui/packages/tgui/interfaces/PaintingAdminPanel.tsx index e21c69602db7..08a943c28cf7 100644 --- a/tgui/packages/tgui/interfaces/PaintingAdminPanel.tsx +++ b/tgui/packages/tgui/interfaces/PaintingAdminPanel.tsx @@ -1,4 +1,5 @@ import { decodeHtmlEntities } from 'common/string'; + import { resolveAsset } from '../assets'; import { useBackend, useLocalState } from '../backend'; import { Box, Button, LabeledList, Section, Table } from '../components'; @@ -10,20 +11,20 @@ type PaintingAdminPanelData = { }; type PaintingData = { - md5: string; - title: string; - creator_ckey: string; - creator_name: string | null; creation_date: Date | null; creation_round_id: number | null; - patron_ckey: string | null; - patron_name: string | null; + creator_ckey: string; + creator_name: string | null; credit_value: number; - width: number; height: number; + md5: string; + medium: string | null; + patron_ckey: string | null; + patron_name: string | null; ref: string; tags: string[] | null; - medium: string | null; + title: string; + width: number; }; export const PaintingAdminPanel = (props) => { diff --git a/tgui/packages/tgui/interfaces/PaintingMachine.jsx b/tgui/packages/tgui/interfaces/PaintingMachine.jsx index 67ab4c0066a0..720de2275776 100644 --- a/tgui/packages/tgui/interfaces/PaintingMachine.jsx +++ b/tgui/packages/tgui/interfaces/PaintingMachine.jsx @@ -1,6 +1,6 @@ import { useBackend, useSharedState } from '../backend'; -import { Window } from '../layouts'; import { Button, Dropdown, Section, Stack } from '../components'; +import { Window } from '../layouts'; export const PaintingMachine = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Pandemic.tsx b/tgui/packages/tgui/interfaces/Pandemic.tsx index 102256d939a9..1a383700466e 100644 --- a/tgui/packages/tgui/interfaces/Pandemic.tsx +++ b/tgui/packages/tgui/interfaces/Pandemic.tsx @@ -26,8 +26,8 @@ type PandemicContext = { }; type Beaker = { - volume: number; capacity: number; + volume: number; }; type Blood = { @@ -41,19 +41,19 @@ type Resistance = { }; type Virus = { - name: string; + agent: string; can_rename: BooleanLike; + cure: string; + description: string; + index: number; is_adv: BooleanLike; - symptoms?: Symptom[]; + name: string; resistance: number; - stealth: number; + spread: string; stage_speed: number; + stealth: number; + symptoms?: Symptom[]; transmission: number; - index: number; - agent: string; - description: string; - spread: string; - cure: string; }; type VirusDisplayProps = { @@ -70,15 +70,15 @@ type TabsProps = { }; type Symptom = { - name: string; desc: string; - stealth: number; - resistance: number; - stage_speed: number; - transmission: number; level: number; + name: string; neutered: BooleanLike; + resistance: number; + stage_speed: number; + stealth: number; threshold_desc: Threshold[]; + transmission: number; }; type SymptomDisplayProps = { @@ -90,8 +90,8 @@ type SymptomInfoProps = { }; type Threshold = { - label: string; descr: string; + label: string; }; type ThresholdDisplayProps = { diff --git a/tgui/packages/tgui/interfaces/PaperSheet.jsx b/tgui/packages/tgui/interfaces/PaperSheet.jsx index 360db672c93f..6513853bc8be 100644 --- a/tgui/packages/tgui/interfaces/PaperSheet.jsx +++ b/tgui/packages/tgui/interfaces/PaperSheet.jsx @@ -9,13 +9,14 @@ * @license MIT */ +import { clamp } from 'common/math'; import { classes } from 'common/react'; -import { Component } from 'react'; import { marked } from 'marked'; +import { Component } from 'react'; + import { useBackend } from '../backend'; -import { Box, Flex, Tabs, TextArea, Table } from '../components'; +import { Box, Flex, Table, Tabs, TextArea } from '../components'; import { Window } from '../layouts'; -import { clamp } from 'common/math'; import { sanitizeText } from '../sanitize'; const MAX_PAPER_LENGTH = 5000; // Question, should we send this with ui_data? diff --git a/tgui/packages/tgui/interfaces/ParticleEdit/EntriesBasic.tsx b/tgui/packages/tgui/interfaces/ParticleEdit/EntriesBasic.tsx index e887192b65e7..0220890fda5a 100644 --- a/tgui/packages/tgui/interfaces/ParticleEdit/EntriesBasic.tsx +++ b/tgui/packages/tgui/interfaces/ParticleEdit/EntriesBasic.tsx @@ -2,11 +2,11 @@ import { useBackend, useLocalState } from '../../backend'; import { Box, Button, - LabeledList, - NumberInput, ColorBox, - Input, Dropdown, + Input, + LabeledList, + NumberInput, Stack, } from '../../components'; import { @@ -16,10 +16,10 @@ import { EntryIconStateProps, EntryTransformProps, MatrixTypes, - ParticleUIData, P_DATA_ICON_ADD, P_DATA_ICON_REMOVE, P_DATA_ICON_WEIGHT, + ParticleUIData, SpaceToNum, SpaceTypes, } from './data'; diff --git a/tgui/packages/tgui/interfaces/ParticleEdit/EntriesGenerators.tsx b/tgui/packages/tgui/interfaces/ParticleEdit/EntriesGenerators.tsx index 65a1186dece0..33bcd60b7fa3 100644 --- a/tgui/packages/tgui/interfaces/ParticleEdit/EntriesGenerators.tsx +++ b/tgui/packages/tgui/interfaces/ParticleEdit/EntriesGenerators.tsx @@ -2,22 +2,22 @@ import { useBackend, useLocalState } from '../../backend'; import { Button, - LabeledList, - NumberInput, ColorBox, Input, + LabeledList, + NumberInput, Stack, } from '../../components'; import { EntryGeneratorNumbersListProps, FloatGeneratorColorProps, FloatGeneratorProps, - ParticleUIData, P_DATA_GENERATOR, + ParticleUIData, RandToNumber, } from './data'; -import { isStringArray } from './helpers'; import { GeneratorListEntry } from './Generators'; +import { isStringArray } from './helpers'; export const FloatGenerator = (props: FloatGeneratorProps) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/ParticleEdit/Generators.tsx b/tgui/packages/tgui/interfaces/ParticleEdit/Generators.tsx index 5fc8411281e7..4b99f71ce4f6 100644 --- a/tgui/packages/tgui/interfaces/ParticleEdit/Generators.tsx +++ b/tgui/packages/tgui/interfaces/ParticleEdit/Generators.tsx @@ -1,11 +1,11 @@ import { useBackend } from '../../backend'; -import { NumberInput, Dropdown, Stack } from '../../components'; +import { Dropdown, NumberInput, Stack } from '../../components'; import { GeneratorProps, GeneratorTypes, GeneratorTypesNoVectors, - ParticleUIData, P_DATA_GENERATOR, + ParticleUIData, RandToNumber, RandTypes, } from './data'; diff --git a/tgui/packages/tgui/interfaces/ParticleEdit/Tutorial.tsx b/tgui/packages/tgui/interfaces/ParticleEdit/Tutorial.tsx index 9c4873364d52..5e493efc9253 100644 --- a/tgui/packages/tgui/interfaces/ParticleEdit/Tutorial.tsx +++ b/tgui/packages/tgui/interfaces/ParticleEdit/Tutorial.tsx @@ -1,13 +1,13 @@ +import { resolveAsset } from '../../assets'; import { useLocalState } from '../../backend'; import { Box, Button, LabeledList, - Section, Modal, + Section, Stack, } from '../../components'; -import { resolveAsset } from '../../assets'; import { Image } from '../../components/Image'; export const ShowDesc = (props) => { diff --git a/tgui/packages/tgui/interfaces/ParticleEdit/data.ts b/tgui/packages/tgui/interfaces/ParticleEdit/data.ts index 2ccfb5501e20..21fca7e38629 100644 --- a/tgui/packages/tgui/interfaces/ParticleEdit/data.ts +++ b/tgui/packages/tgui/interfaces/ParticleEdit/data.ts @@ -56,90 +56,90 @@ export const GeneratorTypesNoVectors = [ ]; export type ParticleUIData = { - target_name: string; particle_data: ParticleData; + target_name: string; }; type ParticleData = { - width: number; - height: number; - count: number; - spawning: number; bound1: number[]; bound2: number[]; - gravity?: number[]; - gradient?: (string | number)[]; - transform?: number[]; + color?: number | string | string[]; + color_change?: number | string[]; + count: number; + drift?: number[] | string[]; + fade?: number | string[]; + fadein?: number | string[]; + friction?: number | string[]; + gradient?: (string | number)[]; + gravity?: number[]; + grow?: number | number[] | string[]; + height: number; icon?: string | { [key: string]: number }; icon_state?: string | { [key: string]: number }; lifespan?: number | string[]; - fade?: number | string[]; - fadein?: number | string[]; - color?: number | string | string[]; - color_change?: number | string[]; position?: number[] | string[]; - velocity?: number[] | string[]; - scale?: number | number[] | string[]; - grow?: number | number[] | string[]; rotation?: number | string[]; + scale?: number | number[] | string[]; + spawning: number; spin?: number | string[]; - friction?: number | string[]; + transform?: number[]; + velocity?: number[] | string[]; - drift?: number[] | string[]; + width: number; }; export type EntryFloatProps = { + float: number; name: string; var_name: string; - float: number; }; export type EntryCoordProps = { + coord?: number[]; name: string; var_name: string; - coord?: number[]; }; export type EntryGradientProps = { + gradient?: (string | number)[]; name: string; var_name: string; - gradient?: (string | number)[]; }; export type EntryTransformProps = { name: string; - var_name: string; transform?: number[]; + var_name: string; }; export type EntryIconStateProps = { + icon_state?: string | { [key: string]: number }; name: string; var_name: string; - icon_state?: string | { [key: string]: number }; }; export type FloatGeneratorProps = { + float?: number | string[]; name: string; var_name: string; - float?: number | string[]; }; export type FloatGeneratorColorProps = { + float?: number | string | string[]; name: string; var_name: string; - float?: number | string | string[]; }; export type GeneratorProps = { - var_name: string; - generator?: string[]; allow_vectors?: boolean; + generator?: string[]; + var_name: string; }; export type EntryGeneratorNumbersListProps = { - name: string; - var_name: string; allow_z: boolean; input?: number | number[] | string[]; + name: string; + var_name: string; }; diff --git a/tgui/packages/tgui/interfaces/ParticleEdit/index.tsx b/tgui/packages/tgui/interfaces/ParticleEdit/index.tsx index f0487742cefa..883b349fd4b2 100644 --- a/tgui/packages/tgui/interfaces/ParticleEdit/index.tsx +++ b/tgui/packages/tgui/interfaces/ParticleEdit/index.tsx @@ -3,20 +3,20 @@ import { useBackend, useLocalState } from '../../backend'; import { Button, LabeledList, Section } from '../../components'; import { Window } from '../../layouts'; import { ParticleUIData } from './data'; -import { ShowDesc } from './Tutorial'; import { - EntryFloat, EntryCoord, + EntryFloat, EntryGradient, - EntryTransform, EntryIcon, EntryIconState, + EntryTransform, } from './EntriesBasic'; import { + EntryGeneratorNumbersList, FloatGenerator, FloatGeneratorColor, - EntryGeneratorNumbersList, } from './EntriesGenerators'; +import { ShowDesc } from './Tutorial'; export const ParticleEdit = (props) => { const { act, data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/Photocopier.jsx b/tgui/packages/tgui/interfaces/Photocopier.jsx index a6a426feceef..c5590601c5c9 100644 --- a/tgui/packages/tgui/interfaces/Photocopier.jsx +++ b/tgui/packages/tgui/interfaces/Photocopier.jsx @@ -1,4 +1,5 @@ import { sortBy } from 'common/collections'; + import { useBackend } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/PipeDispenser.jsx b/tgui/packages/tgui/interfaces/PipeDispenser.jsx index 5736a6789225..61f285499b9d 100644 --- a/tgui/packages/tgui/interfaces/PipeDispenser.jsx +++ b/tgui/packages/tgui/interfaces/PipeDispenser.jsx @@ -2,8 +2,8 @@ import { useBackend, useLocalState } from '../backend'; import { Button, LabeledList, Section, Stack, Tabs } from '../components'; import { Window } from '../layouts'; import { - ICON_BY_CATEGORY_NAME, ColorItem, + ICON_BY_CATEGORY_NAME, LayerSelect, SmartPipeBlockSection, } from './RapidPipeDispenser'; diff --git a/tgui/packages/tgui/interfaces/PortableChemMixer.jsx b/tgui/packages/tgui/interfaces/PortableChemMixer.jsx index 2e43afc03eb5..af150eb47a00 100644 --- a/tgui/packages/tgui/interfaces/PortableChemMixer.jsx +++ b/tgui/packages/tgui/interfaces/PortableChemMixer.jsx @@ -1,5 +1,6 @@ import { sortBy } from 'common/collections'; import { toTitleCase } from 'common/string'; + import { useBackend } from '../backend'; import { AnimatedNumber, diff --git a/tgui/packages/tgui/interfaces/PortraitPicker.jsx b/tgui/packages/tgui/interfaces/PortraitPicker.jsx index acbd066a9ec4..c030986a0c77 100644 --- a/tgui/packages/tgui/interfaces/PortraitPicker.jsx +++ b/tgui/packages/tgui/interfaces/PortraitPicker.jsx @@ -1,6 +1,6 @@ import { resolveAsset } from '../assets'; import { useBackend, useLocalState } from '../backend'; -import { Button, Flex, NoticeBox, Section, Input } from '../components'; +import { Button, Flex, Input, NoticeBox, Section } from '../components'; import { Window } from '../layouts'; export const PortraitPicker = (props) => { diff --git a/tgui/packages/tgui/interfaces/PowerMonitor.jsx b/tgui/packages/tgui/interfaces/PowerMonitor.jsx index ece815d649c2..83557ec9e57f 100644 --- a/tgui/packages/tgui/interfaces/PowerMonitor.jsx +++ b/tgui/packages/tgui/interfaces/PowerMonitor.jsx @@ -1,6 +1,7 @@ import { map, sortBy } from 'common/collections'; import { flow } from 'common/fp'; import { toFixed } from 'common/math'; + import { useBackend, useLocalState } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/AntagsPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/AntagsPage.tsx index e5ead1b909bb..99dd1bb2fc14 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/AntagsPage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/AntagsPage.tsx @@ -1,5 +1,6 @@ import { binaryInsertWith } from 'common/collections'; import { classes } from 'common/react'; + import { useBackend, useLocalState } from '../../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferenceWindow.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferenceWindow.tsx index a58e7edb44c5..a9857127c16f 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferenceWindow.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/CharacterPreferenceWindow.tsx @@ -1,14 +1,15 @@ import { exhaustiveCheck } from 'common/exhaustive'; + import { useBackend, useLocalState } from '../../backend'; -import { Stack, Dropdown, Flex } from '../../components'; +import { Dropdown, Flex, Stack } from '../../components'; import { Window } from '../../layouts'; -import { PreferencesMenuData } from './data'; -import { PageButton } from './PageButton'; import { AntagsPage } from './AntagsPage'; +import { PreferencesMenuData } from './data'; import { JobsPage } from './JobsPage'; import { MainPage } from './MainPage'; -import { SpeciesPage } from './SpeciesPage'; +import { PageButton } from './PageButton'; import { QuirksPage } from './QuirksPage'; +import { SpeciesPage } from './SpeciesPage'; enum Page { Antags, diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/GamePreferenceWindow.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/GamePreferenceWindow.tsx index 518493b76bec..6aeb30cd3570 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/GamePreferenceWindow.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/GamePreferenceWindow.tsx @@ -1,11 +1,12 @@ +import { exhaustiveCheck } from 'common/exhaustive'; + +import { useBackend, useLocalState } from '../../backend'; import { Stack } from '../../components'; import { Window } from '../../layouts'; -import { KeybindingsPage } from './KeybindingsPage'; +import { GamePreferencesSelectedPage, PreferencesMenuData } from './data'; import { GamePreferencesPage } from './GamePreferencesPage'; +import { KeybindingsPage } from './KeybindingsPage'; import { PageButton } from './PageButton'; -import { useBackend, useLocalState } from '../../backend'; -import { GamePreferencesSelectedPage, PreferencesMenuData } from './data'; -import { exhaustiveCheck } from 'common/exhaustive'; export const GamePreferenceWindow = (props: { startingPage?: GamePreferencesSelectedPage; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/GamePreferencesPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/GamePreferencesPage.tsx index 0423d1a785c4..f910e8183640 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/GamePreferencesPage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/GamePreferencesPage.tsx @@ -1,5 +1,6 @@ import { binaryInsertWith, sortBy } from 'common/collections'; import { ReactNode } from 'react'; + import { useBackend } from '../../backend'; import { Box, Flex, Tooltip } from '../../components'; import { PreferencesMenuData } from './data'; @@ -8,8 +9,8 @@ import { FeatureValueInput } from './preferences/features/base'; import { TabbedMenu } from './TabbedMenu'; type PreferenceChild = { - name: string; children: ReactNode; + name: string; }; const binaryInsertPreference = binaryInsertWith( diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/JobsPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/JobsPage.tsx index a1556ddd4dc6..1cd6b3845f42 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/JobsPage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/JobsPage.tsx @@ -1,6 +1,7 @@ import { sortBy } from 'common/collections'; import { classes } from 'common/react'; import { FC, ReactNode } from 'react'; + import { useBackend } from '../../backend'; import { Box, Button, Dropdown, Stack, Tooltip } from '../../components'; import { logger } from '../../logging'; @@ -22,10 +23,10 @@ const sortJobs = (entries: [string, Job][], head?: string) => const PRIORITY_BUTTON_SIZE = '18px'; const PriorityButton = (props: { - name: string; color: string; - modifier?: string; enabled: boolean; + modifier?: string; + name: string; onClick: () => void; }) => { const className = `PreferencesMenu__Jobs__departments__priority`; @@ -282,7 +283,7 @@ const JobRow = (props: { className?: string; job: Job; name: string }) => { ); }; -const Department: FC<{ department: string; children?: ReactNode }> = ( +const Department: FC<{ children?: ReactNode; department: string }> = ( props, ) => { const { children, department: name } = props; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/KeybindingsPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/KeybindingsPage.tsx index 72317550ab45..322d9e84aa19 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/KeybindingsPage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/KeybindingsPage.tsx @@ -1,4 +1,8 @@ +import { range, sortBy } from 'common/collections'; import { Component } from 'react'; + +import { resolveAsset } from '../../assets'; +import { useBackend } from '../../backend'; import { Box, Button, @@ -7,17 +11,14 @@ import { Tooltip, TrackOutsideClicks, } from '../../components'; -import { resolveAsset } from '../../assets'; -import { PreferencesMenuData } from './data'; -import { useBackend } from '../../backend'; -import { range, sortBy } from 'common/collections'; import { KeyEvent } from '../../events'; -import { TabbedMenu } from './TabbedMenu'; import { fetchRetry } from '../../http'; +import { PreferencesMenuData } from './data'; +import { TabbedMenu } from './TabbedMenu'; type Keybinding = { - name: string; description?: string; + name: string; }; type Keybindings = Record>; @@ -25,14 +26,14 @@ type Keybindings = Record>; type KeybindingsPageState = { keybindings?: Keybindings; lastKeyboardEvent?: KeyboardEvent; - selectedKeybindings?: PreferencesMenuData['keybindings']; - /** * The current hotkey that the user is rebinding. * * First element is the hotkey name, the second is the slot. */ rebindingHotkey?: [string, number]; + + selectedKeybindings?: PreferencesMenuData['keybindings']; }; const isStandardKey = (event: KeyboardEvent): boolean => { diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/MainPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/MainPage.tsx index 79d0328d0536..a5d9cb28e755 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/MainPage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/MainPage.tsx @@ -1,34 +1,35 @@ +import { filterMap, sortBy } from 'common/collections'; import { classes } from 'common/react'; import { ReactNode } from 'react'; + import { sendAct, useBackend, useLocalState } from '../../backend'; import { Autofocus, Box, Button, + Dropdown, Flex, LabeledList, Popper, Stack, - TrackOutsideClicks, - Dropdown, Tooltip, + TrackOutsideClicks, } from '../../components'; +import { CharacterPreview } from './CharacterPreview'; import { createSetPreference, PreferencesMenuData, RandomSetting, } from './data'; -import { CharacterPreview } from './CharacterPreview'; -import { RandomizationButton } from './RandomizationButton'; -import { ServerPreferencesFetcher } from './ServerPreferencesFetcher'; import { MultiNameInput, NameInput } from './names'; -import { Gender, GENDERS } from './preferences/gender'; import features from './preferences/features'; import { FeatureChoicedServerData, FeatureValueInput, } from './preferences/features/base'; -import { filterMap, sortBy } from 'common/collections'; +import { Gender, GENDERS } from './preferences/gender'; +import { RandomizationButton } from './RandomizationButton'; +import { ServerPreferencesFetcher } from './ServerPreferencesFetcher'; import { useRandomToggleState } from './useRandomToggleState'; const CLOTHING_CELL_SIZE = 48; @@ -39,11 +40,11 @@ const CLOTHING_SELECTION_WIDTH = 5.4; const CLOTHING_SELECTION_MULTIPLIER = 5.2; const CharacterControls = (props: { - handleRotate: () => void; - handleOpenSpecies: () => void; - handleLoadout: () => void; - handleAppearanceMods: () => void; gender: Gender; + handleAppearanceMods: () => void; + handleLoadout: () => void; + handleOpenSpecies: () => void; + handleRotate: () => void; setGender: (gender: Gender) => void; showGender: boolean; }) => { @@ -105,13 +106,13 @@ const CharacterControls = (props: { }; const ChoicedSelection = (props: { - name: string; catalog: FeatureChoicedServerData; + name: string; + onClose: () => void; + onSelect: (value: string) => void; selected: string; supplementalFeature?: string; supplementalValue?: unknown; - onClose: () => void; - onSelect: (value: string) => void; }) => { const { act } = useBackend(); @@ -213,8 +214,8 @@ const ChoicedSelection = (props: { }; const GenderButton = (props: { - handleSetGender: (gender: Gender) => void; gender: Gender; + handleSetGender: (gender: Gender) => void; }) => { const [genderMenuOpen, setGenderMenuOpen] = useLocalState( 'genderMenuOpen', @@ -269,10 +270,10 @@ const MainFeature = (props: { supplemental_feature?: string; }; currentValue: string; - isOpen: boolean; handleClose: () => void; handleOpen: () => void; handleSelect: (newClothing: string) => void; + isOpen: boolean; randomization?: RandomSetting; setRandomization: (newSetting: RandomSetting) => void; }) => { diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/PageButton.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/PageButton.tsx index 36bc8e9767ef..709b6c458715 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/PageButton.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/PageButton.tsx @@ -1,14 +1,15 @@ import { ReactNode } from 'react'; + import { Button } from '../../components'; export const PageButton =

(props: { + children?: ReactNode; currentPage: P; - page: P; otherActivePages?: P[]; - setPage: (page: P) => void; + page: P; - children?: ReactNode; + setPage: (page: P) => void; }) => { const pageIsActive = props.currentPage === props.page || diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/QuirksPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/QuirksPage.tsx index d272ec3aa8ec..b678e3d1ac86 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/QuirksPage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/QuirksPage.tsx @@ -1,6 +1,6 @@ +import { useBackend, useLocalState } from '../../backend'; import { Box, Icon, Stack, Tooltip } from '../../components'; import { PreferencesMenuData, Quirk } from './data'; -import { useBackend, useLocalState } from '../../backend'; import { ServerPreferencesFetcher } from './ServerPreferencesFetcher'; const getValueClass = (value: number): string => { @@ -14,13 +14,13 @@ const getValueClass = (value: number): string => { }; const QuirkList = (props: { + onClick: (quirkName: string, quirk: Quirk) => void; quirks: [ string, Quirk & { failTooltip?: string; }, ][]; - onClick: (quirkName: string, quirk: Quirk) => void; }) => { return ( // Stack is not used here for a variety of IE flex bugs diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/RandomizationButton.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/RandomizationButton.tsx index ea33f7437f05..187109fd48cd 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/RandomizationButton.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/RandomizationButton.tsx @@ -1,6 +1,7 @@ +import { exhaustiveCheck } from 'common/exhaustive'; + import { Dropdown, Icon } from '../../components'; import { RandomSetting } from './data'; -import { exhaustiveCheck } from 'common/exhaustive'; export const RandomizationButton = (props: { dropdownProps?: Record; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/ServerPreferencesFetcher.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/ServerPreferencesFetcher.tsx index 11e1962a91d8..46905c4536a7 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/ServerPreferencesFetcher.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/ServerPreferencesFetcher.tsx @@ -1,4 +1,5 @@ import { Component, ReactNode } from 'react'; + import { resolveAsset } from '../../assets'; import { fetchRetry } from '../../http'; import { ServerData } from './data'; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/SpeciesPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/SpeciesPage.tsx index 801c94d385ca..2d244db30f9a 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/SpeciesPage.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/SpeciesPage.tsx @@ -1,4 +1,5 @@ import { classes } from 'common/react'; + import { useBackend } from '../../backend'; import { BlockQuote, @@ -68,10 +69,10 @@ const notIn = function (set: Set) { }; const FoodList = (props: { + className: string; food: Food[]; icon: string; name: string; - className: string; }) => { if (props.food.length === 0) { return null; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/TabbedMenu.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/TabbedMenu.tsx index 38f97d8e3ddf..13c572ebc84c 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/TabbedMenu.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/TabbedMenu.tsx @@ -1,4 +1,5 @@ import { Component, createRef, ReactNode, RefObject } from 'react'; + import { Button, Section, Stack } from '../../components'; import { FlexProps } from '../../components/Flex'; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/base.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/base.ts index a91b6af87813..b7a8726f8fc8 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/base.ts +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/antagonists/base.ts @@ -19,12 +19,12 @@ */ export type Antagonist = { + category: Category; + + description: string[]; // the antag_flag, made lowercase, and with non-alphanumerics removed. key: string; - name: string; - description: string[]; - category: Category; priority?: number; }; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts index 7fa5320315f8..5f1c670106b0 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/data.ts @@ -1,4 +1,5 @@ import { BooleanLike } from 'common/react'; + import { sendAct } from '../../backend'; import { Gender } from './preferences/gender'; @@ -35,33 +36,33 @@ export type Name = { }; export type Species = { - name: string; desc: string; - lore: string[]; + diet?: { + disliked_food: Food[]; + liked_food: Food[]; + toxic_food: Food[]; + }; + enabled_features: string[]; icon: string; - use_skintones: BooleanLike; - sexes: BooleanLike; - - enabled_features: string[]; + lore: string[]; + name: string; perks: { - positive: Perk[]; negative: Perk[]; neutral: Perk[]; + positive: Perk[]; }; - diet?: { - liked_food: Food[]; - disliked_food: Food[]; - toxic_food: Food[]; - }; + sexes: BooleanLike; + + use_skintones: BooleanLike; }; export type Perk = { - ui_icon: string; - name: string; description: string; + name: string; + ui_icon: string; }; export type Department = { @@ -69,10 +70,10 @@ export type Department = { }; export type Job = { - description: string; - department: string; // PARIAH EDIT alt_titles?: string[]; + department: string; + description: string; // PARIAH EDIT END }; @@ -85,8 +86,8 @@ export type Quirk = { export type QuirkInfo = { max_positive_quirks: number; - quirk_info: Record; quirk_blacklist: string[][]; + quirk_info: Record; }; export enum RandomSetting { @@ -121,38 +122,44 @@ export enum Window { } export type PreferencesMenuData = { - character_preview_view: string; - character_profiles: (string | null)[]; - - preview_options: string; // PARIAH EDIT ADDITION - preview_selection: string; // PARIAH EDIT ADDITION + active_slot: number; + antag_bans?: string[]; + antag_days_left?: Record; + // PARIAH EDIT ADDITION character_preferences: { clothing: Record; features: Record; game_preferences: Record; - non_contextual: { - random_body: RandomSetting; - [otherKey: string]: unknown; - }; - secondary_features: Record; - supplemental_features: Record; - - names: Record; - misc: { gender: Gender; joblessrole: JoblessRole; species: string; }; + names: Record; + non_contextual: { + [otherKey: string]: unknown; + random_body: RandomSetting; + }; randomization: Record; + + secondary_features: Record; + + supplemental_features: Record; }; - content_unlocked: BooleanLike; + character_preview_view: string; + character_profiles: (string | null)[]; + + content_unlocked: BooleanLike; + job_alt_titles: Record; job_bans?: string[]; job_days_left?: Record; + + job_preferences: Record; + job_required_experience?: Record< string, { @@ -160,25 +167,23 @@ export type PreferencesMenuData = { required_playtime: number; } >; - job_preferences: Record; - - job_alt_titles: Record; // PARIAH EDIT ADDITION - + // PARIAH EDIT ADDITION keybindings: Record; + name_to_use: string; + overflow_role: string; - selected_quirks: string[]; + preview_options: string; + // PARIAH EDIT ADDITION + preview_selection: string; - antag_bans?: string[]; - antag_days_left?: Record; selected_antags: string[]; - - active_slot: number; - name_to_use: string; + selected_quirks: string[]; window: Window; }; export type ServerData = { + [otheyKey: string]: unknown; jobs: { departments: Record; jobs: Record; @@ -191,5 +196,4 @@ export type ServerData = { randomizable: string[]; }; species: Record; - [otheyKey: string]: unknown; }; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/index.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/index.tsx index cacfd3c95785..0f8aefcecf9d 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/index.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/index.tsx @@ -1,11 +1,12 @@ import { exhaustiveCheck } from 'common/exhaustive'; + import { useBackend } from '../../backend'; +import { CharacterPreferenceWindow } from './CharacterPreferenceWindow'; import { GamePreferencesSelectedPage, PreferencesMenuData, Window, } from './data'; -import { CharacterPreferenceWindow } from './CharacterPreferenceWindow'; import { GamePreferenceWindow } from './GamePreferenceWindow'; export const PreferencesMenu = (props) => { diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/names.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/names.tsx index c6475763eaad..55fe73c594f0 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/names.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/names.tsx @@ -1,4 +1,5 @@ import { binaryInsertWith, sortBy } from 'common/collections'; + import { useLocalState } from '../../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/base.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/base.tsx index a5bd303b3940..2475add3578c 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/base.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/base.tsx @@ -1,15 +1,16 @@ import { sortBy, sortStrings } from 'common/collections'; import { BooleanLike, classes } from 'common/react'; import { ComponentType, createElement, ReactNode } from 'react'; + import { sendAct, useBackend, useLocalState } from '../../../../backend'; import { Box, Button, Dropdown, + Input, NumberInput, Stack, TextArea, - Input, } from '../../../../components'; import { createSetPreference, PreferencesMenuData } from '../../data'; import { ServerPreferencesFetcher } from '../../ServerPreferencesFetcher'; @@ -21,10 +22,10 @@ export type Feature< TSending = TReceiving, TServerData = undefined, > = { - name: string; - component: FeatureValue; category?: string; + component: FeatureValue; description?: string; + name: string; }; /** @@ -276,8 +277,8 @@ export const FeatureIconnedDropdownInput = ( }; export type FeatureNumericData = { - minimum: number; maximum: number; + minimum: number; step: number; }; @@ -304,12 +305,12 @@ export const FeatureNumberInput = ( }; export const FeatureValueInput = (props: { + act: typeof sendAct; feature: Feature; featureId: string; shrink?: boolean; - value: unknown; - act: typeof sendAct; + value: unknown; }) => { const { data } = useBackend(); diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/admin.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/admin.tsx index 5859c66ae63e..704614cb6d5b 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/admin.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/admin.tsx @@ -1,7 +1,7 @@ import { CheckboxInput, - FeatureColorInput, Feature, + FeatureColorInput, FeatureDropdownInput, FeatureToggle, } from '../base'; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ghost.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ghost.tsx index 4a1fcaa92e17..e23713f13f31 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ghost.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ghost.tsx @@ -1,3 +1,5 @@ +import { useBackend } from '../../../../../backend'; +import { PreferencesMenuData } from '../../../data'; import { CheckboxInput, FeatureChoiced, @@ -6,8 +8,6 @@ import { FeatureToggle, FeatureValueProps, } from '../base'; -import { useBackend } from '../../../../../backend'; -import { PreferencesMenuData } from '../../../data'; export const ghost_hud: FeatureToggle = { name: 'Ghost HUD', diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/legacy_chat_toggles.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/legacy_chat_toggles.tsx index ddd9be2ad777..84418348d00a 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/legacy_chat_toggles.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/legacy_chat_toggles.tsx @@ -1,4 +1,4 @@ -import { FeatureToggle, CheckboxInput } from '../base'; +import { CheckboxInput, FeatureToggle } from '../base'; export const chat_bankcard: FeatureToggle = { name: 'Enable income updates', diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/legacy_toggles.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/legacy_toggles.tsx index 4bde004fa20c..bef4ef6b6683 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/legacy_toggles.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/legacy_toggles.tsx @@ -1,4 +1,4 @@ -import { FeatureToggle, CheckboxInput, CheckboxInputInverse } from '../base'; +import { CheckboxInput, CheckboxInputInverse, FeatureToggle } from '../base'; export const admin_ignore_cult_ghost: FeatureToggle = { name: 'Prevent being summoned as a cult ghost', diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ooc.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ooc.tsx index 3e0421de7124..fe551cce2f7b 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ooc.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ooc.tsx @@ -1,4 +1,4 @@ -import { FeatureColorInput, Feature } from '../base'; +import { Feature, FeatureColorInput } from '../base'; export const ooccolor: Feature = { name: 'OOC color', diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/screentips.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/screentips.tsx index 60f8b1d11263..c350c863f2a2 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/screentips.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/screentips.tsx @@ -1,7 +1,7 @@ import { - FeatureColorInput, Feature, FeatureChoiced, + FeatureColorInput, FeatureDropdownInput, } from '../base'; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ui_style.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ui_style.tsx index fa133c4abc2a..218b5b3c5809 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ui_style.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/ui_style.tsx @@ -1,11 +1,12 @@ import { classes } from 'common/react'; + +import { Box, Dropdown, Stack } from '../../../../../components'; import { FeatureChoiced, FeatureChoicedServerData, FeatureValueProps, sortChoices, } from '../base'; -import { Box, Dropdown, Stack } from '../../../../../components'; const UIStyleInput = ( props: FeatureValueProps, diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/species_features.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/species_features.tsx index fd112862d670..0017c77c6326 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/species_features.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/species_features.tsx @@ -1,9 +1,9 @@ import { - FeatureColorInput, - FeatureTriColorInput, Feature, FeatureChoiced, + FeatureColorInput, FeatureDropdownInput, + FeatureTriColorInput, } from './base'; export const feature_mutant_colors: Feature = { diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/gender.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/gender.ts index d757c47aa487..8f5604e12f29 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/gender.ts +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/gender.ts @@ -1,6 +1,6 @@ export enum Gender { - Male = 'male', Female = 'female', + Male = 'male', Other = 'plural', } diff --git a/tgui/packages/tgui/interfaces/ProcCallMenu.tsx b/tgui/packages/tgui/interfaces/ProcCallMenu.tsx index bb8ec931e521..621c01e869a0 100644 --- a/tgui/packages/tgui/interfaces/ProcCallMenu.tsx +++ b/tgui/packages/tgui/interfaces/ProcCallMenu.tsx @@ -1,26 +1,27 @@ import { BooleanLike } from 'common/react'; + import { useBackend } from '../backend'; import { - Stack, - Section, - Input, Button, Dropdown, + Input, NoticeBox, + Section, + Stack, } from '../components'; import { Window } from '../layouts'; type Port = { - name: string; color: string; datatype: string; + name: string; }; type ProcCallMenuData = { - input_ports: Port[]; - possible_types: string[]; expected_output: string; expected_output_color: string; + input_ports: Port[]; + possible_types: string[]; resolve_weakref: BooleanLike; }; diff --git a/tgui/packages/tgui/interfaces/Radio.jsx b/tgui/packages/tgui/interfaces/Radio.jsx index e2e0c1b3ffd5..a6a35739d439 100644 --- a/tgui/packages/tgui/interfaces/Radio.jsx +++ b/tgui/packages/tgui/interfaces/Radio.jsx @@ -1,5 +1,6 @@ import { map } from 'common/collections'; import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { Box, Button, LabeledList, NumberInput, Section } from '../components'; import { RADIO_CHANNELS } from '../constants'; diff --git a/tgui/packages/tgui/interfaces/RadioactiveMicrolaser.jsx b/tgui/packages/tgui/interfaces/RadioactiveMicrolaser.jsx index 3179a1f0542b..2732d6d327dc 100644 --- a/tgui/packages/tgui/interfaces/RadioactiveMicrolaser.jsx +++ b/tgui/packages/tgui/interfaces/RadioactiveMicrolaser.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Button, Box, NumberInput, Section, LabeledList } from '../components'; +import { Box, Button, LabeledList, NumberInput, Section } from '../components'; import { Window } from '../layouts'; export const RadioactiveMicrolaser = (props) => { diff --git a/tgui/packages/tgui/interfaces/RapidPipeDispenser.jsx b/tgui/packages/tgui/interfaces/RapidPipeDispenser.jsx index ce20d513f21e..9c49cdf144a0 100644 --- a/tgui/packages/tgui/interfaces/RapidPipeDispenser.jsx +++ b/tgui/packages/tgui/interfaces/RapidPipeDispenser.jsx @@ -1,4 +1,5 @@ import { classes } from 'common/react'; + import { useBackend, useLocalState } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/RemoteRobotControl.jsx b/tgui/packages/tgui/interfaces/RemoteRobotControl.jsx index 872a12fe3f3d..f613dc7b8042 100644 --- a/tgui/packages/tgui/interfaces/RemoteRobotControl.jsx +++ b/tgui/packages/tgui/interfaces/RemoteRobotControl.jsx @@ -1,6 +1,7 @@ import { decodeHtmlEntities } from 'common/string'; + import { useBackend } from '../backend'; -import { Box, Button, NoticeBox, Section, LabeledList } from '../components'; +import { Box, Button, LabeledList, NoticeBox, Section } from '../components'; import { Window } from '../layouts'; export const RemoteRobotControl = (props) => { diff --git a/tgui/packages/tgui/interfaces/RequestManager.jsx b/tgui/packages/tgui/interfaces/RequestManager.jsx index a3800c01c483..d5bab5c2fb52 100644 --- a/tgui/packages/tgui/interfaces/RequestManager.jsx +++ b/tgui/packages/tgui/interfaces/RequestManager.jsx @@ -5,6 +5,7 @@ */ import { decodeHtmlEntities } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; import { Button, Input, Section, Table } from '../components'; import { Popper } from '../components/Popper'; diff --git a/tgui/packages/tgui/interfaces/Roulette.jsx b/tgui/packages/tgui/interfaces/Roulette.jsx index f352b9082ad8..c29aa9e6973b 100644 --- a/tgui/packages/tgui/interfaces/Roulette.jsx +++ b/tgui/packages/tgui/interfaces/Roulette.jsx @@ -1,4 +1,5 @@ import { classes } from 'common/react'; + import { useBackend, useLocalState } from '../backend'; import { Box, Button, Grid, NumberInput, Table } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/Safe.jsx b/tgui/packages/tgui/interfaces/Safe.jsx index bf0fcdb91f20..9e013b38fcd1 100644 --- a/tgui/packages/tgui/interfaces/Safe.jsx +++ b/tgui/packages/tgui/interfaces/Safe.jsx @@ -1,4 +1,5 @@ import { Fragment } from 'react'; + import { resolveAsset } from '../assets'; import { useBackend } from '../backend'; import { Box, Button, Icon, Section } from '../components'; diff --git a/tgui/packages/tgui/interfaces/ScannerGate.jsx b/tgui/packages/tgui/interfaces/ScannerGate.jsx index a76309f624a1..91d7b75b2cbf 100644 --- a/tgui/packages/tgui/interfaces/ScannerGate.jsx +++ b/tgui/packages/tgui/interfaces/ScannerGate.jsx @@ -1,7 +1,7 @@ import { useBackend } from '../backend'; import { Box, Button, LabeledList, Section } from '../components'; -import { InterfaceLockNoticeBox } from './common/InterfaceLockNoticeBox'; import { Window } from '../layouts'; +import { InterfaceLockNoticeBox } from './common/InterfaceLockNoticeBox'; const DISEASE_THEASHOLD_LIST = [ 'Positive', diff --git a/tgui/packages/tgui/interfaces/Secrets.jsx b/tgui/packages/tgui/interfaces/Secrets.jsx index 101cc5ca1ba0..5dbf2988f30a 100644 --- a/tgui/packages/tgui/interfaces/Secrets.jsx +++ b/tgui/packages/tgui/interfaces/Secrets.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend, useLocalState } from '../backend'; import { Button, diff --git a/tgui/packages/tgui/interfaces/SeedExtractor.jsx b/tgui/packages/tgui/interfaces/SeedExtractor.jsx index 0935940c09a0..61d6b4905a01 100644 --- a/tgui/packages/tgui/interfaces/SeedExtractor.jsx +++ b/tgui/packages/tgui/interfaces/SeedExtractor.jsx @@ -1,6 +1,7 @@ import { sortBy } from 'common/collections'; import { flow } from 'common/fp'; import { toTitleCase } from 'common/string'; + import { useBackend } from '../backend'; import { Button, Section, Table } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/SelectEquipment.jsx b/tgui/packages/tgui/interfaces/SelectEquipment.jsx index f417e48b4787..0efe24bc5ed5 100644 --- a/tgui/packages/tgui/interfaces/SelectEquipment.jsx +++ b/tgui/packages/tgui/interfaces/SelectEquipment.jsx @@ -1,6 +1,7 @@ import { filter, map, sortBy, uniq } from 'common/collections'; import { flow } from 'common/fp'; import { createSearch } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; import { Box, Button, Icon, Input, Section, Stack, Tabs } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/SentienceFunBalloon.jsx b/tgui/packages/tgui/interfaces/SentienceFunBalloon.jsx index 8b68d44ce5dc..bb7d1d56fbde 100644 --- a/tgui/packages/tgui/interfaces/SentienceFunBalloon.jsx +++ b/tgui/packages/tgui/interfaces/SentienceFunBalloon.jsx @@ -1,11 +1,11 @@ import { useBackend } from '../backend'; import { Button, + Input, + LabeledList, NumberInput, Section, Stack, - Input, - LabeledList, } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/ServerMonitor.jsx b/tgui/packages/tgui/interfaces/ServerMonitor.jsx index 7cc261a0e237..96b650394a62 100644 --- a/tgui/packages/tgui/interfaces/ServerMonitor.jsx +++ b/tgui/packages/tgui/interfaces/ServerMonitor.jsx @@ -1,14 +1,14 @@ import { useBackend, useLocalState } from '../backend'; import { - Section, - Stack, - Input, Button, - Table, - LabeledList, - Flex, Divider, + Flex, + Input, + LabeledList, NoticeBox, + Section, + Stack, + Table, } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/ShuttleManipulator.jsx b/tgui/packages/tgui/interfaces/ShuttleManipulator.jsx index 10074f0e984f..7929d19601ef 100644 --- a/tgui/packages/tgui/interfaces/ShuttleManipulator.jsx +++ b/tgui/packages/tgui/interfaces/ShuttleManipulator.jsx @@ -1,4 +1,5 @@ import { map } from 'common/collections'; + import { useBackend, useLocalState } from '../backend'; import { Button, Flex, LabeledList, Section, Table, Tabs } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/Signaler.jsx b/tgui/packages/tgui/interfaces/Signaler.jsx index 81ee5a370c81..716b241f535f 100644 --- a/tgui/packages/tgui/interfaces/Signaler.jsx +++ b/tgui/packages/tgui/interfaces/Signaler.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { Button, Grid, NumberInput, Section } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/SimpleBot.tsx b/tgui/packages/tgui/interfaces/SimpleBot.tsx index 7dba3e8cd31f..94e52699934c 100644 --- a/tgui/packages/tgui/interfaces/SimpleBot.tsx +++ b/tgui/packages/tgui/interfaces/SimpleBot.tsx @@ -13,12 +13,12 @@ import { Window } from '../layouts'; type SimpleBotContext = { can_hack: number; - locked: number; + custom_controls: Controls; emagged: number; has_access: number; + locked: number; pai: Pai; settings: Settings; - custom_controls: Controls; }; type Pai = { @@ -27,10 +27,10 @@ type Pai = { }; type Settings = { - power: number; airplane_mode: number; maintenance_lock: number; patrol_station: number; + power: number; }; type Controls = { diff --git a/tgui/packages/tgui/interfaces/SkillStation.jsx b/tgui/packages/tgui/interfaces/SkillStation.jsx index ce77d7b7b033..b26163bbaf8a 100644 --- a/tgui/packages/tgui/interfaces/SkillStation.jsx +++ b/tgui/packages/tgui/interfaces/SkillStation.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/SlimeBodySwapper.jsx b/tgui/packages/tgui/interfaces/SlimeBodySwapper.jsx index 887e0cb8d1db..d5c97e05d370 100644 --- a/tgui/packages/tgui/interfaces/SlimeBodySwapper.jsx +++ b/tgui/packages/tgui/interfaces/SlimeBodySwapper.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Section, LabeledList, Button, Box } from '../components'; +import { Box, Button, LabeledList, Section } from '../components'; import { Window } from '../layouts'; const statusMap = { diff --git a/tgui/packages/tgui/interfaces/SmartVend.jsx b/tgui/packages/tgui/interfaces/SmartVend.jsx index d64de294b434..cc1ddea1c244 100644 --- a/tgui/packages/tgui/interfaces/SmartVend.jsx +++ b/tgui/packages/tgui/interfaces/SmartVend.jsx @@ -1,4 +1,5 @@ import { map } from 'common/collections'; + import { useBackend } from '../backend'; import { Button, NoticeBox, Section, Table } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/SparringContract.tsx b/tgui/packages/tgui/interfaces/SparringContract.tsx index 8cd4e851a8e1..a57eef0e2121 100644 --- a/tgui/packages/tgui/interfaces/SparringContract.tsx +++ b/tgui/packages/tgui/interfaces/SparringContract.tsx @@ -1,4 +1,5 @@ import { BooleanLike } from 'common/react'; + import { useBackend, useLocalState } from '../backend'; import { BlockQuote, Button, Dropdown, Section, Stack } from '../components'; import { Window } from '../layouts'; @@ -30,14 +31,14 @@ const stakesblurb = [ ]; type Info = { - set_weapon: number; - set_area: string; - set_stakes: number; - left_sign: string; - right_sign: string; in_area: BooleanLike; + left_sign: string; no_chaplains: BooleanLike; possible_areas: Array; + right_sign: string; + set_area: string; + set_stakes: number; + set_weapon: number; }; export const SparringContract = (props) => { diff --git a/tgui/packages/tgui/interfaces/SpawnersMenu.tsx b/tgui/packages/tgui/interfaces/SpawnersMenu.tsx index a425d8642773..319d4c606447 100644 --- a/tgui/packages/tgui/interfaces/SpawnersMenu.tsx +++ b/tgui/packages/tgui/interfaces/SpawnersMenu.tsx @@ -7,11 +7,11 @@ type SpawnersMenuContext = { }; type spawner = { - name: string; amount_left: number; - you_are_text?: string; flavor_text?: string; important_text?: string; + name: string; + you_are_text?: string; }; export const SpawnersMenu = (props) => { diff --git a/tgui/packages/tgui/interfaces/Stack.jsx b/tgui/packages/tgui/interfaces/Stack.jsx index 8b266f980b97..99700b1ba95c 100644 --- a/tgui/packages/tgui/interfaces/Stack.jsx +++ b/tgui/packages/tgui/interfaces/Stack.jsx @@ -1,13 +1,14 @@ -import { createSearch } from 'common/string'; import { sortBy } from 'common/collections'; +import { createSearch } from 'common/string'; + import { useBackend, useLocalState } from '../backend'; import { Box, Button, + Collapsible, Input, NoticeBox, Section, - Collapsible, Table, } from '../components'; import { Window } from '../layouts'; @@ -72,14 +73,14 @@ const RecipeList = (props) => { const recipe = recipes[title]; if (recipe.ref === undefined) { return ( - + ); } else { - return ; + return ; } }); }; diff --git a/tgui/packages/tgui/interfaces/StationAlertConsole.jsx b/tgui/packages/tgui/interfaces/StationAlertConsole.jsx index 0483065f5307..f80a5826b064 100644 --- a/tgui/packages/tgui/interfaces/StationAlertConsole.jsx +++ b/tgui/packages/tgui/interfaces/StationAlertConsole.jsx @@ -1,5 +1,6 @@ import { sortBy } from 'common/collections'; import { flow } from 'common/fp'; + import { useBackend } from '../backend'; import { Button, Section, Stack } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/StationTraitsPanel.tsx b/tgui/packages/tgui/interfaces/StationTraitsPanel.tsx index ce4ff4cf6f81..3a1ae11b096f 100644 --- a/tgui/packages/tgui/interfaces/StationTraitsPanel.tsx +++ b/tgui/packages/tgui/interfaces/StationTraitsPanel.tsx @@ -1,6 +1,7 @@ import { filterMap } from 'common/collections'; import { exhaustiveCheck } from 'common/exhaustive'; import { BooleanLike } from 'common/react'; + import { useBackend, useLocalState } from '../backend'; import { Box, Button, Divider, Dropdown, Stack, Tabs } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/StripMenu.tsx b/tgui/packages/tgui/interfaces/StripMenu.tsx index f3e01c8867f8..5f94d506d326 100644 --- a/tgui/packages/tgui/interfaces/StripMenu.tsx +++ b/tgui/packages/tgui/interfaces/StripMenu.tsx @@ -1,5 +1,6 @@ import { range } from 'common/collections'; import { BooleanLike } from 'common/react'; + import { resolveAsset } from '../assets'; import { useBackend } from '../backend'; import { Box, Button, Icon, Stack } from '../components'; @@ -77,10 +78,10 @@ const ALTERNATE_ACTIONS: Record = { const SLOTS: Record< string, { + additionalComponent?: JSX.Element; displayName: string; gridSpot: GridSpotKey; image?: string; - additionalComponent?: JSX.Element; } > = { eyes: { @@ -234,9 +235,9 @@ type StripMenuItem = | Interactable | (( | { + alternate?: string; icon: string; name: string; - alternate?: string; } | { obscured: ObscuringLevel; diff --git a/tgui/packages/tgui/interfaces/SupermatterMonitor.jsx b/tgui/packages/tgui/interfaces/SupermatterMonitor.jsx index e129b00b636c..e23555913bc2 100644 --- a/tgui/packages/tgui/interfaces/SupermatterMonitor.jsx +++ b/tgui/packages/tgui/interfaces/SupermatterMonitor.jsx @@ -1,6 +1,7 @@ import { sortBy } from 'common/collections'; import { flow } from 'common/fp'; import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { Button, diff --git a/tgui/packages/tgui/interfaces/SurgeryInitiator.tsx b/tgui/packages/tgui/interfaces/SurgeryInitiator.tsx index fad53e06a757..da6abf42a1bc 100644 --- a/tgui/packages/tgui/interfaces/SurgeryInitiator.tsx +++ b/tgui/packages/tgui/interfaces/SurgeryInitiator.tsx @@ -2,14 +2,15 @@ import { sortBy } from 'common/collections'; import { KEY_DOWN, KEY_ENTER, KEY_UP } from 'common/keycodes'; import { BooleanLike } from 'common/react'; import { Component } from 'react'; + import { useBackend } from '../backend'; import { Button, KeyListener, Stack } from '../components'; import { BodyZone, BodyZoneSelector } from '../components/BodyZoneSelector'; import { Window } from '../layouts'; type Surgery = { - name: string; blocked?: BooleanLike; + name: string; }; type SurgeryInitiatorData = { diff --git a/tgui/packages/tgui/interfaces/SyndContractor.jsx b/tgui/packages/tgui/interfaces/SyndContractor.jsx index 48d553c35186..874e21cbc2f2 100644 --- a/tgui/packages/tgui/interfaces/SyndContractor.jsx +++ b/tgui/packages/tgui/interfaces/SyndContractor.jsx @@ -1,4 +1,5 @@ import { Component, Fragment } from 'react'; + import { useBackend, useLocalState } from '../backend'; import { Box, diff --git a/tgui/packages/tgui/interfaces/Tank.jsx b/tgui/packages/tgui/interfaces/Tank.jsx index 8710a94b74e3..87c1d4e2221c 100644 --- a/tgui/packages/tgui/interfaces/Tank.jsx +++ b/tgui/packages/tgui/interfaces/Tank.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { Button, diff --git a/tgui/packages/tgui/interfaces/TankCompressor.jsx b/tgui/packages/tgui/interfaces/TankCompressor.jsx index 7eb26c15de50..5404af738051 100644 --- a/tgui/packages/tgui/interfaces/TankCompressor.jsx +++ b/tgui/packages/tgui/interfaces/TankCompressor.jsx @@ -4,14 +4,14 @@ import { Button, Flex, Icon, + LabeledList, Modal, + NoticeBox, RoundGauge, Section, Slider, Stack, - NoticeBox, Tabs, - LabeledList, } from '../components'; import { Window } from '../layouts'; import { GasmixParser } from './common/GasmixParser'; diff --git a/tgui/packages/tgui/interfaces/Telecomms.jsx b/tgui/packages/tgui/interfaces/Telecomms.jsx index 6ef6b902ed60..d0faebd0b9a5 100644 --- a/tgui/packages/tgui/interfaces/Telecomms.jsx +++ b/tgui/packages/tgui/interfaces/Telecomms.jsx @@ -1,14 +1,14 @@ import { useBackend } from '../backend'; import { + Box, Button, Input, + LabeledControls, LabeledList, - Section, - Table, NoticeBox, NumberInput, - LabeledControls, - Box, + Section, + Table, } from '../components'; import { RADIO_CHANNELS } from '../constants'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/TextInputModal.tsx b/tgui/packages/tgui/interfaces/TextInputModal.tsx index 97ef9e941956..c92db58957a9 100644 --- a/tgui/packages/tgui/interfaces/TextInputModal.tsx +++ b/tgui/packages/tgui/interfaces/TextInputModal.tsx @@ -1,9 +1,9 @@ -import { Loader } from './common/Loader'; -import { InputButtons } from './common/InputButtons'; -import { useBackend, useLocalState } from '../backend'; import { KEY_ENTER, KEY_ESCAPE } from '../../common/keycodes'; +import { useBackend, useLocalState } from '../backend'; import { Box, Section, Stack, TextArea } from '../components'; import { Window } from '../layouts'; +import { InputButtons } from './common/InputButtons'; +import { Loader } from './common/Loader'; type TextInputData = { large_buttons: boolean; diff --git a/tgui/packages/tgui/interfaces/ThermoMachine.jsx b/tgui/packages/tgui/interfaces/ThermoMachine.jsx index 0074a22d21ca..8b430b46515b 100644 --- a/tgui/packages/tgui/interfaces/ThermoMachine.jsx +++ b/tgui/packages/tgui/interfaces/ThermoMachine.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { AnimatedNumber, diff --git a/tgui/packages/tgui/interfaces/Thermometer.jsx b/tgui/packages/tgui/interfaces/Thermometer.jsx index 85a5eb7c44a5..19a97d65a2e4 100644 --- a/tgui/packages/tgui/interfaces/Thermometer.jsx +++ b/tgui/packages/tgui/interfaces/Thermometer.jsx @@ -1,4 +1,5 @@ import { Component } from 'react'; + import { useBackend } from '../backend'; import { Box, Stack } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/TrackedPlaytime.jsx b/tgui/packages/tgui/interfaces/TrackedPlaytime.jsx index f405e5b8623e..3f1a3dcb543e 100644 --- a/tgui/packages/tgui/interfaces/TrackedPlaytime.jsx +++ b/tgui/packages/tgui/interfaces/TrackedPlaytime.jsx @@ -1,4 +1,5 @@ import { sortBy } from 'common/collections'; + import { useBackend } from '../backend'; import { Box, Button, Flex, ProgressBar, Section, Table } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/TraitorObjectiveDebug.tsx b/tgui/packages/tgui/interfaces/TraitorObjectiveDebug.tsx index 45922f14b24a..d5ca53310d84 100644 --- a/tgui/packages/tgui/interfaces/TraitorObjectiveDebug.tsx +++ b/tgui/packages/tgui/interfaces/TraitorObjectiveDebug.tsx @@ -4,17 +4,17 @@ import { Window } from '../layouts'; import { getReputation } from './Uplink/calculateReputationLevel'; type Objective = { - name: string; description: string; - progression_minimum: number; - progression_maximum: number; - global_progression_limit_coeff: number; global_progression_influence_intensity: number; + global_progression_limit_coeff: number; + name: string; + progression_maximum: number; + progression_minimum: number; progression_reward: [number, number]; - telecrystal_reward: [number, number]; telecrystal_penalty: number; - weight: number; + telecrystal_reward: [number, number]; type: string; + weight: number; }; type ObjectiveList = { diff --git a/tgui/packages/tgui/interfaces/TurbineComputer.jsx b/tgui/packages/tgui/interfaces/TurbineComputer.jsx index 7b6d439ef916..6662a474301c 100644 --- a/tgui/packages/tgui/interfaces/TurbineComputer.jsx +++ b/tgui/packages/tgui/interfaces/TurbineComputer.jsx @@ -1,12 +1,12 @@ import { useBackend } from '../backend'; import { + Box, Button, LabeledList, - Section, - Box, Modal, - ProgressBar, NumberInput, + ProgressBar, + Section, } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/Uplink/GenericUplink.tsx b/tgui/packages/tgui/interfaces/Uplink/GenericUplink.tsx index 21d5d5862daf..8f5297ea1fee 100644 --- a/tgui/packages/tgui/interfaces/Uplink/GenericUplink.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/GenericUplink.tsx @@ -1,21 +1,22 @@ import { BooleanLike } from 'common/react'; + import { useLocalState, useSharedState } from '../../backend'; import { Box, Button, Input, - Section, - Tabs, NoticeBox, + Section, Stack, + Tabs, } from '../../components'; type GenericUplinkProps = { - currency?: string | JSX.Element; categories: string[]; - items: Item[]; - + currency?: string | JSX.Element; handleBuy: (item: Item) => void; + + items: Item[]; }; export const GenericUplink = (props: GenericUplinkProps) => { @@ -96,20 +97,20 @@ export const GenericUplink = (props: GenericUplinkProps) => { }; export type Item = { - id: string | number; - name: string; category: string; cost: JSX.Element | string; desc: JSX.Element | string; disabled: BooleanLike; extraData?: ItemData; + id: string | number; + name: string; }; export type ItemListProps = { compactMode: BooleanLike; - items: Item[]; - handleBuy: (item: Item) => void; + + items: Item[]; }; const ItemList = (props: ItemListProps) => { diff --git a/tgui/packages/tgui/interfaces/Uplink/ObjectiveMenu.tsx b/tgui/packages/tgui/interfaces/Uplink/ObjectiveMenu.tsx index f2ea38d67cbc..bc1d61e9fe3e 100644 --- a/tgui/packages/tgui/interfaces/Uplink/ObjectiveMenu.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/ObjectiveMenu.tsx @@ -1,15 +1,16 @@ import { BooleanLike, classes } from 'common/react'; import { Component } from 'react'; + import { - Section, - Stack, Box, Button, - Flex, - Tooltip, - NoticeBox, Dimmer, + Flex, Icon, + NoticeBox, + Section, + Stack, + Tooltip, } from '../../components'; import { calculateProgression, @@ -19,37 +20,37 @@ import { import { ObjectiveState } from './constants'; export type Objective = { + description: string; + final_objective: BooleanLike; id: number; name: string; - description: string; + objective_state: ObjectiveState; + original_progression: number; progression_minimum: number; progression_reward: number; - telecrystal_reward: number; telecrystal_penalty: number; + telecrystal_reward: number; ui_buttons?: ObjectiveUiButton[]; - objective_state: ObjectiveState; - original_progression: number; - final_objective: BooleanLike; }; export type ObjectiveUiButton = { + action: string; + icon: string; name: string; tooltip: string; - icon: string; - action: string; }; type ObjectiveMenuProps = { activeObjectives: Objective[]; - potentialObjectives: Objective[]; - maximumActiveObjectives: number; - maximumPotentialObjectives: number; - - handleStartObjective: (objective: Objective) => void; + handleObjectiveAbort: (objective: Objective) => void; handleObjectiveAction: (objective: Objective, action: string) => void; handleObjectiveCompleted: (objective: Objective) => void; - handleObjectiveAbort: (objective: Objective) => void; + handleRequestObjectives: () => void; + handleStartObjective: (objective: Objective) => void; + maximumActiveObjectives: number; + maximumPotentialObjectives: number; + potentialObjectives: Objective[]; }; type ObjectiveMenuState = { @@ -342,21 +343,21 @@ const ObjectiveFunction = ( }; type ObjectiveElementProps = { - name: string; - reputation: Rank; + canAbort: BooleanLike; description: string; - telecrystalReward: number; - progressionReward: number; - uiButtons?: JSX.Element; + finalObjective: BooleanLike; + grow: boolean; + handleAbort: (event: MouseEvent) => void; + handleCompletion: (event: MouseEvent) => void; + name: string; objectiveState: ObjectiveState; originalProgression: number; + progressionReward: number; + reputation: Rank; telecrystalPenalty: number; - grow: boolean; - finalObjective: BooleanLike; - canAbort: BooleanLike; - handleCompletion: (event: MouseEvent) => void; - handleAbort: (event: MouseEvent) => void; + telecrystalReward: number; + uiButtons?: JSX.Element; }; const ObjectiveElement = (props: ObjectiveElementProps) => { diff --git a/tgui/packages/tgui/interfaces/Uplink/calculateReputationLevel.tsx b/tgui/packages/tgui/interfaces/Uplink/calculateReputationLevel.tsx index ffb6375c647b..b55de90e5f18 100644 --- a/tgui/packages/tgui/interfaces/Uplink/calculateReputationLevel.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/calculateReputationLevel.tsx @@ -12,9 +12,9 @@ const ultraGoodGradient = 'reputation-super-good'; const bestGradient = 'reputation-best'; export type Rank = { + gradient: string; minutesLessThan: number; title: string; - gradient: string; }; export const ranks: Rank[] = [ diff --git a/tgui/packages/tgui/interfaces/Uplink/index.tsx b/tgui/packages/tgui/interfaces/Uplink/index.tsx index fa92e4963130..da0aac5bc89a 100644 --- a/tgui/packages/tgui/interfaces/Uplink/index.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/index.tsx @@ -1,71 +1,72 @@ -import { useBackend } from '../../backend'; -import { Window } from '../../layouts'; -import { GenericUplink, Item } from './GenericUplink'; +import { BooleanLike } from 'common/react'; import { Component } from 'react'; -import { fetchRetry } from '../../http'; + import { resolveAsset } from '../../assets'; -import { BooleanLike } from 'common/react'; -import { Box, Tabs, Button, Stack, Section, Tooltip } from '../../components'; -import { Objective, ObjectiveMenu } from './ObjectiveMenu'; +import { useBackend } from '../../backend'; +import { Box, Button, Section, Stack, Tabs, Tooltip } from '../../components'; +import { fetchRetry } from '../../http'; +import { Window } from '../../layouts'; import { calculateProgression, calculateReputationLevel, reputationDefault, reputationLevelsTooltip, } from './calculateReputationLevel'; +import { GenericUplink, Item } from './GenericUplink'; +import { Objective, ObjectiveMenu } from './ObjectiveMenu'; type UplinkItem = { - id: string; - name: string; + category: string; cost: number; + cost_override_string: string; desc: string; - category: string; + id: string; + limited_stock: number; + name: string; + progression_minimum: number; purchasable_from: number; + ref?: string; restricted: BooleanLike; - limited_stock: number; restricted_roles: string; restricted_species: string; - progression_minimum: number; - cost_override_string: string; - ref?: string; }; type UplinkData = { - telecrystals: number; - progression_points: number; - lockable: BooleanLike; - current_expected_progression: number; - progression_scaling_deviance: number; - current_progression_scaling: number; - uplink_flag: number; + active_objectives: Objective[]; assigned_role: string; assigned_species: string; + current_expected_progression: number; + current_progression_scaling: number; + current_stock: { + [key: string]: number; + }; debug: BooleanLike; extra_purchasable: UplinkItem[]; extra_purchasable_stock: { [key: string]: number; }; - current_stock: { - [key: string]: number; - }; - has_objectives: BooleanLike; has_progression: BooleanLike; - potential_objectives: Objective[]; - active_objectives: Objective[]; + lockable: BooleanLike; maximum_active_objectives: number; + maximum_potential_objectives: number; + potential_objectives: Objective[]; + progression_points: number; + progression_scaling_deviance: number; + telecrystals: number; + uplink_flag: number; }; type UplinkState = { - allItems: UplinkItem[]; allCategories: string[]; + allItems: UplinkItem[]; currentTab: number; }; type ServerData = { - items: UplinkItem[]; categories: string[]; + items: UplinkItem[]; }; type ItemExtraData = { diff --git a/tgui/packages/tgui/interfaces/VaultController.jsx b/tgui/packages/tgui/interfaces/VaultController.jsx index 27c9e77efb41..d1f721e6c981 100644 --- a/tgui/packages/tgui/interfaces/VaultController.jsx +++ b/tgui/packages/tgui/interfaces/VaultController.jsx @@ -1,4 +1,5 @@ import { toFixed } from 'common/math'; + import { useBackend } from '../backend'; import { Button, LabeledList, ProgressBar, Section } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/Vending.tsx b/tgui/packages/tgui/interfaces/Vending.tsx index 2e16980a9c68..a0323c88063f 100644 --- a/tgui/packages/tgui/interfaces/Vending.tsx +++ b/tgui/packages/tgui/interfaces/Vending.tsx @@ -13,68 +13,68 @@ import { DmIcon } from '../components/DMIcon'; import { Window } from '../layouts'; type VendingData = { - onstation: boolean; + access: boolean; + coin_records: CoinRecord[]; department: string; + extended_inventory: boolean; + hidden_records: HiddenRecord[]; jobDiscount: number; + onstation: boolean; product_records: ProductRecord[]; - coin_records: CoinRecord[]; - hidden_records: HiddenRecord[]; - user: UserData; stock: StockItem[]; - extended_inventory: boolean; - access: boolean; + user: UserData; vending_machine_input: CustomInput[]; }; type ProductRecord = { - path: string; + icon: string; + icon_state: string; + max_amount: number; name: string; + path: string; price: number; - max_amount: number; ref: string; - icon: string; - icon_state: string; }; type CoinRecord = { - path: string; + icon: string; + icon_state: string; + max_amount: number; name: string; + path: string; + premium: boolean; price: number; - max_amount: number; ref: string; - premium: boolean; - icon: string; - icon_state: string; }; type HiddenRecord = { - path: string; + icon: string; + icon_state: string; + max_amount: number; name: string; + path: string; + premium: boolean; price: number; - max_amount: number; ref: string; - premium: boolean; - icon: string; - icon_state: string; }; type UserData = { - name: string; cash: number; - job: string; department: string; + job: string; + name: string; }; type StockItem = { - name: string; amount: number; colorable: boolean; + name: string; }; type CustomInput = { + img: string; name: string; price: number; - img: string; }; export const Vending = (_) => { diff --git a/tgui/packages/tgui/interfaces/Vote.jsx b/tgui/packages/tgui/interfaces/Vote.jsx index f3b7f73b5261..53ec01614212 100644 --- a/tgui/packages/tgui/interfaces/Vote.jsx +++ b/tgui/packages/tgui/interfaces/Vote.jsx @@ -1,13 +1,13 @@ import { useBackend } from '../backend'; import { Box, - Icon, - Stack, Button, - Section, - NoticeBox, - LabeledList, Collapsible, + Icon, + LabeledList, + NoticeBox, + Section, + Stack, } from '../components'; import { Window } from '../layouts'; diff --git a/tgui/packages/tgui/interfaces/Wires.jsx b/tgui/packages/tgui/interfaces/Wires.jsx index 13c4778a28f8..6f2a8884c440 100644 --- a/tgui/packages/tgui/interfaces/Wires.jsx +++ b/tgui/packages/tgui/interfaces/Wires.jsx @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { Box, Button, LabeledList, Section, NoticeBox } from '../components'; +import { Box, Button, LabeledList, NoticeBox, Section } from '../components'; import { Window } from '../layouts'; export const Wires = (props) => { diff --git a/tgui/packages/tgui/interfaces/common/AccessConfig.jsx b/tgui/packages/tgui/interfaces/common/AccessConfig.jsx index fb16d28b6e9e..274ecf0f76ae 100644 --- a/tgui/packages/tgui/interfaces/common/AccessConfig.jsx +++ b/tgui/packages/tgui/interfaces/common/AccessConfig.jsx @@ -1,6 +1,7 @@ import { sortBy } from 'common/collections'; -import { Section, Button, Flex, Tabs, Grid } from '../../components'; + import { useLocalState } from '../../backend'; +import { Button, Flex, Grid, Section, Tabs } from '../../components'; export const AccessConfig = (props) => { const { diff --git a/tgui/packages/tgui/interfaces/common/AccessList.jsx b/tgui/packages/tgui/interfaces/common/AccessList.jsx index 8f651618b6c4..a4096b6ce305 100644 --- a/tgui/packages/tgui/interfaces/common/AccessList.jsx +++ b/tgui/packages/tgui/interfaces/common/AccessList.jsx @@ -1,4 +1,5 @@ import { sortBy } from 'common/collections'; + import { useSharedState } from '../../backend'; import { Button, Flex, Section, Tabs } from '../../components'; diff --git a/tgui/packages/tgui/interfaces/common/AtmosControls.jsx b/tgui/packages/tgui/interfaces/common/AtmosControls.jsx index 6edcd75582fd..bbae5fbc0988 100644 --- a/tgui/packages/tgui/interfaces/common/AtmosControls.jsx +++ b/tgui/packages/tgui/interfaces/common/AtmosControls.jsx @@ -1,4 +1,5 @@ import { decodeHtmlEntities } from 'common/string'; + import { useBackend } from '../../backend'; import { Button, LabeledList, NumberInput, Section } from '../../components'; import { getGasLabel } from '../../constants'; diff --git a/tgui/packages/tgui/interfaces/common/AtmosHandbook.tsx b/tgui/packages/tgui/interfaces/common/AtmosHandbook.tsx index b708b22d64a5..2897e7790321 100644 --- a/tgui/packages/tgui/interfaces/common/AtmosHandbook.tsx +++ b/tgui/packages/tgui/interfaces/common/AtmosHandbook.tsx @@ -1,4 +1,5 @@ import { ReactNode } from 'react'; + import { useBackend, useLocalState } from '../../backend'; import { Box, @@ -21,34 +22,34 @@ import { */ type Factor = { + desc: string; factor_id?: string; - factor_type: 'gas' | 'misc'; factor_name: string; - desc: string; + factor_type: 'gas' | 'misc'; tooltip?: string; }; type Reaction = { - id: string; - name: string; description: string; factors: Factor[]; + id: string; + name: string; }; type Gas = { + description: string; id: string; name: string; - description: string; - specific_heat: number; reactions: { [key: string]: string } | []; + specific_heat: number; }; const GasSearchBar = (props: { - title: ReactNode; - onChange: (inputValue: string) => void; activeInput: boolean; + onChange: (inputValue: string) => void; setActiveInput: (toggle: boolean) => void; + title: ReactNode; }) => { const { title, onChange, activeInput, setActiveInput } = props; return ( diff --git a/tgui/packages/tgui/interfaces/common/GasmixParser.tsx b/tgui/packages/tgui/interfaces/common/GasmixParser.tsx index 1ee095776d62..b0f343f01649 100644 --- a/tgui/packages/tgui/interfaces/common/GasmixParser.tsx +++ b/tgui/packages/tgui/interfaces/common/GasmixParser.tsx @@ -1,21 +1,22 @@ -import { LabeledList, Box, Button } from '../../components'; +import { Box, Button, LabeledList } from '../../components'; export type Gasmix = { + gases: [string, string, number][]; name?: string; - gases: [string, string, number][]; // ID, name, and amount. - temperature: number; - volume: number; pressure: number; - total_moles: number; reference: string; + // ID, name, and amount. + temperature: number; + total_moles: number; + volume: number; }; type GasmixParserProps = { - gasmix: Gasmix; gasesOnClick?: (gas_id: string) => void; + gasmix: Gasmix; + pressureOnClick?: () => void; temperatureOnClick?: () => void; volumeOnClick?: () => void; - pressureOnClick?: () => void; }; export const GasmixParser = (props: GasmixParserProps) => { diff --git a/tgui/packages/tgui/interfaces/common/Loader.tsx b/tgui/packages/tgui/interfaces/common/Loader.tsx index 7f758a94ad95..bf0f432d0559 100644 --- a/tgui/packages/tgui/interfaces/common/Loader.tsx +++ b/tgui/packages/tgui/interfaces/common/Loader.tsx @@ -1,6 +1,7 @@ -import { Box } from '../../components'; import { clamp01 } from 'common/math'; +import { Box } from '../../components'; + export const Loader = (props) => { const { value } = props; diff --git a/tgui/packages/tgui/interfaces/common/Materials.tsx b/tgui/packages/tgui/interfaces/common/Materials.tsx index 53b9a5f4c3c2..671c96094ecd 100644 --- a/tgui/packages/tgui/interfaces/common/Materials.tsx +++ b/tgui/packages/tgui/interfaces/common/Materials.tsx @@ -1,9 +1,10 @@ import { BooleanLike } from 'common/react'; -import { Box, Button, NumberInput, Flex } from '../../components'; import { classes } from 'common/react'; -import { formatMoney, formatSiUnit } from '../../format'; + import { useSharedState } from '../../backend'; +import { Box, Button, Flex, NumberInput } from '../../components'; import { BoxProps } from '../../components/Box'; +import { formatMoney, formatSiUnit } from '../../format'; export const MATERIAL_KEYS = { iron: 'sheet-metal_3', @@ -20,11 +21,11 @@ export const MATERIAL_KEYS = { } as const; export type Material = { + amount: number; name: keyof typeof MATERIAL_KEYS; ref: string; - amount: number; - sheets: number; removable: BooleanLike; + sheets: number; }; interface MaterialIconProps extends BoxProps { @@ -115,10 +116,10 @@ export enum MaterialFormatting { } export const MaterialAmount = (props: { - name: keyof typeof MATERIAL_KEYS; amount: number; - formatting?: MaterialFormatting; color?: string; + formatting?: MaterialFormatting; + name: keyof typeof MATERIAL_KEYS; style?: Record; }) => { const { name, amount, color, style } = props; diff --git a/tgui/packages/tgui/layouts/Layout.jsx b/tgui/packages/tgui/layouts/Layout.jsx index cb7d1f2178dd..cba10104ec3d 100644 --- a/tgui/packages/tgui/layouts/Layout.jsx +++ b/tgui/packages/tgui/layouts/Layout.jsx @@ -5,6 +5,7 @@ */ import { classes } from 'common/react'; + import { computeBoxClassName, computeBoxProps } from '../components/Box'; export const Layout = (props) => { diff --git a/tgui/packages/tgui/layouts/Pane.jsx b/tgui/packages/tgui/layouts/Pane.jsx index 37773637f1e8..b4c9d4109fcd 100644 --- a/tgui/packages/tgui/layouts/Pane.jsx +++ b/tgui/packages/tgui/layouts/Pane.jsx @@ -5,6 +5,7 @@ */ import { classes } from 'common/react'; + import { useBackend } from '../backend'; import { Box } from '../components'; import { useDebug } from '../debug'; diff --git a/tgui/packages/tgui/layouts/Window.jsx b/tgui/packages/tgui/layouts/Window.jsx index 0baf09438634..8f037612286d 100644 --- a/tgui/packages/tgui/layouts/Window.jsx +++ b/tgui/packages/tgui/layouts/Window.jsx @@ -7,6 +7,7 @@ import { classes } from 'common/react'; import { decodeHtmlEntities, toTitleCase } from 'common/string'; import { Component } from 'react'; + import { backendSuspendStart, globalStore, useBackend } from '../backend'; import { Icon } from '../components'; import { UI_DISABLED, UI_INTERACTIVE, UI_UPDATE } from '../constants'; diff --git a/tgui/packages/tgui/renderer.ts b/tgui/packages/tgui/renderer.ts index 50ba4814662a..bf3bad183948 100644 --- a/tgui/packages/tgui/renderer.ts +++ b/tgui/packages/tgui/renderer.ts @@ -1,8 +1,9 @@ import { perf } from 'common/perf'; import { ReactNode } from 'react'; -import { createLogger } from './logging'; import { createRoot, Root } from 'react-dom/client'; +import { createLogger } from './logging'; + const logger = createLogger('renderer'); let reactRoot: Root; diff --git a/tgui/packages/tgui/store.js b/tgui/packages/tgui/store.js index ab582e844adf..6d782db0007a 100644 --- a/tgui/packages/tgui/store.js +++ b/tgui/packages/tgui/store.js @@ -6,6 +6,7 @@ import { flow } from 'common/fp'; import { applyMiddleware, combineReducers, createStore } from 'common/redux'; + import { assetMiddleware } from './assets'; import { backendMiddleware, backendReducer } from './backend'; import { debugMiddleware, debugReducer, relayMiddleware } from './debug'; diff --git a/tgui/packages/tgui/stories/Storage.stories.jsx b/tgui/packages/tgui/stories/Storage.stories.jsx index 78c3893739f9..2fb115bf453d 100644 --- a/tgui/packages/tgui/stories/Storage.stories.jsx +++ b/tgui/packages/tgui/stories/Storage.stories.jsx @@ -5,6 +5,7 @@ */ import { storage } from 'common/storage'; + import { Button, LabeledList, NoticeBox, Section } from '../components'; import { formatSiUnit } from '../format'; diff --git a/tgui/yarn.lock b/tgui/yarn.lock index d704c2fd3560..54652366fc65 100644 --- a/tgui/yarn.lock +++ b/tgui/yarn.lock @@ -1562,6 +1562,13 @@ __metadata: languageName: node linkType: hard +"@types/semver@npm:^7.3.12": + version: 7.5.8 + resolution: "@types/semver@npm:7.5.8" + checksum: 10c0/8663ff927234d1c5fcc04b33062cb2b9fcfbe0f5f351ed26c4d1e1581657deebd506b41ff7fdf89e787e3d33ce05854bc01686379b89e9c49b564c4cfa988efa + languageName: node + linkType: hard + "@types/stack-utils@npm:^2.0.0": version: 2.0.0 resolution: "@types/stack-utils@npm:2.0.0" @@ -1610,6 +1617,17 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/experimental-utils@npm:^5.0.0": + version: 5.62.0 + resolution: "@typescript-eslint/experimental-utils@npm:5.62.0" + dependencies: + "@typescript-eslint/utils": "npm:5.62.0" + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 10c0/f7037977e00849cd8c03677a88b0659a4f0e0b1e0151aebb47c49c92b8e57408578142df598eac08b364623d926343c724f42494f87662e437b1c89f0b2e815b + languageName: node + linkType: hard + "@typescript-eslint/parser@npm:^7.12.0": version: 7.12.0 resolution: "@typescript-eslint/parser@npm:7.12.0" @@ -1628,6 +1646,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/scope-manager@npm:5.62.0" + dependencies: + "@typescript-eslint/types": "npm:5.62.0" + "@typescript-eslint/visitor-keys": "npm:5.62.0" + checksum: 10c0/861253235576c1c5c1772d23cdce1418c2da2618a479a7de4f6114a12a7ca853011a1e530525d0931c355a8fd237b9cd828fac560f85f9623e24054fd024726f + languageName: node + linkType: hard + "@typescript-eslint/scope-manager@npm:7.12.0": version: 7.12.0 resolution: "@typescript-eslint/scope-manager@npm:7.12.0" @@ -1638,6 +1666,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/types@npm:5.62.0" + checksum: 10c0/7febd3a7f0701c0b927e094f02e82d8ee2cada2b186fcb938bc2b94ff6fbad88237afc304cbaf33e82797078bbbb1baf91475f6400912f8b64c89be79bfa4ddf + languageName: node + linkType: hard + "@typescript-eslint/types@npm:7.12.0": version: 7.12.0 resolution: "@typescript-eslint/types@npm:7.12.0" @@ -1645,6 +1680,24 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" + dependencies: + "@typescript-eslint/types": "npm:5.62.0" + "@typescript-eslint/visitor-keys": "npm:5.62.0" + debug: "npm:^4.3.4" + globby: "npm:^11.1.0" + is-glob: "npm:^4.0.3" + semver: "npm:^7.3.7" + tsutils: "npm:^3.21.0" + peerDependenciesMeta: + typescript: + optional: true + checksum: 10c0/d7984a3e9d56897b2481940ec803cb8e7ead03df8d9cfd9797350be82ff765dfcf3cfec04e7355e1779e948da8f02bc5e11719d07a596eb1cb995c48a95e38cf + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:7.12.0": version: 7.12.0 resolution: "@typescript-eslint/typescript-estree@npm:7.12.0" @@ -1664,6 +1717,34 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/utils@npm:5.62.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@types/json-schema": "npm:^7.0.9" + "@types/semver": "npm:^7.3.12" + "@typescript-eslint/scope-manager": "npm:5.62.0" + "@typescript-eslint/types": "npm:5.62.0" + "@typescript-eslint/typescript-estree": "npm:5.62.0" + eslint-scope: "npm:^5.1.1" + semver: "npm:^7.3.7" + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 + checksum: 10c0/f09b7d9952e4a205eb1ced31d7684dd55cee40bf8c2d78e923aa8a255318d97279825733902742c09d8690f37a50243f4c4d383ab16bd7aefaf9c4b438f785e1 + languageName: node + linkType: hard + +"@typescript-eslint/visitor-keys@npm:5.62.0": + version: 5.62.0 + resolution: "@typescript-eslint/visitor-keys@npm:5.62.0" + dependencies: + "@typescript-eslint/types": "npm:5.62.0" + eslint-visitor-keys: "npm:^3.3.0" + checksum: 10c0/7c3b8e4148e9b94d9b7162a596a1260d7a3efc4e65199693b8025c71c4652b8042501c0bc9f57654c1e2943c26da98c0f77884a746c6ae81389fcb0b513d995d + languageName: node + linkType: hard + "@typescript-eslint/visitor-keys@npm:7.12.0": version: 7.12.0 resolution: "@typescript-eslint/visitor-keys@npm:7.12.0" @@ -4145,6 +4226,15 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-simple-import-sort@npm:^12.1.0": + version: 12.1.0 + resolution: "eslint-plugin-simple-import-sort@npm:12.1.0" + peerDependencies: + eslint: ">=5.0.0" + checksum: 10c0/11e963683216e190b09bb6834b6978ca71d438d9413c52495e92493b0a68fc10268d7fd5815814496ab02fe7c018e4d5fd82866bf3ed5f95cff69628ca741102 + languageName: node + linkType: hard + "eslint-plugin-sonarjs@npm:^1.0.3": version: 1.0.3 resolution: "eslint-plugin-sonarjs@npm:1.0.3" @@ -4154,6 +4244,21 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-typescript-sort-keys@npm:^3.2.0": + version: 3.2.0 + resolution: "eslint-plugin-typescript-sort-keys@npm:3.2.0" + dependencies: + "@typescript-eslint/experimental-utils": "npm:^5.0.0" + json-schema: "npm:^0.4.0" + natural-compare-lite: "npm:^1.4.0" + peerDependencies: + "@typescript-eslint/parser": ^6 || ^7 + eslint: ^7 || ^8 + typescript: ^3 || ^4 || ^5 + checksum: 10c0/c832d5a93cac4f955f05b126ad79d1df49f9f11402ab225b1835d42972291a3855e477d28b07696d2a65a511ccdcdf64001eeda216248da82a5187af6d03e70f + languageName: node + linkType: hard + "eslint-plugin-unused-imports@npm:^3.2.0": version: 3.2.0 resolution: "eslint-plugin-unused-imports@npm:3.2.0" @@ -4176,7 +4281,7 @@ __metadata: languageName: node linkType: hard -"eslint-scope@npm:5.1.1": +"eslint-scope@npm:5.1.1, eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" dependencies: @@ -6686,6 +6791,13 @@ __metadata: languageName: node linkType: hard +"json-schema@npm:^0.4.0": + version: 0.4.0 + resolution: "json-schema@npm:0.4.0" + checksum: 10c0/d4a637ec1d83544857c1c163232f3da46912e971d5bf054ba44fdb88f07d8d359a462b4aec46f2745efbc57053365608d88bc1d7b1729f7b4fc3369765639ed3 + languageName: node + linkType: hard + "json-stable-stringify-without-jsonify@npm:^1.0.1": version: 1.0.1 resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" @@ -7251,6 +7363,13 @@ __metadata: languageName: node linkType: hard +"natural-compare-lite@npm:^1.4.0": + version: 1.4.0 + resolution: "natural-compare-lite@npm:1.4.0" + checksum: 10c0/f6cef26f5044515754802c0fc475d81426f3b90fe88c20fabe08771ce1f736ce46e0397c10acb569a4dd0acb84c7f1ee70676122f95d5bfdd747af3a6c6bbaa8 + languageName: node + linkType: hard + "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -8606,7 +8725,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": +"semver@npm:^7.3.7, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0": version: 7.6.2 resolution: "semver@npm:7.6.2" bin: @@ -9511,7 +9630,9 @@ __metadata: eslint: "npm:^8.57.0" eslint-config-prettier: "npm:^9.1.0" eslint-plugin-react: "npm:^7.34.2" + eslint-plugin-simple-import-sort: "npm:^12.1.0" eslint-plugin-sonarjs: "npm:^1.0.3" + eslint-plugin-typescript-sort-keys: "npm:^3.2.0" eslint-plugin-unused-imports: "npm:^3.2.0" file-loader: "npm:^6.2.0" jest: "npm:^29.7.0" @@ -9663,13 +9784,24 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^1.9.0": +"tslib@npm:^1.8.1, tslib@npm:^1.9.0": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: 10c0/69ae09c49eea644bc5ebe1bca4fa4cc2c82b7b3e02f43b84bd891504edf66dbc6b2ec0eef31a957042de2269139e4acff911e6d186a258fb14069cd7f6febce2 languageName: node linkType: hard +"tsutils@npm:^3.21.0": + version: 3.21.0 + resolution: "tsutils@npm:3.21.0" + dependencies: + tslib: "npm:^1.8.1" + peerDependencies: + typescript: ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + checksum: 10c0/02f19e458ec78ead8fffbf711f834ad8ecd2cc6ade4ec0320790713dccc0a412b99e7fd907c4cda2a1dc602c75db6f12e0108e87a5afad4b2f9e90a24cabd5a2 + languageName: node + linkType: hard + "ttf2eot@npm:^3.1.0": version: 3.1.0 resolution: "ttf2eot@npm:3.1.0"