From fa32acd647f236e857bc7b2adcd5d784d76c5e42 Mon Sep 17 00:00:00 2001
From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com>
Date: Sat, 9 Dec 2023 16:39:55 +0300
Subject: [PATCH] Removes missing context from Skyrat UI files, and labels the
Skyrat UI files.(#1042)
* Removes the rest of context from skyrat uis
* Adds a comment labeling skyrat ui files
* Adds remaining labels to skyrat tsx files
Fixes some skyrat edits that were not skyrat edits
* Missed these two
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
---
.../tgui/interfaces/AmmoWorkbench.jsx | 25 +++----
.../tgui/interfaces/AntagInfoAssaultops.tsx | 5 +-
.../tgui/interfaces/AntagInfoClock.tsx | 6 +-
.../tgui/interfaces/AntagInfoOpfor.tsx | 1 +
.../tgui/interfaces/AntagInfoRules.tsx | 1 +
.../tgui/interfaces/ArmamentStation.jsx | 9 ++-
.../tgui/interfaces/BluespaceArtillery.tsx | 1 +
tgui/packages/tgui/interfaces/BorerChem.jsx | 5 +-
.../tgui/interfaces/BorerEvolution.tsx | 1 +
.../tgui/interfaces/CargoImportConsole.jsx | 9 ++-
tgui/packages/tgui/interfaces/ChemPress.jsx | 5 +-
.../tgui/interfaces/ClockworkResearch.tsx | 1 +
.../tgui/interfaces/ClockworkSlab.jsx | 24 +++---
.../tgui/interfaces/CommandReportConsole.jsx | 5 +-
.../tgui/interfaces/CrewConsoleSkyrat.jsx | 9 ++-
.../CrewConsoleSkyratBlueshield.jsx | 9 ++-
.../tgui/interfaces/CryopodConsole.jsx | 13 ++--
.../tgui/interfaces/DelamProcedure.tsx | 3 +-
tgui/packages/tgui/interfaces/EventPanel.jsx | 5 +-
.../packages/tgui/interfaces/ExaminePanel.jsx | 5 +-
.../packages/tgui/interfaces/GlassBlowing.tsx | 1 +
.../tgui/interfaces/IntensityCredits.tsx | 1 +
.../tgui/interfaces/InteractionMenu.tsx | 1 +
.../tgui/interfaces/LoadoutManager.jsx | 6 +-
.../tgui/interfaces/MicrofusionGunControl.jsx | 5 +-
.../tgui/interfaces/MilkingMachine.jsx | 25 ++++---
tgui/packages/tgui/interfaces/NifPanel.jsx | 31 ++++----
tgui/packages/tgui/interfaces/NifSoulPoem.jsx | 5 +-
.../tgui/interfaces/NightmareInfo.jsx | 75 -------------------
.../tgui/interfaces/NtosCrewManifest.jsx | 2 +-
.../tgui/interfaces/NtosNetDownloader.jsx | 1 +
.../tgui/interfaces/NtosNewsArchive.jsx | 5 +-
.../tgui/interfaces/NtosNifsoftCatalog.jsx | 10 +--
.../tgui/interfaces/OpposingForcePanel.jsx | 28 +++----
.../tgui/interfaces/ParticleAccelerator.jsx | 5 +-
.../PreferencesMenu/LanguagesMenu.tsx | 1 +
.../interfaces/PreferencesMenu/LimbsPage.tsx | 1 +
.../tgui/interfaces/RecordManifest.jsx | 7 +-
.../tgui/interfaces/ServerControlPanel.jsx | 5 +-
tgui/packages/tgui/interfaces/Signalvib.jsx | 5 +-
tgui/packages/tgui/interfaces/Soulcatcher.jsx | 5 +-
.../tgui/interfaces/SoulcatcherUser.jsx | 5 +-
.../packages/tgui/interfaces/StoryManager.tsx | 1 +
tgui/packages/tgui/interfaces/TimeClock.jsx | 5 +-
44 files changed, 160 insertions(+), 218 deletions(-)
delete mode 100644 tgui/packages/tgui/interfaces/NightmareInfo.jsx
diff --git a/tgui/packages/tgui/interfaces/AmmoWorkbench.jsx b/tgui/packages/tgui/interfaces/AmmoWorkbench.jsx
index dda3be054f4..d5e99883262 100644
--- a/tgui/packages/tgui/interfaces/AmmoWorkbench.jsx
+++ b/tgui/packages/tgui/interfaces/AmmoWorkbench.jsx
@@ -1,10 +1,11 @@
+// THIS IS A SKYRAT UI FILE
import { toTitleCase } from 'common/string';
import { useBackend, useSharedState, useLocalState } from '../backend';
import { Box, Button, NumberInput, NoticeBox, ProgressBar, Section, Flex, Stack, RoundGauge, Tabs, Table, Tooltip } from '../components';
import { Window } from '../layouts';
-export const AmmoWorkbench = (props, context) => {
- const [tab, setTab] = useSharedState(context, 'tab', 1);
+export const AmmoWorkbench = (props) => {
+ const [tab, setTab] = useSharedState('tab', 1);
return (
{
);
};
-export const AmmunitionsTab = (props, context) => {
- const { act, data } = useBackend(context);
+export const AmmunitionsTab = (props) => {
+ const { act, data } = useBackend();
const {
mag_loaded,
system_busy,
@@ -141,8 +142,8 @@ export const AmmunitionsTab = (props, context) => {
);
};
-export const MaterialsTab = (props, context) => {
- const { act, data } = useBackend(context);
+export const MaterialsTab = (props) => {
+ const { act, data } = useBackend();
const { materials = [] } = data;
return (
@@ -164,8 +165,8 @@ export const MaterialsTab = (props, context) => {
);
};
-export const DatadiskTab = (props, context) => {
- const { act, data } = useBackend(context);
+export const DatadiskTab = (props) => {
+ const { act, data } = useBackend();
const {
loaded_datadisks = [],
datadisk_loaded,
@@ -222,14 +223,10 @@ export const DatadiskTab = (props, context) => {
);
};
-const MaterialRow = (props, context) => {
+const MaterialRow = (props) => {
const { material, onRelease } = props;
- const [amount, setAmount] = useLocalState(
- context,
- 'amount' + material.name,
- 1
- );
+ const [amount, setAmount] = useLocalState('amount' + material.name, 1);
const amountAvailable = Math.floor(material.amount);
return (
diff --git a/tgui/packages/tgui/interfaces/AntagInfoAssaultops.tsx b/tgui/packages/tgui/interfaces/AntagInfoAssaultops.tsx
index ccc600e162d..b6f6afb4d34 100644
--- a/tgui/packages/tgui/interfaces/AntagInfoAssaultops.tsx
+++ b/tgui/packages/tgui/interfaces/AntagInfoAssaultops.tsx
@@ -1,10 +1,9 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend, useLocalState } from '../backend';
import { LabeledList, Stack, Button, Section, ProgressBar, Box, Tabs, Divider } from '../components';
import { BooleanLike } from 'common/react';
import { Window } from '../layouts';
-// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
-// SKYRAT EDIT END
type Objectives = {
count: number;
@@ -120,11 +119,9 @@ export const AntagInfoAssaultops = (props) => {
{tab === 1 && }
{tab === 2 && }
- {/* SKYRAT EDIT ADDITION START */}
- {/* SKYRAT EDIT ADDITION END */}
diff --git a/tgui/packages/tgui/interfaces/AntagInfoClock.tsx b/tgui/packages/tgui/interfaces/AntagInfoClock.tsx
index f527bf80251..78911f8462c 100644
--- a/tgui/packages/tgui/interfaces/AntagInfoClock.tsx
+++ b/tgui/packages/tgui/interfaces/AntagInfoClock.tsx
@@ -1,15 +1,13 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Icon, Section, Stack } from '../components';
import { Window } from '../layouts';
-// SKYRAT EDIT BEGIN
import { Rules } from './AntagInfoRules';
-// SKYRAT EDIT END
type Info = {
antag_name: string;
};
-// SKYRAT EDIT change height from 250 to 350
export const AntagInfoClock = (props) => {
const { data } = useBackend();
const { antag_name } = data;
@@ -23,11 +21,9 @@ export const AntagInfoClock = (props) => {
{' You are the ' + antag_name + '! '}
- {/* SKYRAT EDIT ADDITION START */}
- {/* SKYRAT EDIT ADDITION END */}
diff --git a/tgui/packages/tgui/interfaces/AntagInfoOpfor.tsx b/tgui/packages/tgui/interfaces/AntagInfoOpfor.tsx
index cd3e7b224af..48abbfce64a 100644
--- a/tgui/packages/tgui/interfaces/AntagInfoOpfor.tsx
+++ b/tgui/packages/tgui/interfaces/AntagInfoOpfor.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { Section, Stack, Button } from '../components';
import { Window } from '../layouts';
import { useBackend } from '../backend';
diff --git a/tgui/packages/tgui/interfaces/AntagInfoRules.tsx b/tgui/packages/tgui/interfaces/AntagInfoRules.tsx
index d5303b344f1..4a10aabde48 100644
--- a/tgui/packages/tgui/interfaces/AntagInfoRules.tsx
+++ b/tgui/packages/tgui/interfaces/AntagInfoRules.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Stack } from '../components';
import { Objective } from './common/Objectives';
diff --git a/tgui/packages/tgui/interfaces/ArmamentStation.jsx b/tgui/packages/tgui/interfaces/ArmamentStation.jsx
index 0e7a648038d..df1e0f43f56 100644
--- a/tgui/packages/tgui/interfaces/ArmamentStation.jsx
+++ b/tgui/packages/tgui/interfaces/ArmamentStation.jsx
@@ -1,11 +1,12 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend, useLocalState } from '../backend';
import { Section, Stack, Box, Divider, Button, NoticeBox } from '../components';
import { Window } from '../layouts';
-export const ArmamentStation = (props, context) => {
- const [category, setCategory] = useLocalState(context, 'category', '');
- const [weapon, setArmament] = useLocalState(context, 'weapon');
- const { act, data } = useBackend(context);
+export const ArmamentStation = (props) => {
+ const [category, setCategory] = useLocalState('category', '');
+ const [weapon, setArmament] = useLocalState('weapon');
+ const { act, data } = useBackend();
const { armaments_list = [], card_inserted, card_points, card_name } = data;
return (
diff --git a/tgui/packages/tgui/interfaces/BluespaceArtillery.tsx b/tgui/packages/tgui/interfaces/BluespaceArtillery.tsx
index 31a3bc204e8..fa2098686c3 100644
--- a/tgui/packages/tgui/interfaces/BluespaceArtillery.tsx
+++ b/tgui/packages/tgui/interfaces/BluespaceArtillery.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { BooleanLike } from 'common/react';
import { useBackend } from '../backend';
import { Box, Button, LabeledList, NoticeBox, Section } from '../components';
diff --git a/tgui/packages/tgui/interfaces/BorerChem.jsx b/tgui/packages/tgui/interfaces/BorerChem.jsx
index 8f5210ed0fa..6bc32d5e7c5 100644
--- a/tgui/packages/tgui/interfaces/BorerChem.jsx
+++ b/tgui/packages/tgui/interfaces/BorerChem.jsx
@@ -1,10 +1,11 @@
+// THIS IS A SKYRAT UI FILE
import { toFixed } from 'common/math';
import { useBackend } from '../backend';
import { Box, Button, LabeledList, ProgressBar, Section } from '../components';
import { Window } from '../layouts';
-export const BorerChem = (props, context) => {
- const { act, data } = useBackend(context);
+export const BorerChem = (props) => {
+ const { act, data } = useBackend();
const borerTransferAmounts = data.borerTransferAmounts || [];
return (
diff --git a/tgui/packages/tgui/interfaces/BorerEvolution.tsx b/tgui/packages/tgui/interfaces/BorerEvolution.tsx
index ad2268e7bdd..05929376aab 100644
--- a/tgui/packages/tgui/interfaces/BorerEvolution.tsx
+++ b/tgui/packages/tgui/interfaces/BorerEvolution.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Section, Stack, Button, BlockQuote } from '../components';
import { Window } from '../layouts';
diff --git a/tgui/packages/tgui/interfaces/CargoImportConsole.jsx b/tgui/packages/tgui/interfaces/CargoImportConsole.jsx
index 0b846e4e1af..46569a0f065 100644
--- a/tgui/packages/tgui/interfaces/CargoImportConsole.jsx
+++ b/tgui/packages/tgui/interfaces/CargoImportConsole.jsx
@@ -1,11 +1,12 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend, useLocalState } from '../backend';
import { Section, Stack, Box, Divider, Button } from '../components';
import { Window } from '../layouts';
-export const CargoImportConsole = (props, context) => {
- const [category, setCategory] = useLocalState(context, 'category', '');
- const [weapon, setArmament] = useLocalState(context, 'weapon');
- const { act, data } = useBackend(context);
+export const CargoImportConsole = (props) => {
+ const [category, setCategory] = useLocalState('category', '');
+ const [weapon, setArmament] = useLocalState('weapon');
+ const { act, data } = useBackend();
const {
armaments_list = [],
budget_points,
diff --git a/tgui/packages/tgui/interfaces/ChemPress.jsx b/tgui/packages/tgui/interfaces/ChemPress.jsx
index c4d9c9f8a1b..31df6c6b275 100644
--- a/tgui/packages/tgui/interfaces/ChemPress.jsx
+++ b/tgui/packages/tgui/interfaces/ChemPress.jsx
@@ -1,9 +1,10 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Box, Button, Input, LabeledList, NumberInput, Section } from '../components';
import { Window } from '../layouts';
-export const ChemPress = (props, context) => {
- const { act, data } = useBackend(context);
+export const ChemPress = (props) => {
+ const { act, data } = useBackend();
const {
current_volume,
product_name,
diff --git a/tgui/packages/tgui/interfaces/ClockworkResearch.tsx b/tgui/packages/tgui/interfaces/ClockworkResearch.tsx
index ed7ad55ba05..4edd1a6c4a5 100644
--- a/tgui/packages/tgui/interfaces/ClockworkResearch.tsx
+++ b/tgui/packages/tgui/interfaces/ClockworkResearch.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Box, Button, Section, Stack, Divider, Flex } from '../components';
import { Window } from '../layouts';
diff --git a/tgui/packages/tgui/interfaces/ClockworkSlab.jsx b/tgui/packages/tgui/interfaces/ClockworkSlab.jsx
index cd37fa78614..144ed917f2c 100644
--- a/tgui/packages/tgui/interfaces/ClockworkSlab.jsx
+++ b/tgui/packages/tgui/interfaces/ClockworkSlab.jsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { Fragment } from 'inferno';
import { useBackend, useLocalState } from '../backend';
import { Icon, Box, Button, Section, Table, Divider, Grid, ProgressBar, Collapsible } from '../components';
@@ -20,9 +21,8 @@ const convertPower = (power_in) => {
return Math.round((value + Number.EPSILON) * 100) / 100 + units[power];
};
-export const ClockworkSlab = (props, context) => {
+export const ClockworkSlab = (props) => {
const [selectedTab, setSelectedTab] = useLocalState(
- context,
'selectedTab',
'Servitude'
);
@@ -64,7 +64,7 @@ export const ClockworkSlab = (props, context) => {
);
};
-const ClockworkHelp = (props, context) => {
+const ClockworkHelp = (props) => {
return (
@@ -199,8 +199,8 @@ const ClockworkHelp = (props, context) => {
);
};
-const ClockworkSpellList = (props, context) => {
- const { act, data } = useBackend(context);
+const ClockworkSpellList = (props) => {
+ const { act, data } = useBackend();
const { selectedTab } = props;
const { scriptures = [] } = data;
return (
@@ -260,8 +260,8 @@ const ClockworkSpellList = (props, context) => {
);
};
-const ClockworkOverview = (props, context) => {
- const { data } = useBackend(context);
+const ClockworkOverview = (props) => {
+ const { data } = useBackend();
const { power, cogs, vitality, max_power, max_vitality } = data;
return (
@@ -294,7 +294,7 @@ const ClockworkOverview = (props, context) => {
);
};
-const ClockworkOverviewStat = (props, context) => {
+const ClockworkOverviewStat = (props) => {
const { title, iconName, amount, maxAmount, unit, overrideText } = props;
return (
@@ -321,12 +321,8 @@ const ClockworkOverviewStat = (props, context) => {
);
};
-const ClockworkButtonSelection = (props, context) => {
- const [selectedTab, setSelectedTab] = useLocalState(
- context,
- 'selectedTab',
- {}
- );
+const ClockworkButtonSelection = (props) => {
+ const [selectedTab, setSelectedTab] = useLocalState('selectedTab', {});
const tabs = ['Servitude', 'Preservation', 'Structures'];
return (
diff --git a/tgui/packages/tgui/interfaces/CommandReportConsole.jsx b/tgui/packages/tgui/interfaces/CommandReportConsole.jsx
index 840207af229..ce52c242bd6 100644
--- a/tgui/packages/tgui/interfaces/CommandReportConsole.jsx
+++ b/tgui/packages/tgui/interfaces/CommandReportConsole.jsx
@@ -1,9 +1,10 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Button, NoticeBox, Input, Section, Stack, TextArea } from '../components';
import { Window } from '../layouts';
-export const CommandReportConsole = (props, context) => {
- const { act, data } = useBackend(context);
+export const CommandReportConsole = (props) => {
+ const { act, data } = useBackend();
const {
command_report_content,
command_report_title,
diff --git a/tgui/packages/tgui/interfaces/CrewConsoleSkyrat.jsx b/tgui/packages/tgui/interfaces/CrewConsoleSkyrat.jsx
index 88fc5906df4..b67b6c92662 100644
--- a/tgui/packages/tgui/interfaces/CrewConsoleSkyrat.jsx
+++ b/tgui/packages/tgui/interfaces/CrewConsoleSkyrat.jsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { sortBy } from 'common/collections';
import { useBackend } from '../backend';
import { Box, Button, Section, Table, Icon } from '../components';
@@ -84,8 +85,8 @@ export const CrewConsoleSkyrat = () => {
);
};
-const CrewTable = (props, context) => {
- const { act, data } = useBackend(context);
+const CrewTable = (props) => {
+ const { act, data } = useBackend();
const sensors = sortBy((s) => s.ijob)(data.sensors ?? []);
return (
@@ -110,8 +111,8 @@ const CrewTable = (props, context) => {
);
};
-const CrewTableEntry = (props, context) => {
- const { act, data } = useBackend(context);
+const CrewTableEntry = (props) => {
+ const { act, data } = useBackend();
const { link_allowed } = data;
const { sensor_data } = props;
const {
diff --git a/tgui/packages/tgui/interfaces/CrewConsoleSkyratBlueshield.jsx b/tgui/packages/tgui/interfaces/CrewConsoleSkyratBlueshield.jsx
index 2d13e59d150..9ca177c6eb0 100644
--- a/tgui/packages/tgui/interfaces/CrewConsoleSkyratBlueshield.jsx
+++ b/tgui/packages/tgui/interfaces/CrewConsoleSkyratBlueshield.jsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { sortBy } from 'common/collections';
import { useBackend } from '../backend';
import { Box, Button, Section, Table, Icon } from '../components';
@@ -79,8 +80,8 @@ export const CrewConsoleSkyratBlueshield = () => {
);
};
-const CrewTable = (props, context) => {
- const { act, data } = useBackend(context);
+const CrewTable = (props) => {
+ const { act, data } = useBackend();
const sensors = sortBy((s) => s.ijob)(data.sensors ?? []);
return (
@@ -105,8 +106,8 @@ const CrewTable = (props, context) => {
);
};
-const CrewTableEntry = (props, context) => {
- const { act, data } = useBackend(context);
+const CrewTableEntry = (props) => {
+ const { act, data } = useBackend();
const { link_allowed } = data;
const { sensor_data } = props;
const {
diff --git a/tgui/packages/tgui/interfaces/CryopodConsole.jsx b/tgui/packages/tgui/interfaces/CryopodConsole.jsx
index 5355831c3ab..2932046c066 100644
--- a/tgui/packages/tgui/interfaces/CryopodConsole.jsx
+++ b/tgui/packages/tgui/interfaces/CryopodConsole.jsx
@@ -1,9 +1,10 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Button, LabeledList, NoticeBox, Section, Stack } from '../components';
import { Window } from '../layouts';
-export const CryopodConsole = (props, context) => {
- const { data } = useBackend(context);
+export const CryopodConsole = (props) => {
+ const { data } = useBackend();
const { account_name } = data;
const welcomeTitle = `Hello, ${account_name || '[REDACTED]'}!`;
@@ -30,8 +31,8 @@ export const CryopodConsole = (props, context) => {
);
};
-const CrewList = (props, context) => {
- const { data } = useBackend(context);
+const CrewList = (props) => {
+ const { data } = useBackend();
const { frozen_crew } = data;
return (
@@ -49,8 +50,8 @@ const CrewList = (props, context) => {
);
};
-const ItemList = (props, context) => {
- const { act, data } = useBackend(context);
+const ItemList = (props) => {
+ const { act, data } = useBackend();
const { item_ref_list, item_ref_name, item_retrieval_allowed } = data;
if (!item_retrieval_allowed) {
return You are not authorized for item management.;
diff --git a/tgui/packages/tgui/interfaces/DelamProcedure.tsx b/tgui/packages/tgui/interfaces/DelamProcedure.tsx
index f51c910d672..e93ad881d7d 100644
--- a/tgui/packages/tgui/interfaces/DelamProcedure.tsx
+++ b/tgui/packages/tgui/interfaces/DelamProcedure.tsx
@@ -1,7 +1,8 @@
+// THIS IS A SKYRAT UI FILE
import { Section, BlockQuote, Box, NoticeBox } from '../components';
import { Window } from '../layouts';
-export const DelamProcedure = (context) => {
+export const DelamProcedure = () => {
return (
{
- const { act, data } = useBackend(context);
+export const EventPanel = (props) => {
+ const { act, data } = useBackend();
const {
event_list = [],
end_time,
diff --git a/tgui/packages/tgui/interfaces/ExaminePanel.jsx b/tgui/packages/tgui/interfaces/ExaminePanel.jsx
index 3695200931a..8c935084e69 100644
--- a/tgui/packages/tgui/interfaces/ExaminePanel.jsx
+++ b/tgui/packages/tgui/interfaces/ExaminePanel.jsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Stack, Section, ByondUi } from '../components';
import { Window } from '../layouts';
@@ -30,8 +31,8 @@ const formatURLs = (text) => {
return {parts}
;
};
-export const ExaminePanel = (props, context) => {
- const { act, data } = useBackend(context);
+export const ExaminePanel = (props) => {
+ const { act, data } = useBackend();
const {
character_name,
obscured,
diff --git a/tgui/packages/tgui/interfaces/GlassBlowing.tsx b/tgui/packages/tgui/interfaces/GlassBlowing.tsx
index fd131ee8a42..4c6808f15d3 100644
--- a/tgui/packages/tgui/interfaces/GlassBlowing.tsx
+++ b/tgui/packages/tgui/interfaces/GlassBlowing.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { Box, Button, Flex, Stack, Section, ProgressBar, AnimatedNumber, Table } from '../components';
import { toFixed } from 'common/math';
import { BooleanLike } from 'common/react';
diff --git a/tgui/packages/tgui/interfaces/IntensityCredits.tsx b/tgui/packages/tgui/interfaces/IntensityCredits.tsx
index a493445ca47..3bd67b2c665 100644
--- a/tgui/packages/tgui/interfaces/IntensityCredits.tsx
+++ b/tgui/packages/tgui/interfaces/IntensityCredits.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Section, NoticeBox, Flex } from '../components';
import { Window } from '../layouts';
diff --git a/tgui/packages/tgui/interfaces/InteractionMenu.tsx b/tgui/packages/tgui/interfaces/InteractionMenu.tsx
index c4750fe2441..0d44352be0e 100644
--- a/tgui/packages/tgui/interfaces/InteractionMenu.tsx
+++ b/tgui/packages/tgui/interfaces/InteractionMenu.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Button, Collapsible, Icon, NoticeBox, Section, Stack, Box } from '../components';
import { Window } from '../layouts';
diff --git a/tgui/packages/tgui/interfaces/LoadoutManager.jsx b/tgui/packages/tgui/interfaces/LoadoutManager.jsx
index abcc83ebbd6..22187ea837f 100644
--- a/tgui/packages/tgui/interfaces/LoadoutManager.jsx
+++ b/tgui/packages/tgui/interfaces/LoadoutManager.jsx
@@ -1,13 +1,13 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend, useSharedState } from '../backend';
import { Box, Button, Section, Stack, Dropdown } from '../components';
import { Window } from '../layouts';
-export const LoadoutManager = (props, context) => {
- const { act, data } = useBackend(context);
+export const LoadoutManager = (props) => {
+ const { act, data } = useBackend();
const { selected_loadout, loadout_tabs, user_is_donator } = data;
const [selectedTabName, setSelectedTab] = useSharedState(
- context,
'tabs',
loadout_tabs[0]?.name
);
diff --git a/tgui/packages/tgui/interfaces/MicrofusionGunControl.jsx b/tgui/packages/tgui/interfaces/MicrofusionGunControl.jsx
index caa9c1d03b9..4a2422b52a6 100644
--- a/tgui/packages/tgui/interfaces/MicrofusionGunControl.jsx
+++ b/tgui/packages/tgui/interfaces/MicrofusionGunControl.jsx
@@ -1,10 +1,11 @@
+// THIS IS A SKYRAT UI FILE
import { toFixed } from 'common/math';
import { useBackend } from '../backend';
import { NoticeBox, Section, Stack, Button, LabeledList, ProgressBar } from '../components';
import { Window } from '../layouts';
-export const MicrofusionGunControl = (props, context) => {
- const { act, data } = useBackend(context);
+export const MicrofusionGunControl = (props) => {
+ const { act, data } = useBackend();
const { cell_data } = data;
const { phase_emitter_data } = data;
const {
diff --git a/tgui/packages/tgui/interfaces/MilkingMachine.jsx b/tgui/packages/tgui/interfaces/MilkingMachine.jsx
index 6e66b6fe686..1ecad902323 100644
--- a/tgui/packages/tgui/interfaces/MilkingMachine.jsx
+++ b/tgui/packages/tgui/interfaces/MilkingMachine.jsx
@@ -1,11 +1,12 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Box, Button, Section, Stack } from '../components';
import { Window } from '../layouts';
let palette;
-export const MilkingMachine = (props, context) => {
- const { data } = useBackend(context);
+export const MilkingMachine = (props) => {
+ const { data } = useBackend();
const { machine_color } = data;
colorChange(machine_color);
@@ -21,8 +22,8 @@ export const MilkingMachine = (props, context) => {
);
};
-const MilkingMachineContent = (props, context) => {
- const { act, data } = useBackend(context);
+const MilkingMachineContent = (props) => {
+ const { act, data } = useBackend();
const {
mobName,
mobCanLactate,
@@ -101,7 +102,7 @@ const MilkingMachineContent = (props, context) => {
- {modeButtonStates('Off', data, palette, context)}
+ {modeButtonStates('Off', data, palette)}
@@ -119,13 +120,13 @@ const MilkingMachineContent = (props, context) => {
- {modeButtonStates('Low', data, palette, context)}
+ {modeButtonStates('Low', data, palette)}
- {modeButtonStates('Medium', data, palette, context)}
+ {modeButtonStates('Medium', data, palette)}
- {modeButtonStates('Hard', data, palette, context)}
+ {modeButtonStates('Hard', data, palette)}
@@ -542,8 +543,8 @@ const MilkingMachineContent = (props, context) => {
);
};
-const modeButtonStates = (Name, data, palette, context) => {
- const { act } = useBackend(context);
+const modeButtonStates = (Name, data, palette) => {
+ const { act } = useBackend();
let ModeNameCapital = capitalize(data.mode);
let action = 'set' + Name + 'Mode';
@@ -615,8 +616,8 @@ const modeButtonStates = (Name, data, palette, context) => {
}
};
-const organButtonStates = (Name, data, palette, context) => {
- const { act } = useBackend(context);
+const organButtonStates = (Name, data, palette) => {
+ const { act } = useBackend();
let OrganNameCapital;
if (data.current_selected_organ_name !== null) {
OrganNameCapital = capitalize(data.current_selected_organ_name);
diff --git a/tgui/packages/tgui/interfaces/NifPanel.jsx b/tgui/packages/tgui/interfaces/NifPanel.jsx
index 8e2d3160794..fa6a878f9e3 100644
--- a/tgui/packages/tgui/interfaces/NifPanel.jsx
+++ b/tgui/packages/tgui/interfaces/NifPanel.jsx
@@ -1,10 +1,11 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend, useLocalState } from '../backend';
import { Window } from '../layouts';
import { Box, Dropdown, LabeledList, ProgressBar, Section, Button, Input, BlockQuote, Flex, Collapsible, Table, Icon } from '../components';
import { TableCell, TableRow } from '../components/Table';
-export const NifPanel = (props, context) => {
- const { act, data } = useBackend(context);
+export const NifPanel = (props) => {
+ const { act, data } = useBackend();
const {
linked_mob_name,
loaded_nifsofts,
@@ -12,11 +13,7 @@ export const NifPanel = (props, context) => {
max_power,
current_theme,
} = data;
- const [settingsOpen, setSettingsOpen] = useLocalState(
- context,
- 'settingsOpen',
- false
- );
+ const [settingsOpen, setSettingsOpen] = useLocalState('settingsOpen', false);
return (
{
);
};
-const NifSettings = (props, context) => {
- const { act, data } = useBackend(context);
+const NifSettings = (props) => {
+ const { act, data } = useBackend();
const {
nutrition_drain,
ui_themes,
@@ -242,14 +239,14 @@ const NifSettings = (props, context) => {
);
};
-const NifProductNotes = (props, context) => {
- const { act, data } = useBackend(context);
+const NifProductNotes = (props) => {
+ const { act, data } = useBackend(t);
const { product_notes } = data;
return {product_notes}
;
};
-const NifStats = (props, context) => {
- const { act, data } = useBackend(context);
+const NifStats = (props) => {
+ const { act, data } = useBackend();
const {
max_power,
power_level,
@@ -309,8 +306,8 @@ const NifStats = (props, context) => {
);
};
-const NifNutritionBar = (props, context) => {
- const { act, data } = useBackend(context);
+const NifNutritionBar = (props) => {
+ const { act, data } = useBackend();
const { nutrition_level } = data;
return (
{
);
};
-const NifBloodBar = (props, context) => {
- const { act, data } = useBackend(context);
+const NifBloodBar = (props) => {
+ const { act, data } = useBackend();
const { blood_level, minimum_blood_level, max_blood_level } = data;
return (
{
- const { act, data } = useBackend(context);
+export const NifSoulPoem = (props) => {
+ const { act, data } = useBackend();
const {
name_to_send,
text_to_send,
diff --git a/tgui/packages/tgui/interfaces/NightmareInfo.jsx b/tgui/packages/tgui/interfaces/NightmareInfo.jsx
deleted file mode 100644
index 344b596f407..00000000000
--- a/tgui/packages/tgui/interfaces/NightmareInfo.jsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import { BlockQuote, LabeledList, Section, Stack } from '../components';
-import { Window } from '../layouts';
-
-const tipstyle = {
- color: 'white',
-};
-
-const noticestyle = {
- color: 'lightblue',
-};
-
-export const NightmareInfo = (props, context) => {
- return (
-
-
-
-
-
-
- You are a Nightmare.
-
-
- You are a creature from beyond the stars that has incredibly
- strong powers in the darkness, becoming nigh unbeatable.
- Unfortunately, you wither and burn away in the light. You
- must use your
- light eater to dim
- the station, making hunting easier.
-
-
-
-
- Tip #1:
- Move often. The station will be hunting you after you are
- discovered, so don't stay in one area for long.
-
- Tip #2:
- Pick unfair fights. You are incredibly strong in one versus
- one situations, use it. The more you fight, the harder it will
- be to keep it dark.
-
- Tip #3:
- Fully destroy APCs when possible. Instead of hunting lights
- that can be fixed, hunt the APCs which are harder to repair.
-
-
-
-
-
-
-
-
- Whilst in the shadows, you are immune to all melee and ranged
- attacks, whilst also rapidly regenerating health.
-
-
- You are allowed unlimited, unrestricted movement in the dark.
- Light will pull you out of this.
-
-
- Your heart invites the shadows. If you die in the darkness,
- you will eventually revive if left alone.
-
-
- Your twisted appendage. It will consume the light of what it
- touches, be it victim or object.
-
-
-
-
-
-
-
- );
-};
diff --git a/tgui/packages/tgui/interfaces/NtosCrewManifest.jsx b/tgui/packages/tgui/interfaces/NtosCrewManifest.jsx
index 67b4bdf3f6f..29d2207f0b7 100644
--- a/tgui/packages/tgui/interfaces/NtosCrewManifest.jsx
+++ b/tgui/packages/tgui/interfaces/NtosCrewManifest.jsx
@@ -9,7 +9,7 @@ import { NtosWindow } from '../layouts';
//
// {entry.rank === entry.trim ? entry.rank : <>{entry.rank} ({entry.trim})>}
// - Original: entry.rank
-export const NtosCrewManifest = (props, context) => {
+export const NtosCrewManifest = (props) => {
const { act, data } = useBackend();
const { manifest = {} } = data;
return (
diff --git a/tgui/packages/tgui/interfaces/NtosNetDownloader.jsx b/tgui/packages/tgui/interfaces/NtosNetDownloader.jsx
index df7d87cef56..6d6456b7cab 100644
--- a/tgui/packages/tgui/interfaces/NtosNetDownloader.jsx
+++ b/tgui/packages/tgui/interfaces/NtosNetDownloader.jsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { scale, toFixed } from 'common/math';
import { useBackend, useLocalState } from '../backend';
import { Box, Button, Stack, Icon, LabeledList, NoticeBox, ProgressBar, Section, Tabs } from '../components';
diff --git a/tgui/packages/tgui/interfaces/NtosNewsArchive.jsx b/tgui/packages/tgui/interfaces/NtosNewsArchive.jsx
index 2316e96eaee..60cf8501b7e 100644
--- a/tgui/packages/tgui/interfaces/NtosNewsArchive.jsx
+++ b/tgui/packages/tgui/interfaces/NtosNewsArchive.jsx
@@ -1,9 +1,10 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Collapsible, Section } from '../components';
import { NtosWindow } from '../layouts';
-export const NtosNewsArchive = (props, context) => {
- const { data } = useBackend(context);
+export const NtosNewsArchive = (props) => {
+ const { data } = useBackend();
const { stories } = data;
return (
diff --git a/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.jsx b/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.jsx
index ad91e6ad86b..c9411e05dfe 100644
--- a/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.jsx
+++ b/tgui/packages/tgui/interfaces/NtosNifsoftCatalog.jsx
@@ -1,12 +1,12 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend, useSharedState } from '../backend';
import { NtosWindow } from '../layouts';
import { BlockQuote, Button, Collapsible, Flex, Section, Tabs, LabeledList, Box, Icon } from '../components';
-export const NtosNifsoftCatalog = (props, context) => {
- const { act, data } = useBackend(context);
+export const NtosNifsoftCatalog = (props) => {
+ const { act, data } = useBackend();
const { product_list = [], rewards_points, current_balance } = data;
const [tab, setTab] = useSharedState(
- context,
'product_category',
product_list[0].name
);
@@ -45,8 +45,8 @@ export const NtosNifsoftCatalog = (props, context) => {
);
};
-const ProductCategory = (props, context) => {
- const { act, data } = useBackend(context);
+const ProductCategory = (props) => {
+ const { act, data } = useBackend();
const { target_nif, paying_account, rewards_points, current_balance } = data;
const { products } = props;
diff --git a/tgui/packages/tgui/interfaces/OpposingForcePanel.jsx b/tgui/packages/tgui/interfaces/OpposingForcePanel.jsx
index 9cf77eed299..b4b7cc167fb 100644
--- a/tgui/packages/tgui/interfaces/OpposingForcePanel.jsx
+++ b/tgui/packages/tgui/interfaces/OpposingForcePanel.jsx
@@ -1,11 +1,12 @@
+// THIS IS A SKYRAT UI FILE
import { round } from 'common/math';
import { useBackend, useLocalState } from '../backend';
import { Section, Stack, TextArea, Button, Tabs, Input, Slider, NoticeBox, LabeledList, Box, Collapsible, NumberInput } from '../components';
import { Window } from '../layouts';
-export const OpposingForcePanel = (props, context) => {
- const [tab, setTab] = useLocalState(context, 'tab', 1);
- const { act, data } = useBackend(context);
+export const OpposingForcePanel = (props) => {
+ const [tab, setTab] = useLocalState('tab', 1);
+ const { act, data } = useBackend();
const { admin_mode, creator_ckey, owner_antag } = data;
return (
{
);
};
-export const OpposingForceTab = (props, context) => {
- const { act, data } = useBackend(context);
+export const OpposingForceTab = (props) => {
+ const { act, data } = useBackend();
const {
creator_ckey,
objectives = [],
@@ -208,12 +209,11 @@ export const OpposingForceTab = (props, context) => {
);
};
-export const OpposingForceObjectives = (props, context) => {
- const { act, data } = useBackend(context);
+export const OpposingForceObjectives = (props) => {
+ const { act, data } = useBackend();
const { objectives = [], can_edit } = data;
const [selectedObjectiveID, setSelectedObjective] = useLocalState(
- context,
'objectives',
objectives[0]?.id
);
@@ -458,8 +458,8 @@ export const OpposingForceObjectives = (props, context) => {
);
};
-export const EquipmentTab = (props, context) => {
- const { act, data } = useBackend(context);
+export const EquipmentTab = (props) => {
+ const { act, data } = useBackend();
const { equipment_list = [], selected_equipment = [], can_edit } = data;
return (
@@ -569,8 +569,8 @@ export const EquipmentTab = (props, context) => {
);
};
-export const AdminChatTab = (props, context) => {
- const { act, data } = useBackend(context);
+export const AdminChatTab = (props) => {
+ const { act, data } = useBackend();
const { messages = [] } = data;
return (
@@ -599,8 +599,8 @@ export const AdminChatTab = (props, context) => {
);
};
-export const AdminTab = (props, context) => {
- const { act, data } = useBackend(context);
+export const AdminTab = (props) => {
+ const { act, data } = useBackend();
const {
request_updates_muted,
approved,
diff --git a/tgui/packages/tgui/interfaces/ParticleAccelerator.jsx b/tgui/packages/tgui/interfaces/ParticleAccelerator.jsx
index cfe77c78703..0466c171e8f 100644
--- a/tgui/packages/tgui/interfaces/ParticleAccelerator.jsx
+++ b/tgui/packages/tgui/interfaces/ParticleAccelerator.jsx
@@ -1,9 +1,10 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Box, Button, LabeledList, Section } from '../components';
import { Window } from '../layouts';
-export const ParticleAccelerator = (props, context) => {
- const { act, data } = useBackend(context);
+export const ParticleAccelerator = (props) => {
+ const { act, data } = useBackend();
const { assembled, power, strength } = data;
return (
diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/LanguagesMenu.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/LanguagesMenu.tsx
index 457959b650a..6a754b0bbef 100644
--- a/tgui/packages/tgui/interfaces/PreferencesMenu/LanguagesMenu.tsx
+++ b/tgui/packages/tgui/interfaces/PreferencesMenu/LanguagesMenu.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { Stack, Section, Button, Box } from '../../components';
import { useBackend } from '../../backend';
import { PreferencesMenuData } from './data';
diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/LimbsPage.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/LimbsPage.tsx
index 0b68929b9f6..3ef796744fb 100644
--- a/tgui/packages/tgui/interfaces/PreferencesMenu/LimbsPage.tsx
+++ b/tgui/packages/tgui/interfaces/PreferencesMenu/LimbsPage.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { Box, Stack, Section, Dropdown, Button, ColorBox } from '../../components';
import { useBackend } from '../../backend';
import { PreferencesMenuData } from './data';
diff --git a/tgui/packages/tgui/interfaces/RecordManifest.jsx b/tgui/packages/tgui/interfaces/RecordManifest.jsx
index 49f6fdcf51a..80bdd972c7c 100644
--- a/tgui/packages/tgui/interfaces/RecordManifest.jsx
+++ b/tgui/packages/tgui/interfaces/RecordManifest.jsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { classes } from 'common/react';
import { useBackend } from '../backend';
import { Icon, Section, Table, Tooltip, Button } from '../components';
@@ -11,11 +12,11 @@ const commandJobs = [
'Chief Medical Officer',
];
-export const RecordManifest = (props, context) => {
+export const RecordManifest = (props) => {
const {
data: { manifest, positions },
- } = useBackend(context);
- const { act } = useBackend(context);
+ } = useBackend();
+ const { act } = useBackend();
return (
diff --git a/tgui/packages/tgui/interfaces/ServerControlPanel.jsx b/tgui/packages/tgui/interfaces/ServerControlPanel.jsx
index 69948dc7c48..9608f2fa5a1 100644
--- a/tgui/packages/tgui/interfaces/ServerControlPanel.jsx
+++ b/tgui/packages/tgui/interfaces/ServerControlPanel.jsx
@@ -1,9 +1,10 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { NoticeBox, Section, Button, LabeledList } from '../components';
import { Window } from '../layouts';
-export const MicrofusionGunControl = (props, context) => {
- const { act, data } = useBackend(context);
+export const MicrofusionGunControl = (props) => {
+ const { act, data } = useBackend();
const { current_players, servers = [] } = data;
return (
diff --git a/tgui/packages/tgui/interfaces/Signalvib.jsx b/tgui/packages/tgui/interfaces/Signalvib.jsx
index 1608a31cd4d..dc31629f884 100644
--- a/tgui/packages/tgui/interfaces/Signalvib.jsx
+++ b/tgui/packages/tgui/interfaces/Signalvib.jsx
@@ -1,10 +1,11 @@
+// THIS IS A SKYRAT UI FILE
import { toFixed } from 'common/math';
import { useBackend } from '../backend';
import { Button, LabeledList, NumberInput, Section } from '../components';
import { Window } from '../layouts';
-export const Signalvib = (props, context) => {
- const { act, data } = useBackend(context);
+export const Signalvib = (props) => {
+ const { act, data } = useBackend();
const { toystate, code, frequency, minFrequency, maxFrequency } = data;
return (
diff --git a/tgui/packages/tgui/interfaces/Soulcatcher.jsx b/tgui/packages/tgui/interfaces/Soulcatcher.jsx
index 0c8c4f6e66b..b6922757902 100644
--- a/tgui/packages/tgui/interfaces/Soulcatcher.jsx
+++ b/tgui/packages/tgui/interfaces/Soulcatcher.jsx
@@ -1,9 +1,10 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Window } from '../layouts';
import { BlockQuote, Button, Divider, Section, Box, Flex, Collapsible, LabeledList, ProgressBar } from '../components';
-export const Soulcatcher = (props, context) => {
- const { act, data } = useBackend(context);
+export const Soulcatcher = (props) => {
+ const { act, data } = useBackend();
const {
require_approval,
current_rooms = [],
diff --git a/tgui/packages/tgui/interfaces/SoulcatcherUser.jsx b/tgui/packages/tgui/interfaces/SoulcatcherUser.jsx
index cabe26aabc3..bd3da01e960 100644
--- a/tgui/packages/tgui/interfaces/SoulcatcherUser.jsx
+++ b/tgui/packages/tgui/interfaces/SoulcatcherUser.jsx
@@ -1,9 +1,10 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Window } from '../layouts';
import { BlockQuote, Button, Divider, Box, Flex, Collapsible, LabeledList, Section } from '../components';
-export const SoulcatcherUser = (props, context) => {
- const { act, data } = useBackend(context);
+export const SoulcatcherUser = (props) => {
+ const { act, data } = useBackend();
const { current_room, user_data, communicate_as_parent, souls = [] } = data;
return (
diff --git a/tgui/packages/tgui/interfaces/StoryManager.tsx b/tgui/packages/tgui/interfaces/StoryManager.tsx
index 06fcfb9a52e..29f8315b625 100644
--- a/tgui/packages/tgui/interfaces/StoryManager.tsx
+++ b/tgui/packages/tgui/interfaces/StoryManager.tsx
@@ -1,3 +1,4 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend, useLocalState } from '../backend';
import { Collapsible, Section, TextArea, LabeledList, Button } from '../components';
import { Window } from '../layouts';
diff --git a/tgui/packages/tgui/interfaces/TimeClock.jsx b/tgui/packages/tgui/interfaces/TimeClock.jsx
index ceff30f1194..0a446310514 100644
--- a/tgui/packages/tgui/interfaces/TimeClock.jsx
+++ b/tgui/packages/tgui/interfaces/TimeClock.jsx
@@ -1,9 +1,10 @@
+// THIS IS A SKYRAT UI FILE
import { useBackend } from '../backend';
import { Window } from '../layouts';
import { Box, LabeledList, Section, Button } from '../components';
-export const TimeClock = (props, context) => {
- const { act, data } = useBackend(context);
+export const TimeClock = (props) => {
+ const { act, data } = useBackend();
const {
inserted_id,
insert_id_cooldown,