From fe260344109bc46a63aa0c1873caacd769e14dd2 Mon Sep 17 00:00:00 2001 From: Artur Date: Thu, 23 Apr 2020 13:31:48 +0300 Subject: [PATCH] Kills old TGUI, hardsyncs TGUI to 3.0 --- tgui-next/.eslintrc.yml | 749 -- tgui-next/.gitattributes | 10 - tgui-next/.gitignore | 7 - tgui-next/README.md | 855 -- tgui-next/docs/tutorial-and-examples.md | 245 - tgui-next/package.json | 19 - tgui-next/packages/common/math.js | 19 - tgui-next/packages/common/package.json | 6 - .../packages/tgui-dev-server/link/server.js | 117 - .../packages/tgui-dev-server/package.json | 12 - tgui-next/packages/tgui/backend.js | 95 - tgui-next/packages/tgui/byond.js | 84 - tgui-next/packages/tgui/components/Box.js | 186 - tgui-next/packages/tgui/components/Button.js | 257 - .../packages/tgui/components/ColorBox.js | 19 - tgui-next/packages/tgui/components/Flex.js | 66 - .../packages/tgui/components/LabeledList.js | 75 - .../packages/tgui/components/ProgressBar.js | 50 - tgui-next/packages/tgui/components/Table.js | 59 - tgui-next/packages/tgui/components/Tabs.js | 135 - .../packages/tgui/components/TitleBar.js | 51 - tgui-next/packages/tgui/components/Toast.js | 57 - tgui-next/packages/tgui/components/index.js | 23 - tgui-next/packages/tgui/hotkeys.js | 257 - tgui-next/packages/tgui/index.js | 167 - .../packages/tgui/interfaces/Achievements.js | 134 - .../tgui/interfaces/AirlockElectronics.js | 138 - tgui-next/packages/tgui/interfaces/Apc.js | 229 - .../packages/tgui/interfaces/AtmosRelief.js | 54 - tgui-next/packages/tgui/interfaces/Bepis.js | 109 - .../packages/tgui/interfaces/BorgPanel.js | 135 - .../packages/tgui/interfaces/Canister.js | 121 - tgui-next/packages/tgui/interfaces/Cargo.js | 339 - .../tgui/interfaces/CentcomPodLauncher.js | 450 - .../packages/tgui/interfaces/ChemDispenser.js | 180 - .../packages/tgui/interfaces/ChemHeater.js | 87 - .../packages/tgui/interfaces/ChemMaster.js | 448 - tgui-next/packages/tgui/interfaces/Cryo.js | 108 - .../packages/tgui/interfaces/DecalPainter.js | 63 - .../packages/tgui/interfaces/DnaVault.js | 74 - .../tgui/interfaces/GravityGenerator.js | 77 - .../tgui/interfaces/GulagItemReclaimer.js | 28 - .../packages/tgui/interfaces/KitchenSink.js | 347 - .../packages/tgui/interfaces/LanguageMenu.js | 99 - .../packages/tgui/interfaces/Launchpad.js | 278 - .../packages/tgui/interfaces/NaniteRemote.js | 165 - .../packages/tgui/interfaces/NtosArcade.js | 117 - .../tgui/interfaces/NtosConfiguration.js | 90 - .../packages/tgui/interfaces/NtosMain.js | 79 - .../tgui/interfaces/NtosSupermatterMonitor.js | 161 - .../packages/tgui/interfaces/NtosWrapper.js | 109 - .../tgui/interfaces/OperatingComputer.js | 145 - .../tgui/interfaces/PersonalCrafting.js | 175 - .../packages/tgui/interfaces/PortableAtmos.js | 155 - .../packages/tgui/interfaces/PowerMonitor.js | 222 - .../tgui/interfaces/RapidPipeDispenser.js | 188 - tgui-next/packages/tgui/interfaces/Sleeper.js | 181 - tgui-next/packages/tgui/interfaces/Smes.js | 176 - .../packages/tgui/interfaces/SmokeMachine.js | 71 - .../packages/tgui/interfaces/SolarControl.js | 118 - .../packages/tgui/interfaces/SpaceHeater.js | 104 - .../tgui/interfaces/SyndContractor.js | 382 - tgui-next/packages/tgui/interfaces/Tank.js | 53 - .../packages/tgui/interfaces/Teleporter.js | 69 - .../tgui/interfaces/VaultController.js | 32 - tgui-next/packages/tgui/interfaces/Vending.js | 99 - tgui-next/packages/tgui/layout.js | 95 - tgui-next/packages/tgui/package.json | 31 - tgui-next/packages/tgui/polyfills.js | 5 - tgui-next/packages/tgui/public/shim-css-om.js | 38 - tgui-next/packages/tgui/public/shim-dom4.js | 969 -- .../packages/tgui/public/shim-html5shiv.js | 329 - tgui-next/packages/tgui/public/shim-ie8.js | 835 -- .../packages/tgui/public/tgui-fallback.html | 68 - tgui-next/packages/tgui/public/tgui-main.html | 127 - .../packages/tgui/public/tgui.bundle.css | 1 - tgui-next/packages/tgui/public/tgui.bundle.js | 3 - tgui-next/packages/tgui/refocus.js | 12 - tgui-next/packages/tgui/routes.js | 557 - tgui-next/packages/tgui/store.js | 30 - .../tgui/styles/components/Button.scss | 115 - .../packages/tgui/styles/components/Flex.scss | 15 - .../tgui/styles/components/Layout.scss | 114 - .../tgui/styles/components/NtosHeader.scss | 15 - .../tgui/styles/components/NtosWrapper.scss | 19 - .../tgui/styles/components/NuclearBomb.scss | 57 - .../tgui/styles/components/TitleBar.scss | 70 - tgui-next/packages/tgui/styles/main.scss | 47 - .../packages/tgui/styles/themes/ntos.scss | 32 - tgui-next/packages/tgui/webpack.config.js | 204 - tgui/.babelrc | 5 - {tgui-next => tgui}/.editorconfig | 0 {tgui-next => tgui}/.eslintignore | 0 {tgui-next => tgui}/.eslintrc-harder.yml | 0 tgui/.gitattributes | 11 +- tgui/.gitignore | 9 +- tgui/LICENSE.md | 20 - tgui/README.md | 142 - tgui/assets/tgui.css | 1 - tgui/assets/tgui.js | 1 - {tgui-next => tgui}/bin/tgui | 14 + {tgui-next => tgui}/bin/tgui-build.bat | 0 {tgui-next => tgui}/bin/tgui-dev-server.bat | 0 tgui/build.sh | 12 - tgui/build_assets.bat | 6 - tgui/docs/component-reference.md | 125 +- .../docs/converting-old-tgui-interfaces.md | 0 tgui/gulp/css.js | 31 - tgui/gulp/flags.js | 7 - tgui/gulp/js.js | 68 - tgui/gulp/plugins.js | 21 - tgui/gulp/reload.js | 10 - tgui/gulp/size.js | 9 - tgui/gulpfile.babel.js | 12 - tgui/install_dependencies.bat | 8 - tgui/package-lock.json | 10545 ---------------- tgui/package.json | 71 +- .../packages/common/collections.js | 112 + {tgui-next => tgui}/packages/common/fp.js | 0 .../packages/common/logging.js | 0 {tgui-next => tgui}/packages/common/react.js | 0 {tgui-next => tgui}/packages/common/redux.js | 0 .../packages/common/string.babel-plugin.cjs | 0 {tgui-next => tgui}/packages/common/string.js | 0 tgui/packages/common/timer.js | 23 + {tgui-next => tgui}/packages/common/vector.js | 0 .../packages/tgui-dev-server/index.js | 0 .../packages/tgui-dev-server/link/client.js | 0 .../packages/tgui-dev-server/link/retrace.js | 0 .../packages/tgui-dev-server/reloader.js | 0 .../packages/tgui-dev-server/util.js | 0 .../packages/tgui-dev-server/webpack.js | 0 .../packages/tgui/assets/bg-nanotrasen.svg | 0 .../packages/tgui/assets/bg-syndicate.svg | 0 tgui/packages/tgui/byond.js | 4 +- .../tgui/components/AnimatedNumber.js | 0 .../packages/tgui/components/BlockQuote.js | 0 tgui/packages/tgui/components/Box.js | 68 +- .../packages/tgui/components/Chart.js | 0 .../packages/tgui/components/Collapsible.js | 0 .../packages/tgui/components/Dimmer.js | 0 .../tgui/components/DraggableControl.js | 215 +- .../packages/tgui/components/Dropdown.js | 0 .../packages/tgui/components/Grid.js | 0 .../packages/tgui/components/Icon.js | 0 .../packages/tgui/components/Input.js | 0 .../packages/tgui/components/NoticeBox.js | 0 .../packages/tgui/components/Section.js | 0 .../packages/tgui/components/Tooltip.js | 0 .../packages/tgui/constants.js | 6 + {tgui-next => tgui}/packages/tgui/drag.js | 0 .../packages/tgui/interfaces/AiAirlock.js | 0 .../packages/tgui/interfaces/AirAlarm.js | 0 .../tgui/interfaces/AtmosAlertConsole.js | 0 .../tgui/interfaces/AtmosControlConsole.js | 0 .../packages/tgui/interfaces/AtmosFilter.js | 0 .../packages/tgui/interfaces/AtmosMixer.js | 0 .../packages/tgui/interfaces/AtmosPump.js | 0 .../packages/tgui/interfaces/BankMachine.js | 0 .../tgui/interfaces/BlackmarketUplink.js | 1 - .../tgui/interfaces/BluespaceArtillery.js | 0 .../packages/tgui/interfaces/BrigTimer.js | 0 .../tgui/interfaces/CellularEmporium.js | 0 .../tgui/interfaces/ChemAcclimator.js | 0 .../tgui/interfaces/ChemDebugSynthesizer.js | 0 .../packages/tgui/interfaces/ChemFilter.js | 3 +- tgui/packages/tgui/interfaces/ChemMaster.js | 4 +- .../packages/tgui/interfaces/ChemPress.js | 2 +- .../tgui/interfaces/ChemReactionChamber.js | 0 .../packages/tgui/interfaces/ChemSplitter.js | 0 .../tgui/interfaces/ChemSynthesizer.js | 0 .../packages/tgui/interfaces/CodexGigas.js | 0 .../tgui/interfaces/ComputerFabricator.js | 8 +- .../packages/tgui/interfaces/Crayon.js | 0 .../packages/tgui/interfaces/CrewConsole.js | 4 +- .../packages/tgui/interfaces/DisposalUnit.js | 0 .../packages/tgui/interfaces/EightBallVote.js | 0 tgui/packages/tgui/interfaces/Electrolyzer.js | 48 + tgui/packages/tgui/interfaces/Electropack.js | 4 +- .../interfaces/EmergencyShuttleConsole.js | 0 .../tgui/interfaces/EngravedMessage.js | 0 .../packages/tgui/interfaces/Gps.js | 0 .../tgui/interfaces/GulagTeleporterConsole.js | 0 .../packages/tgui/interfaces/Holodeck.js | 0 .../packages/tgui/interfaces/ImplantChair.js | 0 .../packages/tgui/interfaces/Intellicard.js | 0 .../packages/tgui/interfaces/KeycardAuth.js | 0 .../tgui/interfaces/LaborClaimConsole.js | 0 .../tgui/interfaces/MechBayPowerConsole.js | 0 .../packages/tgui/interfaces/MedicalKiosk.js | 0 .../packages/tgui/interfaces/Mule.js | 0 .../tgui/interfaces/NaniteChamberControl.js | 0 .../tgui/interfaces/NaniteCloudControl.js | 0 .../tgui/interfaces/NaniteProgramHub.js | 0 .../tgui/interfaces/NaniteProgrammer.js | 0 .../interfaces/NotificationPreferences.js | 0 .../packages/tgui/interfaces/NtnetRelay.js | 0 .../tgui/interfaces/NtosAiRestorer.js | 2 +- tgui/packages/tgui/interfaces/NtosArcade.js | 2 +- tgui/packages/tgui/interfaces/NtosMain.js | 2 +- .../packages/tgui/interfaces/NtosNetChat.js | 0 .../tgui/interfaces/NtosNetDownloader.js | 0 .../packages/tgui/interfaces/NuclearBomb.js | 0 .../packages/tgui/interfaces/OreBox.js | 0 .../tgui/interfaces/OreRedemptionMachine.js | 0 .../packages/tgui/interfaces/Pandemic.js | 0 .../tgui/interfaces/PersonalCrafting.js | 29 +- .../tgui/interfaces/PortableGenerator.js | 0 .../packages/tgui/interfaces/Radio.js | 0 .../tgui/interfaces/SatelliteControl.js | 0 .../packages/tgui/interfaces/ScannerGate.js | 0 .../tgui/interfaces/ShuttleManipulator.js | 0 .../packages/tgui/interfaces/Signaler.js | 4 +- .../tgui/interfaces/SlimeBodySwapper.js | 0 .../packages/tgui/interfaces/SmartVend.js | 0 .../packages/tgui/interfaces/SpawnersMenu.js | 0 .../tgui/interfaces/StationAlertConsole.js | 0 .../tgui/interfaces/SuitStorageUnit.js | 0 .../packages/tgui/interfaces/TankDispenser.js | 0 .../packages/tgui/interfaces/ThermoMachine.js | 0 .../tgui/interfaces/TurbineComputer.js | 0 .../packages/tgui/interfaces/Uplink.js | 0 .../packages/tgui/interfaces/Wires.js | 0 .../tgui/interfaces/common/BeakerContents.js | 2 +- .../common/InterfaceLockNoticeBox.js | 0 .../interfaces/manually-routed/KitchenSink.js | 8 +- {tgui-next => tgui}/packages/tgui/logging.js | 0 tgui/packages/tgui/public/tgui.bundle.js | 4 +- .../tgui/styles/atomic/candystripe.scss | 0 .../packages/tgui/styles/atomic/color.scss | 0 .../tgui/styles/atomic/debug-layout.scss | 12 + .../packages/tgui/styles/atomic/display.scss | 0 .../packages/tgui/styles/atomic/margin.scss | 0 .../packages/tgui/styles/atomic/position.scss | 0 .../packages/tgui/styles/atomic/text.scss | 0 .../packages/tgui/styles/base.scss | 0 .../packages/tgui/styles/colors.scss | 0 .../tgui/styles/components/BlockQuote.scss | 0 .../tgui/styles/components/ColorBox.scss | 0 .../tgui/styles/components/Dropdown.scss | 0 .../tgui/styles/components/FatalError.scss | 0 .../tgui/styles/components/Input.scss | 0 .../packages/tgui/styles/components/Knob.scss | 159 + .../tgui/styles/components/LabeledList.scss | 0 .../tgui/styles/components/NoticeBox.scss | 0 .../tgui/styles/components/NumberInput.scss | 0 .../tgui/styles/components/ProgressBar.scss | 6 +- .../tgui/styles/components/Section.scss | 0 .../tgui/styles/components/Slider.scss | 41 + .../tgui/styles/components/Table.scss | 0 .../packages/tgui/styles/components/Tabs.scss | 0 .../tgui/styles/components/Tooltip.scss | 0 .../packages/tgui/styles/functions.scss | 35 +- tgui/packages/tgui/styles/main.scss | 1 - .../packages/tgui/styles/reset.scss | 2 +- .../tgui/styles/themes/cardtable.scss | 0 .../tgui/styles/themes/hackerman.scss | 0 .../packages/tgui/styles/themes/retro.scss | 0 .../tgui/styles/themes/syndicate.scss | 0 tgui/reload.bat | 8 - tgui/src/.babelrc | 8 - tgui/src/components/bar.ract | 16 - tgui/src/components/bar.styl | 32 - tgui/src/components/button.ract | 81 - tgui/src/components/button.styl | 56 - tgui/src/components/display.ract | 13 - tgui/src/components/display.styl | 33 - tgui/src/components/input.ract | 13 - tgui/src/components/input.styl | 19 - tgui/src/components/linegraph.ract | 88 - tgui/src/components/linegraph.styl | 2 - tgui/src/components/notice.ract | 3 - tgui/src/components/notice.styl | 27 - tgui/src/components/resize.ract | 29 - tgui/src/components/resize.styl | 12 - tgui/src/components/section.ract | 12 - tgui/src/components/section.styl | 44 - tgui/src/components/subdisplay.ract | 11 - tgui/src/components/subdisplay.styl | 11 - tgui/src/components/tabs.ract | 27 - tgui/src/components/tabs/tab.ract | 3 - tgui/src/components/titlebar.ract | 78 - tgui/src/components/titlebar.styl | 65 - tgui/src/components/warnings.ract | 47 - tgui/src/images/nanotrasen.svg | 8 - tgui/src/images/syndicate.svg | 6 - tgui/src/interfaces/ai_airlock.ract | 131 - tgui/src/interfaces/airalarm.ract | 51 - tgui/src/interfaces/airalarm/back.ract | 1 - tgui/src/interfaces/airalarm/modes.ract | 14 - tgui/src/interfaces/airalarm/scrubbers.ract | 29 - tgui/src/interfaces/airalarm/status.ract | 30 - tgui/src/interfaces/airalarm/thresholds.ract | 31 - tgui/src/interfaces/airalarm/vents.ract | 42 - tgui/src/interfaces/airlock_electronics.ract | 45 - tgui/src/interfaces/airlock_electronics.styl | 10 - tgui/src/interfaces/apc.ract | 165 - tgui/src/interfaces/atmos_alert.ract | 14 - tgui/src/interfaces/atmos_control.ract | 40 - tgui/src/interfaces/atmos_filter.ract | 17 - tgui/src/interfaces/atmos_mixer.ract | 33 - tgui/src/interfaces/atmos_pump.ract | 19 - tgui/src/interfaces/atmos_relief.ract | 12 - tgui/src/interfaces/borgopanel.ract | 46 - tgui/src/interfaces/brig_timer.ract | 18 - tgui/src/interfaces/bsa.ract | 26 - tgui/src/interfaces/canister.ract | 84 - tgui/src/interfaces/cargo.ract | 90 - tgui/src/interfaces/cargo_express.ract | 50 - tgui/src/interfaces/cellular_emporium.ract | 25 - tgui/src/interfaces/centcom_podlauncher.ract | 157 - tgui/src/interfaces/chem_dispenser.ract | 76 - tgui/src/interfaces/chem_heater.ract | 34 - tgui/src/interfaces/chem_master.ract | 147 - tgui/src/interfaces/chem_synthesizer.ract | 22 - tgui/src/interfaces/clockwork_slab.ract | 43 - tgui/src/interfaces/codex_gigas.ract | 50 - tgui/src/interfaces/computer_fabricator.ract | 89 - tgui/src/interfaces/crayon.ract | 35 - tgui/src/interfaces/crew.ract | 138 - tgui/src/interfaces/cryo.ract | 53 - tgui/src/interfaces/disposal_unit.ract | 33 - tgui/src/interfaces/dna_vault.ract | 22 - tgui/src/interfaces/dogborg_sleeper.ract | 49 - tgui/src/interfaces/eightball.ract | 14 - .../interfaces/emergency_shuttle_console.ract | 30 - tgui/src/interfaces/engraved_message.ract | 29 - tgui/src/interfaces/error.ract | 3 - tgui/src/interfaces/exofab - Copia.ract | 50 - tgui/src/interfaces/exonet_node.ract | 14 - tgui/src/interfaces/gps.ract | 30 - tgui/src/interfaces/gulag_console.ract | 49 - tgui/src/interfaces/gulag_item_reclaimer.ract | 7 - tgui/src/interfaces/holodeck.ract | 21 - tgui/src/interfaces/implantchair.ract | 40 - tgui/src/interfaces/intellicard.ract | 42 - tgui/src/interfaces/keycard_auth.ract | 17 - tgui/src/interfaces/labor_claim_console.ract | 20 - tgui/src/interfaces/language_menu.ract | 48 - tgui/src/interfaces/launchpad_remote.ract | 49 - .../interfaces/mech_bay_power_console.ract | 44 - tgui/src/interfaces/mulebot.ract | 60 - .../interfaces/nanite_chamber_control.ract | 109 - tgui/src/interfaces/nanite_cloud_control.ract | 104 - tgui/src/interfaces/nanite_comm_remote.ract | 41 - tgui/src/interfaces/nanite_program_hub.ract | 49 - tgui/src/interfaces/nanite_programmer.ract | 54 - tgui/src/interfaces/nanite_remote.ract | 36 - tgui/src/interfaces/notificationpanel.ract | 7 - tgui/src/interfaces/ntnet_relay.ract | 22 - tgui/src/interfaces/ntos_ai_restorer.ract | 78 - tgui/src/interfaces/ntos_card.ract | 228 - tgui/src/interfaces/ntos_configuration.ract | 67 - tgui/src/interfaces/ntos_file_manager.ract | 75 - tgui/src/interfaces/ntos_main.ract | 19 - tgui/src/interfaces/ntos_net_chat.ract | 71 - tgui/src/interfaces/ntos_net_dos.ract | 26 - tgui/src/interfaces/ntos_net_downloader.ract | 90 - tgui/src/interfaces/ntos_net_monitor.ract | 93 - tgui/src/interfaces/ntos_net_transfer.ract | 103 - tgui/src/interfaces/ntos_power_monitor.ract | 80 - tgui/src/interfaces/ntos_revelation.ract | 27 - tgui/src/interfaces/ntos_station_alert.ract | 14 - .../interfaces/ntos_supermatter_monitor.ract | 65 - tgui/src/interfaces/ntosheader.ract | 30 - tgui/src/interfaces/nuclear_bomb.ract | 68 - tgui/src/interfaces/operating_computer.ract | 66 - .../interfaces/ore_redemption_machine.ract | 101 - tgui/src/interfaces/pandemic.ract | 113 - tgui/src/interfaces/personal_crafting.ract | 172 - tgui/src/interfaces/point_bank.ract | 60 - tgui/src/interfaces/portable_pump.ract | 54 - tgui/src/interfaces/portable_scrubber.ract | 44 - tgui/src/interfaces/power_monitor.ract | 77 - tgui/src/interfaces/radio.ract | 66 - tgui/src/interfaces/rdconsole.ract | 47 - tgui/src/interfaces/rdconsole/circuit.ract | 57 - tgui/src/interfaces/rdconsole/designview.ract | 48 - tgui/src/interfaces/rdconsole/destruct.ract | 25 - .../interfaces/rdconsole/diskopsdesign.ract | 34 - .../src/interfaces/rdconsole/diskopstech.ract | 19 - tgui/src/interfaces/rdconsole/nodeview.ract | 26 - tgui/src/interfaces/rdconsole/protolathe.ract | 62 - tgui/src/interfaces/rdconsole/rdheader.ract | 7 - tgui/src/interfaces/rdconsole/settings.ract | 6 - tgui/src/interfaces/rdconsole/techweb.ract | 15 - tgui/src/interfaces/reagentgrinder.ract | 43 - tgui/src/interfaces/rpd.ract | 60 - tgui/src/interfaces/rpd/colorsel.ract | 6 - tgui/src/interfaces/rpd/dirsel.ract | 10 - tgui/src/interfaces/sat_control.ract | 21 - tgui/src/interfaces/scrubbing_types.ract | 4 - tgui/src/interfaces/shuttle_manipulator.ract | 20 - .../shuttle_manipulator/modification.ract | 38 - .../shuttle_manipulator/status.ract | 33 - .../shuttle_manipulator/templates.ract | 24 - tgui/src/interfaces/sleeper.ract | 139 - tgui/src/interfaces/slime_swap_body.ract | 22 - tgui/src/interfaces/smartvend.ract | 48 - tgui/src/interfaces/smes.ract | 70 - tgui/src/interfaces/smoke_machine.ract | 38 - tgui/src/interfaces/solar_control.ract | 46 - tgui/src/interfaces/space_heater.ract | 45 - tgui/src/interfaces/spawners_menu.ract | 18 - tgui/src/interfaces/station_alert.ract | 11 - tgui/src/interfaces/suit_storage_unit.ract | 41 - tgui/src/interfaces/synd_contract.ract | 148 - tgui/src/interfaces/tank_dispenser.ract | 8 - tgui/src/interfaces/tanks.ract | 35 - tgui/src/interfaces/thermomachine.ract | 25 - tgui/src/interfaces/turbine_computer.ract | 51 - tgui/src/interfaces/uplink.ract | 43 - tgui/src/interfaces/vr_sleeper.ract | 56 - tgui/src/interfaces/wires.ract | 16 - tgui/src/styles/clockwork.styl | 48 - tgui/src/styles/nanotrasen.styl | 9 - tgui/src/styles/syndicate.styl | 31 - tgui/src/tgui.js | 70 - tgui/src/tgui.ract | 57 - tgui/src/tgui.styl | 134 - tgui/src/util/byond.js | 70 - tgui/src/util/colors.styl | 10 - tgui/src/util/constants.js | 5 - tgui/src/util/dragresize.js | 59 - tgui/src/util/filter.js | 22 - tgui/src/util/math.js | 9 - tgui/src/util/misc.styl | 12 - tgui/src/util/text.js | 14 - tgui/src/util/text.styl | 17 - tgui/src/util/tooltip.styl | 55 - {tgui-next => tgui}/yarn.lock | 3199 ++--- 431 files changed, 2381 insertions(+), 34240 deletions(-) delete mode 100644 tgui-next/.eslintrc.yml delete mode 100644 tgui-next/.gitattributes delete mode 100644 tgui-next/.gitignore delete mode 100644 tgui-next/README.md delete mode 100644 tgui-next/docs/tutorial-and-examples.md delete mode 100644 tgui-next/package.json delete mode 100644 tgui-next/packages/common/math.js delete mode 100644 tgui-next/packages/common/package.json delete mode 100644 tgui-next/packages/tgui-dev-server/link/server.js delete mode 100644 tgui-next/packages/tgui-dev-server/package.json delete mode 100644 tgui-next/packages/tgui/backend.js delete mode 100644 tgui-next/packages/tgui/byond.js delete mode 100644 tgui-next/packages/tgui/components/Box.js delete mode 100644 tgui-next/packages/tgui/components/Button.js delete mode 100644 tgui-next/packages/tgui/components/ColorBox.js delete mode 100644 tgui-next/packages/tgui/components/Flex.js delete mode 100644 tgui-next/packages/tgui/components/LabeledList.js delete mode 100644 tgui-next/packages/tgui/components/ProgressBar.js delete mode 100644 tgui-next/packages/tgui/components/Table.js delete mode 100644 tgui-next/packages/tgui/components/Tabs.js delete mode 100644 tgui-next/packages/tgui/components/TitleBar.js delete mode 100644 tgui-next/packages/tgui/components/Toast.js delete mode 100644 tgui-next/packages/tgui/components/index.js delete mode 100644 tgui-next/packages/tgui/hotkeys.js delete mode 100644 tgui-next/packages/tgui/index.js delete mode 100644 tgui-next/packages/tgui/interfaces/Achievements.js delete mode 100644 tgui-next/packages/tgui/interfaces/AirlockElectronics.js delete mode 100644 tgui-next/packages/tgui/interfaces/Apc.js delete mode 100644 tgui-next/packages/tgui/interfaces/AtmosRelief.js delete mode 100644 tgui-next/packages/tgui/interfaces/Bepis.js delete mode 100644 tgui-next/packages/tgui/interfaces/BorgPanel.js delete mode 100644 tgui-next/packages/tgui/interfaces/Canister.js delete mode 100644 tgui-next/packages/tgui/interfaces/Cargo.js delete mode 100644 tgui-next/packages/tgui/interfaces/CentcomPodLauncher.js delete mode 100644 tgui-next/packages/tgui/interfaces/ChemDispenser.js delete mode 100644 tgui-next/packages/tgui/interfaces/ChemHeater.js delete mode 100644 tgui-next/packages/tgui/interfaces/ChemMaster.js delete mode 100644 tgui-next/packages/tgui/interfaces/Cryo.js delete mode 100644 tgui-next/packages/tgui/interfaces/DecalPainter.js delete mode 100644 tgui-next/packages/tgui/interfaces/DnaVault.js delete mode 100644 tgui-next/packages/tgui/interfaces/GravityGenerator.js delete mode 100644 tgui-next/packages/tgui/interfaces/GulagItemReclaimer.js delete mode 100644 tgui-next/packages/tgui/interfaces/KitchenSink.js delete mode 100644 tgui-next/packages/tgui/interfaces/LanguageMenu.js delete mode 100644 tgui-next/packages/tgui/interfaces/Launchpad.js delete mode 100644 tgui-next/packages/tgui/interfaces/NaniteRemote.js delete mode 100644 tgui-next/packages/tgui/interfaces/NtosArcade.js delete mode 100644 tgui-next/packages/tgui/interfaces/NtosConfiguration.js delete mode 100644 tgui-next/packages/tgui/interfaces/NtosMain.js delete mode 100644 tgui-next/packages/tgui/interfaces/NtosSupermatterMonitor.js delete mode 100644 tgui-next/packages/tgui/interfaces/NtosWrapper.js delete mode 100644 tgui-next/packages/tgui/interfaces/OperatingComputer.js delete mode 100644 tgui-next/packages/tgui/interfaces/PersonalCrafting.js delete mode 100644 tgui-next/packages/tgui/interfaces/PortableAtmos.js delete mode 100644 tgui-next/packages/tgui/interfaces/PowerMonitor.js delete mode 100644 tgui-next/packages/tgui/interfaces/RapidPipeDispenser.js delete mode 100644 tgui-next/packages/tgui/interfaces/Sleeper.js delete mode 100644 tgui-next/packages/tgui/interfaces/Smes.js delete mode 100644 tgui-next/packages/tgui/interfaces/SmokeMachine.js delete mode 100644 tgui-next/packages/tgui/interfaces/SolarControl.js delete mode 100644 tgui-next/packages/tgui/interfaces/SpaceHeater.js delete mode 100644 tgui-next/packages/tgui/interfaces/SyndContractor.js delete mode 100644 tgui-next/packages/tgui/interfaces/Tank.js delete mode 100644 tgui-next/packages/tgui/interfaces/Teleporter.js delete mode 100644 tgui-next/packages/tgui/interfaces/VaultController.js delete mode 100644 tgui-next/packages/tgui/interfaces/Vending.js delete mode 100644 tgui-next/packages/tgui/layout.js delete mode 100644 tgui-next/packages/tgui/package.json delete mode 100644 tgui-next/packages/tgui/polyfills.js delete mode 100644 tgui-next/packages/tgui/public/shim-css-om.js delete mode 100644 tgui-next/packages/tgui/public/shim-dom4.js delete mode 100644 tgui-next/packages/tgui/public/shim-html5shiv.js delete mode 100644 tgui-next/packages/tgui/public/shim-ie8.js delete mode 100644 tgui-next/packages/tgui/public/tgui-fallback.html delete mode 100644 tgui-next/packages/tgui/public/tgui-main.html delete mode 100644 tgui-next/packages/tgui/public/tgui.bundle.css delete mode 100644 tgui-next/packages/tgui/public/tgui.bundle.js delete mode 100644 tgui-next/packages/tgui/refocus.js delete mode 100644 tgui-next/packages/tgui/routes.js delete mode 100644 tgui-next/packages/tgui/store.js delete mode 100644 tgui-next/packages/tgui/styles/components/Button.scss delete mode 100644 tgui-next/packages/tgui/styles/components/Flex.scss delete mode 100644 tgui-next/packages/tgui/styles/components/Layout.scss delete mode 100644 tgui-next/packages/tgui/styles/components/NtosHeader.scss delete mode 100644 tgui-next/packages/tgui/styles/components/NtosWrapper.scss delete mode 100644 tgui-next/packages/tgui/styles/components/NuclearBomb.scss delete mode 100644 tgui-next/packages/tgui/styles/components/TitleBar.scss delete mode 100644 tgui-next/packages/tgui/styles/main.scss delete mode 100644 tgui-next/packages/tgui/styles/themes/ntos.scss delete mode 100644 tgui-next/packages/tgui/webpack.config.js delete mode 100644 tgui/.babelrc rename {tgui-next => tgui}/.editorconfig (100%) rename {tgui-next => tgui}/.eslintignore (100%) rename {tgui-next => tgui}/.eslintrc-harder.yml (100%) delete mode 100644 tgui/LICENSE.md delete mode 100644 tgui/assets/tgui.css delete mode 100644 tgui/assets/tgui.js rename {tgui-next => tgui}/bin/tgui (89%) mode change 100755 => 100644 rename {tgui-next => tgui}/bin/tgui-build.bat (100%) rename {tgui-next => tgui}/bin/tgui-dev-server.bat (100%) delete mode 100644 tgui/build.sh delete mode 100644 tgui/build_assets.bat rename {tgui-next => tgui}/docs/converting-old-tgui-interfaces.md (100%) delete mode 100644 tgui/gulp/css.js delete mode 100644 tgui/gulp/flags.js delete mode 100644 tgui/gulp/js.js delete mode 100644 tgui/gulp/plugins.js delete mode 100644 tgui/gulp/reload.js delete mode 100644 tgui/gulp/size.js delete mode 100644 tgui/gulpfile.babel.js delete mode 100644 tgui/install_dependencies.bat delete mode 100644 tgui/package-lock.json rename {tgui-next => tgui}/packages/common/collections.js (58%) rename {tgui-next => tgui}/packages/common/fp.js (100%) rename {tgui-next => tgui}/packages/common/logging.js (100%) rename {tgui-next => tgui}/packages/common/react.js (100%) rename {tgui-next => tgui}/packages/common/redux.js (100%) rename {tgui-next => tgui}/packages/common/string.babel-plugin.cjs (100%) rename {tgui-next => tgui}/packages/common/string.js (100%) create mode 100644 tgui/packages/common/timer.js rename {tgui-next => tgui}/packages/common/vector.js (100%) rename {tgui-next => tgui}/packages/tgui-dev-server/index.js (100%) rename {tgui-next => tgui}/packages/tgui-dev-server/link/client.js (100%) rename {tgui-next => tgui}/packages/tgui-dev-server/link/retrace.js (100%) rename {tgui-next => tgui}/packages/tgui-dev-server/reloader.js (100%) rename {tgui-next => tgui}/packages/tgui-dev-server/util.js (100%) rename {tgui-next => tgui}/packages/tgui-dev-server/webpack.js (100%) rename {tgui-next => tgui}/packages/tgui/assets/bg-nanotrasen.svg (100%) rename {tgui-next => tgui}/packages/tgui/assets/bg-syndicate.svg (100%) rename {tgui-next => tgui}/packages/tgui/components/AnimatedNumber.js (100%) rename {tgui-next => tgui}/packages/tgui/components/BlockQuote.js (100%) rename {tgui-next => tgui}/packages/tgui/components/Chart.js (100%) rename {tgui-next => tgui}/packages/tgui/components/Collapsible.js (100%) rename {tgui-next => tgui}/packages/tgui/components/Dimmer.js (100%) rename tgui-next/packages/tgui/components/NumberInput.js => tgui/packages/tgui/components/DraggableControl.js (58%) rename {tgui-next => tgui}/packages/tgui/components/Dropdown.js (100%) rename {tgui-next => tgui}/packages/tgui/components/Grid.js (100%) rename {tgui-next => tgui}/packages/tgui/components/Icon.js (100%) rename {tgui-next => tgui}/packages/tgui/components/Input.js (100%) rename {tgui-next => tgui}/packages/tgui/components/NoticeBox.js (100%) rename {tgui-next => tgui}/packages/tgui/components/Section.js (100%) rename {tgui-next => tgui}/packages/tgui/components/Tooltip.js (100%) rename {tgui-next => tgui}/packages/tgui/constants.js (97%) rename {tgui-next => tgui}/packages/tgui/drag.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/AiAirlock.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/AirAlarm.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/AtmosAlertConsole.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/AtmosControlConsole.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/AtmosFilter.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/AtmosMixer.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/AtmosPump.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/BankMachine.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/BluespaceArtillery.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/BrigTimer.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/CellularEmporium.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/ChemAcclimator.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/ChemDebugSynthesizer.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/ChemFilter.js (97%) rename {tgui-next => tgui}/packages/tgui/interfaces/ChemPress.js (98%) rename {tgui-next => tgui}/packages/tgui/interfaces/ChemReactionChamber.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/ChemSplitter.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/ChemSynthesizer.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/CodexGigas.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/ComputerFabricator.js (99%) rename {tgui-next => tgui}/packages/tgui/interfaces/Crayon.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/CrewConsole.js (98%) rename {tgui-next => tgui}/packages/tgui/interfaces/DisposalUnit.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/EightBallVote.js (100%) create mode 100644 tgui/packages/tgui/interfaces/Electrolyzer.js rename {tgui-next => tgui}/packages/tgui/interfaces/EmergencyShuttleConsole.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/EngravedMessage.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/Gps.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/GulagTeleporterConsole.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/Holodeck.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/ImplantChair.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/Intellicard.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/KeycardAuth.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/LaborClaimConsole.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/MechBayPowerConsole.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/MedicalKiosk.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/Mule.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/NaniteChamberControl.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/NaniteCloudControl.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/NaniteProgramHub.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/NaniteProgrammer.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/NotificationPreferences.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/NtnetRelay.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/NtosNetChat.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/NtosNetDownloader.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/NuclearBomb.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/OreBox.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/OreRedemptionMachine.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/Pandemic.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/PortableGenerator.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/Radio.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/SatelliteControl.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/ScannerGate.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/ShuttleManipulator.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/Signaler.js (97%) rename {tgui-next => tgui}/packages/tgui/interfaces/SlimeBodySwapper.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/SmartVend.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/SpawnersMenu.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/StationAlertConsole.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/SuitStorageUnit.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/TankDispenser.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/ThermoMachine.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/TurbineComputer.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/Uplink.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/Wires.js (100%) rename {tgui-next => tgui}/packages/tgui/interfaces/common/BeakerContents.js (86%) rename {tgui-next => tgui}/packages/tgui/interfaces/common/InterfaceLockNoticeBox.js (100%) rename {tgui-next => tgui}/packages/tgui/logging.js (100%) rename {tgui-next => tgui}/packages/tgui/styles/atomic/candystripe.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/atomic/color.scss (100%) create mode 100644 tgui/packages/tgui/styles/atomic/debug-layout.scss rename {tgui-next => tgui}/packages/tgui/styles/atomic/display.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/atomic/margin.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/atomic/position.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/atomic/text.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/base.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/colors.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/components/BlockQuote.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/components/ColorBox.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/components/Dropdown.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/components/FatalError.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/components/Input.scss (100%) create mode 100644 tgui/packages/tgui/styles/components/Knob.scss rename {tgui-next => tgui}/packages/tgui/styles/components/LabeledList.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/components/NoticeBox.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/components/NumberInput.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/components/ProgressBar.scss (90%) rename {tgui-next => tgui}/packages/tgui/styles/components/Section.scss (100%) create mode 100644 tgui/packages/tgui/styles/components/Slider.scss rename {tgui-next => tgui}/packages/tgui/styles/components/Table.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/components/Tabs.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/components/Tooltip.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/functions.scss (58%) rename {tgui-next => tgui}/packages/tgui/styles/reset.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/themes/cardtable.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/themes/hackerman.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/themes/retro.scss (100%) rename {tgui-next => tgui}/packages/tgui/styles/themes/syndicate.scss (100%) delete mode 100644 tgui/reload.bat delete mode 100644 tgui/src/.babelrc delete mode 100644 tgui/src/components/bar.ract delete mode 100644 tgui/src/components/bar.styl delete mode 100644 tgui/src/components/button.ract delete mode 100644 tgui/src/components/button.styl delete mode 100644 tgui/src/components/display.ract delete mode 100644 tgui/src/components/display.styl delete mode 100644 tgui/src/components/input.ract delete mode 100644 tgui/src/components/input.styl delete mode 100644 tgui/src/components/linegraph.ract delete mode 100644 tgui/src/components/linegraph.styl delete mode 100644 tgui/src/components/notice.ract delete mode 100644 tgui/src/components/notice.styl delete mode 100644 tgui/src/components/resize.ract delete mode 100644 tgui/src/components/resize.styl delete mode 100644 tgui/src/components/section.ract delete mode 100644 tgui/src/components/section.styl delete mode 100644 tgui/src/components/subdisplay.ract delete mode 100644 tgui/src/components/subdisplay.styl delete mode 100644 tgui/src/components/tabs.ract delete mode 100644 tgui/src/components/tabs/tab.ract delete mode 100644 tgui/src/components/titlebar.ract delete mode 100644 tgui/src/components/titlebar.styl delete mode 100644 tgui/src/components/warnings.ract delete mode 100644 tgui/src/images/nanotrasen.svg delete mode 100644 tgui/src/images/syndicate.svg delete mode 100644 tgui/src/interfaces/ai_airlock.ract delete mode 100644 tgui/src/interfaces/airalarm.ract delete mode 100644 tgui/src/interfaces/airalarm/back.ract delete mode 100644 tgui/src/interfaces/airalarm/modes.ract delete mode 100644 tgui/src/interfaces/airalarm/scrubbers.ract delete mode 100644 tgui/src/interfaces/airalarm/status.ract delete mode 100644 tgui/src/interfaces/airalarm/thresholds.ract delete mode 100644 tgui/src/interfaces/airalarm/vents.ract delete mode 100644 tgui/src/interfaces/airlock_electronics.ract delete mode 100644 tgui/src/interfaces/airlock_electronics.styl delete mode 100644 tgui/src/interfaces/apc.ract delete mode 100644 tgui/src/interfaces/atmos_alert.ract delete mode 100644 tgui/src/interfaces/atmos_control.ract delete mode 100644 tgui/src/interfaces/atmos_filter.ract delete mode 100644 tgui/src/interfaces/atmos_mixer.ract delete mode 100644 tgui/src/interfaces/atmos_pump.ract delete mode 100644 tgui/src/interfaces/atmos_relief.ract delete mode 100644 tgui/src/interfaces/borgopanel.ract delete mode 100644 tgui/src/interfaces/brig_timer.ract delete mode 100644 tgui/src/interfaces/bsa.ract delete mode 100644 tgui/src/interfaces/canister.ract delete mode 100644 tgui/src/interfaces/cargo.ract delete mode 100644 tgui/src/interfaces/cargo_express.ract delete mode 100644 tgui/src/interfaces/cellular_emporium.ract delete mode 100644 tgui/src/interfaces/centcom_podlauncher.ract delete mode 100644 tgui/src/interfaces/chem_dispenser.ract delete mode 100644 tgui/src/interfaces/chem_heater.ract delete mode 100644 tgui/src/interfaces/chem_master.ract delete mode 100644 tgui/src/interfaces/chem_synthesizer.ract delete mode 100644 tgui/src/interfaces/clockwork_slab.ract delete mode 100644 tgui/src/interfaces/codex_gigas.ract delete mode 100644 tgui/src/interfaces/computer_fabricator.ract delete mode 100644 tgui/src/interfaces/crayon.ract delete mode 100644 tgui/src/interfaces/crew.ract delete mode 100644 tgui/src/interfaces/cryo.ract delete mode 100644 tgui/src/interfaces/disposal_unit.ract delete mode 100644 tgui/src/interfaces/dna_vault.ract delete mode 100644 tgui/src/interfaces/dogborg_sleeper.ract delete mode 100644 tgui/src/interfaces/eightball.ract delete mode 100644 tgui/src/interfaces/emergency_shuttle_console.ract delete mode 100644 tgui/src/interfaces/engraved_message.ract delete mode 100644 tgui/src/interfaces/error.ract delete mode 100644 tgui/src/interfaces/exofab - Copia.ract delete mode 100644 tgui/src/interfaces/exonet_node.ract delete mode 100644 tgui/src/interfaces/gps.ract delete mode 100644 tgui/src/interfaces/gulag_console.ract delete mode 100644 tgui/src/interfaces/gulag_item_reclaimer.ract delete mode 100644 tgui/src/interfaces/holodeck.ract delete mode 100644 tgui/src/interfaces/implantchair.ract delete mode 100644 tgui/src/interfaces/intellicard.ract delete mode 100644 tgui/src/interfaces/keycard_auth.ract delete mode 100644 tgui/src/interfaces/labor_claim_console.ract delete mode 100644 tgui/src/interfaces/language_menu.ract delete mode 100644 tgui/src/interfaces/launchpad_remote.ract delete mode 100644 tgui/src/interfaces/mech_bay_power_console.ract delete mode 100644 tgui/src/interfaces/mulebot.ract delete mode 100644 tgui/src/interfaces/nanite_chamber_control.ract delete mode 100644 tgui/src/interfaces/nanite_cloud_control.ract delete mode 100644 tgui/src/interfaces/nanite_comm_remote.ract delete mode 100644 tgui/src/interfaces/nanite_program_hub.ract delete mode 100644 tgui/src/interfaces/nanite_programmer.ract delete mode 100644 tgui/src/interfaces/nanite_remote.ract delete mode 100644 tgui/src/interfaces/notificationpanel.ract delete mode 100644 tgui/src/interfaces/ntnet_relay.ract delete mode 100644 tgui/src/interfaces/ntos_ai_restorer.ract delete mode 100644 tgui/src/interfaces/ntos_card.ract delete mode 100644 tgui/src/interfaces/ntos_configuration.ract delete mode 100644 tgui/src/interfaces/ntos_file_manager.ract delete mode 100644 tgui/src/interfaces/ntos_main.ract delete mode 100644 tgui/src/interfaces/ntos_net_chat.ract delete mode 100644 tgui/src/interfaces/ntos_net_dos.ract delete mode 100644 tgui/src/interfaces/ntos_net_downloader.ract delete mode 100644 tgui/src/interfaces/ntos_net_monitor.ract delete mode 100644 tgui/src/interfaces/ntos_net_transfer.ract delete mode 100644 tgui/src/interfaces/ntos_power_monitor.ract delete mode 100644 tgui/src/interfaces/ntos_revelation.ract delete mode 100644 tgui/src/interfaces/ntos_station_alert.ract delete mode 100644 tgui/src/interfaces/ntos_supermatter_monitor.ract delete mode 100644 tgui/src/interfaces/ntosheader.ract delete mode 100644 tgui/src/interfaces/nuclear_bomb.ract delete mode 100644 tgui/src/interfaces/operating_computer.ract delete mode 100644 tgui/src/interfaces/ore_redemption_machine.ract delete mode 100644 tgui/src/interfaces/pandemic.ract delete mode 100644 tgui/src/interfaces/personal_crafting.ract delete mode 100644 tgui/src/interfaces/point_bank.ract delete mode 100644 tgui/src/interfaces/portable_pump.ract delete mode 100644 tgui/src/interfaces/portable_scrubber.ract delete mode 100644 tgui/src/interfaces/power_monitor.ract delete mode 100644 tgui/src/interfaces/radio.ract delete mode 100644 tgui/src/interfaces/rdconsole.ract delete mode 100644 tgui/src/interfaces/rdconsole/circuit.ract delete mode 100644 tgui/src/interfaces/rdconsole/designview.ract delete mode 100644 tgui/src/interfaces/rdconsole/destruct.ract delete mode 100644 tgui/src/interfaces/rdconsole/diskopsdesign.ract delete mode 100644 tgui/src/interfaces/rdconsole/diskopstech.ract delete mode 100644 tgui/src/interfaces/rdconsole/nodeview.ract delete mode 100644 tgui/src/interfaces/rdconsole/protolathe.ract delete mode 100644 tgui/src/interfaces/rdconsole/rdheader.ract delete mode 100644 tgui/src/interfaces/rdconsole/settings.ract delete mode 100644 tgui/src/interfaces/rdconsole/techweb.ract delete mode 100644 tgui/src/interfaces/reagentgrinder.ract delete mode 100644 tgui/src/interfaces/rpd.ract delete mode 100644 tgui/src/interfaces/rpd/colorsel.ract delete mode 100644 tgui/src/interfaces/rpd/dirsel.ract delete mode 100644 tgui/src/interfaces/sat_control.ract delete mode 100644 tgui/src/interfaces/scrubbing_types.ract delete mode 100644 tgui/src/interfaces/shuttle_manipulator.ract delete mode 100644 tgui/src/interfaces/shuttle_manipulator/modification.ract delete mode 100644 tgui/src/interfaces/shuttle_manipulator/status.ract delete mode 100644 tgui/src/interfaces/shuttle_manipulator/templates.ract delete mode 100644 tgui/src/interfaces/sleeper.ract delete mode 100644 tgui/src/interfaces/slime_swap_body.ract delete mode 100644 tgui/src/interfaces/smartvend.ract delete mode 100644 tgui/src/interfaces/smes.ract delete mode 100644 tgui/src/interfaces/smoke_machine.ract delete mode 100644 tgui/src/interfaces/solar_control.ract delete mode 100644 tgui/src/interfaces/space_heater.ract delete mode 100644 tgui/src/interfaces/spawners_menu.ract delete mode 100644 tgui/src/interfaces/station_alert.ract delete mode 100644 tgui/src/interfaces/suit_storage_unit.ract delete mode 100644 tgui/src/interfaces/synd_contract.ract delete mode 100644 tgui/src/interfaces/tank_dispenser.ract delete mode 100644 tgui/src/interfaces/tanks.ract delete mode 100644 tgui/src/interfaces/thermomachine.ract delete mode 100644 tgui/src/interfaces/turbine_computer.ract delete mode 100644 tgui/src/interfaces/uplink.ract delete mode 100644 tgui/src/interfaces/vr_sleeper.ract delete mode 100644 tgui/src/interfaces/wires.ract delete mode 100644 tgui/src/styles/clockwork.styl delete mode 100644 tgui/src/styles/nanotrasen.styl delete mode 100644 tgui/src/styles/syndicate.styl delete mode 100644 tgui/src/tgui.js delete mode 100644 tgui/src/tgui.ract delete mode 100644 tgui/src/tgui.styl delete mode 100644 tgui/src/util/byond.js delete mode 100644 tgui/src/util/colors.styl delete mode 100644 tgui/src/util/constants.js delete mode 100644 tgui/src/util/dragresize.js delete mode 100644 tgui/src/util/filter.js delete mode 100644 tgui/src/util/math.js delete mode 100644 tgui/src/util/misc.styl delete mode 100644 tgui/src/util/text.js delete mode 100644 tgui/src/util/text.styl delete mode 100644 tgui/src/util/tooltip.styl rename {tgui-next => tgui}/yarn.lock (72%) diff --git a/tgui-next/.eslintrc.yml b/tgui-next/.eslintrc.yml deleted file mode 100644 index 4bff333295..0000000000 --- a/tgui-next/.eslintrc.yml +++ /dev/null @@ -1,749 +0,0 @@ -parser: babel-eslint -parserOptions: - ecmaVersion: 2019 - sourceType: module - ecmaFeatures: - jsx: true -env: - es6: true - browser: true - node: true -plugins: - - react -settings: - react: - version: '16.10' -rules: - - ## Possible Errors - ## ---------------------------------------- - - ## Enforce “for” loop update clause moving the counter in the right - ## direction. - # for-direction: error - ## Enforce return statements in getters - # getter-return: error - ## Disallow using an async function as a Promise executor - no-async-promise-executor: error - ## Disallow await inside of loops - # no-await-in-loop: error - ## Disallow comparing against -0 - # no-compare-neg-zero: error - ## Disallow assignment operators in conditional expressions - no-cond-assign: error - ## Disallow the use of console - # no-console: error - ## Disallow constant expressions in conditions - # no-constant-condition: error - ## Disallow control characters in regular expressions - # no-control-regex: error - ## Disallow the use of debugger - no-debugger: error - ## Disallow duplicate arguments in function definitions - no-dupe-args: error - ## Disallow duplicate keys in object literals - no-dupe-keys: error - ## Disallow duplicate case labels - no-duplicate-case: error - ## Disallow empty block statements - # no-empty: error - ## Disallow empty character classes in regular expressions - no-empty-character-class: error - ## Disallow reassigning exceptions in catch clauses - no-ex-assign: error - ## Disallow unnecessary boolean casts - no-extra-boolean-cast: error - ## Disallow unnecessary parentheses - # no-extra-parens: warn - ## Disallow unnecessary semicolons - no-extra-semi: error - ## Disallow reassigning function declarations - no-func-assign: error - ## Disallow assigning to imported bindings - no-import-assign: error - ## Disallow variable or function declarations in nested blocks - no-inner-declarations: error - ## Disallow invalid regular expression strings in RegExp constructors - no-invalid-regexp: error - ## Disallow irregular whitespace - no-irregular-whitespace: error - ## Disallow characters which are made with multiple code points in character - ## class syntax - no-misleading-character-class: error - ## Disallow calling global object properties as functions - no-obj-calls: error - ## Disallow calling some Object.prototype methods directly on objects - no-prototype-builtins: error - ## Disallow multiple spaces in regular expressions - no-regex-spaces: error - ## Disallow sparse arrays - no-sparse-arrays: error - ## Disallow template literal placeholder syntax in regular strings - no-template-curly-in-string: error - ## Disallow confusing multiline expressions - no-unexpected-multiline: error - ## Disallow unreachable code after return, throw, continue, and break - ## statements - # no-unreachable: warn - ## Disallow control flow statements in finally blocks - no-unsafe-finally: error - ## Disallow negating the left operand of relational operators - no-unsafe-negation: error - ## Disallow assignments that can lead to race conditions due to usage of - ## await or yield - # require-atomic-updates: error - ## Require calls to isNaN() when checking for NaN - use-isnan: error - ## Enforce comparing typeof expressions against valid strings - valid-typeof: error - - ## Best practices - ## ---------------------------------------- - ## Enforce getter and setter pairs in objects and classes - # accessor-pairs: error - ## Enforce return statements in callbacks of array methods - # array-callback-return: error - ## Enforce the use of variables within the scope they are defined - # block-scoped-var: error - ## Enforce that class methods utilize this - # class-methods-use-this: error - ## Enforce a maximum cyclomatic complexity allowed in a program - complexity: [error, { max: 50 }] - ## Require return statements to either always or never specify values - # consistent-return: error - ## Enforce consistent brace style for all control statements - curly: [error, all] - ## Require default cases in switch statements - # default-case: error - ## Enforce default parameters to be last - # default-param-last: error - ## Enforce consistent newlines before and after dots - dot-location: [error, property] - ## Enforce dot notation whenever possible - # dot-notation: error - ## Require the use of === and !== - eqeqeq: [error, always] - ## Require for-in loops to include an if statement - # guard-for-in: error - ## Enforce a maximum number of classes per file - # max-classes-per-file: error - ## Disallow the use of alert, confirm, and prompt - # no-alert: error - ## Disallow the use of arguments.caller or arguments.callee - # no-caller: error - ## Disallow lexical declarations in case clauses - no-case-declarations: error - ## Disallow division operators explicitly at the beginning of regular - ## expressions - # no-div-regex: error - ## Disallow else blocks after return statements in if statements - # no-else-return: error - ## Disallow empty functions - # no-empty-function: error - ## Disallow empty destructuring patterns - no-empty-pattern: error - ## Disallow null comparisons without type-checking operators - # no-eq-null: error - ## Disallow the use of eval() - # no-eval: error - ## Disallow extending native types - # no-extend-native: error - ## Disallow unnecessary calls to .bind() - # no-extra-bind: error - ## Disallow unnecessary labels - # no-extra-label: error - ## Disallow fallthrough of case statements - no-fallthrough: error - ## Disallow leading or trailing decimal points in numeric literals - # no-floating-decimal: error - ## Disallow assignments to native objects or read-only global variables - no-global-assign: error - ## Disallow shorthand type conversions - # no-implicit-coercion: error - ## Disallow variable and function declarations in the global scope - # no-implicit-globals: error - ## Disallow the use of eval()-like methods - # no-implied-eval: error - ## Disallow this keywords outside of classes or class-like objects - # no-invalid-this: error - ## Disallow the use of the __iterator__ property - # no-iterator: error - ## Disallow labeled statements - # no-labels: error - ## Disallow unnecessary nested blocks - # no-lone-blocks: error - ## Disallow function declarations that contain unsafe references inside - ## loop statements - # no-loop-func: error - ## Disallow magic numbers - # no-magic-numbers: error - ## Disallow multiple spaces - no-multi-spaces: warn - ## Disallow multiline strings - # no-multi-str: error - ## Disallow new operators outside of assignments or comparisons - # no-new: error - ## Disallow new operators with the Function object - # no-new-func: error - ## Disallow new operators with the String, Number, and Boolean objects - # no-new-wrappers: error - ## Disallow octal literals - no-octal: error - ## Disallow octal escape sequences in string literals - no-octal-escape: error - ## Disallow reassigning function parameters - # no-param-reassign: error - ## Disallow the use of the __proto__ property - # no-proto: error - ## Disallow variable redeclaration - no-redeclare: error - ## Disallow certain properties on certain objects - # no-restricted-properties: error - ## Disallow assignment operators in return statements - no-return-assign: error - ## Disallow unnecessary return await - # no-return-await: error - ## Disallow javascript: urls - # no-script-url: error - ## Disallow assignments where both sides are exactly the same - no-self-assign: error - ## Disallow comparisons where both sides are exactly the same - # no-self-compare: error - ## Disallow comma operators - no-sequences: error - ## Disallow throwing literals as exceptions - # no-throw-literal: error - ## Disallow unmodified loop conditions - # no-unmodified-loop-condition: error - ## Disallow unused expressions - # no-unused-expressions: error - ## Disallow unused labels - no-unused-labels: warn - ## Disallow unnecessary calls to .call() and .apply() - # no-useless-call: error - ## Disallow unnecessary catch clauses - # no-useless-catch: error - ## Disallow unnecessary concatenation of literals or template literals - # no-useless-concat: error - ## Disallow unnecessary escape characters - no-useless-escape: warn - ## Disallow redundant return statements - # no-useless-return: error - ## Disallow void operators - # no-void: error - ## Disallow specified warning terms in comments - # no-warning-comments: error - ## Disallow with statements - no-with: error - ## Enforce using named capture group in regular expression - # prefer-named-capture-group: error - ## Require using Error objects as Promise rejection reasons - # prefer-promise-reject-errors: error - ## Disallow use of the RegExp constructor in favor of regular expression - ## literals - # prefer-regex-literals: error - ## Enforce the consistent use of the radix argument when using parseInt() - radix: error - ## Disallow async functions which have no await expression - # require-await: error - ## Enforce the use of u flag on RegExp - # require-unicode-regexp: error - ## Require var declarations be placed at the top of their containing scope - # vars-on-top: error - ## Require parentheses around immediate function invocations - # wrap-iife: error - ## Require or disallow “Yoda” conditions - # yoda: error - - ## Strict mode - ## ---------------------------------------- - ## Require or disallow strict mode directives - strict: error - - ## Variables - ## ---------------------------------------- - ## Require or disallow initialization in variable declarations - # init-declarations: error - ## Disallow deleting variables - no-delete-var: error - ## Disallow labels that share a name with a variable - # no-label-var: error - ## Disallow specified global variables - # no-restricted-globals: error - ## Disallow variable declarations from shadowing variables declared in - ## the outer scope - # no-shadow: error - ## Disallow identifiers from shadowing restricted names - no-shadow-restricted-names: error - ## Disallow the use of undeclared variables unless mentioned - ## in /*global*/ comments - no-undef: error - ## Disallow initializing variables to undefined - no-undef-init: error - ## Disallow the use of undefined as an identifier - # no-undefined: error - ## Disallow unused variables - # no-unused-vars: error - ## 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, always-multiline] - ## 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: 80, - ## Ignore imports - ignorePattern: '^(import\s.+\sfrom\s|.*require\()', - ignoreUrls: true, - ignoreRegExpLiterals: 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 - # arrow-body-style: error - ## Require parentheses around arrow function arguments - arrow-parens: [error, as-needed] - ## Enforce consistent spacing before and after the arrow in arrow functions - arrow-spacing: [error, { before: true, after: true }] - ## Require super() calls in constructors - # constructor-super: error - ## Enforce consistent spacing around * operators in generator functions - generator-star-spacing: [error, { before: false, after: true }] - ## Disallow reassigning class members - no-class-assign: error - ## Disallow arrow functions where they could be confused with comparisons - # no-confusing-arrow: error - ## Disallow reassigning const variables - no-const-assign: error - ## Disallow duplicate class members - no-dupe-class-members: error - ## Disallow duplicate module imports - # no-duplicate-imports: error - ## Disallow new operators with the Symbol object - no-new-symbol: error - ## Disallow specified modules when loaded by import - # no-restricted-imports: error - ## Disallow this/super before calling super() in constructors - no-this-before-super: error - ## Disallow unnecessary computed property keys in object literals - # no-useless-computed-key: error - ## Disallow unnecessary constructors - # no-useless-constructor: error - ## Disallow renaming import, export, and destructured assignments to the - ## same name - # no-useless-rename: error - ## Require let or const instead of var - no-var: error - ## Require or disallow method and property shorthand syntax for object - ## literals - # object-shorthand: error - ## Require using arrow functions for callbacks - prefer-arrow-callback: error - ## Require const declarations for variables that are never reassigned after - ## declared - # prefer-const: error - ## Require destructuring from arrays and/or objects - # prefer-destructuring: error - ## Disallow parseInt() and Number.parseInt() in favor of binary, octal, and - ## hexadecimal literals - # prefer-numeric-literals: error - ## Require rest parameters instead of arguments - # prefer-rest-params: error - ## Require spread operators instead of .apply() - # prefer-spread: error - ## Require template literals instead of string concatenation - # prefer-template: error - ## Require generator functions to contain yield - # require-yield: error - ## Enforce spacing between rest and spread operators and their expressions - # rest-spread-spacing: error - ## Enforce sorted import declarations within modules - # sort-imports: error - ## Require symbol descriptions - # symbol-description: error - ## Require or disallow spacing around embedded expressions of template - ## strings - # template-curly-spacing: error - ## Require or disallow spacing around the * in yield* expressions - yield-star-spacing: [error, { before: false, after: true }] - - ## React - ## ---------------------------------------- - ## Enforces consistent naming for boolean props - react/boolean-prop-naming: error - ## Forbid "button" element without an explicit "type" attribute - react/button-has-type: error - ## Prevent extraneous defaultProps on components - react/default-props-match-prop-types: error - ## Rule enforces consistent usage of destructuring assignment in component - # react/destructuring-assignment: [error, always, { ignoreClassFields: true }] - ## Prevent missing displayName in a React component definition - react/display-name: error - ## Forbid certain props on Components - # react/forbid-component-props: error - ## Forbid certain props on DOM Nodes - # react/forbid-dom-props: error - ## Forbid certain elements - # react/forbid-elements: error - ## Forbid certain propTypes - # react/forbid-prop-types: error - ## Forbid foreign propTypes - # react/forbid-foreign-prop-types: error - ## Prevent using this.state inside this.setState - react/no-access-state-in-setstate: error - ## Prevent using Array index in key props - # react/no-array-index-key: error - ## Prevent passing children as props - react/no-children-prop: error - ## Prevent usage of dangerous JSX properties - react/no-danger: error - ## Prevent problem with children and props.dangerouslySetInnerHTML - react/no-danger-with-children: error - ## Prevent usage of deprecated methods, including component lifecycle - ## methods - react/no-deprecated: error - ## Prevent usage of setState in componentDidMount - react/no-did-mount-set-state: error - ## Prevent usage of setState in componentDidUpdate - react/no-did-update-set-state: error - ## Prevent direct mutation of this.state - react/no-direct-mutation-state: error - ## Prevent usage of findDOMNode - react/no-find-dom-node: error - ## Prevent usage of isMounted - react/no-is-mounted: error - ## Prevent multiple component definition per file - # react/no-multi-comp: error - ## Prevent usage of shouldComponentUpdate when extending React.PureComponent - react/no-redundant-should-component-update: error - ## Prevent usage of the return value of React.render - react/no-render-return-value: error - ## Prevent usage of setState - # react/no-set-state: error - ## Prevent common casing typos - react/no-typos: error - ## Prevent using string references in ref attribute. - react/no-string-refs: error - ## Prevent using this in stateless functional components - react/no-this-in-sfc: error - ## Prevent invalid characters from appearing in markup - react/no-unescaped-entities: error - ## Prevent usage of unknown DOM property (fixable) - react/no-unknown-property: error - ## Prevent usage of unsafe lifecycle methods - react/no-unsafe: error - ## Prevent definitions of unused prop types - react/no-unused-prop-types: error - ## Prevent definitions of unused state properties - react/no-unused-state: error - ## Prevent usage of setState in componentWillUpdate - react/no-will-update-set-state: error - ## Enforce ES5 or ES6 class for React Components - react/prefer-es6-class: error - ## Enforce that props are read-only - react/prefer-read-only-props: error - ## Enforce stateless React Components to be written as a pure function - react/prefer-stateless-function: error - ## Prevent missing props validation in a React component definition - # react/prop-types: error - ## Prevent missing React when using JSX - # react/react-in-jsx-scope: error - ## Enforce a defaultProps definition for every prop that is not a required - ## prop - # react/require-default-props: error - ## Enforce React components to have a shouldComponentUpdate method - # react/require-optimization: error - ## Enforce ES5 or ES6 class for returning value in render function - react/require-render-return: error - ## Prevent extra closing tags for components without children (fixable) - react/self-closing-comp: error - ## Enforce component methods order (fixable) - # react/sort-comp: error - ## Enforce propTypes declarations alphabetical sorting - # react/sort-prop-types: error - ## Enforce the state initialization style to be either in a constructor or - ## with a class property - react/state-in-constructor: error - ## Enforces where React component static properties should be positioned. - # react/static-property-placement: error - ## Enforce style prop value being an object - react/style-prop-object: error - ## Prevent void DOM elements (e.g. ,
) from receiving children - react/void-dom-elements-no-children: error - - ## JSX-specific rules - ## ---------------------------------------- - ## Enforce boolean attributes notation in JSX (fixable) - react/jsx-boolean-value: error - ## Enforce or disallow spaces inside of curly braces in JSX attributes and - ## expressions. - # react/jsx-child-element-spacing: error - ## Validate closing bracket location in JSX (fixable) - react/jsx-closing-bracket-location: [error, { - ## NOTE: Not really sure about enforcing this one - selfClosing: false, - nonEmpty: after-props, - }] - ## Validate closing tag location in JSX (fixable) - react/jsx-closing-tag-location: error - ## Enforce or disallow newlines inside of curly braces in JSX attributes and - ## expressions (fixable) - react/jsx-curly-newline: error - ## Enforce or disallow spaces inside of curly braces in JSX attributes and - ## expressions (fixable) - react/jsx-curly-spacing: error - ## Enforce or disallow spaces around equal signs in JSX attributes (fixable) - react/jsx-equals-spacing: error - ## Restrict file extensions that may contain JSX - # react/jsx-filename-extension: error - ## Enforce position of the first prop in JSX (fixable) - # react/jsx-first-prop-new-line: error - ## Enforce event handler naming conventions in JSX - react/jsx-handler-names: error - ## Validate JSX indentation (fixable) - react/jsx-indent: [error, 2, { - checkAttributes: true, - }] - ## Validate props indentation in JSX (fixable) - react/jsx-indent-props: [error, 2] - ## Validate JSX has key prop when in array or iterator - react/jsx-key: error - ## Validate JSX maximum depth - react/jsx-max-depth: [error, { max: 6 }] ## Generous - ## Limit maximum of props on a single line in JSX (fixable) - # react/jsx-max-props-per-line: error - ## Prevent usage of .bind() and arrow functions in JSX props - # react/jsx-no-bind: error - ## Prevent comments from being inserted as text nodes - react/jsx-no-comment-textnodes: error - ## Prevent duplicate props in JSX - react/jsx-no-duplicate-props: error - ## Prevent usage of unwrapped JSX strings - # react/jsx-no-literals: error - ## Prevent usage of unsafe target='_blank' - react/jsx-no-target-blank: error - ## Disallow undeclared variables in JSX - react/jsx-no-undef: error - ## Disallow unnecessary fragments (fixable) - react/jsx-no-useless-fragment: error - ## Limit to one expression per line in JSX - # react/jsx-one-expression-per-line: error - ## Enforce curly braces or disallow unnecessary curly braces in JSX - # react/jsx-curly-brace-presence: error - ## Enforce shorthand or standard form for React fragments - react/jsx-fragments: error - ## Enforce PascalCase for user-defined JSX components - react/jsx-pascal-case: error - ## Disallow multiple spaces between inline JSX props (fixable) - react/jsx-props-no-multi-spaces: error - ## Disallow JSX props spreading - # react/jsx-props-no-spreading: error - ## Enforce default props alphabetical sorting - # react/jsx-sort-default-props: error - ## Enforce props alphabetical sorting (fixable) - # react/jsx-sort-props: error - ## Validate whitespace in and around the JSX opening and closing brackets - ## (fixable) - react/jsx-tag-spacing: error - ## Prevent React to be incorrectly marked as unused - react/jsx-uses-react: error - ## Prevent variables used in JSX to be incorrectly marked as unused - react/jsx-uses-vars: error - ## Prevent missing parentheses around multilines JSX (fixable) - react/jsx-wrap-multilines: error diff --git a/tgui-next/.gitattributes b/tgui-next/.gitattributes deleted file mode 100644 index 0016cc3bf6..0000000000 --- a/tgui-next/.gitattributes +++ /dev/null @@ -1,10 +0,0 @@ -* text=auto - -## Enforce text mode and LF line breaks -*.js text eol=lf -*.css text eol=lf -*.html text eol=lf -*.json text eol=lf - -## Treat bundles as binary and ignore them during conflicts -*.bundle.* binary merge=tgui-merge-bundle diff --git a/tgui-next/.gitignore b/tgui-next/.gitignore deleted file mode 100644 index 416ca3768d..0000000000 --- a/tgui-next/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -node_modules -*.log -package-lock.json - -/packages/tgui/public/.tmp/**/* -/packages/tgui/public/**/*.hot-update.* -/packages/tgui/public/**/*.map diff --git a/tgui-next/README.md b/tgui-next/README.md deleted file mode 100644 index beb7aaff80..0000000000 --- a/tgui-next/README.md +++ /dev/null @@ -1,855 +0,0 @@ -# tgui - -## Introduction - -tgui is a robust user interface framework of /tg/station. - -tgui is very different from most UIs you will encounter in BYOND programming. -It is heavily reliant on Javascript and web technologies as opposed to DM. -If you are familiar with NanoUI (a library which can be found on almost -every other SS13 codebase), tgui should be fairly easy to pick up. - -## Learn tgui - -People come to tgui from different backgrounds and with different -learning styles. Whether you prefer a more theoretical or a practical -approach, we hope you’ll find this section helpful. - -### Practical tutorial - -If you are completely new to frontend and prefer to **learn by doing**, -start with our [practical tutorial](docs/tutorial-and-examples.md). - -### Guides - -This project uses **Inferno** - a very fast UI rendering engine with a similar -API to React. Take your time to read these guides: - -- [React guide](https://reactjs.org/docs/hello-world.html) -- [Inferno documentation](https://infernojs.org/docs/guides/components) - -highlights differences with React. - -If you were already familiar with an older, Ractive-based tgui, and want -to translate concepts between old and new tgui, read this -[interface conversion guide](docs/converting-old-tgui-interfaces.md). - -## Pre-requisites - -You will need these programs to start developing in tgui: - -- [Node v12.13+](https://nodejs.org/en/download/) -- [Yarn v1.19+](https://yarnpkg.com/en/docs/install) -- [MSys2](https://www.msys2.org/) (optional) - -> MSys2 closely replicates a unix-like environment which is necessary for -> the `bin/tgui` script to run. It comes with a robust "mintty" terminal -> emulator which is better than any standard Windows shell, it supports -> "git" out of the box (almost like Git for Windows, but better), has -> a "pacman" package manager, and you can install a text editor like "vim" -> for a full boomer experience. - -## Usage - -**For MSys2, Git Bash, WSL, Linux or macOS users:** - -First and foremost, change your directory to `tgui-next`. - -Run `bin/tgui --install-git-hooks` (optional) to install merge drivers -which will assist you in conflict resolution when rebasing your branches. - -Run one of the following: - -- `bin/tgui` - build the project in production mode. -- `bin/tgui --dev` - launch a development server. - - tgui development server provides you with incremental compilation, - hot module replacement and logging facilities in all running instances - of tgui. In short, this means that you will instantly see changes in the - game as you code it. Very useful, highly recommended. - In order to use, you should start the game server first, connect to it so dreamseeker is - open, then start the dev server. You'll know if it's hooked correctly if data gets dumped - to the log when tgui windows are opened. -- `bin/tgui --dev --reload` - reload byond cache once. -- `bin/tgui --dev --debug` - run server with debug logging enabled. -- `bin/tgui --dev --no-hot` - disable hot module replacement (helps when -doing development on IE8). -- `bin/tgui --lint` - show problems with the code. -- `bin/tgui --lint --fix` - auto-fix problems with the code. -- `bin/tgui --analyze` - run a bundle analyzer. -- `bin/tgui --clean` - clean up project repo. -- `bin/tgui [webpack options]` - build the project with custom webpack -options. - -**For everyone else:** - -If you haven't opened the console already, you can do that by holding -Shift and right clicking on the `tgui-next` folder, then pressing -either `Open command window here` or `Open PowerShell window here`. - -Run `yarn install` to install npm dependencies, then one of the following: - -- `yarn run build` - build the project in production mode. -- `yarn run watch` - launch a development server. -- `yarn run lint` - show problems with the code. -- `yarn run lint --fix` - auto-fix problems with the code. -- `yarn run analyze` - run a bundle analyzer. - -We also got some batch files in store, for those who don't like fiddling -with the console: - -- `bin/tgui-build.bat` - build the project in production mode. -- `bin/tgui-dev-server.bat` - launch a development server. - -> Remember to always run a full build before submitting a PR. It creates -> a compressed javascript bundle which is then referenced from DM code. -> We prefer to keep it version controlled, so that people could build the -> game just by using Dream Maker. - -## Project structure - -- `/packages` - Each folder here represents a self-contained Node module. -- `/packages/common` - Helper functions -- `/packages/tgui/index.js` - Application entry point. -- `/packages/tgui/components` - Basic UI building blocks. -- `/packages/tgui/interfaces` - Actual in-game interfaces. -Interface takes data via the `state` prop and outputs an html-like stucture, -which you can build using existing UI components. -- `/packages/tgui/routes.js` - This is where you want to register new -interfaces, otherwise they simply won't load. -- `/packages/tgui/layout.js` - A root-level component, holding the -window elements, like the titlebar, buttons, resize handlers. Calls -`routes.js` to decide which component to render. -- `/packages/tgui/styles/main.scss` - CSS entry point. -- `/packages/tgui/styles/atomic.scss` - Atomic CSS classes. -These are very simple, tiny, reusable CSS classes which you can use and -combine to change appearance of your elements. Keep them small. -- `/packages/tgui/styles/components.scss` - CSS classes which are used -in UI components, and most of the stylesheets referenced here are located -in `/packages/tgui/components`. These stylesheets closely follow the -[BEM](https://en.bem.info/methodology/) methodology. -- `/packages/tgui/styles/functions.scss` - Useful SASS functions. -Stuff like `lighten`, `darken`, `luminance` are defined here. - -## Component reference - -> Notice: This documentation might be out of date, so always check the source -> code to see the most up-to-date information. - -These are the components which you can use for interface construction. -If you have trouble finding the exact prop you need on a component, -please note, that most of these components inherit from other basic -components, such as `Box`. This component in particular provides a lot -of styling options for all components, e.g. `color` and `opacity`, thus -it is used a lot in this framework. - -There are a few important semantics you need to know about: - -- `content` prop is a synonym to a `children` prop. - - `content` is better used when your element is a self-closing tag - (like ``), and when content is long and complex. This is - a native React prop (unlike `content`), and contains all elements you - defined between the opening and the closing tag of an element. - - You should never use both on a same element. - - You should never use `children` explicitly as a prop on an element. -- Inferno supports both camelcase (`onClick`) and lowercase (`onclick`) -event names. - - Camel case names are what's called "synthetic" events, and are the - *preferred way* of handling events in React, for efficiency and - performance reasons. Please read - [Inferno Event Handling](https://infernojs.org/docs/guides/event-handling) - to understand what this is about. - - Lower case names are native browser events and should be used sparingly, - for example when you need an explicit IE8 support. **DO NOT** use - lowercase event handlers unless you really know what you are doing. - - [Button](#button) component straight up does not support lowercase event - handlers. Use the camel case `onClick` instead. - -### `AnimatedNumber` - -This component provides animations for numeric values. - -Props: - -- `value: number` - Value to animate. -- `initial: number` - Initial value to use in animation when element -first appears. If you set initial to `0` for example, number will always -animate starting from `0`, and if omitted, it will not play an initial -animation. -- `format: value => value` - Output formatter. - - Example: `value => Math.round(value)`. -- `children: (formattedValue, rawValue) => any` - Pull the animated number to -animate more complex things deeper in the DOM tree. - - Example: `(_, value) => ` - -### `BlockQuote` - -Just a block quote, just like this example in markdown: - -> Here's an example of a block quote. - -Props: - -- See inherited props: [Box](#box) - -### `Box` - -The Box component serves as a wrapper component for most of the CSS utility -needs. It creates a new DOM element, a `
` by default that can be changed -with the `as` property. Let's say you want to use a `` instead: - -```jsx - - - ); - })} -
-
- {content || null} -
- - ); - } -} - -/** - * A dummy component, which is used for carrying props for the - * tab container. - */ -export const Tab = props => null; - -Tab.defaultProps = { - __type__: TAB_MAGIC_TYPE, -}; - -Tabs.Tab = Tab; diff --git a/tgui-next/packages/tgui/components/TitleBar.js b/tgui-next/packages/tgui/components/TitleBar.js deleted file mode 100644 index f0a5040500..0000000000 --- a/tgui-next/packages/tgui/components/TitleBar.js +++ /dev/null @@ -1,51 +0,0 @@ -import { classes, pureComponentHooks } from 'common/react'; -import { toTitleCase } from 'common/string'; -import { tridentVersion } from '../byond'; -import { UI_DISABLED, UI_INTERACTIVE, UI_UPDATE } from '../constants'; -import { Icon } from './Icon'; - -const statusToColor = status => { - switch (status) { - case UI_INTERACTIVE: - return 'good'; - case UI_UPDATE: - return 'average'; - case UI_DISABLED: - default: - return 'bad'; - } -}; - -export const TitleBar = props => { - const { className, title, status, fancy, onDragStart, onClose } = props; - return ( -
- -
- {title === title.toLowerCase() ? toTitleCase(title) : title} -
-
fancy && onDragStart(e)} /> - {!!fancy && ( -
- {tridentVersion <= 4 ? 'x' : '×'} -
- )} -
- ); -}; - -TitleBar.defaultHooks = pureComponentHooks; diff --git a/tgui-next/packages/tgui/components/Toast.js b/tgui-next/packages/tgui/components/Toast.js deleted file mode 100644 index d3b9d603de..0000000000 --- a/tgui-next/packages/tgui/components/Toast.js +++ /dev/null @@ -1,57 +0,0 @@ -import { pureComponentHooks } from 'common/react'; - -export const Toast = props => { - const { content, children } = props; - return ( -
- {content} - {children} -
- ); -}; - -Toast.defaultHooks = pureComponentHooks; - -let toastTimeout; - -/** - * Shows a toast at the bottom of the screen. - * - * Takes the store's dispatch function, and text as a second argument. - */ -export const showToast = (dispatch, text) => { - if (toastTimeout) { - clearTimeout(toastTimeout); - } - toastTimeout = setTimeout(() => { - toastTimeout = undefined; - dispatch({ - type: 'hideToast', - }); - }, 5000); - dispatch({ - type: 'showToast', - payload: { text }, - }); -}; - -export const toastReducer = (state, action) => { - const { type, payload } = action; - - if (type === 'showToast') { - const { text } = payload; - return { - ...state, - toastText: text, - }; - } - - if (type === 'hideToast') { - return { - ...state, - toastText: null, - }; - } - - return state; -}; diff --git a/tgui-next/packages/tgui/components/index.js b/tgui-next/packages/tgui/components/index.js deleted file mode 100644 index c0074b4eec..0000000000 --- a/tgui-next/packages/tgui/components/index.js +++ /dev/null @@ -1,23 +0,0 @@ -export { AnimatedNumber } from './AnimatedNumber'; -export { BlockQuote } from './BlockQuote'; -export { Box } from './Box'; -export { Button } from './Button'; -export { ColorBox } from './ColorBox'; -export { Collapsible } from './Collapsible'; -export { Dimmer } from './Dimmer'; -export { Dropdown } from './Dropdown'; -export { Flex } from './Flex'; -export { Grid } from './Grid'; -export { Icon } from './Icon'; -export { Input } from './Input'; -export { LabeledList } from './LabeledList'; -export { NoticeBox } from './NoticeBox'; -export { NumberInput } from './NumberInput'; -export { ProgressBar } from './ProgressBar'; -export { Section } from './Section'; -export { Table } from './Table'; -export { Tabs } from './Tabs'; -export { TitleBar } from './TitleBar'; -export { Toast } from './Toast'; -export { Tooltip } from './Tooltip'; -export { Chart } from './Chart'; diff --git a/tgui-next/packages/tgui/hotkeys.js b/tgui-next/packages/tgui/hotkeys.js deleted file mode 100644 index 08625aa64d..0000000000 --- a/tgui-next/packages/tgui/hotkeys.js +++ /dev/null @@ -1,257 +0,0 @@ -import { createLogger } from './logging'; -import { callByond, tridentVersion } from './byond'; - -const logger = createLogger('hotkeys'); - -// Key codes -export const KEY_BACKSPACE = 8; -export const KEY_TAB = 9; -export const KEY_ENTER = 13; -export const KEY_SHIFT = 16; -export const KEY_CTRL = 17; -export const KEY_ALT = 18; -export const KEY_ESCAPE = 27; -export const KEY_SPACE = 32; -export const KEY_0 = 48; -export const KEY_1 = 49; -export const KEY_2 = 50; -export const KEY_3 = 51; -export const KEY_4 = 52; -export const KEY_5 = 53; -export const KEY_6 = 54; -export const KEY_7 = 55; -export const KEY_8 = 56; -export const KEY_9 = 57; -export const KEY_A = 65; -export const KEY_B = 66; -export const KEY_C = 67; -export const KEY_D = 68; -export const KEY_E = 69; -export const KEY_F = 70; -export const KEY_G = 71; -export const KEY_H = 72; -export const KEY_I = 73; -export const KEY_J = 74; -export const KEY_K = 75; -export const KEY_L = 76; -export const KEY_M = 77; -export const KEY_N = 78; -export const KEY_O = 79; -export const KEY_P = 80; -export const KEY_Q = 81; -export const KEY_R = 82; -export const KEY_S = 83; -export const KEY_T = 84; -export const KEY_U = 85; -export const KEY_V = 86; -export const KEY_W = 87; -export const KEY_X = 88; -export const KEY_Y = 89; -export const KEY_Z = 90; -export const KEY_EQUAL = 187; -export const KEY_MINUS = 189; - -const MODIFIER_KEYS = [ - KEY_CTRL, - KEY_ALT, - KEY_SHIFT, -]; - -const NO_PASSTHROUGH_KEYS = [ - KEY_ESCAPE, - KEY_ENTER, - KEY_SPACE, - KEY_TAB, - KEY_CTRL, - KEY_SHIFT, -]; - -// Tracks the "pressed" state of keys -const keyState = {}; - -const createHotkeyString = (ctrlKey, altKey, shiftKey, keyCode) => { - let str = ''; - if (ctrlKey) { - str += 'Ctrl+'; - } - if (altKey) { - str += 'Alt+'; - } - if (shiftKey) { - str += 'Shift+'; - } - if (keyCode >= 48 && keyCode <= 90) { - str += String.fromCharCode(keyCode); - } - else { - str += '[' + keyCode + ']'; - } - return str; -}; - -/** - * Parses the event and compiles information about the keypress. - */ -const getKeyData = e => { - const keyCode = window.event ? e.which : e.keyCode; - const { ctrlKey, altKey, shiftKey } = e; - return { - keyCode, - ctrlKey, - altKey, - shiftKey, - hasModifierKeys: ctrlKey || altKey || shiftKey, - keyString: createHotkeyString(ctrlKey, altKey, shiftKey, keyCode), - }; -}; - -/** - * Keyboard passthrough logic. This allows you to keep doing things - * in game while the browser window is focused. - */ -const handlePassthrough = (e, eventType) => { - if (e.defaultPrevented) { - return; - } - const targetName = e.target && e.target.localName; - if (targetName === 'input' || targetName === 'textarea') { - return; - } - const keyData = getKeyData(e); - const { keyCode, ctrlKey, shiftKey } = keyData; - // NOTE: We pass through only Alt of all modifier keys, because Alt - // modifier (for toggling run/walk) is implemented very shittily - // in our codebase. We pass no other modifier keys, because they can - // be used internally as tgui hotkeys. - if (ctrlKey || shiftKey || NO_PASSTHROUGH_KEYS.includes(keyCode)) { - return; - } - // Send this keypress to BYOND - if (eventType === 'keydown' && !keyState[keyCode]) { - logger.debug('passthrough', eventType, keyData); - return callByond('', { __keydown: keyCode }); - } - if (eventType === 'keyup' && keyState[keyCode]) { - logger.debug('passthrough', eventType, keyData); - return callByond('', { __keyup: keyCode }); - } -}; - -/** - * Cleanup procedure for keyboard passthrough, which should be called - * whenever you're unloading tgui. - */ -export const releaseHeldKeys = () => { - for (let keyCode of Object.keys(keyState)) { - if (keyState[keyCode]) { - logger.log(`releasing [${keyCode}] key`); - keyState[keyCode] = false; - callByond('', { __keyup: keyCode }); - } - } -}; - -const handleHotKey = (e, eventType, dispatch) => { - if (eventType !== 'keyup') { - return; - } - const keyData = getKeyData(e); - const { - ctrlKey, - altKey, - keyCode, - hasModifierKeys, - keyString, - } = keyData; - // Dispatch a detected hotkey as a store action - if (hasModifierKeys && !MODIFIER_KEYS.includes(keyCode)) { - logger.log(keyString); - // Fun stuff - if (ctrlKey && altKey && keyCode === KEY_BACKSPACE) { - // NOTE: We need to call this in a timeout, because we need a clean - // stack in order for this to be a fatal error. - setTimeout(() => { - throw new Error( - 'OOPSIE WOOPSIE!! UwU We made a fucky wucky!! A wittle' - + ' fucko boingo! The code monkeys at our headquarters are' - + ' working VEWY HAWD to fix this!'); - }); - } - dispatch({ - type: 'hotKey', - payload: keyData, - }); - } -}; - -/** - * Subscribe to an event when browser window has been completely - * unfocused. Conveniently fires events when the browser window - * is closed from the outside. - */ -const subscribeToLossOfFocus = listenerFn => { - let timeout; - document.addEventListener('focusout', () => { - timeout = setTimeout(listenerFn); - }); - document.addEventListener('focusin', () => { - clearTimeout(timeout); - }); - window.addEventListener('beforeunload', listenerFn); -}; - -/** - * Subscribe to keydown/keyup events with globally tracked key state. - */ -const subscribeToKeyPresses = listenerFn => { - document.addEventListener('keydown', e => { - const keyCode = window.event ? e.which : e.keyCode; - listenerFn(e, 'keydown'); - keyState[keyCode] = true; - }); - document.addEventListener('keyup', e => { - const keyCode = window.event ? e.which : e.keyCode; - listenerFn(e, 'keyup'); - keyState[keyCode] = false; - }); -}; - -// Middleware -export const hotKeyMiddleware = store => { - const { dispatch } = store; - // Subscribe to key events - subscribeToKeyPresses((e, eventType) => { - // IE8: Can't determine the focused element, so by extension it passes - // keypresses when inputs are focused. - if (tridentVersion > 4) { - handlePassthrough(e, eventType); - } - handleHotKey(e, eventType, dispatch); - }); - // IE8: focusin/focusout only available on IE9+ - if (tridentVersion > 4) { - // Clean up when browser window completely loses focus - subscribeToLossOfFocus(() => { - releaseHeldKeys(); - }); - } - // Pass through store actions (do nothing) - return next => action => next(action); -}; - -// Reducer -export const hotKeyReducer = (state, action) => { - const { type, payload } = action; - if (type === 'hotKey') { - const { ctrlKey, altKey, keyCode } = payload; - // Toggle kitchen sink mode - if (ctrlKey && altKey && keyCode === KEY_EQUAL) { - return { - ...state, - showKitchenSink: !state.showKitchenSink, - }; - } - return state; - } - return state; -}; diff --git a/tgui-next/packages/tgui/index.js b/tgui-next/packages/tgui/index.js deleted file mode 100644 index 1a8b9d4eab..0000000000 --- a/tgui-next/packages/tgui/index.js +++ /dev/null @@ -1,167 +0,0 @@ -import 'core-js/es'; -import 'core-js/web/immediate'; -import 'core-js/web/queue-microtask'; -import 'core-js/web/timers'; -import 'regenerator-runtime/runtime'; -import './polyfills'; - -import { loadCSS } from 'fg-loadcss'; -import { render } from 'inferno'; -import { setupHotReloading } from 'tgui-dev-server/link/client'; -import { backendUpdate } from './backend'; -import { tridentVersion } from './byond'; -import { setupDrag } from './drag'; -import { createLogger } from './logging'; -import { getRoute } from './routes'; -import { createStore } from './store'; - -const logger = createLogger(); -const store = createStore(); -const reactRoot = document.getElementById('react-root'); - -let initialRender = true; -let handedOverToOldTgui = false; - -const renderLayout = () => { - // Short-circuit the renderer - if (handedOverToOldTgui) { - return; - } - // Mark the beginning of the render - let startedAt; - if (process.env.NODE_ENV !== 'production') { - startedAt = Date.now(); - } - try { - const state = store.getState(); - // Initial render setup - if (initialRender) { - logger.log('initial render', state); - - // ----- Old TGUI chain-loader: begin ----- - const route = getRoute(state); - // Route was not found, load old TGUI - if (!route) { - logger.info('loading old tgui'); - // Short-circuit the renderer - handedOverToOldTgui = true; - // Unsubscribe from updates - window.update = window.initialize = () => {}; - // IE8: Use a redirection method - if (tridentVersion <= 4) { - setTimeout(() => { - location.href = 'tgui-fallback.html?ref=' + window.__ref__; - }, 10); - return; - } - // Inject current state into the data holder - const holder = document.getElementById('data'); - holder.textContent = JSON.stringify(state); - // Load old TGUI by injecting new scripts - loadCSS('v4shim.css'); - loadCSS('tgui.css'); - const head = document.getElementsByTagName('head')[0]; - const script = document.createElement('script'); - script.type = 'text/javascript'; - script.src = 'tgui.js'; - head.appendChild(script); - // Bail - return; - } - // ----- Old TGUI chain-loader: end ----- - - // Setup dragging - setupDrag(state); - } - // Start rendering - const { Layout } = require('./layout'); - const element = ; - render(element, reactRoot); - } - catch (err) { - logger.error('rendering error', err); - } - // Report rendering time - if (process.env.NODE_ENV !== 'production') { - const finishedAt = Date.now(); - const diff = finishedAt - startedAt; - const diffFrames = (diff / 16.6667).toFixed(2); - logger.debug(`rendered in ${diff}ms (${diffFrames} frames)`); - if (initialRender) { - const diff = finishedAt - window.__inception__; - const diffFrames = (diff / 16.6667).toFixed(2); - logger.log(`fully loaded in ${diff}ms (${diffFrames} frames)`); - } - } - if (initialRender) { - initialRender = false; - } -}; - -// Parse JSON and report all abnormal JSON strings coming from BYOND -const parseStateJson = json => { - let reviver = (key, value) => { - if (typeof value === 'object' && value !== null) { - if (value.__number__) { - return parseFloat(value.__number__); - } - } - return value; - }; - // IE8: No reviver for you! - // See: https://stackoverflow.com/questions/1288962 - if (tridentVersion <= 4) { - reviver = undefined; - } - try { - return JSON.parse(json, reviver); - } - catch (err) { - logger.log(err); - logger.log('What we got:', json); - const msg = err && err.message; - throw new Error('JSON parsing error: ' + msg); - } -}; - -const setupApp = () => { - // Subscribe for redux state updates - store.subscribe(() => { - renderLayout(); - }); - - // Subscribe for bankend updates - window.update = window.initialize = stateJson => { - const state = parseStateJson(stateJson); - // Backend update dispatches a store action - store.dispatch(backendUpdate(state)); - }; - - // Enable hot module reloading - if (module.hot) { - setupHotReloading(); - module.hot.accept(['./layout', './routes'], () => { - renderLayout(); - }); - } - - // Process the early update queue - while (true) { - let stateJson = window.__updateQueue__.shift(); - if (!stateJson) { - break; - } - window.update(stateJson); - } - - // Dynamically load font-awesome from browser's cache - loadCSS('font-awesome.css'); -}; - -// IE8: Wait for DOM to properly load -if (tridentVersion <= 4 && document.readyState === 'loading') { - document.addEventListener('DOMContentLoaded', setupApp); -} -else { - setupApp(); -} diff --git a/tgui-next/packages/tgui/interfaces/Achievements.js b/tgui-next/packages/tgui/interfaces/Achievements.js deleted file mode 100644 index 6e2ad7a599..0000000000 --- a/tgui-next/packages/tgui/interfaces/Achievements.js +++ /dev/null @@ -1,134 +0,0 @@ -import { useBackend } from '../backend'; -import { Box, Icon, Table, Tabs } from '../components'; - -export const Achievement = props => { - const { - name, - desc, - icon_class, - value, - } = props; - return ( - - - - - -

