{
diff --git a/tgui/packages/tgui/interfaces/Cargo.tsx b/tgui/packages/tgui/interfaces/Cargo.tsx
index 588455774b..5f78b36d1c 100644
--- a/tgui/packages/tgui/interfaces/Cargo.tsx
+++ b/tgui/packages/tgui/interfaces/Cargo.tsx
@@ -2,7 +2,7 @@ import { toArray } from 'common/collections';
import { Fragment } from 'react';
import { useBackend, useSharedState } from '../backend';
import { AnimatedNumber, Box, Button, Flex, LabeledList, Section, Table, Tabs } from 'tgui-core/components';
-import { formatMoney } from '../format';
+import { formatMoney } from 'tgui-core/format';
import { Window } from '../layouts';
export const Cargo = (props) => {
@@ -10,7 +10,7 @@ export const Cargo = (props) => {
+ >
@@ -98,7 +98,7 @@ const CargoStatus = (props) => {
)}>
- {docked && !requestonly && can_send &&(
+ {docked && !requestonly && can_send && (
)}
@@ -261,7 +261,7 @@ const CargoRequests = (props) => {
{formatMoney(request.cost)} cr
- {(!requestonly || can_send)&& can_approve_requests &&(
+ {(!requestonly || can_send) && can_approve_requests && (
- {can_send &&(
+ {can_send && (
))}
diff --git a/tgui/packages/tgui/interfaces/ReligiousTool.tsx b/tgui/packages/tgui/interfaces/ReligiousTool.tsx
index b039c6831b..044f8417e7 100644
--- a/tgui/packages/tgui/interfaces/ReligiousTool.tsx
+++ b/tgui/packages/tgui/interfaces/ReligiousTool.tsx
@@ -1,4 +1,4 @@
-import { capitalize } from 'common/string';
+import { capitalize } from 'tgui-core/string';
import { useBackend, useSharedState } from '../backend';
import { AnimatedNumber, BlockQuote, Box, Button, Collapsible, Dimmer, Icon, LabeledList, NoticeBox, ProgressBar, Section, Stack, Tabs } from 'tgui-core/components';
import { Window } from '../layouts';
@@ -80,7 +80,7 @@ const SectTab = (props) => {
- {"\""+quote+"\""}
+ {"\"" + quote + "\""}
{favordesc}
@@ -95,8 +95,8 @@ const SectTab = (props) => {
{!wanted && (
deity + " doesn't want any sacrifices."
) || (
- deity + " wishes for " + wanted + "."
- )}
+ deity + " wishes for " + wanted + "."
+ )}
@@ -126,7 +126,7 @@ const SectSelectTab = (props) => {
{sect.name}
- {"\""+sect.quote+"\""}
+ {"\"" + sect.quote + "\""}
)}
diff --git a/tgui/packages/tgui/interfaces/RemoteRobotControl.tsx b/tgui/packages/tgui/interfaces/RemoteRobotControl.tsx
index 8ffcfc914f..5cd77d2a2a 100644
--- a/tgui/packages/tgui/interfaces/RemoteRobotControl.tsx
+++ b/tgui/packages/tgui/interfaces/RemoteRobotControl.tsx
@@ -1,4 +1,4 @@
-import { decodeHtmlEntities } from 'common/string';
+import { decodeHtmlEntities } from 'tgui-core/string';
import { useBackend } from '../backend';
import { Box, Button, NoticeBox, Section, LabeledList } from 'tgui-core/components';
import { Window } from '../layouts';
@@ -67,7 +67,7 @@ export const RemoteRobotControlContent = (props) => {
(HACKED)
- ) || "" }
+ ) || ""}
{robot.location}
diff --git a/tgui/packages/tgui/interfaces/RequestKiosk.tsx b/tgui/packages/tgui/interfaces/RequestKiosk.tsx
index 4a3710c52b..08b7d26f35 100644
--- a/tgui/packages/tgui/interfaces/RequestKiosk.tsx
+++ b/tgui/packages/tgui/interfaces/RequestKiosk.tsx
@@ -1,6 +1,6 @@
import { useBackend } from '../backend';
import { Box, Button, Collapsible, Flex, LabeledList, NumberInput, Section, Stack, TextArea } from 'tgui-core/components';
-import { formatMoney } from '../format';
+import { formatMoney } from 'tgui-core/format';
import { Window } from '../layouts';
export const RequestKiosk = (props) => {
diff --git a/tgui/packages/tgui/interfaces/SeedExtractor.tsx b/tgui/packages/tgui/interfaces/SeedExtractor.tsx
index c9bbac7f07..1c982c0263 100644
--- a/tgui/packages/tgui/interfaces/SeedExtractor.tsx
+++ b/tgui/packages/tgui/interfaces/SeedExtractor.tsx
@@ -1,6 +1,6 @@
import { sortBy } from 'common/collections';
import { flow } from 'common/fp';
-import { toTitleCase } from 'common/string';
+import { toTitleCase } from 'tgui-core/string';
import { useBackend } from '../backend';
import { Button, Section, Table } from 'tgui-core/components';
import { Window } from '../layouts';
diff --git a/tgui/packages/tgui/interfaces/SelectEquipment.tsx b/tgui/packages/tgui/interfaces/SelectEquipment.tsx
index c31112b208..1158c2574a 100644
--- a/tgui/packages/tgui/interfaces/SelectEquipment.tsx
+++ b/tgui/packages/tgui/interfaces/SelectEquipment.tsx
@@ -1,6 +1,6 @@
import { filter, map, sortBy, uniq } from 'common/collections';
import { flow } from 'common/fp';
-import { createSearch } from 'common/string';
+import { createSearch } from 'tgui-core/string';
import { useBackend, useLocalState } from '../backend';
import { Box, Button, Icon, Input, Section, Stack, Tabs } from 'tgui-core/components';
import { Window } from '../layouts';
@@ -9,7 +9,7 @@ import { Window } from '../layouts';
// custom outfits give a ref keyword instead of path
const getOutfitKey = outfit => outfit.path || outfit.ref;
-const useOutfitTabs = (context, categories) => {
+const useOutfitTabs = (categories) => {
return useLocalState('selected-tab', categories[0]);
};
@@ -38,10 +38,10 @@ export const SelectEquipment = (props) => {
...outfits.map(entry => entry.category),
'Custom',
]);
- const [tab] = useOutfitTabs(context, categories);
+ const [tab] = useOutfitTabs(categories);
const [searchText, setSearchText] = useLocalState(
- context, 'searchText', '');
+ 'searchText', '');
const searchFilter = createSearch(searchText, entry => (
entry.name + entry.path
));
@@ -120,7 +120,7 @@ export const SelectEquipment = (props) => {
const DisplayTabs = (props) => {
const { categories } = props;
- const [tab, setTab] = useOutfitTabs(context, categories);
+ const [tab, setTab] = useOutfitTabs(categories);
return (
{categories.map(category => (
diff --git a/tgui/packages/tgui/interfaces/SimpleBot.tsx b/tgui/packages/tgui/interfaces/SimpleBot.tsx
index 84ca62781a..4ababad26b 100644
--- a/tgui/packages/tgui/interfaces/SimpleBot.tsx
+++ b/tgui/packages/tgui/interfaces/SimpleBot.tsx
@@ -1,4 +1,4 @@
-import { multiline } from '../../common/string';
+import { multiline } from '../../tgui-core/string';
import { useBackend } from '../backend';
import { Button, Icon, LabeledControls, NoticeBox, Section, Slider, Stack, Tooltip } from 'tgui-core/components';
import { Window } from '../layouts';
diff --git a/tgui/packages/tgui/interfaces/Smes.tsx b/tgui/packages/tgui/interfaces/Smes.tsx
index 4833916b05..6305486a61 100644
--- a/tgui/packages/tgui/interfaces/Smes.tsx
+++ b/tgui/packages/tgui/interfaces/Smes.tsx
@@ -1,6 +1,6 @@
import { useBackend } from '../backend';
import { Box, Button, Flex, LabeledList, ProgressBar, Section, Slider } from 'tgui-core/components';
-import { formatPower } from '../format';
+import { formatPower } from 'tgui-core/format';
import { Window } from '../layouts';
// Common power multiplier
diff --git a/tgui/packages/tgui/interfaces/Spellbook.tsx b/tgui/packages/tgui/interfaces/Spellbook.tsx
index 9d9693eb5c..398731817a 100644
--- a/tgui/packages/tgui/interfaces/Spellbook.tsx
+++ b/tgui/packages/tgui/interfaces/Spellbook.tsx
@@ -1,4 +1,4 @@
-import { multiline } from 'common/string';
+import { multiline } from 'tgui-core/string';
import { useBackend, useLocalState } from '../backend';
import { Blink, Box, Button, Dimmer, Divider, Icon, Modal, NoticeBox, ProgressBar, Section, Stack } from 'tgui-core/components';
import { Window } from '../layouts';
@@ -362,14 +362,14 @@ export const Spellbook = (props) => {
tabIndex,
setTabIndex,
] = useLocalState('tab-index', 1);
- const ScrollableCheck = TAB2NAME[tabIndex-1].noScrollable ? false : true;
- const ScrollableNextCheck = TAB2NAME[tabIndex-1].noScrollable !== 2;
- const TabComponent = TAB2NAME[tabIndex-1].component
- ? TAB2NAME[tabIndex-1].component() : null;
+ const ScrollableCheck = TAB2NAME[tabIndex - 1].noScrollable ? false : true;
+ const ScrollableNextCheck = TAB2NAME[tabIndex - 1].noScrollable !== 2;
+ const TabComponent = TAB2NAME[tabIndex - 1].component
+ ? TAB2NAME[tabIndex - 1].component() : null;
const TabNextComponent = TAB2NAME[tabIndex].component
? TAB2NAME[tabIndex].component() : null;
const TabSpells = entries ? entries.filter(
- entry => entry.cat === TAB2NAME[tabIndex-1].title) : null;
+ entry => entry.cat === TAB2NAME[tabIndex - 1].title) : null;
const TabNextSpells = entries ? entries.filter(
entry => entry.cat === TAB2NAME[tabIndex].title) : null;
return (
@@ -389,7 +389,7 @@ export const Spellbook = (props) => {
width={widthSection}
height={heightSection}
fill
- title={TAB2NAME[tabIndex-1].title}
+ title={TAB2NAME[tabIndex - 1].title}
buttons={
<>
{
disabled={tabIndex === 1}
icon="arrow-left"
content="Previous Page"
- onClick={() => setTabIndex(tabIndex-2)} />
+ onClick={() => setTabIndex(tabIndex - 2)} />
{tabIndex}
>
}>
- {!!TAB2NAME[tabIndex-1].locked && (
+ {!!TAB2NAME[tabIndex - 1].locked && (
)}
- {TAB2NAME[tabIndex-1].blurb !== null && (
+ {TAB2NAME[tabIndex - 1].blurb !== null && (
- {TAB2NAME[tabIndex-1].blurb}
+ {TAB2NAME[tabIndex - 1].blurb}
)}
- {!!TAB2NAME[tabIndex-1].component && (
+ {!!TAB2NAME[tabIndex - 1].component && (
) || (
-
-
- {TabSpells?.map(entry => (
-
-
-
-
- {entry.cost} Points
-
- {entry.cat === 'Rituals' && (
- !!entry.times && (
-
- Cast {entry.times} Times.
-
- ) || (
-
- Not Casted Yet.
-
- )
- ) || (
- entry.cooldown && (
-
- {entry.cooldown}s Cooldown
-
- ) || (
-
- No Cooldown!
- )
- )}
- {entry.buyword === "Learn" && (
-
-
+
+
+ {TabSpells?.map(entry => (
+
+
+
+
+ {entry.cost} Points
- )}
- >
- }>
-
-
- {entry.desc}
-
-
-
-
-
- = entry.cost ? "green" : "bad"}
- disabled={points < entry.cost}
- width={7}
- icon={BUYWORD2ICON[entry.buyword]}
- content={entry.buyword}
- onClick={() => act("purchase", {
- spellref: entry.ref,
- })} />
-
- {!entry.refundable && (
-
- No refunds.
-
- ) || (
+ {entry.cat === 'Rituals' && (
+ !!entry.times && (
+
+ Cast {entry.times} Times.
+
+ ) || (
+
+ Not Casted Yet.
+
+ )
+ ) || (
+ entry.cooldown && (
+
+ {entry.cooldown}s Cooldown
+
+ ) || (
+
+ No Cooldown!
+ )
+ )}
+ {entry.buyword === "Learn" && (
+
+
+
+ )}
+ >
+ }>
+
+
+ {entry.desc}
+
+
+
+
+
= entry.cost ? "green" : "bad"}
+ disabled={points < entry.cost}
width={7}
- icon="arrow-left"
- content="Refund"
- onClick={() => act("refund", {
+ icon={BUYWORD2ICON[entry.buyword]}
+ content={entry.buyword}
+ onClick={() => act("purchase", {
spellref: entry.ref,
})} />
- )}
-
-
-
-
- ))}
-
-
- )}
+
+ {!entry.refundable && (
+
+ No refunds.
+
+ ) || (
+ act("refund", {
+ spellref: entry.ref,
+ })} />
+ )}
+
+
+
+
+ ))}
+
+
+ )}
@@ -527,9 +527,9 @@ export const Spellbook = (props) => {
icon="arrow-right"
disabled={tabIndex === 9}
content="Next Page"
- onClick={() => setTabIndex(tabIndex+2)} />
+ onClick={() => setTabIndex(tabIndex + 2)} />
- {tabIndex+1}
+ {tabIndex + 1}
>
}>
@@ -552,94 +552,94 @@ export const Spellbook = (props) => {
) || (
-
-
- {TabNextSpells?.map(entry => (
-
-
-
-
- {entry.cost} Points
-
- {entry.cat === 'Rituals' && (
- !!entry.times && (
-
- Cast {entry.times} Time(s).
-
- ) || (
-
- Not Casted Yet.
-
- )
- ) || (
- entry.cooldown && (
-
- {entry.cooldown}s Cooldown
-
- ) || (
-
- No Cooldown!
-
- )
- )}
- {entry.buyword === "Learn" && (
-
-
+
+
+ {TabNextSpells?.map(entry => (
+
+
+
+
+ {entry.cost} Points
- )}
- >
- }>
-
-
- {entry.desc}
-
-
-
-
-
- = entry.cost ? "green" : "bad"}
- disabled={points < entry.cost}
- width={7}
- icon={BUYWORD2ICON[entry.buyword]}
- content={entry.buyword}
- onClick={() => act("purchase", {
- spellref: entry.ref,
- })} />
-
- {!entry.refundable && (
-
- No refunds.
-
- ) || (
+ {entry.cat === 'Rituals' && (
+ !!entry.times && (
+
+ Cast {entry.times} Time(s).
+
+ ) || (
+
+ Not Casted Yet.
+
+ )
+ ) || (
+ entry.cooldown && (
+
+ {entry.cooldown}s Cooldown
+
+ ) || (
+
+ No Cooldown!
+
+ )
+ )}
+ {entry.buyword === "Learn" && (
+
+
+
+ )}
+ >
+ }>
+
+
+ {entry.desc}
+
+
+
+
+
= entry.cost ? "green" : "bad"}
+ disabled={points < entry.cost}
width={7}
- icon="arrow-left"
- content="Refund"
- onClick={() => act("refund", {
+ icon={BUYWORD2ICON[entry.buyword]}
+ content={entry.buyword}
+ onClick={() => act("purchase", {
spellref: entry.ref,
})} />
- )}
-
-
-
-
- ))}
-
-
- )}
+
+ {!entry.refundable && (
+
+ No refunds.
+
+ ) || (
+ act("refund", {
+ spellref: entry.ref,
+ })} />
+ )}
+
+
+
+
+ ))}
+
+
+ )}
@@ -648,7 +648,7 @@ export const Spellbook = (props) => {
+ value={points / 10}>
{points + ' points left to spend.'}
diff --git a/tgui/packages/tgui/interfaces/Stack.tsx b/tgui/packages/tgui/interfaces/Stack.tsx
index 4ed07274dc..a6f6493643 100644
--- a/tgui/packages/tgui/interfaces/Stack.tsx
+++ b/tgui/packages/tgui/interfaces/Stack.tsx
@@ -1,4 +1,4 @@
-import { createSearch } from 'common/string';
+import { createSearch } from 'tgui-core/string';
import { sortBy } from 'common/collections';
import { useBackend, useLocalState } from "../backend";
import { Box, Button, Input, NoticeBox, Section, Collapsible, Table } from "tgui-core/components";
@@ -22,12 +22,12 @@ export const Stack = (props) => {
});
const items = searchText.length > 0
- && Object.keys(recipes)
- .filter(testSearch)
- .reduce((obj, key) => {
- obj[key] = recipes[key];
- return obj;
- }, {})
+ && Object.keys(recipes)
+ .filter(testSearch)
+ .reduce((obj, key) => {
+ obj[key] = recipes[key];
+ return obj;
+ }, {})
|| recipes;
const height = Math.max(94 + Object.keys(recipes).length * 26, 250);
@@ -54,8 +54,8 @@ export const Stack = (props) => {
No recipes found.
) || (
-
- )}
+
+ )}
diff --git a/tgui/packages/tgui/interfaces/Tank.tsx b/tgui/packages/tgui/interfaces/Tank.tsx
index 5cca012c2a..426b8601b0 100644
--- a/tgui/packages/tgui/interfaces/Tank.tsx
+++ b/tgui/packages/tgui/interfaces/Tank.tsx
@@ -1,7 +1,7 @@
import { toFixed } from 'common/math';
import { useBackend } from '../backend';
import { Button, LabeledControls, NumberInput, RoundGauge, Section } from 'tgui-core/components';
-import { formatSiUnit } from '../format';
+import { formatSiUnit } from 'tgui-core/format';
import { Window } from '../layouts';
const formatPressure = value => {
diff --git a/tgui/packages/tgui/interfaces/Uplink.tsx b/tgui/packages/tgui/interfaces/Uplink.tsx
index e88ff9c484..292adcc5d7 100644
--- a/tgui/packages/tgui/interfaces/Uplink.tsx
+++ b/tgui/packages/tgui/interfaces/Uplink.tsx
@@ -1,7 +1,7 @@
-import { createSearch, decodeHtmlEntities } from 'common/string';
+import { createSearch, decodeHtmlEntities } from 'tgui-core/string';
import { useBackend, useLocalState } from '../backend';
import { Box, Button, Flex, Input, Section, Table, Tabs, NoticeBox } from 'tgui-core/components';
-import { formatMoney } from '../format';
+import { formatMoney } from 'tgui-core/format';
import { Window } from '../layouts';
const MAX_SEARCH_RESULTS = 25;
diff --git a/tgui/packages/tgui/interfaces/Vending.tsx b/tgui/packages/tgui/interfaces/Vending.tsx
index c8ce132bae..3cec5a8608 100644
--- a/tgui/packages/tgui/interfaces/Vending.tsx
+++ b/tgui/packages/tgui/interfaces/Vending.tsx
@@ -1,7 +1,7 @@
import { filter } from 'common/collections';
import { flow } from 'common/fp';
import { classes } from 'common/react';
-import { createSearch } from 'common/string';
+import { createSearch } from 'tgui-core/string';
import { useBackend, useLocalState } from '../backend';
import { Box, Button, Icon, Input, Section, Table } from 'tgui-core/components';
import { Window } from '../layouts';
@@ -97,16 +97,16 @@ const VendingRow = (props) => {
'horizontal-align': 'middle',
}} />
) || (
-
- )}
+
+ )}
{product.name}
@@ -131,21 +131,21 @@ const VendingRow = (props) => {
'item': product.name,
})} />
) || (
- user.cash
- )
- )}
- content={free
- ? 'FREE' : `${product.price} cr`}
- onClick={() => act('vend', {
- 'ref': product.ref,
- })} />
- )}
+ user.cash
+ )
+ )}
+ content={free
+ ? 'FREE' : `${product.price} cr`}
+ onClick={() => act('vend', {
+ 'ref': product.ref,
+ })} />
+ )}
{
@@ -221,11 +221,11 @@ export const Vending = (props) => {
Your balance is {user.cash} credits.
) || (
-
- No registered ID card!
- Please contact your local HoP!
-
- )}
+
+ No registered ID card!
+ Please contact your local HoP!
+
+ )}
)}
diff --git a/tgui/packages/tgui/interfaces/common/AtmosControls.tsx b/tgui/packages/tgui/interfaces/common/AtmosControls.tsx
index e1f072ac68..b8816a01df 100644
--- a/tgui/packages/tgui/interfaces/common/AtmosControls.tsx
+++ b/tgui/packages/tgui/interfaces/common/AtmosControls.tsx
@@ -1,4 +1,4 @@
-import { decodeHtmlEntities } from 'common/string';
+import { decodeHtmlEntities } from 'tgui-core/string';
import { useBackend } from '../../backend';
import { Button, LabeledList, NumberInput, Section } from 'tgui-core/components';
import { getGasLabel } from '../../constants';
diff --git a/tgui/packages/tgui/interfaces/common/Materials.tsx b/tgui/packages/tgui/interfaces/common/Materials.tsx
index 3042ec770b..1012c887a8 100644
--- a/tgui/packages/tgui/interfaces/common/Materials.tsx
+++ b/tgui/packages/tgui/interfaces/common/Materials.tsx
@@ -1,7 +1,7 @@
import { BooleanLike } from 'common/react';
import { Box, Button, NumberInput, Flex } from 'tgui-core/components';
import { classes } from 'common/react';
-import { formatMoney, formatSiUnit } from '../../format';
+import { formatMoney, formatSiUnit } from 'tgui-core/format';
import { useSharedState } from '../../backend';
import { BoxProps } from 'tgui-core/components/Box';
@@ -52,7 +52,7 @@ const EjectMaterial = (props: {
sheets,
} = props.material;
const [removeMaterials, setRemoveMaterials] = useSharedState(
- context, 'remove_mats_' + name, 1);
+ 'remove_mats_' + name, 1);
if (removeMaterials > 1 && sheets < removeMaterials) {
setRemoveMaterials(sheets || 1);
}