{name}

- {desc} - - - - ); -}; - -export const Score = props => { - const { - name, - desc, - icon_class, - value, - } = props; - return ( - - - - - -

{name}

- {desc} - 0 ? 'good' : 'bad'} - content={value > 0 ? `Earned ${value} times` : 'Locked'} /> - - - ); -}; - -export const Achievements = props => { - const { data } = useBackend(props); - return ( - - {data.categories.map(category => ( - - - {data.achievements - .filter(x => x.category === category) - .map(achievement => { - if (achievement.score) { - return ( - - ); - } - return ( - - ); - })} - - - ))} - - - {data.highscore.map(highscore => ( - - - - - # - - - Key - - - Score - - - {Object.keys(highscore.scores).map((key, index) => ( - - - {index+1} - - - {index === 0 && ( - - )} - {key} - {index === 0 && ( - - )} - - - {highscore.scores[key]} - - - ))} -
-
- ))} -
-
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/AirlockElectronics.js b/tgui-next/packages/tgui/interfaces/AirlockElectronics.js deleted file mode 100644 index 680849e649..0000000000 --- a/tgui-next/packages/tgui/interfaces/AirlockElectronics.js +++ /dev/null @@ -1,138 +0,0 @@ -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { Box, Button, LabeledList, Section, Tabs } from '../components'; - -export const AirlockElectronics = props => { - const { act, data } = useBackend(props); - const regions = data.regions || []; - - const diffMap = { - 0: { - icon: 'times-circle', - }, - 1: { - icon: 'stop-circle', - }, - 2: { - icon: 'check-circle', - }, - }; - - const checkAccessIcon = accesses => { - let oneAccess = false; - let oneInaccess = false; - - accesses.forEach(element => { - if (element.req) { - oneAccess = true; - } - else { - oneInaccess = true; - } - }); - - if (!oneAccess && oneInaccess) { - return 0; - } - else if (oneAccess && oneInaccess) { - return 1; - } - else { - return 2; - } - }; - - return ( - -
- - -
-
- - - {regions.map(region => { - const { name } = region; - const accesses = region.accesses || []; - const icon = diffMap[checkAccessIcon(accesses)].icon; - return ( - - {() => accesses.map(access => ( - -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/Apc.js b/tgui-next/packages/tgui/interfaces/Apc.js deleted file mode 100644 index c899ea8ae7..0000000000 --- a/tgui-next/packages/tgui/interfaces/Apc.js +++ /dev/null @@ -1,229 +0,0 @@ -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { Box, Button, LabeledList, NoticeBox, ProgressBar, Section } from '../components'; -import { InterfaceLockNoticeBox } from './common/InterfaceLockNoticeBox'; - -export const Apc = props => { - const { act, data } = useBackend(props); - const locked = data.locked && !data.siliconUser; - const powerStatusMap = { - 2: { - color: 'good', - externalPowerText: 'External Power', - chargingText: 'Fully Charged', - }, - 1: { - color: 'average', - externalPowerText: 'Low External Power', - chargingText: 'Charging', - }, - 0: { - color: 'bad', - externalPowerText: 'No External Power', - chargingText: 'Not Charging', - }, - }; - const malfMap = { - 1: { - icon: 'terminal', - content: 'Override Programming', - action: 'hack', - }, - 2: { - icon: 'caret-square-down', - content: 'Shunt Core Process', - action: 'occupy', - }, - 3: { - icon: 'caret-square-left', - content: 'Return to Main Core', - action: 'deoccupy', - }, - 4: { - icon: 'caret-square-down', - content: 'Shunt Core Process', - action: 'occupy', - }, - }; - const externalPowerStatus = powerStatusMap[data.externalPower] - || powerStatusMap[0]; - const chargingStatus = powerStatusMap[data.chargingStatus] - || powerStatusMap[0]; - const channelArray = data.powerChannels || []; - const malfStatus = malfMap[data.malfStatus] || malfMap[0]; - const adjustedCellChange = data.powerCellStatus / 100; - - if (data.failTime > 0) { - return ( - -

SYSTEM FAILURE

- - I/O regulators malfunction detected! - Waiting for system reboot... - -
- Automatic reboot in {data.failTime} seconds... - - - ))} - - )} - {!condi && ( - this.setState({ - pillAmount: value, - })} - onCreate={() => act(ref, 'create', { - type: 'pill', - amount: pillAmount, - volume: 'auto', - })} /> - )} - {!condi && ( - this.setState({ - patchAmount: value, - })} - onCreate={() => act(ref, 'create', { - type: 'patch', - amount: patchAmount, - volume: 'auto', - })} /> - )} - {!condi && ( - this.setState({ - bottleAmount: value, - })} - onCreate={() => act(ref, 'create', { - type: 'bottle', - amount: bottleAmount, - volume: 'auto', - })} /> - )} - {!condi && ( - this.setState({ - vialAmount: value, - })} - onCreate={() => act(ref, 'create', { - type: 'hypoVial', - amount: vialAmount, - volume: 'auto', - })} /> - )} - {!condi && ( - this.setState({ - dartAmount: value, - })} - onCreate={() => act(ref, 'create', { - type: 'smartDart', - amount: dartAmount, - volume: 'auto', - })} /> - )} - {!!condi && ( - this.setState({ - packAmount: value, - })} - onCreate={() => act(ref, 'create', { - type: 'condimentPack', - amount: packAmount, - volume: 'auto', - })} /> - )} - {!!condi && ( - this.setState({ - bottleAmount: value, - })} - onCreate={() => act(ref, 'create', { - type: 'condimentBottle', - amount: bottleAmount, - volume: 'auto', - })} /> - )} - - ); - } -} - -const AnalysisResults = props => { - const { state, fermianalyze } = props; - const { ref } = state.config; - const { analyzeVars } = state.data; - return ( -
act(ref, 'goScreen', { - screen: 'home', - })} /> - )}> - {!fermianalyze && ( - - - {analyzeVars.name} - - - {analyzeVars.state} - - - - {analyzeVars.color} - - - {analyzeVars.description} - - - {analyzeVars.metaRate} u/minute - - - {analyzeVars.overD} - - - {analyzeVars.addicD} - - - )} - {!!fermianalyze && ( - - - {analyzeVars.name} - - - {analyzeVars.state} - - - - {analyzeVars.color} - - - {analyzeVars.description} - - - {analyzeVars.metaRate} u/minute - - - {analyzeVars.overD} - - - {analyzeVars.addicD} - - - {analyzeVars.purityF} - - - {analyzeVars.inverseRatioF} - - - {analyzeVars.purityE} - - - {analyzeVars.minTemp} - - - {analyzeVars.maxTemp} - - - {analyzeVars.eTemp} - - - {analyzeVars.pHpeak} - - - )} -
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/Cryo.js b/tgui-next/packages/tgui/interfaces/Cryo.js deleted file mode 100644 index 289c6765a8..0000000000 --- a/tgui-next/packages/tgui/interfaces/Cryo.js +++ /dev/null @@ -1,108 +0,0 @@ -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { AnimatedNumber, Button, LabeledList, ProgressBar, Section } from '../components'; -import { BeakerContents } from './common/BeakerContents'; - -export const Cryo = props => { - const { act, data } = useBackend(props); - const damageTypes = [ - { - label: "Brute", - type: "bruteLoss", - }, - { - label: "Respiratory", - type: "oxyLoss", - }, - { - label: "Toxin", - type: "toxLoss", - }, - { - label: "Burn", - type: "fireLoss", - }, - ]; - return ( - -
- - - {!!data.hasOccupant && ( - - - - K - - - 0) ? "good" : "average"}> - - - - {(damageTypes.map(damageType => ( - - - - - - )))} - - )} - -
-
- - act('power')} - color={data.isOperating && ("green")}> - {data.isOperating ? "On" : "Off"} - - )} /> - - K - - -
-
act('ejectbeaker')} - content="Eject" /> - )}> - -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/DecalPainter.js b/tgui-next/packages/tgui/interfaces/DecalPainter.js deleted file mode 100644 index 7709d41f49..0000000000 --- a/tgui-next/packages/tgui/interfaces/DecalPainter.js +++ /dev/null @@ -1,63 +0,0 @@ -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { AnimatedNumber, Box, Button, LabeledList, ProgressBar, Section, Tabs } from '../components'; - -export const DecalPainter = props => { - const { act, data } = useBackend(props); - const decal_list = data.decal_list || []; - const color_list = data.color_list || []; - const dir_list = data.dir_list || []; - return ( - -
- {decal_list.map(decal => { - return ( -
-
- {color_list.map(color => { - return ( -
-
- {dir_list.map(dir => { - return ( -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/DnaVault.js b/tgui-next/packages/tgui/interfaces/DnaVault.js deleted file mode 100644 index 76fc5da4a3..0000000000 --- a/tgui-next/packages/tgui/interfaces/DnaVault.js +++ /dev/null @@ -1,74 +0,0 @@ -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { Box, Button, Grid, LabeledList, ProgressBar, Section } from '../components'; - -export const DnaVault = props => { - const { act, data } = useBackend(props); - const { - completed, - used, - choiceA, - choiceB, - dna, - dna_max, - plants, - plants_max, - animals, - animals_max, - } = data; - return ( - -
- - - - - - - - - - - -
- {!!(completed && !used) && ( -
- - Applicable Gene Therapy Treatments - - - -
- )} -
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/GravityGenerator.js b/tgui-next/packages/tgui/interfaces/GravityGenerator.js deleted file mode 100644 index 9fbf263a38..0000000000 --- a/tgui-next/packages/tgui/interfaces/GravityGenerator.js +++ /dev/null @@ -1,77 +0,0 @@ -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { Box, Button, LabeledList, NoticeBox, ProgressBar, Section } from '../components'; - -export const GravityGenerator = props => { - const { act, data } = useBackend(props); - const { - breaker, - charge_count, - charging_state, - on, - operational, - } = data; - return ( - -
- {!operational && ( - - No data available - - ) || ( - - -
- {operational && charging_state !== 0 && ( - - WARNING - Radiation detected - - )} - {operational && charging_state === 0 && ( - - No radiation detected - - )} -
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/GulagItemReclaimer.js b/tgui-next/packages/tgui/interfaces/GulagItemReclaimer.js deleted file mode 100644 index a113b15a4b..0000000000 --- a/tgui-next/packages/tgui/interfaces/GulagItemReclaimer.js +++ /dev/null @@ -1,28 +0,0 @@ -import { useBackend } from '../backend'; -import { Button, Section, Table } from '../components'; - -export const GulagItemReclaimer = props => { - const { act, data } = useBackend(props); - const mobs = data.mobs || []; - return ( -
- - {mobs.map(mob => ( - - - {mob.name} - - -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/KitchenSink.js b/tgui-next/packages/tgui/interfaces/KitchenSink.js deleted file mode 100644 index 3fc4bf64e0..0000000000 --- a/tgui-next/packages/tgui/interfaces/KitchenSink.js +++ /dev/null @@ -1,347 +0,0 @@ -import { Component } from 'inferno'; -import { BlockQuote, Box, Button, Collapsible, Input, LabeledList, NumberInput, ProgressBar, Section, Tabs, Tooltip } from '../components'; - -const COLORS_ARBITRARY = [ - 'red', - 'orange', - 'yellow', - 'olive', - 'green', - 'teal', - 'blue', - 'violet', - 'purple', - 'pink', - 'brown', - 'grey', -]; - -const COLORS_STATES = [ - 'good', - 'average', - 'bad', - 'black', - 'white', -]; - -const PAGES = [ - { - title: 'Button', - component: () => KitchenSinkButton, - }, - { - title: 'Box', - component: () => KitchenSinkBox, - }, - { - title: 'ProgressBar', - component: () => KitchenSinkProgressBar, - }, - { - title: 'Tabs', - component: () => KitchenSinkTabs, - }, - { - title: 'Tooltip', - component: () => KitchenSinkTooltip, - }, - { - title: 'Input', - component: () => KitchenSinkInput, - }, - { - title: 'Collapsible', - component: () => KitchenSinkCollapsible, - }, - { - title: 'BlockQuote', - component: () => KitchenSinkBlockQuote, - }, -]; - -export const KitchenSink = props => { - return ( -
- - {PAGES.map(page => ( - - {() => { - const Component = page.component(); - return ( - - ); - }} - - ))} - -
- ); -}; - -const KitchenSinkButton = props => { - return ( - - - - - - )} -
- - {programs.map(program => ( - - -
-
- - ); -}; diff --git a/tgui-next/packages/tgui/interfaces/NtosSupermatterMonitor.js b/tgui-next/packages/tgui/interfaces/NtosSupermatterMonitor.js deleted file mode 100644 index 0316fc4ac7..0000000000 --- a/tgui-next/packages/tgui/interfaces/NtosSupermatterMonitor.js +++ /dev/null @@ -1,161 +0,0 @@ -import { sortBy } from 'common/collections'; -import { flow } from 'common/fp'; -import { toFixed } from 'common/math'; -import { useBackend } from '../backend'; -import { Box, Button, Flex, LabeledList, ProgressBar, Section, Table } from '../components'; -import { getGasColor, getGasLabel } from '../constants'; - -const logScale = value => Math.log2(16 + Math.max(0, value)) - 4; - -export const NtosSupermatterMonitor = props => { - const { state } = props; - const { act, data } = useBackend(props); - const { - active, - SM_integrity, - SM_power, - SM_ambienttemp, - SM_ambientpressure, - } = data; - if (!active) { - return ( - - ); - } - const gases = flow([ - gases => gases.filter(gas => gas.amount >= 0.01), - sortBy(gas => -gas.amount), - ])(data.gases || []); - const gasMaxAmount = Math.max(1, ...gases.map(gas => gas.amount)); - return ( - - -
- - - - - - - {toFixed(SM_power) + ' MeV/cm3'} - - - - - {toFixed(SM_ambienttemp) + ' K'} - - - - - {toFixed(SM_ambientpressure) + ' kPa'} - - - -
-
- -
act('PRG_clear')} /> - )}> - - - {gases.map(gas => ( - - - {toFixed(gas.amount, 2) + '%'} - - - ))} - - -
-
-
- ); -}; - -const SupermatterList = props => { - const { act, data } = useBackend(props); - const { supermatters = [] } = data; - return ( -
act('PRG_refresh')} /> - )}> - - {supermatters.map(sm => ( - - - {sm.uid + '. ' + sm.area_name} - - - Integrity: - - - - - -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/NtosWrapper.js b/tgui-next/packages/tgui/interfaces/NtosWrapper.js deleted file mode 100644 index b342883e79..0000000000 --- a/tgui-next/packages/tgui/interfaces/NtosWrapper.js +++ /dev/null @@ -1,109 +0,0 @@ -import { useBackend } from '../backend'; -import { Box, Button } from '../components'; -import { refocusLayout } from '../refocus'; - -export const NtosWrapper = props => { - const { children } = props; - const { act, data } = useBackend(props); - const { - PC_batteryicon, - PC_showbatteryicon, - PC_batterypercent, - PC_ntneticon, - PC_apclinkicon, - PC_stationtime, - PC_programheaders = [], - PC_showexitprogram, - } = data; - return ( -
-
{ - refocusLayout(); - }}> -
- - {PC_stationtime} - - - NtOS - -
-
- {PC_programheaders.map(header => ( - - - - ))} - - {PC_ntneticon && ( - - )} - - {!!PC_showbatteryicon && PC_batteryicon && ( - - {PC_batteryicon && ( - - )} - {PC_batterypercent && ( - PC_batterypercent - )} - - )} - {PC_apclinkicon && ( - - - - )} - {!!PC_showexitprogram && ( -
-
-
- {children} -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/OperatingComputer.js b/tgui-next/packages/tgui/interfaces/OperatingComputer.js deleted file mode 100644 index 59cdfadc68..0000000000 --- a/tgui-next/packages/tgui/interfaces/OperatingComputer.js +++ /dev/null @@ -1,145 +0,0 @@ -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { AnimatedNumber, Button, LabeledList, NoticeBox, ProgressBar, Section, Tabs } from '../components'; - -export const OperatingComputer = props => { - const { act, data } = useBackend(props); - const damageTypes = [ - { - label: 'Brute', - type: 'bruteLoss', - }, - { - label: 'Burn', - type: 'fireLoss', - }, - { - label: 'Toxin', - type: 'toxLoss', - }, - { - label: 'Respiratory', - type: 'oxyLoss', - }, - ]; - const { - table, - surgeries = [], - procedures = [], - patient = {}, - } = data; - return ( - - - {!table && ( - - No Table Detected - - )} -
-
- {patient ? ( - - - {patient.stat} - - - {patient.blood_type} - - - = 0 ? 'good' : 'average'} - content={( - - )} /> - - {damageTypes.map(type => ( - - - )} /> - - ))} - - ) : ( - 'No Patient Detected' - )} -
-
- {procedures.length ? ( - procedures.map(procedure => ( -
- - - {procedure.next_step} - {procedure.chems_needed && ( - - - Required Chemicals: - -
- {procedure.chems_needed} -
- )} -
- {!!data.alternative_step && ( - - {procedure.alternative_step} - {procedure.alt_chems_needed && ( - - - Required Chemicals: - -
- {procedure.alt_chems_needed} -
- )} -
- )} -
-
- )) - ) : ( - 'No Active Procedures' - )} -
-
-
- -
-
-
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/PersonalCrafting.js b/tgui-next/packages/tgui/interfaces/PersonalCrafting.js deleted file mode 100644 index 11e4ddf1cb..0000000000 --- a/tgui-next/packages/tgui/interfaces/PersonalCrafting.js +++ /dev/null @@ -1,175 +0,0 @@ -import { map } from 'common/collections'; -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { Box, Button, Dimmer, Icon, LabeledList, Section, Tabs } from '../components'; - -const CraftingList = props => { - const { - craftables = [], - } = props; - const { act, data } = useBackend(props); - const { - craftability = {}, - display_compact, - display_craftable_only, - } = data; - return craftables.map(craftable => { - if (display_craftable_only && !craftability[craftable.ref]) { - return null; - } - // Compact display - if (display_compact) { - return ( - act('make', { - recipe: craftable.ref, - })} /> - )}> - {craftable.req_text} - - ); - } - // Full display - return ( -
act('make', { - recipe: craftable.ref, - })} /> - )}> - - {!!craftable.req_text && ( - - {craftable.req_text} - - )} - {!!craftable.catalyst_text && ( - - {craftable.catalyst_text} - - )} - {!!craftable.tool_text && ( - - {craftable.tool_text} - - )} - -
- ); - }); -}; - -export const PersonalCrafting = props => { - const { state } = props; - const { act, data } = useBackend(props); - const { - busy, - display_craftable_only, - display_compact, - } = data; - - const craftingRecipes = map((subcategory, category) => { - const hasSubcats = ('has_subcats' in subcategory); - const firstSubcatName = Object.keys(subcategory) - .find(name => name !== 'has_subcats'); - return { - category, - subcategory, - hasSubcats, - firstSubcatName, - }; - })(data.crafting_recipes || {}); - - // Shows an overlay when crafting an item - const busyBox = !!busy && ( - - - - {' Crafting...'} - - - ); - - return ( - - {busyBox} -
-
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/PortableAtmos.js b/tgui-next/packages/tgui/interfaces/PortableAtmos.js deleted file mode 100644 index 77efabc96c..0000000000 --- a/tgui-next/packages/tgui/interfaces/PortableAtmos.js +++ /dev/null @@ -1,155 +0,0 @@ -import { useBackend } from '../backend'; -import { Fragment } from 'inferno'; -import { Box, Section, LabeledList, Button, AnimatedNumber, NumberInput } from '../components'; -import { getGasLabel } from '../constants'; - -export const PortableBasicInfo = props => { - const { act, data } = useBackend(props); - - const { - connected, - holding, - on, - pressure, - } = data; - - return ( - -
act('power')} /> - )}> - - - - {' kPa'} - - - {connected ? 'Connected' : 'Not Connected'} - - -
-
act('eject')} /> - )}> - {holding ? ( - - - {holding.name} - - - - {' kPa'} - - - ) : ( - - No holding tank - - )} -
-
- ); -}; - -export const PortablePump = props => { - const { act, data } = useBackend(props); - - const { - direction, - holding, - target_pressure, - default_pressure, - min_pressure, - max_pressure, - } = data; - - return ( - - -
act('direction')} /> - )}> - - - act('pressure', { - pressure: value, - })} /> - - -
-
- ); -}; - -export const PortableScrubber = props => { - const { act, data } = useBackend(props); - - const filter_types = data.filter_types || []; - - return ( - - -
- {filter_types.map(filter => ( -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/PowerMonitor.js b/tgui-next/packages/tgui/interfaces/PowerMonitor.js deleted file mode 100644 index 8998344be5..0000000000 --- a/tgui-next/packages/tgui/interfaces/PowerMonitor.js +++ /dev/null @@ -1,222 +0,0 @@ -import { map, sortBy } from 'common/collections'; -import { flow } from 'common/fp'; -import { toFixed } from 'common/math'; -import { pureComponentHooks } from 'common/react'; -import { Component, Fragment } from 'inferno'; -import { Box, Button, Chart, ColorBox, Flex, Icon, LabeledList, ProgressBar, Section, Table } from '../components'; - -const PEAK_DRAW = 500000; - -const powerRank = str => { - const unit = String(str.split(' ')[1]).toLowerCase(); - return ['w', 'kw', 'mw', 'gw'].indexOf(unit); -}; - -export class PowerMonitor extends Component { - constructor() { - super(); - this.state = { - sortByField: null, - }; - } - - render() { - const { state } = this.props; - const { data } = state; - const { history } = data; - const { sortByField } = this.state; - const supply = history.supply[history.supply.length - 1] || 0; - const demand = history.demand[history.demand.length - 1] || 0; - const supplyData = history.supply.map((value, i) => [i, value]); - const demandData = history.demand.map((value, i) => [i, value]); - const maxValue = Math.max( - PEAK_DRAW, - ...history.supply, - ...history.demand); - // Process area data - const areas = flow([ - map((area, i) => ({ - ...area, - // Generate a unique id - id: area.name + i, - })), - sortByField === 'name' && sortBy(area => area.name), - sortByField === 'charge' && sortBy(area => -area.charge), - sortByField === 'draw' && sortBy( - area => -powerRank(area.load), - area => -parseFloat(area.load)), - ])(data.areas); - return ( - - - -
- - - - - - - - -
-
- -
- - -
-
-
-
- - - Sort by: - - this.setState({ - sortByField: sortByField !== 'name' && 'name', - })} /> - this.setState({ - sortByField: sortByField !== 'charge' && 'charge', - })} /> - this.setState({ - sortByField: sortByField !== 'draw' && 'draw', - })} /> - - - - - Area - - - Charge - - - Draw - - - Eqp - - - Lgt - - - Env - - - {areas.map((area, i) => ( - - - - - - - - - ))} -
- {area.name} - - - - {area.load} - - - - - - -
-
-
- ); - } -} - -const AreaCharge = props => { - const { charging, charge } = props; - return ( - - 50 - ? 'battery-half' - : 'battery-quarter' - ) - || charging === 1 && 'bolt' - || charging === 2 && 'battery-full' - )} - color={( - charging === 0 && ( - charge > 50 - ? 'yellow' - : 'red' - ) - || charging === 1 && 'yellow' - || charging === 2 && 'green' - )} /> - - {toFixed(charge) + '%'} - - - ); -}; - -AreaCharge.defaultHooks = pureComponentHooks; - -const AreaStatusColorBox = props => { - const { status } = props; - const power = Boolean(status & 2); - const mode = Boolean(status & 1); - const tooltipText = (power ? 'On' : 'Off') - + ` [${mode ? 'auto' : 'manual'}]`; - return ( - - ); -}; - -AreaStatusColorBox.defaultHooks = pureComponentHooks; diff --git a/tgui-next/packages/tgui/interfaces/RapidPipeDispenser.js b/tgui-next/packages/tgui/interfaces/RapidPipeDispenser.js deleted file mode 100644 index 17e4fd9d15..0000000000 --- a/tgui-next/packages/tgui/interfaces/RapidPipeDispenser.js +++ /dev/null @@ -1,188 +0,0 @@ -import { classes } from 'common/react'; -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { Box, Button, ColorBox, Flex, LabeledList, Section, Tabs } from '../components'; - -const ROOT_CATEGORIES = [ - 'Atmospherics', - 'Disposals', - 'Transit Tubes', -]; - -const ICON_BY_CATEGORY_NAME = { - 'Atmospherics': 'wrench', - 'Disposals': 'trash-alt', - 'Transit Tubes': 'bus', - 'Pipes': 'grip-lines', - 'Disposal Pipes': 'grip-lines', - 'Devices': 'microchip', - 'Heat Exchange': 'thermometer-half', - 'Station Equipment': 'microchip', -}; - -const PAINT_COLORS = { - grey: '#bbbbbb', - amethyst: '#a365ff', - blue: '#4466ff', - brown: '#b26438', - cyan: '#48eae8', - dark: '#808080', - green: '#1edd00', - orange: '#ffa030', - purple: '#b535ea', - red: '#ff3333', - violet: '#6e00f6', - yellow: '#ffce26', -}; - -const TOOLS = [ - { - name: 'Dispense', - bitmask: 1, - }, - { - name: 'Connect', - bitmask: 2, - }, - { - name: 'Destroy', - bitmask: 4, - }, - { - name: 'Paint', - bitmask: 8, - }, -]; - -export const RapidPipeDispenser = props => { - const { act, data } = useBackend(props); - const { - category: rootCategoryIndex, - categories = [], - selected_color, - piping_layer, - mode, - } = data; - const previews = data.preview_rows.flatMap(row => row.previews); - return ( - -
- - - {ROOT_CATEGORIES.map((categoryName, i) => ( -
- - -
- {rootCategoryIndex === 0 && ( - - {[1, 2, 3].map(layer => ( - act('piping_layer', { - piping_layer: layer, - })} /> - ))} - - )} - - {previews.map(preview => ( - - ))} - -
-
- -
- - {categories.map(category => ( - - {() => category.recipes.map(recipe => ( - act('pipe_type', { - pipe_type: recipe.pipe_index, - category: category.cat_name, - })} /> - ))} - - ))} - -
-
-
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/Sleeper.js b/tgui-next/packages/tgui/interfaces/Sleeper.js deleted file mode 100644 index dabf0f355d..0000000000 --- a/tgui-next/packages/tgui/interfaces/Sleeper.js +++ /dev/null @@ -1,181 +0,0 @@ -import { useBackend } from '../backend'; -import { Box, Section, LabeledList, Button, ProgressBar, Flex, AnimatedNumber } from '../components'; -import { Fragment } from 'inferno'; - -export const Sleeper = props => { - const { act, data } = useBackend(props); - - const { - occupied, - open, - occupant = [], - } = data; - - const preSortChems = data.chems || []; - const chems = preSortChems.sort((a, b) => { - const descA = a.name.toLowerCase(); - const descB = b.name.toLowerCase(); - if (descA < descB) { - return -1; - } - if (descA > descB) { - return 1; - } - return 0; - }); - const preSortSynth = data.synthchems || []; - const synthchems = preSortSynth.sort((a, b) => { - const descA = a.name.toLowerCase(); - const descB = b.name.toLowerCase(); - if (descA < descB) { - return -1; - } - if (descA > descB) { - return 1; - } - return 0; - }); - - const damageTypes = [ - { - label: 'Brute', - type: 'bruteLoss', - }, - { - label: 'Burn', - type: 'fireLoss', - }, - { - label: 'Toxin', - type: 'toxLoss', - }, - { - label: 'Oxygen', - type: 'oxyLoss', - }, - ]; - - return ( - -
- {occupant.stat} - - )}> - {!!occupied && ( - - - - - {damageTypes.map(type => ( - - - - ))} - - - - - {data.blood_status} - - - {occupant.cloneLoss ? 'Damaged' : 'Healthy'} - - - {occupant.brainLoss ? 'Abnormal' : 'Healthy'} - - - - )} -
-
- - {data.chemical_list.map(specificChem => ( - - {specificChem.volume} units of {specificChem.name} - - ), - )} - -
-
act('door')} /> - )}> - {chems.map(chem => ( -
-
- {synthchems.map(chem => ( -
-
- {chems.map(chem => ( -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/Smes.js b/tgui-next/packages/tgui/interfaces/Smes.js deleted file mode 100644 index 7479af5894..0000000000 --- a/tgui-next/packages/tgui/interfaces/Smes.js +++ /dev/null @@ -1,176 +0,0 @@ -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { Box, Button, NumberInput, LabeledList, ProgressBar, Section } from '../components'; - -export const Smes = props => { - const { act, data } = useBackend(props); - - let inputState; - if (data.capacityPercent >= 100) { - inputState = 'good'; - } - else if (data.inputting) { - inputState = 'average'; - } - else { - inputState = 'bad'; - } - let outputState; - if (data.outputting) { - outputState = 'good'; - } - else if (data.charge > 0) { - outputState = 'average'; - } - else { - outputState = 'bad'; - } - - return ( - -
- -
-
- - act('tryinput')}> - {data.inputAttempt ? 'Auto' : 'Off'} - - }> - - {data.capacityPercent >= 100 - ? 'Fully Charged' - : data.inputting - ? 'Charging' - : 'Not Charging'} - - - - - - -
-
- - act('tryoutput')}> - {data.outputAttempt ? 'On' : 'Off'} - - }> - - {data.outputting - ? 'Sending' - : data.charge > 0 - ? 'Not Sending' - : 'No Charge'} - - - - - - -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/SmokeMachine.js b/tgui-next/packages/tgui/interfaces/SmokeMachine.js deleted file mode 100644 index 16ba078910..0000000000 --- a/tgui-next/packages/tgui/interfaces/SmokeMachine.js +++ /dev/null @@ -1,71 +0,0 @@ -import { useBackend } from '../backend'; -import { Fragment } from 'inferno'; -import { AnimatedNumber, Box, Button, LabeledList, ProgressBar, NoticeBox, Section } from '../components'; - -export const SmokeMachine = props => { - const { act, data } = useBackend(props); - const { - TankContents, - isTankLoaded, - TankCurrentVolume, - TankMaxVolume, - active, - setting, - screen, - maxSetting = [], - } = data; - return ( - -
act('power')} /> - )}> - - - {' / ' + TankMaxVolume} - - - - - { [1, 2, 3, 4, 5].map(amount => ( -
-
act('purge')} /> - )}> - {TankContents.map(chemical => ( - - - {' '} - units of {chemical.name} - - ))} -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/SolarControl.js b/tgui-next/packages/tgui/interfaces/SolarControl.js deleted file mode 100644 index 1cfb4800c0..0000000000 --- a/tgui-next/packages/tgui/interfaces/SolarControl.js +++ /dev/null @@ -1,118 +0,0 @@ -import { toFixed } from 'common/math'; -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { Box, Button, Grid, LabeledList, NumberInput, ProgressBar, Section } from '../components'; - -export const SolarControl = props => { - const { act, data } = useBackend(props); - const { - generated, - generated_ratio, - azimuth_current, - azimuth_rate, - max_rotation_rate, - tracking_state, - connected_panels, - connected_tracker, - } = data; - return ( - -
act('refresh')} /> - )}> - - - - - {connected_tracker ? 'OK' : 'N/A'} - - 0 ? 'good' : 'bad'}> - {connected_panels} - - - - - - - - - - - -
-
- - -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/SpaceHeater.js b/tgui-next/packages/tgui/interfaces/SpaceHeater.js deleted file mode 100644 index c44f3e9c47..0000000000 --- a/tgui-next/packages/tgui/interfaces/SpaceHeater.js +++ /dev/null @@ -1,104 +0,0 @@ -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { Box, Button, LabeledList, NumberInput, ProgressBar, Section } from '../components'; - -export const SpaceHeater = props => { - const { act, data } = useBackend(props); - return ( - -
-
-
- - - 50 - ? 'bad' - : Math.abs(data.targetTemp - data.currentTemp) > 20 - ? 'average' - : 'good'}> - {data.currentTemp}°C - - - - {data.open && ( - act('target', { - target: value, - })} /> - ) || ( - data.targetTemp + '°C' - )} - - - {!data.open && 'Auto' || ( - -
-
- ); -}; diff --git a/tgui-next/packages/tgui/interfaces/SyndContractor.js b/tgui-next/packages/tgui/interfaces/SyndContractor.js deleted file mode 100644 index 23f152a831..0000000000 --- a/tgui-next/packages/tgui/interfaces/SyndContractor.js +++ /dev/null @@ -1,382 +0,0 @@ -import { Box, Button, Section, Dimmer, Table, Icon, NoticeBox, Tabs, Grid, LabeledList } from "../components"; -import { useBackend } from "../backend"; -import { Fragment, Component } from "inferno"; - -export class FakeTerminal extends Component { - constructor(props) { - super(props); - this.timer = null; - this.state = { - currentIndex: 0, - currentDisplay: [], - }; - } - - tick() { - const { props, state } = this; - if (state.currentIndex <= props.allMessages.length) { - this.setState(prevState => { - return ({ - currentIndex: prevState.currentIndex + 1, - }); - }); - const { currentDisplay } = state; - currentDisplay.push(props.allMessages[state.currentIndex]); - } else { - clearTimeout(this.timer); - setTimeout(props.onFinished, props.finishedTimeout); - } - } - - componentDidMount() { - const { - linesPerSecond = 2.5, - } = this.props; - this.timer = setInterval(() => this.tick(), 1000 / linesPerSecond); - } - - componentWillUnmount() { - clearTimeout(this.timer); - } - - render() { - return ( - - {this.state.currentDisplay.map(value => ( - - {value} -
-
- ))} -
- ); - } -} - -export const SyndContractor = props => { - const { data, act } = useBackend(props); - - const terminalMessages = [ - "Recording biometric data...", - "Analyzing embedded syndicate info...", - "STATUS CONFIRMED", - "Contacting syndicate database...", - "Awaiting response...", - "Awaiting response...", - "Awaiting response...", - "Awaiting response...", - "Awaiting response...", - "Awaiting response...", - "Response received, ack 4851234...", - "CONFIRM ACC " + (Math.round(Math.random() * 20000)), - "Setting up private accounts...", - "CONTRACTOR ACCOUNT CREATED", - "Searching for available contracts...", - "Searching for available contracts...", - "Searching for available contracts...", - "Searching for available contracts...", - "CONTRACTS FOUND", - "WELCOME, AGENT", - ]; - - const infoEntries = [ - "SyndTract v2.0", - "", - "We've identified potentional high-value targets that are", - "currently assigned to your mission area. They are believed", - "to hold valuable information which could be of immediate", - "importance to our organisation.", - "", - "Listed below are all of the contracts available to you. You", - "are to bring the specified target to the designated", - "drop-off, and contact us via this uplink. We will send", - "a specialised extraction unit to put the body into.", - "", - "We want targets alive - but we will sometimes pay slight", - "amounts if they're not, you just won't recieve the shown", - "bonus. You can redeem your payment through this uplink in", - "the form of raw telecrystals, which can be put into your", - "regular Syndicate uplink to purchase whatever you may need.", - "We provide you with these crystals the moment you send the", - "target up to us, which can be collected at anytime through", - "this system.", - "", - "Targets extracted will be ransomed back to the station once", - "their use to us is fulfilled, with us providing you a small", - "percentage cut. You may want to be mindful of them", - "identifying you when they come back. We provide you with", - "a standard contractor loadout, which will help cover your", - "identity.", - ]; - - const errorPane = !!data.error && ( - - - - - - - - - - {data.error} - -
-
-
- ); - - if (!data.logged_in) { - return ( -
- -
- ); - } - - if (data.logged_in && data.first_load) { - return ( - - act('PRG_set_first_load_finished')} /> - - ); - } - - if (data.info_screen) { - return ( - - - - -