diff --git a/.prettierignore b/.prettierignore index 2b7500b231..43eea47231 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,5 +1,14 @@ -# We don't want prettier to run on anything outside of the TGUI folder, so we have to do this. -/* +# Directories +changelogs +data +font-awesome +jquery +juke +**/build +**/dist +**/node_modules -# We want it to run into the TGUI folder, however. -!/tgui +# File names / types +*.min.* +*.pnp.* +*.bundle.* diff --git a/code/modules/vore/resizing/sizegun_vr.dm b/code/modules/vore/resizing/sizegun_vr.dm index 66214c9d3c..26a9b942a8 100644 --- a/code/modules/vore/resizing/sizegun_vr.dm +++ b/code/modules/vore/resizing/sizegun_vr.dm @@ -52,12 +52,12 @@ set category = "Object" set src in view(1) - var/size_select = tgui_input_number(user, "Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100, 600, 1) + var/size_select = tgui_input_number(user, "Put the desired size (25-200%), (1-600%) in dormitory areas.", "Set Size", size_set_to * 100, RESIZE_MAXIMUM_DORMS * 100, RESIZE_MINIMUM_DORMS * 100) if(!size_select) return //cancelled //We do valid resize testing in actual firings because people move after setting these things. //Just a basic clamp here to the valid ranges. - size_set_to = clamp((size_select/100), RESIZE_MINIMUM_DORMS, RESIZE_MAXIMUM_DORMS) + size_set_to = clamp((size_select / 100), RESIZE_MINIMUM_DORMS, RESIZE_MAXIMUM_DORMS) to_chat(usr, span_notice("You set the size to [size_select]%")) if(size_set_to < RESIZE_MINIMUM || size_set_to > RESIZE_MAXIMUM) to_chat(usr, span_notice("Note: Resizing limited to 25-200% automatically while outside dormatory areas.")) //hint that we clamp it in resize @@ -128,10 +128,10 @@ set category = "Object" set src in view(1) - var/size_select = tgui_input_number(user, "Put the desired size (1-600%)", "Set Size", size_set_to * 100, 600, 1) + var/size_select = tgui_input_number(user, "Put the desired size (1-600%)", "Set Size", size_set_to * 100, RESIZE_MAXIMUM_DORMS * 100, RESIZE_MINIMUM_DORMS * 100) if(!size_select) return //cancelled - size_set_to = clamp((size_select/100), RESIZE_MINIMUM_DORMS, RESIZE_MAXIMUM_DORMS) + size_set_to = clamp((size_select / 100), RESIZE_MINIMUM_DORMS, RESIZE_MAXIMUM_DORMS) to_chat(usr, span_notice("You set the size to [size_select]%")) /obj/item/gun/energy/sizegun/afterattack(atom/A, mob/living/user, adjacent, params) diff --git a/tgui/.prettierignore b/tgui/.prettierignore index 97d37c5a6f..eac862f94a 100644 --- a/tgui/.prettierignore +++ b/tgui/.prettierignore @@ -1,8 +1,5 @@ -.pnp.* -.yarn node_modules +public -# Avoid running on any bundles. -/public/**/* # Running it on tgui.html is fine, however. !/public/tgui.html diff --git a/tgui/packages/common/redux.ts b/tgui/packages/common/redux.ts index dd9b2ee4e6..3327588471 100644 --- a/tgui/packages/common/redux.ts +++ b/tgui/packages/common/redux.ts @@ -4,6 +4,8 @@ * @license MIT */ +type Fn = (...args: any[]) => any; + export type Reducer = ( state: State | undefined, action: ActionType, @@ -36,7 +38,7 @@ export type Dispatch = ( action: ActionType, ) => void; -type StoreEnhancer = (createStoreFunction: Function) => Function; +type StoreEnhancer = (createStoreFunction: Fn) => Fn; type PreparedAction = { payload?: any; @@ -163,7 +165,7 @@ export const combineReducers = ( * @param {string} type The action type to use for created actions. * @param {any} prepare (optional) a method that takes any number of arguments * and returns { payload } or { payload, meta }. If this is given, the - * resulting action creator will pass it's arguments to this method to + * resulting action creator will pass its arguments to this method to * calculate payload & meta. * * @public diff --git a/tgui/packages/tgui-dev-server/link/retrace.ts b/tgui/packages/tgui-dev-server/link/retrace.ts index 86eccd46b5..0560c40aa5 100644 --- a/tgui/packages/tgui-dev-server/link/retrace.ts +++ b/tgui/packages/tgui-dev-server/link/retrace.ts @@ -78,7 +78,7 @@ export function retrace(stack: string): string | undefined { return ` at ${methodName}`; } const compactPath = file - .replace(/^webpack:\/\/\/?/, './') + .replace(/^rspack:\/\/\/?/, './') .replace(/.*node_modules\//, ''); return ` at ${methodName} (${compactPath}:${lineNumber})`; }) diff --git a/tgui/packages/tgui-panel/chat/ChatPageSettings.tsx b/tgui/packages/tgui-panel/chat/ChatPageSettings.tsx index a266fa0143..92e3cc9a21 100644 --- a/tgui/packages/tgui-panel/chat/ChatPageSettings.tsx +++ b/tgui/packages/tgui-panel/chat/ChatPageSettings.tsx @@ -30,6 +30,22 @@ export const ChatPageSettings = (props) => { return (
+ {!page.isMain && ( + + - - - ) : ( - '' - )} - -
{MESSAGE_TYPES.filter( (typeDef) => !typeDef.important && !typeDef.admin, diff --git a/tgui/packages/tgui-panel/settings/settingsImExport.ts b/tgui/packages/tgui-panel/settings/settingsImExport.ts index 5cd8f169dd..912c4dee8d 100644 --- a/tgui/packages/tgui-panel/settings/settingsImExport.ts +++ b/tgui/packages/tgui-panel/settings/settingsImExport.ts @@ -39,16 +39,16 @@ export function exportChatSettings( } export function importChatSettings(settings: string | string[]) { + const dispatch = useDispatch(); if (Array.isArray(settings)) { return; } - const dispatch = useDispatch(); const ourImport = JSON.parse(settings); if (!ourImport?.version) { return; } - const pageRecord = ourImport['chatPages']; - delete ourImport['chatPages']; + const pageRecord = ourImport.chatPages; + delete ourImport.chatPages; dispatch(importSettings(ourImport, pageRecord)); } diff --git a/tgui/packages/tgui-say/index.tsx b/tgui/packages/tgui-say/index.tsx index 2645185767..e84d28af85 100644 --- a/tgui/packages/tgui-say/index.tsx +++ b/tgui/packages/tgui-say/index.tsx @@ -1,12 +1,10 @@ -import './styles/main.scss'; - import { createRoot, type Root } from 'react-dom/client'; import { TguiSay } from './TguiSay'; let reactRoot: Root | null = null; -document.onreadystatechange = function () { +document.onreadystatechange = () => { if (document.readyState !== 'complete') return; if (!reactRoot) { diff --git a/tgui/packages/tgui-setup/helpers.js b/tgui/packages/tgui-setup/helpers.js index 076faf13b9..d3eb103c24 100644 --- a/tgui/packages/tgui-setup/helpers.js +++ b/tgui/packages/tgui-setup/helpers.js @@ -2,11 +2,11 @@ (function () { // Utility functions - let hasOwn = Object.prototype.hasOwnProperty; - let assign = function (target) { + const hasOwn = Object.prototype.hasOwnProperty; + const assign = function (target) { for (let i = 1; i < arguments.length; i++) { - let source = arguments[i]; - for (let key in source) { + const source = arguments[i]; + for (const key in source) { if (hasOwn.call(source, key)) { target[key] = source[key]; } @@ -14,8 +14,8 @@ } return target; }; - let parseMetaTag = function (name) { - let content = document.getElementById(name).getAttribute('content'); + const parseMetaTag = function (name) { + const content = document.getElementById(name).getAttribute('content'); if (content === '[' + name + ']') { return null; } @@ -25,7 +25,7 @@ // BYOND API object // ------------------------------------------------------ - let Byond = (window.Byond = {}); + const Byond = (window.Byond = {}); // Expose inlined metadata Byond.windowId = parseMetaTag('tgui:windowId'); @@ -35,20 +35,20 @@ // Trident engine version Byond.TRIDENT = (function () { - let groups = navigator.userAgent.match(/Trident\/(\d+).+?;/i); - let majorVersion = groups && groups[1]; + const groups = navigator.userAgent.match(/Trident\/(\d+).+?;/i); + const majorVersion = groups && groups[1]; return majorVersion ? parseInt(majorVersion, 10) : null; })(); // Blink engine version Byond.BLINK = (function () { - let groups = navigator.userAgent.match(/Chrome\/(\d+)\./); - let majorVersion = groups && groups[1]; + const groups = navigator.userAgent.match(/Chrome\/(\d+)\./); + const majorVersion = groups && groups[1]; return majorVersion ? parseInt(majorVersion, 10) : null; })(); // Basic checks to detect whether this page runs in BYOND - let isByond = + const isByond = (Byond.TRIDENT !== null || Byond.BLINK !== null || window.cef_to_byond) && location.hostname === '127.0.0.1' && location.search !== '?external'; @@ -65,7 +65,7 @@ Byond.__callbacks__ = []; // Reviver for BYOND JSON - let byondJsonReviver = function (key, value) { + const byondJsonReviver = function (key, value) { if (typeof value === 'object' && value !== null && value.__number__) { return parseFloat(value.__number__); } @@ -83,7 +83,7 @@ let url = (path || '') + '?'; let i = 0; if (params) { - for (let key in params) { + for (const key in params) { if (hasOwn.call(params, key)) { if (i++ > 0) { url += '&'; @@ -110,7 +110,7 @@ } // Send an HTTP request to DreamSeeker's HTTP server. // Allows sending much bigger payloads. - let xhr = new XMLHttpRequest(); + const xhr = new XMLHttpRequest(); xhr.open('GET', url); xhr.send(); }; @@ -119,8 +119,8 @@ if (!window.Promise) { throw new Error('Async calls require API level of ES2015 or later.'); } - let index = Byond.__callbacks__.length; - let promise = new window.Promise((resolve) => { + const index = Byond.__callbacks__.length; + const promise = new window.Promise((resolve) => { Byond.__callbacks__.push(resolve); }); Byond.call( @@ -146,8 +146,8 @@ if (id === null) { id = ''; } - let isArray = propName instanceof Array; - let isSpecific = propName && propName !== '*' && !isArray; + const isArray = propName instanceof Array; + const isSpecific = propName && propName !== '*' && !isArray; let promise = Byond.callAsync('winget', { id: id, property: (isArray && propName.join(',')) || propName || '*', @@ -166,7 +166,7 @@ } else if (typeof id === 'object') { return Byond.call('winset', id); } - let props = {}; + const props = {}; if (typeof propName === 'string') { props[propName] = propValue; } else { @@ -184,7 +184,7 @@ } }; - let MAX_PACKET_SIZE = 1024; + const MAX_PACKET_SIZE = 1024; Byond.sendMessage = function (type, payload) { let message = @@ -195,7 +195,7 @@ message.payload = JSON.stringify(message.payload); if (!Byond.TRIDENT && message.payload.length > MAX_PACKET_SIZE) { - let chunks = []; + const chunks = []; for ( let i = 0, charsLength = message.payload.length; @@ -206,7 +206,7 @@ } for (let i = 0; i < chunks.length; i++) { - let to_send = chunks[i]; + const to_send = chunks[i]; message = { type: type, @@ -242,7 +242,7 @@ }; Byond.subscribeTo = function (type, listener) { - let _listener = function (_type, payload) { + const _listener = function (_type, payload) { if (_type === type) { listener(payload); } @@ -254,43 +254,43 @@ // Asset loaders // ------------------------------------------------------ - let RETRY_ATTEMPTS = 5; - let RETRY_WAIT_INITIAL = 500; - let RETRY_WAIT_INCREMENT = 500; + const RETRY_ATTEMPTS = 5; + const RETRY_WAIT_INITIAL = 500; + const RETRY_WAIT_INCREMENT = 500; - let loadedAssetByUrl = {}; + const loadedAssetByUrl = {}; - let isStyleSheetLoaded = function (node, url) { - let styleSheet = node.sheet; + const isStyleSheetLoaded = function (node, url) { + const styleSheet = node.sheet; if (styleSheet) { return styleSheet.rules.length > 0; } return false; }; - let injectNode = function (node) { + const injectNode = function (node) { if (!document.body) { setTimeout(() => { injectNode(node); }); return; } - let refs = document.body.childNodes; - let ref = refs[refs.length - 1]; + const refs = document.body.childNodes; + const ref = refs[refs.length - 1]; ref.parentNode.insertBefore(node, ref.nextSibling); }; - let loadAsset = function (options) { - let url = options.url; - let type = options.type; - let sync = options.sync; - let attempt = options.attempt || 0; + const loadAsset = function (options) { + const url = options.url; + const type = options.type; + const sync = options.sync; + const attempt = options.attempt || 0; if (loadedAssetByUrl[url]) { return; } loadedAssetByUrl[url] = options; // Generic retry function - let retry = function () { + const retry = function () { if (attempt >= RETRY_ATTEMPTS) { let errorMessage = 'Error: Failed to load the asset ' + @@ -346,7 +346,7 @@ if (!sync) { node.media = 'only x'; } - let removeNodeAndRetry = function () { + const removeNodeAndRetry = function () { node.parentNode.removeChild(node); node = null; retry(); @@ -384,10 +384,10 @@ if (window.navigator.msSaveBlob) { window.navigator.msSaveBlob(blob, filename); } else if (window.showSaveFilePicker) { - let accept = {}; + const accept = {}; accept[blob.type] = [ext]; - let opts = { + const opts = { suggestedName: filename, types: [ { @@ -448,8 +448,8 @@ window.onerror = function (msg, url, line, col, error) { stack = window.__augmentStack__(stack, error); // Print error to the page if (Byond.strictMode) { - let errorRoot = document.getElementById('FatalError'); - let errorStack = document.getElementById('FatalError__stack'); + const errorRoot = document.getElementById('FatalError'); + const errorStack = document.getElementById('FatalError__stack'); if (errorRoot) { errorRoot.className = 'FatalError FatalError--visible'; if (window.onerror.__stack__) { @@ -457,11 +457,11 @@ window.onerror = function (msg, url, line, col, error) { } else { window.onerror.__stack__ = stack; } - let textProp = 'textContent'; + const textProp = 'textContent'; errorStack[textProp] = window.onerror.__stack__; } // Set window geometry - let setFatalErrorGeometry = function () { + const setFatalErrorGeometry = function () { Byond.winset(Byond.windowId, { titlebar: true, 'is-visible': true, @@ -522,9 +522,9 @@ window.update = function (rawMessage) { return; } // Parse the message - let message = Byond.parseJson(rawMessage); + const message = Byond.parseJson(rawMessage); // Notify listeners - let listeners = window.update.listeners; + const listeners = window.update.listeners; for (let i = 0; i < listeners.length; i++) { listeners[i](message.type, message.payload); } @@ -545,15 +545,15 @@ window.update.flushQueue = function (listener) { } } // Process queued messages on provided listener - let queue = window.update.queue; + const queue = window.update.queue; for (let i = 0; i < queue.length; i++) { - let message = Byond.parseJson(queue[i]); + const message = Byond.parseJson(queue[i]); listener(message.type, message.payload); } }; window.replaceHtml = function (inline_html) { - let children = document.body.childNodes; + const children = document.body.childNodes; for (let i = 0; i < children.length; i++) { if (children[i].nodeValue == ' tgui:inline-html-start ') { diff --git a/tgui/packages/tgui/Icons.tsx b/tgui/packages/tgui/Icons.tsx index 1a377c3d38..5745ec64aa 100644 --- a/tgui/packages/tgui/Icons.tsx +++ b/tgui/packages/tgui/Icons.tsx @@ -4,14 +4,18 @@ import { fetchRetry } from 'tgui-core/http'; import { resolveAsset } from './assets'; import { logger } from './logging'; -function loadIconMap() { +function setIconRefMap(map: Record): void { + Byond.iconRefMap = map; +} + +function loadIconMap(): void { fetchRetry(resolveAsset('icon_ref_map.json')) .then((res) => res.json()) - .then((data) => (Byond.iconRefMap = data)) + .then(setIconRefMap) .catch((error) => logger.log(error)); } -function IconMapLoader() { +function IconMapLoader(): null { useEffect(() => { if (Object.keys(Byond.iconRefMap).length === 0) { loadIconMap(); diff --git a/tgui/packages/tgui/backend.ts b/tgui/packages/tgui/backend.ts index 33e6ae9dfc..180bcb623e 100644 --- a/tgui/packages/tgui/backend.ts +++ b/tgui/packages/tgui/backend.ts @@ -223,14 +223,13 @@ export const backendMiddleware = (store) => { export const sendAct = (action: string, payload: object = {}) => { // Validate that payload is an object // prettier-ignore - const isObject = typeof payload === 'object' - && payload !== null - && !Array.isArray(payload); + const isObject = + typeof payload === 'object' && payload !== null && !Array.isArray(payload); if (!isObject) { logger.error(`Payload for act() must be an object, got this:`, payload); return; } - Byond.sendMessage('act/' + action, payload); + Byond.sendMessage(`act/${action}`, payload); }; type BackendState = { diff --git a/tgui/packages/tgui/components/Interactive.tsx b/tgui/packages/tgui/components/Interactive.tsx index dfb328cb1a..b338f8a4f3 100644 --- a/tgui/packages/tgui/components/Interactive.tsx +++ b/tgui/packages/tgui/components/Interactive.tsx @@ -28,7 +28,7 @@ export interface Interaction { // Finds the proper window object to fix iframe embedding issues const getParentWindow = (node?: HTMLDivElement | null): Window => { - return (node && node.ownerDocument.defaultView) || window; + return node?.ownerDocument.defaultView || window; }; // Returns a relative position of the pointer inside the node's bounding box diff --git a/tgui/packages/tgui/components/NanoMap.tsx b/tgui/packages/tgui/components/NanoMap.tsx index aab4a1ed91..e48592b005 100644 --- a/tgui/packages/tgui/components/NanoMap.tsx +++ b/tgui/packages/tgui/components/NanoMap.tsx @@ -192,16 +192,16 @@ export class NanoMap extends Component { const WxH = this.getWxH(zoom); - const mapUrl = resolveAsset('minimap_' + config.mapZLevel + '.png'); + const mapUrl = resolveAsset(`minimap_${config.mapZLevel}.png`); const newStyle: {} = { - width: WxH[0] + 'px', - height: WxH[1] + 'px', - 'margin-top': offsetY + 'px', - 'margin-left': offsetX + 'px', + width: `${WxH[0]}px`, + height: `${WxH[1]}px`, + 'margin-top': `${offsetY}px`, + 'margin-left': `${offsetX}px`, overflow: 'hidden', position: 'relative', 'image-rendering': 'pixelated', - 'background-image': 'url(' + mapUrl + ')', + 'background-image': `url(${mapUrl})`, 'background-size': 'cover', 'background-repeat': 'no-repeat', 'text-align': 'center', @@ -252,8 +252,8 @@ const NanoMapMarker = (props: NanoMapMarkerProps) => { position="absolute" className="NanoMap__marker" lineHeight="0" - bottom={ry + 'px'} - left={rx + 'px'} + bottom={`${ry}px`} + left={`${rx}px`} onMouseDown={handleOnClick} > @@ -283,7 +283,7 @@ const NanoMapZoomer = (props: NanoMapZoomerProps) => { minValue={1} maxValue={8} stepPixelSize={10} - format={(v) => v + 'x'} + format={(v) => `${v}x`} value={props.zoom} onDrag={(e, v) => props.onZoom(e, v)} /> diff --git a/tgui/packages/tgui/components/Pointer.tsx b/tgui/packages/tgui/components/Pointer.tsx index 0e72de0e97..52ae0f59b1 100644 --- a/tgui/packages/tgui/components/Pointer.tsx +++ b/tgui/packages/tgui/components/Pointer.tsx @@ -12,7 +12,7 @@ * SOFTWARE. */ -import React from 'react'; +import type React from 'react'; import { classes } from 'tgui-core/react'; interface PointerProps { diff --git a/tgui/packages/tgui/debug/middleware.ts b/tgui/packages/tgui/debug/middleware.ts index 0c18a26020..e102362f8f 100644 --- a/tgui/packages/tgui/debug/middleware.ts +++ b/tgui/packages/tgui/debug/middleware.ts @@ -65,7 +65,7 @@ export function relayMiddleware(store) { return (next) => (action) => { const { type, relayed } = action; if (type === openExternalBrowser.type) { - window.open(location.href + '?external', '_blank'); + window.open(`${location.href}?external`, '_blank'); return; } if (relayedTypes.includes(type) && !relayed && !externalBrowser) { diff --git a/tgui/packages/tgui/drag.ts b/tgui/packages/tgui/drag.ts index 867c3a69c7..205a21e9f6 100644 --- a/tgui/packages/tgui/drag.ts +++ b/tgui/packages/tgui/drag.ts @@ -43,14 +43,14 @@ export const getWindowSize = (): [number, number] => [ const setWindowPosition = (vec: [number, number]) => { const byondPos = vecAdd(vec, screenOffset); return Byond.winset(Byond.windowId, { - pos: byondPos[0] + ',' + byondPos[1], + pos: `${byondPos[0]},${byondPos[1]}`, }); }; // Set window size const setWindowSize = (vec: [number, number]) => { return Byond.winset(Byond.windowId, { - size: vec[0] + 'x' + vec[1], + size: `${vec[0]}x${vec[1]}`, }); }; diff --git a/tgui/packages/tgui/hotkeys.ts b/tgui/packages/tgui/hotkeys.ts index 6a64ac4daf..b1c602608d 100644 --- a/tgui/packages/tgui/hotkeys.ts +++ b/tgui/packages/tgui/hotkeys.ts @@ -176,7 +176,7 @@ export function setupHotKeys(config?: KeyPassthroughConfig) { const promises: Promise[] = []; for (const set of separated) { - promises.push(Byond.winget(set + '.*')); + promises.push(Byond.winget(`${set}.*`)); } Promise.all(promises).then((sets: Record[]) => { diff --git a/tgui/packages/tgui/interfaces/AccountsTerminal.tsx b/tgui/packages/tgui/interfaces/AccountsTerminal.tsx index 21880d1d8f..b36a2a74f6 100644 --- a/tgui/packages/tgui/interfaces/AccountsTerminal.tsx +++ b/tgui/packages/tgui/interfaces/AccountsTerminal.tsx @@ -251,7 +251,7 @@ const ListView = (props) => { }) } > - {'#' + acc.account_number} + {`#${acc.account_number}`} ))} diff --git a/tgui/packages/tgui/interfaces/AirAlarm.tsx b/tgui/packages/tgui/interfaces/AirAlarm.tsx index afe7eb0d91..fb6338e396 100644 --- a/tgui/packages/tgui/interfaces/AirAlarm.tsx +++ b/tgui/packages/tgui/interfaces/AirAlarm.tsx @@ -338,7 +338,7 @@ const AirAlarmControlThresholds = (props) => { {thresholds.map((threshold) => ( - + {getGasLabel(threshold.name)} diff --git a/tgui/packages/tgui/interfaces/AlertModal.tsx b/tgui/packages/tgui/interfaces/AlertModal.tsx index ef1b7c7dff..f51bdeb582 100644 --- a/tgui/packages/tgui/interfaces/AlertModal.tsx +++ b/tgui/packages/tgui/interfaces/AlertModal.tsx @@ -3,7 +3,7 @@ import { useBackend } from 'tgui/backend'; import { Window } from 'tgui/layouts'; import { Autofocus, Box, Button, Section, Stack } from 'tgui-core/components'; import { isEscape, KEY } from 'tgui-core/keys'; -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; import { Loader } from './common/Loader'; @@ -36,7 +36,7 @@ export function AlertModal(props) { // Stolen wholesale from fontcode function textWidth(text: string, font: string, fontsize: number) { // default font height is 12 in tgui - font = fontsize + 'x ' + font; + font = `${fontsize}x ${font}`; const c = document.createElement('canvas'); const ctx = c.getContext('2d') as CanvasRenderingContext2D; ctx.font = font; diff --git a/tgui/packages/tgui/interfaces/AlgaeFarm.tsx b/tgui/packages/tgui/interfaces/AlgaeFarm.tsx index 7fe1626bda..77d2a1ef3b 100644 --- a/tgui/packages/tgui/interfaces/AlgaeFarm.tsx +++ b/tgui/packages/tgui/interfaces/AlgaeFarm.tsx @@ -109,7 +109,7 @@ export const AlgaeFarm = (props) => { -
+
{input ? ( @@ -125,7 +125,7 @@ export const AlgaeFarm = (props) => {
-
+
{output ? ( diff --git a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerParts.tsx b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerParts.tsx index a4e8c7d89a..87a4f03b54 100644 --- a/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerParts.tsx +++ b/tgui/packages/tgui/interfaces/AppearanceChanger/AppearanceChangerParts.tsx @@ -37,7 +37,7 @@ export const AppearanceChangerParts = (props: { {i === 0 && ( setSearchText(val)} /> @@ -107,7 +107,7 @@ export const AppearanceChangerHair = (props: { setSearchText(val)} /> diff --git a/tgui/packages/tgui/interfaces/AtmosFilter.tsx b/tgui/packages/tgui/interfaces/AtmosFilter.tsx index aab311d261..dcdb5745f7 100644 --- a/tgui/packages/tgui/interfaces/AtmosFilter.tsx +++ b/tgui/packages/tgui/interfaces/AtmosFilter.tsx @@ -41,7 +41,7 @@ export const AtmosFilter = (props) => { val + ' L/s'} + format={(val) => `${val} L/s`} /> { Concentrations - + { } /> - + { return ( -
+
{data.authenticated_account ? ( ) : ( diff --git a/tgui/packages/tgui/interfaces/Batteryrack.tsx b/tgui/packages/tgui/interfaces/Batteryrack.tsx index 49dd41b372..9b66357d45 100644 --- a/tgui/packages/tgui/interfaces/Batteryrack.tsx +++ b/tgui/packages/tgui/interfaces/Batteryrack.tsx @@ -113,7 +113,7 @@ export const Batteryrack = (props) => { - {cell.used ? cell.percentage + '%' : 'N/C'} + {cell.used ? `${cell.percentage}%` : 'N/C'} diff --git a/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainDamage.tsx b/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainDamage.tsx index a265f30570..14429e268a 100644 --- a/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainDamage.tsx +++ b/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainDamage.tsx @@ -14,7 +14,7 @@ export const BodyScannerMainDamage = (props: { occupant: occupant }) => { <> {d1[0]}: - {!!d2 && d2[0] + ':'} + {!!d2 && `${d2[0]}:`} diff --git a/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainOccupant.tsx b/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainOccupant.tsx index 00f05da6de..c50626afad 100644 --- a/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainOccupant.tsx +++ b/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainOccupant.tsx @@ -76,8 +76,8 @@ export const BodyScannerMainOccupant = (props: { occupant: occupant }) => { %) - {toFixed(occupant.weight / 2.20463, 1) + 'kg, '} - {toFixed(occupant.weight) + 'lbs'} + {`${toFixed(occupant.weight / 2.20463, 1)}kg, `} + {`${toFixed(occupant.weight)}lbs`}
diff --git a/tgui/packages/tgui/interfaces/BodyScanner/constants.ts b/tgui/packages/tgui/interfaces/BodyScanner/constants.ts index 82291c3a9e..9214d68b06 100644 --- a/tgui/packages/tgui/interfaces/BodyScanner/constants.ts +++ b/tgui/packages/tgui/interfaces/BodyScanner/constants.ts @@ -27,21 +27,21 @@ export const abnormalities: (string | ((occupant: occupant) => string))[][] = [ 'humanPrey', 'average', (occupant) => { - return 'Foreign Humanoid(s) detected: ' + occupant.humanPrey; + return `Foreign Humanoid(s) detected: ${occupant.humanPrey}`; }, ], [ 'livingPrey', 'average', (occupant) => { - return 'Foreign Creature(s) detected: ' + occupant.livingPrey; + return `Foreign Creature(s) detected: ${occupant.livingPrey}`; }, ], [ 'objectPrey', 'average', (occupant) => { - return 'Foreign Object(s) detected: ' + occupant.objectPrey; + return `Foreign Object(s) detected: ${occupant.objectPrey}`; }, ], [ diff --git a/tgui/packages/tgui/interfaces/BombTester.tsx b/tgui/packages/tgui/interfaces/BombTester.tsx index 0adc6f7aa9..fe47e6ee2c 100644 --- a/tgui/packages/tgui/interfaces/BombTester.tsx +++ b/tgui/packages/tgui/interfaces/BombTester.tsx @@ -215,8 +215,8 @@ class BombTesterSimulation extends Component { const newStyle: {} = { position: 'relative', - left: x + 'px', - top: y + 'px', + left: `${x}px`, + top: `${y}px`, }; return ( diff --git a/tgui/packages/tgui/interfaces/BrigTimer.tsx b/tgui/packages/tgui/interfaces/BrigTimer.tsx index 7f661d168a..7fd3aa42e2 100644 --- a/tgui/packages/tgui/interfaces/BrigTimer.tsx +++ b/tgui/packages/tgui/interfaces/BrigTimer.tsx @@ -78,7 +78,7 @@ export const BrigTimer = (props) => { icon="hourglass-start" onClick={() => act('preset', { preset: 'short' })} > - {'Add ' + formatTime(preset_short)} + {`Add ${formatTime(preset_short)}`} @@ -87,7 +87,7 @@ export const BrigTimer = (props) => { icon="hourglass-start" onClick={() => act('preset', { preset: 'medium' })} > - {'Add ' + formatTime(preset_medium)} + {`Add ${formatTime(preset_medium)}`} @@ -96,7 +96,7 @@ export const BrigTimer = (props) => { icon="hourglass-start" onClick={() => act('preset', { preset: 'long' })} > - {'Add ' + formatTime(preset_long)} + {`Add ${formatTime(preset_long)}`} diff --git a/tgui/packages/tgui/interfaces/CameraConsole.tsx b/tgui/packages/tgui/interfaces/CameraConsole.tsx index 144e58ed83..770732caec 100644 --- a/tgui/packages/tgui/interfaces/CameraConsole.tsx +++ b/tgui/packages/tgui/interfaces/CameraConsole.tsx @@ -96,7 +96,7 @@ export const CameraConsole = (props) => {
Camera: - {(activeCamera && activeCamera.name) || '—'} + {activeCamera?.name || '—'}
SEL: diff --git a/tgui/packages/tgui/interfaces/Canister.tsx b/tgui/packages/tgui/interfaces/Canister.tsx index 9919945192..e6b65ede71 100644 --- a/tgui/packages/tgui/interfaces/Canister.tsx +++ b/tgui/packages/tgui/interfaces/Canister.tsx @@ -68,7 +68,7 @@ export const Canister = (props) => { }} format={(value) => { if (value < 10000) { - return toFixed(value) + ' kPa'; + return `${toFixed(value)} kPa`; } return formatSiUnit(value * 1000, 1, 'Pa'); }} diff --git a/tgui/packages/tgui/interfaces/ChangelingPanel/ChangelingPowerList.tsx b/tgui/packages/tgui/interfaces/ChangelingPanel/ChangelingPowerList.tsx index bb3ccd0c13..d1ae5be7c3 100644 --- a/tgui/packages/tgui/interfaces/ChangelingPanel/ChangelingPowerList.tsx +++ b/tgui/packages/tgui/interfaces/ChangelingPanel/ChangelingPowerList.tsx @@ -32,7 +32,7 @@ export const ChangeLingSearchableList = (props: { mr="10px" fluid value={searchText} - placeholder={'Search for ' + title + '...'} + placeholder={`Search for ${title}...`} onChange={(value: string) => setSearchText(value)} /> diff --git a/tgui/packages/tgui/interfaces/Changelog.tsx b/tgui/packages/tgui/interfaces/Changelog.tsx index 0c04248f25..f9f17516c5 100644 --- a/tgui/packages/tgui/interfaces/Changelog.tsx +++ b/tgui/packages/tgui/interfaces/Changelog.tsx @@ -84,21 +84,19 @@ export class Changelog extends Component< const maxAttempts = 6; if (attemptNumber > maxAttempts) { - return this.setData( - 'Failed to load data after ' + maxAttempts + ' attempts', - ); + return this.setData(`Failed to load data after ${maxAttempts} attempts`); } act('get_month', { date }); - fetch(resolveAsset(date + '.yml')).then(async (changelogData) => { + fetch(resolveAsset(`${date}.yml`)).then(async (changelogData) => { const result = await changelogData.text(); const errorRegex = /^Cannot find/; if (errorRegex.test(result)) { const timeout = 50 + attemptNumber * 50; - self.setData('Loading changelog data' + '.'.repeat(attemptNumber + 3)); + self.setData(`Loading changelog data${'.'.repeat(attemptNumber + 3)}`); setTimeout(() => { self.getData(date, attemptNumber + 1); }, timeout); @@ -305,12 +303,12 @@ export class Changelog extends Component< color={ icons[changeType] ? icons[changeType].color - : icons['unknown'].color + : icons.unknown.icon } name={ icons[changeType] ? icons[changeType].icon - : icons['unknown'].icon + : icons.unknown.icon } /> diff --git a/tgui/packages/tgui/interfaces/ChemAnalyzerPro.tsx b/tgui/packages/tgui/interfaces/ChemAnalyzerPro.tsx index 1785714bba..4517e2e499 100644 --- a/tgui/packages/tgui/interfaces/ChemAnalyzerPro.tsx +++ b/tgui/packages/tgui/interfaces/ChemAnalyzerPro.tsx @@ -42,7 +42,7 @@ export const ChemAnalyzerPro = () => {
onSearchText(value)} /> @@ -141,9 +141,9 @@ export const AnalyzerSearchList = (props: { {capitalize(entry.title)} - {( + {`${( (!total ? 0 : entry.beakerAmount / total) * 100 - ).toFixed() + '%'} + ).toFixed()}%`} diff --git a/tgui/packages/tgui/interfaces/ChemDispenser/ChemDispenserChemicals.tsx b/tgui/packages/tgui/interfaces/ChemDispenser/ChemDispenserChemicals.tsx index d63da7f2c6..2e822529e4 100644 --- a/tgui/packages/tgui/interfaces/ChemDispenser/ChemDispenserChemicals.tsx +++ b/tgui/packages/tgui/interfaces/ChemDispenser/ChemDispenserChemicals.tsx @@ -32,7 +32,7 @@ export const ChemDispenserChemicals = (props) => { }) } > - {c.name + ' (' + c.volume + ')'} + {`${c.name} (${c.volume})`} ))} diff --git a/tgui/packages/tgui/interfaces/ChemDispenser/ChemDispenserSettings.tsx b/tgui/packages/tgui/interfaces/ChemDispenser/ChemDispenserSettings.tsx index c14cb7167b..bdf025a5d9 100644 --- a/tgui/packages/tgui/interfaces/ChemDispenser/ChemDispenserSettings.tsx +++ b/tgui/packages/tgui/interfaces/ChemDispenser/ChemDispenserSettings.tsx @@ -30,7 +30,7 @@ export const ChemDispenserSettings = (props) => { }) } > - {a + 'u'} + {`${a}u`} ))} diff --git a/tgui/packages/tgui/interfaces/ChemMaster/ChemMasterProductionChemical.tsx b/tgui/packages/tgui/interfaces/ChemMaster/ChemMasterProductionChemical.tsx index 05bb17043f..10c9ae8e85 100644 --- a/tgui/packages/tgui/interfaces/ChemMaster/ChemMasterProductionChemical.tsx +++ b/tgui/packages/tgui/interfaces/ChemMaster/ChemMasterProductionChemical.tsx @@ -39,7 +39,7 @@ export const ChemMasterProductionChemical = (props: { }} > {
act('start')}> {on ? 'On' : 'Off'} diff --git a/tgui/packages/tgui/interfaces/CloningConsole/CloningConsoleBodyOverride.tsx b/tgui/packages/tgui/interfaces/CloningConsole/CloningConsoleBodyOverride.tsx index 52debede2e..9f3bd8b873 100644 --- a/tgui/packages/tgui/interfaces/CloningConsole/CloningConsoleBodyOverride.tsx +++ b/tgui/packages/tgui/interfaces/CloningConsole/CloningConsoleBodyOverride.tsx @@ -13,7 +13,7 @@ export const viewRecordModalBodyOverride = (modal: modalData) => { modal.args; const damages = health.split(' - '); return ( -
+
{realname} diff --git a/tgui/packages/tgui/interfaces/CloningConsole/CloningConsoleTabs.tsx b/tgui/packages/tgui/interfaces/CloningConsole/CloningConsoleTabs.tsx index 43771afc18..1cd094fd84 100644 --- a/tgui/packages/tgui/interfaces/CloningConsole/CloningConsoleTabs.tsx +++ b/tgui/packages/tgui/interfaces/CloningConsole/CloningConsoleTabs.tsx @@ -110,7 +110,7 @@ export const CloningConsoleMain = (props) => { }} mt="0.5rem" > - {toFixed(pod.progress) + '%'} + {`${toFixed(pod.progress)}%`} ); } else if (pod.status === 'mess') { @@ -140,7 +140,7 @@ export const CloningConsoleMain = (props) => { {
Item:
{
Preview:
= () => { const { act, data } = useBackend(); @@ -195,7 +195,7 @@ const ColorPresets: React.FC = React.memo( }} > @@ -225,7 +225,7 @@ const ColorPresets: React.FC = React.memo( }} > diff --git a/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleAuth.tsx b/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleAuth.tsx index e0b170f0bd..5ab3eb8608 100644 --- a/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleAuth.tsx +++ b/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleAuth.tsx @@ -35,7 +35,7 @@ export const CommunicationsConsoleAuth = (props) => { selected={authenticated} onClick={() => act('auth')} > - {authenticated ? 'Log Out (' + authReadable + ')' : 'Log In'} + {authenticated ? `Log Out (${authReadable})` : 'Log In'} )} diff --git a/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleMain.tsx b/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleMain.tsx index d9fc1a23f3..200005a382 100644 --- a/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleMain.tsx +++ b/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleMain.tsx @@ -21,14 +21,14 @@ export const CommunicationsConsoleMain = (props) => { boss_short, } = data; - const reportText = 'View (' + messages.length + ')'; + const reportText = `View (${messages.length})`; let announceText = 'Make Priority Announcement'; if (msg_cooldown > 0) { - announceText += ' (' + msg_cooldown + 's)'; + announceText += ` (${msg_cooldown}s)`; } - let ccMessageText = emagged ? 'Message [UNKNOWN]' : 'Message ' + boss_short; + let ccMessageText = emagged ? 'Message [UNKNOWN]' : `Message ${boss_short}`; if (cc_cooldown > 0) { - ccMessageText += ' (' + cc_cooldown + 's)'; + ccMessageText += ` (${cc_cooldown}s)`; } const alertLevelText = str_security_level; diff --git a/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleStatusDisplay.tsx b/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleStatusDisplay.tsx index 81c224058f..868a591f43 100644 --- a/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleStatusDisplay.tsx +++ b/tgui/packages/tgui/interfaces/CommunicationsConsole/CommunicationsConsoleStatusDisplay.tsx @@ -8,7 +8,7 @@ export const CommunicationsConsoleStatusDisplay = (props) => { const { stat_display, authenticated } = data; - const presetButtons = stat_display['presets'].map((pb) => { + const presetButtons = stat_display.presets.map((pb) => { return ( @@ -122,7 +122,7 @@ export const CookingAppliance = (props) => { return ( { }) } > - {cm.area + ' (' + cm.x + ', ' + cm.y + ')'} + {`${cm.area} (${cm.x}, ${cm.y})`} ) : ( - cm.area + ' (' + cm.x + ', ' + cm.y + ', ' + cm.z + ')' + `${cm.area} (${cm.x}, ${cm.y}, ${cm.z})` ) ) : ( 'Not Available' diff --git a/tgui/packages/tgui/interfaces/CrewMonitor/CrewMonitorMapView.tsx b/tgui/packages/tgui/interfaces/CrewMonitor/CrewMonitorMapView.tsx index 9e84e496aa..09486cf398 100644 --- a/tgui/packages/tgui/interfaces/CrewMonitor/CrewMonitorMapView.tsx +++ b/tgui/packages/tgui/interfaces/CrewMonitor/CrewMonitorMapView.tsx @@ -27,7 +27,7 @@ export const CrewMonitorMapView = (props: { y={cm.y} zoom={props.zoom} icon="circle" - tooltip={cm.name + ' (' + cm.assignment + ')'} + tooltip={`${cm.name} (${cm.assignment})`} color={getStatColor(cm)} /> ))} diff --git a/tgui/packages/tgui/interfaces/Cryo/CryoContent.tsx b/tgui/packages/tgui/interfaces/Cryo/CryoContent.tsx index f04b7d7514..296dc71705 100644 --- a/tgui/packages/tgui/interfaces/Cryo/CryoContent.tsx +++ b/tgui/packages/tgui/interfaces/Cryo/CryoContent.tsx @@ -66,7 +66,7 @@ export const CryoContent = (props) => { toFixed(value) + ' K'} + format={(value) => `${toFixed(value)} K`} /> @@ -139,7 +139,7 @@ const CryoBeaker = (props) => { {beakerVolume ? ( toFixed(v) + ' units remaining'} + format={(v) => `${toFixed(v)} units remaining`} /> ) : ( 'Beaker is empty' diff --git a/tgui/packages/tgui/interfaces/DNAModifier/DNAModifierMain.tsx b/tgui/packages/tgui/interfaces/DNAModifier/DNAModifierMain.tsx index 647e3b5382..32d55b6b41 100644 --- a/tgui/packages/tgui/interfaces/DNAModifier/DNAModifierMain.tsx +++ b/tgui/packages/tgui/interfaces/DNAModifier/DNAModifierMain.tsx @@ -12,11 +12,11 @@ export const DNAModifierMain = (props) => { const { selectedMenuKey } = data; - const tabs: React.JSX.Element[] = []; + const tabs: Record = {}; - tabs['se'] = ; - tabs['buffer'] = ; - tabs['rejuvenators'] = ; + tabs.se = ; + tabs.buffer = ; + tabs.rejuvenators = ; return (
diff --git a/tgui/packages/tgui/interfaces/DNAModifier/DNAModifierMainBuffers.tsx b/tgui/packages/tgui/interfaces/DNAModifier/DNAModifierMainBuffers.tsx index 69c42b1487..02f29a7b44 100644 --- a/tgui/packages/tgui/interfaces/DNAModifier/DNAModifierMainBuffers.tsx +++ b/tgui/packages/tgui/interfaces/DNAModifier/DNAModifierMainBuffers.tsx @@ -19,7 +19,7 @@ export const DNAModifierMainBuffers = (props) => { @@ -48,7 +48,7 @@ const DNAModifierMainBuffersElement = (props: { const { act, data } = useBackend(); const { id, name, buffer } = props; const { isInjectorReady, hasOccupant, occupant } = data; - const realName: string = name + (buffer.data ? ' - ' + buffer.label : ''); + const realName: string = name + (buffer.data ? ` - ${buffer.label}` : ''); return (
{ const { radiationIntensity, radiationDuration, occupant } = data; return ( - (occupant && occupant.isViableSubject && ( + (occupant?.isViableSubject && (
diff --git a/tgui/packages/tgui/interfaces/DroneConsole.tsx b/tgui/packages/tgui/interfaces/DroneConsole.tsx index d42125cace..bfc8f7f754 100644 --- a/tgui/packages/tgui/interfaces/DroneConsole.tsx +++ b/tgui/packages/tgui/interfaces/DroneConsole.tsx @@ -70,7 +70,7 @@ export const DroneConsole = (props) => {
- {drones && drones.length ? ( + {drones?.length ? ( {drones.map((drone) => ( { maxValue: 202, value: external_pressure, label: 'External Pressure', - textValue: external_pressure + ' kPa', + textValue: `${external_pressure} kPa`, color: color, }, { @@ -50,7 +50,7 @@ export const AirlockConsoleAdvanced = (props) => { maxValue: 202, value: chamber_pressure, label: 'Chamber Pressure', - textValue: chamber_pressure + ' kPa', + textValue: `${chamber_pressure} kPa`, color: color, }, { @@ -58,7 +58,7 @@ export const AirlockConsoleAdvanced = (props) => { maxValue: 202, value: internal_pressure, label: 'Internal Pressure', - textValue: internal_pressure + ' kPa', + textValue: `${internal_pressure} kPa`, color: color, }, ]; diff --git a/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsoleDocking.tsx b/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsoleDocking.tsx index bac2d5ac53..cf2a606da3 100644 --- a/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsoleDocking.tsx +++ b/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsoleDocking.tsx @@ -34,7 +34,7 @@ export const AirlockConsoleDocking = (props) => { maxValue: 202, value: chamber_pressure, label: 'Chamber Pressure', - textValue: chamber_pressure + ' kPa', + textValue: `${chamber_pressure} kPa`, color: (value: number) => { return value < 80 || value > 120 ? 'bad' diff --git a/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsolePhoron.tsx b/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsolePhoron.tsx index e9fd63fc78..98d82f0753 100644 --- a/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsolePhoron.tsx +++ b/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsolePhoron.tsx @@ -29,7 +29,7 @@ export const AirlockConsolePhoron = (props) => { maxValue: 202, value: chamber_pressure, label: 'Chamber Pressure', - textValue: chamber_pressure + ' kPa', + textValue: `${chamber_pressure} kPa`, color: (value: number) => { return value < 80 || value > 120 ? 'bad' @@ -43,7 +43,7 @@ export const AirlockConsolePhoron = (props) => { maxValue: 100, value: chamber_phoron, label: 'Chamber Phoron', - textValue: chamber_phoron + ' mol', + textValue: `${chamber_phoron} mol`, color: (value: number) => { return value > 5 ? 'bad' : value > 0.5 ? 'average' : 'good'; }, diff --git a/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsoleSimple.tsx b/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsoleSimple.tsx index 6aa2870239..6948dc2ea2 100644 --- a/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsoleSimple.tsx +++ b/tgui/packages/tgui/interfaces/EmbeddedController/AirlockConsoleSimple.tsx @@ -30,7 +30,7 @@ export const AirlockConsoleSimple = (props) => { maxValue: 202, value: chamber_pressure, label: 'Chamber Pressure', - textValue: chamber_pressure + ' kPa', + textValue: `${chamber_pressure} kPa`, color: (value: number) => { return value < 80 || value > 120 ? 'bad' diff --git a/tgui/packages/tgui/interfaces/EmbeddedController/EmbeddedControllerHelpers.tsx b/tgui/packages/tgui/interfaces/EmbeddedController/EmbeddedControllerHelpers.tsx index 6238145d6b..e961d2174d 100644 --- a/tgui/packages/tgui/interfaces/EmbeddedController/EmbeddedControllerHelpers.tsx +++ b/tgui/packages/tgui/interfaces/EmbeddedController/EmbeddedControllerHelpers.tsx @@ -195,12 +195,12 @@ export const EscapePodStatus = (props: { export const DockingStatus = (props: { state: string }) => { const { state } = props; - const dockHatch: React.JSX.Element[] = []; + const dockHatch: Record = {}; - dockHatch['open'] = OPEN; - dockHatch['closed'] = CLOSED; - dockHatch['unlocked'] = UNSECURED; - dockHatch['locked'] = SECURED; + dockHatch.open = OPEN; + dockHatch.closed = CLOSED; + dockHatch.unlocked = UNSECURED; + dockHatch.locked = SECURED; return ( {dockHatch[state] || ERROR} diff --git a/tgui/packages/tgui/interfaces/EmbeddedController/index.tsx b/tgui/packages/tgui/interfaces/EmbeddedController/index.tsx index e9bc92e24e..86d294bed3 100644 --- a/tgui/packages/tgui/interfaces/EmbeddedController/index.tsx +++ b/tgui/packages/tgui/interfaces/EmbeddedController/index.tsx @@ -81,20 +81,20 @@ export const EmbeddedController = (props) => { const primaryRoutes: Record = {}; - primaryRoutes['AirlockConsoleAdvanced'] = ; - primaryRoutes['AirlockConsoleSimple'] = ; - primaryRoutes['AirlockConsolePhoron'] = ; - primaryRoutes['AirlockConsoleDocking'] = ; - primaryRoutes['DockingConsoleSimple'] = ; - primaryRoutes['DockingConsoleMulti'] = ; - primaryRoutes['DoorAccessConsole'] = ; - primaryRoutes['EscapePodConsole'] = ; - primaryRoutes['EscapePodBerthConsole'] = ; + primaryRoutes.AirlockConsoleAdvanced = ; + primaryRoutes.AirlockConsoleSimple = ; + primaryRoutes.AirlockConsolePhoron = ; + primaryRoutes.AirlockConsoleDocking = ; + primaryRoutes.DockingConsoleSimple = ; + primaryRoutes.DockingConsoleMulti = ; + primaryRoutes.DoorAccessConsole = ; + primaryRoutes.EscapePodConsole = ; + primaryRoutes.EscapePodBerthConsole = ; const Component: React.JSX.Element = primaryRoutes[internalTemplateName]; if (!Component) { throw Error( - 'Unable to find Component for template name: ' + internalTemplateName, + `Unable to find Component for template name: ${internalTemplateName}`, ); } diff --git a/tgui/packages/tgui/interfaces/ExonetNode.tsx b/tgui/packages/tgui/interfaces/ExonetNode.tsx index 0d4a09b8ba..1a8a2129ff 100644 --- a/tgui/packages/tgui/interfaces/ExonetNode.tsx +++ b/tgui/packages/tgui/interfaces/ExonetNode.tsx @@ -27,7 +27,7 @@ export const ExonetNode = (props) => { selected={on} onClick={() => act('toggle_power')} > - {'Power ' + (on ? 'On' : 'Off')} + {`Power ${on ? 'On' : 'Off'}`} } > diff --git a/tgui/packages/tgui/interfaces/ExosuitFabricator/Material.tsx b/tgui/packages/tgui/interfaces/ExosuitFabricator/Material.tsx index c52833ab81..9e8fdbb000 100644 --- a/tgui/packages/tgui/interfaces/ExosuitFabricator/Material.tsx +++ b/tgui/packages/tgui/interfaces/ExosuitFabricator/Material.tsx @@ -23,7 +23,7 @@ const EjectMaterial = (props: { material: material }) => { const { name, removable, sheets } = material; const [removeMaterials, setRemoveMaterials] = useSharedState( - 'remove_mats_' + name, + `remove_mats_${name}`, 1, ); diff --git a/tgui/packages/tgui/interfaces/ExosuitFabricator/Parts.tsx b/tgui/packages/tgui/interfaces/ExosuitFabricator/Parts.tsx index a9f1a77bf1..3805445fd0 100644 --- a/tgui/packages/tgui/interfaces/ExosuitFabricator/Parts.tsx +++ b/tgui/packages/tgui/interfaces/ExosuitFabricator/Parts.tsx @@ -81,9 +81,9 @@ export const PartLists = (props: { if (!searchText) { partsObj = { Parts: [] }; buildableParts[selectedPartTab!].forEach((part) => { - part['format'] = partCondFormat(materials, queueMaterials, part); + part.format = partCondFormat(materials, queueMaterials, part); if (!part.subCategory) { - partsObj['Parts'].push(part); + partsObj.Parts.push(part); return; } if (!(part.subCategory in partsObj)) { @@ -93,7 +93,7 @@ export const PartLists = (props: { }); } else { searchFilter(searchText, buildableParts).forEach((part: internalPart) => { - part['format'] = partCondFormat(materials, queueMaterials, part); + part.format = partCondFormat(materials, queueMaterials, part); partsList.push(part); }); } @@ -203,9 +203,7 @@ const PartCategory = (props: { icon="question-circle" color="transparent" height="20px" - tooltip={ - 'Build Time: ' + part.printTime + 's. ' + (part.desc || '') - } + tooltip={`Build Time: ${part.printTime}s. ${part.desc || ''}`} tooltipPosition="left" /> diff --git a/tgui/packages/tgui/interfaces/ExosuitFabricator/Queue.tsx b/tgui/packages/tgui/interfaces/ExosuitFabricator/Queue.tsx index f23dfa8c1d..03ffef1cfb 100644 --- a/tgui/packages/tgui/interfaces/ExosuitFabricator/Queue.tsx +++ b/tgui/packages/tgui/interfaces/ExosuitFabricator/Queue.tsx @@ -176,7 +176,7 @@ const BeingBuilt = (props) => { {name} - {(timeLeft >= 0 && timeLeft + 's') || 'Dispensing...'} + {(timeLeft >= 0 && `${timeLeft}s`) || 'Dispensing...'} diff --git a/tgui/packages/tgui/interfaces/ExosuitFabricator/functions.ts b/tgui/packages/tgui/interfaces/ExosuitFabricator/functions.ts index 57079d678f..71a879c68f 100644 --- a/tgui/packages/tgui/interfaces/ExosuitFabricator/functions.ts +++ b/tgui/packages/tgui/interfaces/ExosuitFabricator/functions.ts @@ -46,8 +46,8 @@ export function partCondFormat( Object.keys(part.cost).forEach((mat) => { format[mat] = partBuildColor(part.cost[mat], tally[mat], materials[mat]); - if (format[mat].color > format['textColor']) { - format['textColor'] = format[mat].color; + if (format[mat].color > format.textColor) { + format.textColor = format[mat].color; } }); @@ -63,30 +63,29 @@ export function queueCondFormat( const missingMatTally = {}; const textColors = {}; - queue && - queue.forEach((part, i) => { - textColors[i] = COLOR_NONE; - Object.keys(part.cost).forEach((mat) => { - materialTally[mat] = materialTally[mat] || 0; - missingMatTally[mat] = missingMatTally[mat] || 0; + queue?.forEach((part, i) => { + textColors[i] = COLOR_NONE; + Object.keys(part.cost).forEach((mat) => { + materialTally[mat] = materialTally[mat] || 0; + missingMatTally[mat] = missingMatTally[mat] || 0; - matFormat[mat] = partBuildColor( - part.cost[mat], - materialTally[mat], - materials[mat], - ); + matFormat[mat] = partBuildColor( + part.cost[mat], + materialTally[mat], + materials[mat], + ); - if (matFormat[mat].color !== COLOR_NONE) { - if (textColors[i] < matFormat[mat].color) { - textColors[i] = matFormat[mat].color; - } - } else { - materialTally[mat] += part.cost[mat]; + if (matFormat[mat].color !== COLOR_NONE) { + if (textColors[i] < matFormat[mat].color) { + textColors[i] = matFormat[mat].color; } + } else { + materialTally[mat] += part.cost[mat]; + } - missingMatTally[mat] += matFormat[mat].deficit; - }); + missingMatTally[mat] += matFormat[mat].deficit; }); + }); return { materialTally, missingMatTally, textColors, matFormat }; } diff --git a/tgui/packages/tgui/interfaces/Filteriffic/FilterEntry.tsx b/tgui/packages/tgui/interfaces/Filteriffic/FilterEntry.tsx index 30dc233aba..cc493e7e01 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic/FilterEntry.tsx +++ b/tgui/packages/tgui/interfaces/Filteriffic/FilterEntry.tsx @@ -18,15 +18,13 @@ export const FilterEntry = (props: { const { name, filterDataEntry } = props; const { type, priority, ...restOfProps } = filterDataEntry; - const filterDefaults = data['filter_info']; + const filterDefaults = data.filter_info; - const targetFilterPossibleKeys = Object.keys( - filterDefaults[type]['defaults'], - ); + const targetFilterPossibleKeys = Object.keys(filterDefaults[type].defaults); return ( {targetFilterPossibleKeys.map((entryName) => { - const defaults = filterDefaults[type]['defaults']; + const defaults = filterDefaults[type].defaults; const value = restOfProps[entryName] || defaults[entryName]; const hasValue = value !== defaults[entryName]; return ( diff --git a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterColorEntry.tsx b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterColorEntry.tsx index 4a2cbc256d..2d7222b0b2 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterColorEntry.tsx +++ b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterColorEntry.tsx @@ -1,7 +1,7 @@ import { useBackend } from 'tgui/backend'; import { Button, ColorBox, Input } from 'tgui-core/components'; -import { type FilterEntryProps } from '../types'; +import type { FilterEntryProps } from '../types'; export const FilterColorEntry = (props: FilterEntryProps) => { const { name, value, hasValue, filterName, filterType } = props; diff --git a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterDataEntry.tsx b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterDataEntry.tsx index ee970407ff..be3b7d2c78 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterDataEntry.tsx +++ b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterDataEntry.tsx @@ -1,6 +1,6 @@ import { Box, LabeledList } from 'tgui-core/components'; -import { type FilterEntryProps } from '../types'; +import type { FilterEntryProps } from '../types'; import { FilterColorEntry } from './FilterColorEntry'; import { FilterEnumEntry } from './FilterEnumEntry'; import { FilterFlagsEntry } from './FilterFlagsEntry'; diff --git a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterEnumEntry.tsx b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterEnumEntry.tsx index 3be68f477c..f436bf86a7 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterEnumEntry.tsx +++ b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterEnumEntry.tsx @@ -1,13 +1,13 @@ import { useBackend } from 'tgui/backend'; import { Button } from 'tgui-core/components'; -import { type Data, type FilterEntryProps } from '../types'; +import type { Data, FilterEntryProps } from '../types'; export const FilterEnumEntry = (props: FilterEntryProps) => { const { name, value, hasValue, filterName, filterType } = props; const { act, data } = useBackend(); const filterInfo = data.filter_info; - const enums: Record = filterInfo[filterType]['enums']; + const enums: Record = filterInfo[filterType].enums; return Object.entries(enums).map(([enumName, enumNumber]) => ( { const { act, data } = useBackend(); const filterInfo = data.filter_info; - const flags: Record = filterInfo[filterType]['flags']; + const flags: Record = filterInfo[filterType].flags; return Object.entries(flags).map(([flagName, bitField]) => ( { const { name, value, hasValue, filterName, filterType } = props; diff --git a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterIconEntry.tsx b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterIconEntry.tsx index 28b252f217..858dee435f 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterIconEntry.tsx +++ b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterIconEntry.tsx @@ -1,7 +1,7 @@ import { useBackend } from 'tgui/backend'; import { Box, Button } from 'tgui-core/components'; -import { type FilterEntryProps } from '../types'; +import type { FilterEntryProps } from '../types'; export const FilterIconEntry = (props: FilterEntryProps) => { const { name, value, hasValue, filterName, filterType } = props; diff --git a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterIntegerEntry.tsx b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterIntegerEntry.tsx index 27dbcb5784..bbf139694f 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterIntegerEntry.tsx +++ b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterIntegerEntry.tsx @@ -1,7 +1,7 @@ import { useBackend } from 'tgui/backend'; import { NumberInput } from 'tgui-core/components'; -import { type FilterEntryProps } from '../types'; +import type { FilterEntryProps } from '../types'; export const FilterIntegerEntry = (props: FilterEntryProps) => { const { name, value, hasValue, filterName, filterType } = props; diff --git a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterTextEntry.tsx b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterTextEntry.tsx index 8c65309bda..2c18005164 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterTextEntry.tsx +++ b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterTextEntry.tsx @@ -1,7 +1,7 @@ import { useBackend } from 'tgui/backend'; import { Input } from 'tgui-core/components'; -import { type FilterEntryProps } from '../types'; +import type { FilterEntryProps } from '../types'; export const FilterTextEntry = (props: FilterEntryProps) => { const { name, value, hasValue, filterName, filterType } = props; diff --git a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterTransformEntry.tsx b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterTransformEntry.tsx index 6550e5b01f..6c3af3188e 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterTransformEntry.tsx +++ b/tgui/packages/tgui/interfaces/Filteriffic/FilterTypes/FilterTransformEntry.tsx @@ -1,7 +1,7 @@ import { useBackend } from 'tgui/backend'; import { Box, NumberInput } from 'tgui-core/components'; -import { type FilterEntryProps } from '../types'; +import type { FilterEntryProps } from '../types'; export const FilterTransformEntry = (props: FilterEntryProps) => { const { name, value, hasValue, filterName, filterType } = props; diff --git a/tgui/packages/tgui/interfaces/Filteriffic/index.tsx b/tgui/packages/tgui/interfaces/Filteriffic/index.tsx index aa6a86bbb8..b32f9919b2 100644 --- a/tgui/packages/tgui/interfaces/Filteriffic/index.tsx +++ b/tgui/packages/tgui/interfaces/Filteriffic/index.tsx @@ -18,7 +18,7 @@ export const Filteriffic = (props: any) => { const name = data.target_name || 'Unknown Object'; const filters = data.target_filter_data || {}; const hasFilters = Object.keys(filters).length !== 0; - const filterDefaults = data['filter_info']; + const filterDefaults = data.filter_info; const [massApplyPath, setMassApplyPath] = useState(''); const [hiddenSecret, setHiddenSecret] = useState(false); diff --git a/tgui/packages/tgui/interfaces/Flamethrower/index.tsx b/tgui/packages/tgui/interfaces/Flamethrower/index.tsx index 140dbbd92a..1637f90f50 100644 --- a/tgui/packages/tgui/interfaces/Flamethrower/index.tsx +++ b/tgui/packages/tgui/interfaces/Flamethrower/index.tsx @@ -34,7 +34,7 @@ export const Flamethrower = (props) => { } > - {!has_tank ? 'No Tank' : fuel_kpa <= 0 ? 'Empty' : fuel_kpa + 'Kpa'} + {!has_tank ? 'No Tank' : fuel_kpa <= 0 ? 'Empty' : `${fuel_kpa}Kpa`} { toFixed(value, 1) + ' L/s'} + format={(value) => `${toFixed(value, 1)} L/s`} /> @@ -45,7 +45,7 @@ export const GasPump = (props) => { last_power_draw < max_power_draw - 5 ? 'good' : 'average' } > - {last_power_draw + ' W'} + {`${last_power_draw} W`} diff --git a/tgui/packages/tgui/interfaces/GasTemperatureSystem.tsx b/tgui/packages/tgui/interfaces/GasTemperatureSystem.tsx index 325e730e7d..f1b933e068 100644 --- a/tgui/packages/tgui/interfaces/GasTemperatureSystem.tsx +++ b/tgui/packages/tgui/interfaces/GasTemperatureSystem.tsx @@ -84,7 +84,7 @@ export const GasTemperatureSystem = (props) => { maxValue={maxGasTemperature} fillValue={gasTemperature} value={targetGasTemperature} - format={(value) => gasTemperature + ' / ' + toFixed(value)} + format={(value) => `${gasTemperature} / ${toFixed(value)}`} unit="K" color={gasTemperatureClass} onChange={(e, val) => act('setGasTemperature', { temp: val })} diff --git a/tgui/packages/tgui/interfaces/GeneralAtmoControl/TankControls.tsx b/tgui/packages/tgui/interfaces/GeneralAtmoControl/TankControls.tsx index 061f6b3332..fa41494a12 100644 --- a/tgui/packages/tgui/interfaces/GeneralAtmoControl/TankControls.tsx +++ b/tgui/packages/tgui/interfaces/GeneralAtmoControl/TankControls.tsx @@ -57,7 +57,7 @@ export const AtmoControlTankCore = (props) => { info={input_info} maxSliderValue={max_flowrate} sliderControl={input_flow_setting} - sliderFill={input_info && input_info.volume_rate} + sliderFill={input_info?.volume_rate} unit="L/s" name={core ? 'Coolant Input' : 'Input'} limitName="Flow Rate Limit" @@ -67,7 +67,7 @@ export const AtmoControlTankCore = (props) => { info={output_info} maxSliderValue={max_pressure} sliderControl={pressure_setting} - sliderFill={output_info && output_info.output_pressure} + sliderFill={output_info?.output_pressure} unit="kPa" name={core ? 'Core Outpump' : 'Output'} limitName={core ? 'Min Core Pressure' : 'Max Output Pressure'} diff --git a/tgui/packages/tgui/interfaces/GeneralRecords/GeneralRecordsList.tsx b/tgui/packages/tgui/interfaces/GeneralRecords/GeneralRecordsList.tsx index d762944e18..32d434f571 100644 --- a/tgui/packages/tgui/interfaces/GeneralRecords/GeneralRecordsList.tsx +++ b/tgui/packages/tgui/interfaces/GeneralRecords/GeneralRecordsList.tsx @@ -31,7 +31,7 @@ export const GeneralRecordsList = (props) => { mb="0.5rem" onClick={() => act('d_rec', { d_rec: record.ref })} > - {record.id + ': ' + record.name} + {`${record.id}: ${record.name}`} ))} diff --git a/tgui/packages/tgui/interfaces/GeneralRecords/GeneralRecordsViewGeneral.tsx b/tgui/packages/tgui/interfaces/GeneralRecords/GeneralRecordsViewGeneral.tsx index 74f7231f2d..11b9826909 100644 --- a/tgui/packages/tgui/interfaces/GeneralRecords/GeneralRecordsViewGeneral.tsx +++ b/tgui/packages/tgui/interfaces/GeneralRecords/GeneralRecordsViewGeneral.tsx @@ -50,8 +50,7 @@ export const GeneralRecordsViewGeneral = (props) => { {general.comments && general.comments.length === 0 ? ( No comments found. ) : ( - general.comments && - general.comments.map((comment, i) => ( + general.comments?.map((comment, i) => ( {comment.header} diff --git a/tgui/packages/tgui/interfaces/Gps.tsx b/tgui/packages/tgui/interfaces/Gps.tsx index 696c5207d3..50b353d727 100644 --- a/tgui/packages/tgui/interfaces/Gps.tsx +++ b/tgui/packages/tgui/interfaces/Gps.tsx @@ -142,7 +142,7 @@ export const Gps = (props) => { rotation={signal.degrees} /> )} - {signal.dist !== undefined && signal.dist + 'm'} + {signal.dist !== undefined && `${signal.dist}m`} {signal.coords} diff --git a/tgui/packages/tgui/interfaces/GuestPass.tsx b/tgui/packages/tgui/interfaces/GuestPass.tsx index 603d88f438..20452796d9 100644 --- a/tgui/packages/tgui/interfaces/GuestPass.tsx +++ b/tgui/packages/tgui/interfaces/GuestPass.tsx @@ -9,7 +9,7 @@ type Data = { area: area[]; giver: string | null; giveName: string; - reason: String; + reason: string; duration: number; mode: BooleanLike; log: string[]; @@ -54,7 +54,7 @@ export const GuestPass = (props) => {
)) || (
act('mode', { mode: 1 })}> Activity Log diff --git a/tgui/packages/tgui/interfaces/ICAssembly/CircuitComponent.tsx b/tgui/packages/tgui/interfaces/ICAssembly/CircuitComponent.tsx index e792866278..612fb23508 100644 --- a/tgui/packages/tgui/interfaces/ICAssembly/CircuitComponent.tsx +++ b/tgui/packages/tgui/interfaces/ICAssembly/CircuitComponent.tsx @@ -155,8 +155,8 @@ export class CircuitComponent extends Component { className="ObjectComponent" position="absolute" - left={x_pos + 'px'} - top={y_pos + 'px'} + left={`${x_pos}px`} + top={`${y_pos}px`} onMouseDown={this.handleStartDrag} onMouseUp={this.handleStopDrag} {...rest} diff --git a/tgui/packages/tgui/interfaces/ICAssembly/Plane.tsx b/tgui/packages/tgui/interfaces/ICAssembly/Plane.tsx index 7dd0e9f158..d1a068e571 100644 --- a/tgui/packages/tgui/interfaces/ICAssembly/Plane.tsx +++ b/tgui/packages/tgui/interfaces/ICAssembly/Plane.tsx @@ -231,8 +231,8 @@ export class Plane extends Component { const { zoom } = this.state; const portLocation = locations[selectedPort.ref]; const mouseCoords = { - x: mouseX * Math.pow(zoom, -1), - y: (mouseY + ABSOLUTE_Y_OFFSET) * Math.pow(zoom, -1), + x: mouseX * zoom ** -1, + y: (mouseY + ABSOLUTE_Y_OFFSET) * zoom ** -1, }; connections.push({ color: @@ -289,7 +289,7 @@ const Circuit = ( onPortRightClick, } = props; - const [pos, setPos] = useSharedState('component-pos-' + circuit.ref, { + const [pos, setPos] = useSharedState(`component-pos-${circuit.ref}`, { x: 0, y: 0, }); diff --git a/tgui/packages/tgui/interfaces/ICAssembly/index.tsx b/tgui/packages/tgui/interfaces/ICAssembly/index.tsx index 0cf3fdebe9..385585add8 100644 --- a/tgui/packages/tgui/interfaces/ICAssembly/index.tsx +++ b/tgui/packages/tgui/interfaces/ICAssembly/index.tsx @@ -156,7 +156,7 @@ const CircuitInfo = (props) => { {(net_power === 0 && '0 W/s') || ( '-' + formatPower(Math.abs(val)) + '/s'} + format={(val) => `-${formatPower(Math.abs(val))}/s`} /> )} diff --git a/tgui/packages/tgui/interfaces/IdentificationComputer.tsx b/tgui/packages/tgui/interfaces/IdentificationComputer.tsx index 05e3a6a3f0..68ad8c86f0 100644 --- a/tgui/packages/tgui/interfaces/IdentificationComputer.tsx +++ b/tgui/packages/tgui/interfaces/IdentificationComputer.tsx @@ -186,12 +186,10 @@ export const IdentificationComputerAccessModification = (props: { icon="exclamation-triangle" confirmIcon="fire" fluid - confirmContent={ - 'You are dismissing ' + target_owner + ', confirm?' - } + confirmContent={`You are dismissing ${target_owner}, confirm?`} onClick={() => act('terminate')} > - {'Dismiss ' + target_owner} + {`Dismiss ${target_owner}`} @@ -283,29 +281,28 @@ export const IdentificationComputerRegions = (props: { actName: string }) => { return ( - {regions && - regions.map((region) => ( - -
- {region.accesses.map((access) => ( - - - - ))} -
-
- ))} + {regions?.map((region) => ( + +
+ {region.accesses.map((access) => ( + + + + ))} +
+
+ ))}
); }; diff --git a/tgui/packages/tgui/interfaces/InventoryPanel.tsx b/tgui/packages/tgui/interfaces/InventoryPanel.tsx index 4a925cd5d8..ddf74a6516 100644 --- a/tgui/packages/tgui/interfaces/InventoryPanel.tsx +++ b/tgui/packages/tgui/interfaces/InventoryPanel.tsx @@ -18,8 +18,7 @@ export const InventoryPanel = (props) => {
- {slots && - slots.length && + {slots?.length && slots.map((slot) => ( diff --git a/tgui/packages/tgui/interfaces/MaterialStack.tsx b/tgui/packages/tgui/interfaces/MaterialStack.tsx index 98ee9f75f9..0c36aea86b 100644 --- a/tgui/packages/tgui/interfaces/MaterialStack.tsx +++ b/tgui/packages/tgui/interfaces/MaterialStack.tsx @@ -30,7 +30,7 @@ export const MaterialStack = (props) => { return ( -
+
{ }) } > - {multiplier * recipe.res_amount + 'x'} + {`${multiplier * recipe.res_amount}x`} , ); } @@ -145,7 +145,7 @@ const Multipliers = (props) => { }) } > - {maxM * recipe.res_amount + 'x'} + {`${maxM * recipe.res_amount}x`} , ); } @@ -164,12 +164,12 @@ const Recipe = (props: { recipe: recipe; title: string }) => { let buttonName = title; buttonName += ' ('; - buttonName += req_amount + ' '; - buttonName += 'sheet' + (req_amount > 1 ? 's' : ''); + buttonName += `${req_amount} `; + buttonName += `sheet${req_amount > 1 ? 's' : ''}`; buttonName += ')'; if (res_amount > 1) { - buttonName = res_amount + 'x ' + buttonName; + buttonName = `${res_amount}x ${buttonName}`; } const maxMultiplier = buildMultiplier(recipe, amount); diff --git a/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsList.tsx b/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsList.tsx index 87fd892270..173ebd93a7 100644 --- a/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsList.tsx +++ b/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsList.tsx @@ -21,7 +21,7 @@ export const MedicalRecordsList = (props) => { mb="0.5rem" onClick={() => act('d_rec', { d_rec: record.ref })} > - {record.id + ': ' + record.name} + {`${record.id}: ${record.name}`} ))} diff --git a/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsViewMedical.tsx b/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsViewMedical.tsx index 2d8efcc08d..d15d1e1deb 100644 --- a/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsViewMedical.tsx +++ b/tgui/packages/tgui/interfaces/MedicalRecords/MedicalRecordsViewMedical.tsx @@ -47,8 +47,7 @@ export const MedicalRecordsViewMedical = (props) => { {medical.comments && medical.comments.length === 0 ? ( No comments found. ) : ( - medical.comments && - medical.comments.map((comment, i) => ( + medical.comments?.map((comment, i) => ( {comment.header} diff --git a/tgui/packages/tgui/interfaces/MedicalRecords/virusModalBodyOverride.tsx b/tgui/packages/tgui/interfaces/MedicalRecords/virusModalBodyOverride.tsx index 1fac742c1c..189a43d6f9 100644 --- a/tgui/packages/tgui/interfaces/MedicalRecords/virusModalBodyOverride.tsx +++ b/tgui/packages/tgui/interfaces/MedicalRecords/virusModalBodyOverride.tsx @@ -34,7 +34,7 @@ export const virusModalBodyOverride = (modal: modalData) => { {virus.symptoms.map((s) => ( - + Strength: {' '} diff --git a/tgui/packages/tgui/interfaces/MessageMonitor/MessageMonitorTabs.tsx b/tgui/packages/tgui/interfaces/MessageMonitor/MessageMonitorTabs.tsx index 3f91f009b7..547c854d64 100644 --- a/tgui/packages/tgui/interfaces/MessageMonitor/MessageMonitorTabs.tsx +++ b/tgui/packages/tgui/interfaces/MessageMonitor/MessageMonitorTabs.tsx @@ -34,7 +34,7 @@ export const MessageMonitorMain = (props) => { selected={linkedServer.active} onClick={() => act('active')} > - {'Server ' + (linkedServer.active ? 'Enabled' : 'Disabled')} + {`Server ${linkedServer.active ? 'Enabled' : 'Disabled'}`} @@ -101,7 +101,7 @@ export const MessageMonitorLogs = (props: { {logs.map((log, i) => (
' + log.recipient} + title={`${log.sender} -> ${log.recipient}`} buttons={ { {items.map((item) => ( @@ -243,7 +243,7 @@ const MicrowaveContents = (props) => { props.onAmount(val)} /> - + toFixed(value)} value={props.sizeMultiplier} diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotComponent.tsx b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotComponent.tsx index 412a9aa134..4233580f5f 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotComponent.tsx +++ b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotComponent.tsx @@ -176,7 +176,7 @@ export const ModifyRobotComponent = (props: { @@ -276,9 +276,9 @@ const ComponentSection = (props: { - {capitalize(component.name)}{' '} + {capitalize(component.name)} {action === 'add_component' && - '(' + component.max_damage + ')'} + ` (${component.max_damage})`} @@ -304,10 +304,10 @@ const ComponentSection = (props: { {action === 'add_component' && - 'Brute Damage: ' + component.brute_damage} + `Brute Damage: ${component.brute_damage}`} {action === 'add_component' && - 'Electronics Damage: ' + component.electronics_damage} + `Electronics Damage: ${component.electronics_damage}`} diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotModules.tsx b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotModules.tsx index 0367a69854..12232d4df6 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotModules.tsx +++ b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotModules.tsx @@ -151,7 +151,7 @@ const SelectionField = (props: { - + diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotRadio.tsx b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotRadio.tsx index d05242112e..dc3a404cfb 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotRadio.tsx +++ b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotRadio.tsx @@ -42,7 +42,7 @@ export const ModifyRobotRadio = (props: { target: Target }) => { diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotUpgrades.tsx b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotUpgrades.tsx index 1beaa0cd28..d85a6fefd8 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotUpgrades.tsx +++ b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/ModifyRobotUpgrades.tsx @@ -54,7 +54,7 @@ export const ModifyRobotUpgrades = (props: { target: Target }) => { diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/SubTabs/ModifyRobotPKA.tsx b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/SubTabs/ModifyRobotPKA.tsx index 6d7a310643..a1621b2b60 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/SubTabs/ModifyRobotPKA.tsx +++ b/tgui/packages/tgui/interfaces/ModifyRobot/ModifyRobotTabs/SubTabs/ModifyRobotPKA.tsx @@ -49,7 +49,7 @@ export const ModifyRobotPKA = (props: { target: Target }) => { color="green" tooltip={ modkit.denied_by - ? 'Modul incompatible with: ' + modkit.denied_by + ? `Modul incompatible with: ${modkit.denied_by}` : '' } onClick={() => diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/functions.ts b/tgui/packages/tgui/interfaces/ModifyRobot/functions.ts index 9f795c8898..f8d3a1be7e 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/functions.ts +++ b/tgui/packages/tgui/interfaces/ModifyRobot/functions.ts @@ -13,7 +13,7 @@ export function prepareSearch( if (typeof object === 'string') { return object; } else { - return object['name']; + return object.name; } }); return flow([ diff --git a/tgui/packages/tgui/interfaces/ModifyRobot/index.tsx b/tgui/packages/tgui/interfaces/ModifyRobot/index.tsx index 22755185cc..93d8d013f3 100644 --- a/tgui/packages/tgui/interfaces/ModifyRobot/index.tsx +++ b/tgui/packages/tgui/interfaces/ModifyRobot/index.tsx @@ -153,7 +153,7 @@ export const ModifyRobot = (props) => { {target ? ( {target.name} - {!!target.ckey && ' played by ' + target.ckey}. + {!!target.ckey && ` played by ${target.ckey}`}. ) : ( No target selected. Please pick one. diff --git a/tgui/packages/tgui/interfaces/MuleBot.tsx b/tgui/packages/tgui/interfaces/MuleBot.tsx index 5d44537e12..d306eb6dfd 100644 --- a/tgui/packages/tgui/interfaces/MuleBot.tsx +++ b/tgui/packages/tgui/interfaces/MuleBot.tsx @@ -93,7 +93,7 @@ const MuleBotClosed = (props) => { selected={auto_return} onClick={() => act('autoret')} > - {'Auto Return Home: ' + (auto_return ? 'Enabled' : 'Disabled')} + {`Auto Return Home: ${auto_return ? 'Enabled' : 'Disabled'}`} )} @@ -121,7 +121,7 @@ const MuleBotOpen = (props) => { color={safety ? 'green' : 'red'} onClick={() => act('safety')} > - {'Safety: ' + (safety ? 'Engaged' : 'Disengaged (DANGER)')} + {`Safety: ${safety ? 'Engaged' : 'Disengaged (DANGER)'}`}
); diff --git a/tgui/packages/tgui/interfaces/NIF/index.tsx b/tgui/packages/tgui/interfaces/NIF/index.tsx index 8806b107ef..5067fbac97 100644 --- a/tgui/packages/tgui/interfaces/NIF/index.tsx +++ b/tgui/packages/tgui/interfaces/NIF/index.tsx @@ -58,7 +58,7 @@ export const NIF = (props) => { icon="ban" color="bad" confirmIcon="ban" - confirmContent={'Uninstall ' + viewingModule.name + '?'} + confirmContent={`Uninstall ${viewingModule.name}?`} onClick={() => { act('uninstall', { module: viewingModule.ref }); setViewing(null); @@ -109,7 +109,7 @@ export const NIF = (props) => { )}
{ selected={enabled} onClick={() => act('toggle')} > - {'Relay ' + (enabled ? 'On' : 'Off')} + {`Relay ${enabled ? 'On' : 'Off'}`} } > diff --git a/tgui/packages/tgui/interfaces/Newscaster/NewscasterViewSelected.tsx b/tgui/packages/tgui/interfaces/Newscaster/NewscasterViewSelected.tsx index c2ac55b74f..8852b2fea1 100644 --- a/tgui/packages/tgui/interfaces/Newscaster/NewscasterViewSelected.tsx +++ b/tgui/packages/tgui/interfaces/Newscaster/NewscasterViewSelected.tsx @@ -95,11 +95,11 @@ export const NewscasterViewSelected = (props: { setScreen: Function }) => { {(!!viewing_channel.messages.length && viewing_channel.messages.map((message) => (
- {message.title && decodeHtmlEntities(message.title) + ' - '} + {message.title && `${decodeHtmlEntities(message.title)} - `} {decodeHtmlEntities(message.body)} {!!message.img && ( - + {(!!message.caption && decodeHtmlEntities(message.caption)) || null} diff --git a/tgui/packages/tgui/interfaces/NtosCameraConsole.tsx b/tgui/packages/tgui/interfaces/NtosCameraConsole.tsx index 8a0eaf6093..7474666c1a 100644 --- a/tgui/packages/tgui/interfaces/NtosCameraConsole.tsx +++ b/tgui/packages/tgui/interfaces/NtosCameraConsole.tsx @@ -27,7 +27,7 @@ export const NtosCameraConsole = (props) => {
Camera: - {(activeCamera && activeCamera.name) || '—'} + {activeCamera?.name || '—'}
SEL: diff --git a/tgui/packages/tgui/interfaces/NtosEmailAdministration.tsx b/tgui/packages/tgui/interfaces/NtosEmailAdministration.tsx index 1aa5ab7ff5..482426b21b 100644 --- a/tgui/packages/tgui/interfaces/NtosEmailAdministration.tsx +++ b/tgui/packages/tgui/interfaces/NtosEmailAdministration.tsx @@ -106,7 +106,7 @@ const ViewAccount = (props) => { const { current_account, cur_suspended, messages = [] } = data; return (
act('back')}> Back @@ -118,7 +118,7 @@ const ViewAccount = (props) => { )} diff --git a/tgui/packages/tgui/interfaces/NtosNetDownloader.tsx b/tgui/packages/tgui/interfaces/NtosNetDownloader.tsx index 58955f3d05..f858fab6e7 100644 --- a/tgui/packages/tgui/interfaces/NtosNetDownloader.tsx +++ b/tgui/packages/tgui/interfaces/NtosNetDownloader.tsx @@ -120,7 +120,7 @@ const Program = (props: { program: program }) => { value={downloadcompletion!} > {toFixed((downloadcompletion! / downloadsize!) * 100, 1)}%  - {'(' + downloadspeed + 'GQ/s)'} + {`(${downloadspeed}GQ/s)`} )) || (downloads_queue.indexOf(program.filename) !== -1 && ( diff --git a/tgui/packages/tgui/interfaces/NtosNewsBrowser.tsx b/tgui/packages/tgui/interfaces/NtosNewsBrowser.tsx index a4b3e5cb73..297bfcc981 100644 --- a/tgui/packages/tgui/interfaces/NtosNewsBrowser.tsx +++ b/tgui/packages/tgui/interfaces/NtosNewsBrowser.tsx @@ -71,7 +71,7 @@ const SelectedArticle = (props) => { return (
diff --git a/tgui/packages/tgui/interfaces/NtosUAV.tsx b/tgui/packages/tgui/interfaces/NtosUAV.tsx index fbecdc2f17..68bad9ebfe 100644 --- a/tgui/packages/tgui/interfaces/NtosUAV.tsx +++ b/tgui/packages/tgui/interfaces/NtosUAV.tsx @@ -21,7 +21,7 @@ export const NtosUAV = (props) => {
- {(current_uav && current_uav.status) || '[Not Connected]'} + {current_uav?.status || '[Not Connected]'} {(current_uav && signal_strength) || '[Not Connected]'} diff --git a/tgui/packages/tgui/interfaces/NtosWordProcessor.tsx b/tgui/packages/tgui/interfaces/NtosWordProcessor.tsx index 3f5734dd6c..5c24c691ea 100644 --- a/tgui/packages/tgui/interfaces/NtosWordProcessor.tsx +++ b/tgui/packages/tgui/interfaces/NtosWordProcessor.tsx @@ -75,7 +75,7 @@ export const NtosWordProcessor = (props) => {
)) || ( -
+
diff --git a/tgui/packages/tgui/interfaces/OmniFilter.tsx b/tgui/packages/tgui/interfaces/OmniFilter.tsx index 326f029605..593dd4f012 100644 --- a/tgui/packages/tgui/interfaces/OmniFilter.tsx +++ b/tgui/packages/tgui/interfaces/OmniFilter.tsx @@ -59,7 +59,7 @@ export const OmniFilter = (props) => { {ports ? ( ports.map((port) => ( - + {config ? ( <> ) : ( - set_flow_rate + ' L/s' + `${set_flow_rate} L/s` )} diff --git a/tgui/packages/tgui/interfaces/OmniMixer.tsx b/tgui/packages/tgui/interfaces/OmniMixer.tsx index dcc8e99aa4..c94a45f7a0 100644 --- a/tgui/packages/tgui/interfaces/OmniMixer.tsx +++ b/tgui/packages/tgui/interfaces/OmniMixer.tsx @@ -101,10 +101,10 @@ export const OmniMixer = (props) => { {config ? ( ) : ( - set_flow_rate + ' L/s' + `${set_flow_rate} L/s` )} @@ -120,7 +120,7 @@ const PortRow = (props) => { return ( - {port.dir + ' Port'} + {`${port.dir} Port`} {config ? ( ) : ( - port.concentration * 100 + '%' + `${port.concentration * 100}%` )} {config ? ( @@ -171,7 +171,7 @@ const PortRow = (props) => { }) } > - {!port.input ? '-' : port.concentration * 100 + ' %'} + {!port.input ? '-' : `${port.concentration * 100} %`} diff --git a/tgui/packages/tgui/interfaces/OperatingComputer/OperatingComputerOptions.tsx b/tgui/packages/tgui/interfaces/OperatingComputer/OperatingComputerOptions.tsx index 7e6a3d34e3..e9739d24b4 100644 --- a/tgui/packages/tgui/interfaces/OperatingComputer/OperatingComputerOptions.tsx +++ b/tgui/packages/tgui/interfaces/OperatingComputer/OperatingComputerOptions.tsx @@ -35,7 +35,7 @@ export const OperatingComputerOptions = (props) => { value={healthAlarm} stepPixelSize={5} ml="0" - format={(val) => toFixed(val) + '%'} + format={(val) => `${toFixed(val)}%`} onChange={(e, val: number) => act('health_adj', { new: val, @@ -60,7 +60,7 @@ export const OperatingComputerOptions = (props) => { value={oxyAlarm} stepPixelSize={5} ml="0" - format={(val) => toFixed(val) + '%'} + format={(val) => `${toFixed(val)}%`} onChange={(e, val: number) => act('oxy_adj', { new: val, diff --git a/tgui/packages/tgui/interfaces/OperatingComputer/OperatingComputerPatient.tsx b/tgui/packages/tgui/interfaces/OperatingComputer/OperatingComputerPatient.tsx index dc3d85d030..1d15d16bc3 100644 --- a/tgui/packages/tgui/interfaces/OperatingComputer/OperatingComputerPatient.tsx +++ b/tgui/packages/tgui/interfaces/OperatingComputer/OperatingComputerPatient.tsx @@ -27,7 +27,7 @@ export const OperatingComputerPatient = (props: { occupant: occupant }) => { /> {damages.map((d, i) => ( - + { | Limit:{' '} val + '%'} + format={(val) => `${val}%`} /> // "Engine " + (i + 1) diff --git a/tgui/packages/tgui/interfaces/ParticleEdit/EntriesGenerators.tsx b/tgui/packages/tgui/interfaces/ParticleEdit/EntriesGenerators.tsx index 6ee64d9678..de48cd6fc3 100644 --- a/tgui/packages/tgui/interfaces/ParticleEdit/EntriesGenerators.tsx +++ b/tgui/packages/tgui/interfaces/ParticleEdit/EntriesGenerators.tsx @@ -44,7 +44,7 @@ export const FloatGenerator = (props: FloatGeneratorProps) => { var: var_name, var_mod: !Array.isArray(float) ? P_DATA_GENERATOR : null, new_value: !Array.isArray(float) - ? ['num', 0, 1, RandToNumber['UNIFORM_RAND']] + ? ['num', 0, 1, RandToNumber.UNIFORM_RAND] : 0, }) } @@ -98,7 +98,7 @@ export const FloatGeneratorColor = (props: FloatGeneratorColorProps) => { var: var_name, var_mod: !Array.isArray(float) ? P_DATA_GENERATOR : null, new_value: !Array.isArray(float) - ? ['num', 0, 1, RandToNumber['UNIFORM_RAND']] + ? ['num', 0, 1, RandToNumber.UNIFORM_RAND] : '#FFFFFF', }) } @@ -155,12 +155,7 @@ export const EntryGeneratorNumbersList = ( var: var_name, var_mod: !isStringArray(input) ? P_DATA_GENERATOR : null, new_value: !isStringArray(input) - ? [ - 'sphere', - [0, 0, 0], - [1, 1, 1], - RandToNumber['UNIFORM_RAND'], - ] + ? ['sphere', [0, 0, 0], [1, 1, 1], RandToNumber.UNIFORM_RAND] : [1, 1, 1], }) } diff --git a/tgui/packages/tgui/interfaces/ParticleEdit/helpers.ts b/tgui/packages/tgui/interfaces/ParticleEdit/helpers.ts index 97a6db4cef..8293cf2924 100644 --- a/tgui/packages/tgui/interfaces/ParticleEdit/helpers.ts +++ b/tgui/packages/tgui/interfaces/ParticleEdit/helpers.ts @@ -43,7 +43,7 @@ export const setGradientSpace = ( gradient?.map((entry) => { if (typeof entry === 'object') { if (Object.keys(entry)[0] === 'space') { - entry['space'] = space; + entry.space = space; found = true; } } diff --git a/tgui/packages/tgui/interfaces/ParticleEdit/index.tsx b/tgui/packages/tgui/interfaces/ParticleEdit/index.tsx index 4a4281c377..3b7383b888 100644 --- a/tgui/packages/tgui/interfaces/ParticleEdit/index.tsx +++ b/tgui/packages/tgui/interfaces/ParticleEdit/index.tsx @@ -9,7 +9,7 @@ import { Button, LabeledList, Section } from 'tgui-core/components'; import { useBackend } from '../../backend'; import { Window } from '../../layouts'; -import { type ParticleUIData } from './data'; +import type { ParticleUIData } from './data'; import { EntryCoord, EntryFloat, @@ -68,7 +68,7 @@ export const ParticleEdit = (props) => { return ( diff --git a/tgui/packages/tgui/interfaces/PartsLathe.tsx b/tgui/packages/tgui/interfaces/PartsLathe.tsx index dcc182cd47..b108a222da 100644 --- a/tgui/packages/tgui/interfaces/PartsLathe.tsx +++ b/tgui/packages/tgui/interfaces/PartsLathe.tsx @@ -76,7 +76,7 @@ export const PartsLathe = (props) => { {toTitleCase(copyBoard)} - {(copyBoardReqComponents && copyBoardReqComponents.length && ( + {(copyBoardReqComponents?.length && ( <> {copyBoardReqComponents.map((comp) => ( diff --git a/tgui/packages/tgui/interfaces/PathogenicIsolator.tsx b/tgui/packages/tgui/interfaces/PathogenicIsolator.tsx index acd1ddab35..e58719cd5a 100644 --- a/tgui/packages/tgui/interfaces/PathogenicIsolator.tsx +++ b/tgui/packages/tgui/interfaces/PathogenicIsolator.tsx @@ -87,7 +87,7 @@ const virusModalBodyOverride = (modal: modalData) => { {virus.symptoms.map((s) => ( - + Strength: diff --git a/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_news.tsx b/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_news.tsx index 7ffe0b171b..0ab7613876 100644 --- a/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_news.tsx +++ b/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_news.tsx @@ -83,7 +83,7 @@ const NewsTargetFeed = (props: { target_feed: feed }) => { - {decodeHtmlEntities(message.body)} {!!message.img && ( - + {decodeHtmlEntities(message.caption) || null} )} diff --git a/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_status_display.tsx b/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_status_display.tsx index 7989228440..6edc5212ee 100644 --- a/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_status_display.tsx +++ b/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_status_display.tsx @@ -46,7 +46,7 @@ export const pda_status_display = (props) => { icon="pen" onClick={() => act('Status', { statdisp: 'setmsg1' })} > - {records && records.message1 + ' (set)'} + {records && `${records.message1} (set)`} @@ -54,7 +54,7 @@ export const pda_status_display = (props) => { icon="pen" onClick={() => act('Status', { statdisp: 'setmsg2' })} > - {records && records.message2 + ' (set)'} + {records && `${records.message2} (set)`} diff --git a/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_supply.tsx b/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_supply.tsx index c6af5d0dc0..89910424c8 100644 --- a/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_supply.tsx +++ b/tgui/packages/tgui/interfaces/Pda/pda_screens/pda_supply.tsx @@ -31,8 +31,8 @@ export const pda_supply = (props) => { {supply.shuttle_moving - ? 'Moving to station ' + supply.shuttle_eta - : 'Shuttle at ' + supply.shuttle_loc} + ? `Moving to station ${supply.shuttle_eta}` + : `Shuttle at ${supply.shuttle_loc}`}
diff --git a/tgui/packages/tgui/interfaces/PersonalCrafting.tsx b/tgui/packages/tgui/interfaces/PersonalCrafting.tsx index db115a984c..84592387b8 100644 --- a/tgui/packages/tgui/interfaces/PersonalCrafting.tsx +++ b/tgui/packages/tgui/interfaces/PersonalCrafting.tsx @@ -202,7 +202,7 @@ const CraftingList = (props: { icon="cog" disabled={!craftability[craftable.ref]} tooltip={ - craftable.tool_text && 'Tools needed: ' + craftable.tool_text + craftable.tool_text && `Tools needed: ${craftable.tool_text}` } tooltipPosition="left" onClick={() => diff --git a/tgui/packages/tgui/interfaces/PetrificationInterface.tsx b/tgui/packages/tgui/interfaces/PetrificationInterface.tsx index 9ac1d5eed4..de6b074318 100644 --- a/tgui/packages/tgui/interfaces/PetrificationInterface.tsx +++ b/tgui/packages/tgui/interfaces/PetrificationInterface.tsx @@ -42,7 +42,7 @@ export const PetrificationInterface = (props) => { tooltipPosition="top" onClick={() => act('set_option', { option: 'identifier' })} > - {'Change Identifier: "' + identifier + '"'} + {`Change Identifier: "${identifier}"`} @@ -56,7 +56,7 @@ export const PetrificationInterface = (props) => { tooltipPosition="top" onClick={() => act('set_option', { option: 'material' })} > - {'Change Material: "' + material + '"'} + {`Change Material: "${material}"`} @@ -70,7 +70,7 @@ export const PetrificationInterface = (props) => { tooltipPosition="top" onClick={() => act('set_option', { option: 'adjective' })} > - {'Change Adjective: "' + adjective + '"'} + {`Change Adjective: "${adjective}"`} diff --git a/tgui/packages/tgui/interfaces/Photocopier.tsx b/tgui/packages/tgui/interfaces/Photocopier.tsx index c97d41e2d5..8cf7210ac7 100644 --- a/tgui/packages/tgui/interfaces/Photocopier.tsx +++ b/tgui/packages/tgui/interfaces/Photocopier.tsx @@ -119,7 +119,7 @@ const Toner = (props) => { return ( - f + '%'} /> + `${f}%`} /> ); }; diff --git a/tgui/packages/tgui/interfaces/PlantAnalyzer.tsx b/tgui/packages/tgui/interfaces/PlantAnalyzer.tsx index a43ae4c8a6..cec799222b 100644 --- a/tgui/packages/tgui/interfaces/PlantAnalyzer.tsx +++ b/tgui/packages/tgui/interfaces/PlantAnalyzer.tsx @@ -27,7 +27,7 @@ export const PlantAnalyzer = (props) => { if (seed) { calculatedHeight += 18 * seed.trait_info.length; } - if (reagents && reagents.length) { + if (reagents?.length) { calculatedHeight += 55; calculatedHeight += 20 * reagents.length; } diff --git a/tgui/packages/tgui/interfaces/PointDefenseControl.tsx b/tgui/packages/tgui/interfaces/PointDefenseControl.tsx index bb8d981793..ef24a57d62 100644 --- a/tgui/packages/tgui/interfaces/PointDefenseControl.tsx +++ b/tgui/packages/tgui/interfaces/PointDefenseControl.tsx @@ -21,7 +21,7 @@ export const PointDefenseControl = (props) => { return ( -
+
{(turrets.length && turrets.map((pd) => (
{ maxValue={maxValue} color="teal" > - {toFixed(supply / 1000) + ' kW'} + {`${toFixed(supply / 1000)} kW`} @@ -113,7 +113,7 @@ export const PowerMonitorFocus = (props: { focus: sensor }) => { maxValue={maxValue} color="pink" > - {toFixed(demand / 1000) + ' kW'} + {`${toFixed(demand / 1000)} kW`} diff --git a/tgui/packages/tgui/interfaces/PowerMonitor/PowerMonitorHelpers.tsx b/tgui/packages/tgui/interfaces/PowerMonitor/PowerMonitorHelpers.tsx index eb9d608923..ef5ee57a5e 100644 --- a/tgui/packages/tgui/interfaces/PowerMonitor/PowerMonitorHelpers.tsx +++ b/tgui/packages/tgui/interfaces/PowerMonitor/PowerMonitorHelpers.tsx @@ -22,7 +22,7 @@ export const AreaCharge = (props: { charging: number; charge: number }) => { } /> - {toFixed(charge) + '%'} + {`${toFixed(charge)}%`} ); @@ -32,8 +32,7 @@ export const AreaStatusColorBox = (props: { status: number }) => { const { status } = props; const power: boolean = Boolean(status & 2); const mode: boolean = Boolean(status & 1); - const tooltipText: string = - (power ? 'On' : 'Off') + ` [${mode ? 'auto' : 'manual'}]`; + const tooltipText: string = `${power ? 'On' : 'Off'} [${mode ? 'auto' : 'manual'}]`; return ( Language Keys - {language_keys.map((key) => key + ' ')} + {language_keys.map((key) => `${key} `)} Preferred Language diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/SubtabSpecies.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/SubtabSpecies.tsx index 0be24d13f1..9587eb6f68 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/SubtabSpecies.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/SubtabSpecies.tsx @@ -10,7 +10,7 @@ import { ImageButton, Stack, } from 'tgui-core/components'; -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; import { AppearanceFlags, @@ -176,10 +176,10 @@ export const SubtabSpecies = (props: { SpawnFlags.SPECIES_IS_WHITELISTED ? ( Whitelist restricted. ) : null} - {viewed_species.has_organ['heart'] ? null : ( + {viewed_species.has_organ.heart ? null : ( Does not have a circulatory system. )} - {viewed_species.has_organ['lungs'] ? null : ( + {viewed_species.has_organ.lungs ? null : ( Does not have a respiratory system. )} {viewed_species.flags & SpeciesFlags.NO_DNA ? ( diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/SubtabTraits.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/SubtabTraits.tsx index 9a6e44dda1..da6ca79614 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/SubtabTraits.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/SubtabTraits.tsx @@ -7,7 +7,7 @@ import { LabeledList, Stack, } from 'tgui-core/components'; -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; import { type GeneralData, diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Ears.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Ears.tsx index 05856e8eda..dedb0d6845 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Ears.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Ears.tsx @@ -8,10 +8,10 @@ import { ColorType, drawColorizedIconToOffscreenCanvas, } from '../../helper_components'; -import { - type GeneralData, - type GeneralDataConstant, - type GeneralDataStatic, +import type { + GeneralData, + GeneralDataConstant, + GeneralDataStatic, } from '../data'; import { BodyPopup } from '../SubtabBody'; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/EarsSecondary.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/EarsSecondary.tsx index 7b9cc321f0..e78d500b70 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/EarsSecondary.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/EarsSecondary.tsx @@ -3,10 +3,10 @@ import { useBackend } from 'tgui/backend'; import { Button, Input, Section } from 'tgui-core/components'; import { ColorPicker, ColorType } from '../../helper_components'; -import { - type GeneralData, - type GeneralDataConstant, - type GeneralDataStatic, +import type { + GeneralData, + GeneralDataConstant, + GeneralDataStatic, } from '../data'; import { BodyPopup } from '../SubtabBody'; import { EarsImageButton } from './Ears'; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Facial.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Facial.tsx index 1753a33a53..7427d839fb 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Facial.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Facial.tsx @@ -32,7 +32,7 @@ export const FacialImageButton = ( async (ctx: OffscreenCanvasRenderingContext2D) => { ctx.globalCompositeOperation = 'destination-over'; const image = await getImage( - Byond.iconRefMap['icons/mob/human.dmi'] + '?state=body_f_s&dir=2', + `${Byond.iconRefMap['icons/mob/human.dmi']}?state=body_f_s&dir=2`, ); ctx.drawImage(image, 0, 0, 32, 10, 0, 0, 64, 20); @@ -52,7 +52,7 @@ export const FacialImageButton = ( return ( { ctx.globalCompositeOperation = 'destination-over'; const image = await getImage( - Byond.iconRefMap['icons/mob/human.dmi'] + '?state=body_f_s&dir=2', + `${Byond.iconRefMap['icons/mob/human.dmi']}?state=body_f_s&dir=2`, ); ctx.drawImage(image, 0, 0, 32, 10, 0, 0, 64, 20); @@ -51,7 +51,7 @@ export const HairImageButton = ( return (
setShow('')}> Close diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Tail.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Tail.tsx index 05592b6466..2098f47db7 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Tail.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Tail.tsx @@ -8,10 +8,10 @@ import { ColorType, drawColorizedIconToOffscreenCanvas, } from '../../helper_components'; -import { - type GeneralData, - type GeneralDataConstant, - type GeneralDataStatic, +import type { + GeneralData, + GeneralDataConstant, + GeneralDataStatic, } from '../data'; import { BodyPopup } from '../SubtabBody'; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Wings.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Wings.tsx index 6e1020027f..fedf0499df 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Wings.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/body/Wings.tsx @@ -8,10 +8,10 @@ import { ColorType, drawColorizedIconToOffscreenCanvas, } from '../../helper_components'; -import { - type GeneralData, - type GeneralDataConstant, - type GeneralDataStatic, +import type { + GeneralData, + GeneralDataConstant, + GeneralDataStatic, } from '../data'; import { BodyPopup } from '../SubtabBody'; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/data.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/data.ts index ee93f7bd6f..67e5500bc7 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/data.ts +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/data.ts @@ -1,4 +1,4 @@ -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; export type BodyMarking = Record< string, @@ -381,7 +381,7 @@ export type Species = { species_language: string; icobase: string; rarity: number; - has_organ: string; + has_organ: Record; flags: SpeciesFlags; spawn_flags: SpawnFlags; appearance_flags: AppearanceFlags; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/index.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/index.tsx index 14cd9130bd..5bc72a8026 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/index.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/general/index.tsx @@ -1,10 +1,10 @@ import { type ReactNode, useState } from 'react'; import { Box, Icon, Section, Tabs } from 'tgui-core/components'; -import { - type GeneralData, - type GeneralDataConstant, - type GeneralDataStatic, +import type { + GeneralData, + GeneralDataConstant, + GeneralDataStatic, } from './data'; import { SubtabBody } from './SubtabBody'; import { SubtabInfo } from './SubtabInfo'; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/helper_components.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/helper_components.tsx index 13a75f27a5..3ab0c4eed8 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/helper_components.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/helper_components.tsx @@ -74,9 +74,7 @@ export const drawColorizedIconToOffscreenCanvas = async ( let image; try { - image = await getImage( - icon + '?state=' + icon_state + '&dir=' + (dir || '2'), - ); + image = await getImage(`${icon}?state=${icon_state}&dir=${dir || '2'}`); } catch (e) { return null; } diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/index.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/index.tsx index 40fd6506e3..fed3afc262 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/index.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/index.tsx @@ -1,23 +1,23 @@ import { Section } from 'tgui-core/components'; import { ServerPreferencesFetcher } from '../ServerPreferencesFetcher'; -import { - type GeneralData, - type GeneralDataConstant, - type GeneralDataStatic, +import type { + GeneralData, + GeneralDataConstant, + GeneralDataStatic, } from './general/data'; import { General } from './general/index'; import { Loadout } from './loadout'; -import { - type LoadoutData, - type LoadoutDataConstant, - type LoadoutDataStatic, +import type { + LoadoutData, + LoadoutDataConstant, + LoadoutDataStatic, } from './loadout/data'; import { Occupation } from './occupation'; -import { - type OccupationData, - type OccupationDataConstant, - type OccupationDataStatic, +import type { + OccupationData, + OccupationDataConstant, + OccupationDataStatic, } from './occupation/data'; enum Tabs { diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/SubtabEquipment.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/SubtabEquipment.tsx index 175f3a0578..e653827596 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/SubtabEquipment.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/SubtabEquipment.tsx @@ -1,10 +1,10 @@ import { useBackend } from 'tgui/backend'; import { Box, Button, LabeledList, Stack } from 'tgui-core/components'; -import { - type LoadoutData, - type LoadoutDataConstant, - type LoadoutDataStatic, +import type { + LoadoutData, + LoadoutDataConstant, + LoadoutDataStatic, } from './data'; export const SubtabEquipment = (props: { diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/SubtabLoadout.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/SubtabLoadout.tsx index 8ea5adf9d2..cfbcdfcbeb 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/SubtabLoadout.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/SubtabLoadout.tsx @@ -3,10 +3,10 @@ import { Fragment, useState } from 'react'; import { useBackend } from 'tgui/backend'; import { Box, Button, Section, Stack, Table } from 'tgui-core/components'; -import { - type LoadoutData, - type LoadoutDataConstant, - type LoadoutDataStatic, +import type { + LoadoutData, + LoadoutDataConstant, + LoadoutDataStatic, } from './data'; export const SubtabLoadout = (props: { diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/data.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/data.ts index aa16723216..25d59e5a2d 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/data.ts +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/data.ts @@ -1,4 +1,4 @@ -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; // Updated every tick export type UnsafeHtml = string; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/index.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/index.tsx index 861137d888..40654360ad 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/index.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/loadout/index.tsx @@ -1,10 +1,10 @@ import { useState } from 'react'; import { Box, Section, Tabs } from 'tgui-core/components'; -import { - type LoadoutData, - type LoadoutDataConstant, - type LoadoutDataStatic, +import type { + LoadoutData, + LoadoutDataConstant, + LoadoutDataStatic, } from './data'; import { SubtabEquipment } from './SubtabEquipment'; import { SubtabLoadout } from './SubtabLoadout'; diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/occupation/data.ts b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/occupation/data.ts index d793111860..47ca74eb27 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/occupation/data.ts +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/occupation/data.ts @@ -1,4 +1,4 @@ -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; export enum AlternateOption { GET_RANDOM_JOB = 0, diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/occupation/index.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/occupation/index.tsx index 786a18bf82..d8c0427d86 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/occupation/index.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/bay_prefs/occupation/index.tsx @@ -1,4 +1,4 @@ -import { type ReactNode } from 'react'; +import type { ReactNode } from 'react'; import { useBackend } from 'tgui/backend'; import { Box, Button, Section, Stack } from 'tgui-core/components'; diff --git a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiChemList.tsx b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiChemList.tsx index 366039933e..9e21aea291 100644 --- a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiChemList.tsx +++ b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiChemList.tsx @@ -97,7 +97,7 @@ export const ChemicalReactionList = (props: { key={entry} ourKey={ourKey} entries={grinding[entry]} - title={capitalize(entry) + ' Grinding'} + title={`${capitalize(entry)} Grinding`} /> ), )} @@ -133,7 +133,7 @@ function getReactionComponents( : 'Component'; return ( -
+
{(typeof reactionTypes.temp_min === 'number' || typeof reactionTypes.temp_max === 'number') && ( @@ -185,7 +185,7 @@ function getReactionComponents( )} - + {required} diff --git a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiListElements.tsx b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiListElements.tsx index 888fe8a0c7..eb727a17ce 100644 --- a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiListElements.tsx +++ b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiListElements.tsx @@ -16,7 +16,7 @@ export const WikiSpoileredList = (props: { {entries.map((entry) => ( - {capitalize(entry)} @@ -31,7 +31,7 @@ export const WikiSpoileredList = (props: { <> - + {Object.keys(entries).map((entry) => ( - {capitalize(entry)}: {entries[entry]} diff --git a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiQuickElements.tsx b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiQuickElements.tsx index 2a3eba9494..9c6ea6d2a3 100644 --- a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiQuickElements.tsx +++ b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiQuickElements.tsx @@ -139,7 +139,7 @@ export const SupplyEntry = (props: { supply_points + ' per sheet, ' + (!!stack_size && - supply_points * stack_size + ' per stack of ' + stack_size) + `${supply_points * stack_size} per stack of ${stack_size}`) ) : ( )} diff --git a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiSearchList.tsx b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiSearchList.tsx index 1a91671a5a..98c3973c1f 100644 --- a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiSearchList.tsx +++ b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiCommon/WikiSearchList.tsx @@ -1,4 +1,4 @@ -import { type Dispatch, type SetStateAction } from 'react'; +import type { Dispatch, SetStateAction } from 'react'; import { useBackend } from 'tgui/backend'; import { Button, Divider, Input, Section, Stack } from 'tgui-core/components'; import { capitalize } from 'tgui-core/string'; @@ -37,7 +37,7 @@ export const WikiSearchList = (props: { mr="10px" fluid value={searchText} - placeholder={'Search for ' + title + '...'} + placeholder={`Search for ${title}...`} onChange={(value: string) => onSearchText(value)} /> diff --git a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WIkiDonationbanner.tsx b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WIkiDonationbanner.tsx index c456188588..aa43b4a382 100644 --- a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WIkiDonationbanner.tsx +++ b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WIkiDonationbanner.tsx @@ -161,7 +161,7 @@ const DonationButtons = (props) => { }) } > - {'Donate ' + donation + '₮'} + {`Donate ${donation}₮`} ); }; diff --git a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WikiSearchPage.tsx b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WikiSearchPage.tsx index edf98f6dbe..8e4336c6ee 100644 --- a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WikiSearchPage.tsx +++ b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WikiSearchPage.tsx @@ -77,25 +77,23 @@ export const WikiSearchPage = ( ); const subToDisplay = subCats?.filter(customSubSearch); - const tabs: React.JSX.Element[] = []; + const tabs: Record = {}; tabs['Food Recipes'] = !!food_data && ; tabs['Drink Recipes'] = !!drink_data && ; - tabs['Chemistry'] = !!chemistry_data && ( + tabs.Chemistry = !!chemistry_data && ( ); - tabs['Botany'] = !!botany_data && ; - tabs['Ores'] = !!ore_data && ; - tabs['Viruses'] = !!virus_data && ; - tabs['Genes'] = !!gene_data && ; - tabs['Materials'] = !!material_data && ( + tabs.Botany = !!botany_data && ; + tabs.Ores = !!ore_data && ; + tabs.Viruses = !!virus_data && ; + tabs.Genes = !!gene_data && ; + tabs.Materials = !!material_data && ( ); tabs['Particle Physics'] = !!particle_data && ( ); - tabs['Catalogs'] = !!catalog_data && ( - - ); + tabs.Catalogs = !!catalog_data && ; return (
diff --git a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WikiSubPages/WikiChemistryPage.tsx b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WikiSubPages/WikiChemistryPage.tsx index 11334d19ac..4104aa97a9 100644 --- a/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WikiSubPages/WikiChemistryPage.tsx +++ b/tgui/packages/tgui/interfaces/PublicLibraryWiki/WikiPages/WikiSubPages/WikiChemistryPage.tsx @@ -38,7 +38,7 @@ export const WikiChemistryPage = (props: { const capitalizedTitle = capitalize(title); const pageTitle = beakerAmount - ? 'Detected Reagent: ' + capitalizedTitle + ? `Detected Reagent: ${capitalizedTitle}` : capitalizedTitle; return ( @@ -69,7 +69,7 @@ export const WikiChemistryPage = (props: { {overdose ? ( - {overdose + 'u'} + {`${overdose}u`} ) : ( )} diff --git a/tgui/packages/tgui/interfaces/PublicLibraryWiki/types.ts b/tgui/packages/tgui/interfaces/PublicLibraryWiki/types.ts index 2012ed00f2..0f67a6d7ca 100644 --- a/tgui/packages/tgui/interfaces/PublicLibraryWiki/types.ts +++ b/tgui/packages/tgui/interfaces/PublicLibraryWiki/types.ts @@ -165,7 +165,7 @@ export type ReactionData = { }; export type GroundMaterial = { - ore: String[] | null; + ore: string[] | null; plant: string[] | null; material: string[] | null; } | null; diff --git a/tgui/packages/tgui/interfaces/RCON/RCONSmesList.tsx b/tgui/packages/tgui/interfaces/RCON/RCONSmesList.tsx index 7cbbeb8049..b6faf8d3d2 100644 --- a/tgui/packages/tgui/interfaces/RCON/RCONSmesList.tsx +++ b/tgui/packages/tgui/interfaces/RCON/RCONSmesList.tsx @@ -14,7 +14,7 @@ export const RCONSmesList = (props) => { }; return ( -
+
{smes_info.map((smes) => ( diff --git a/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitHardware.tsx b/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitHardware.tsx index af433e2a04..0e6a85e523 100644 --- a/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitHardware.tsx +++ b/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitHardware.tsx @@ -7,7 +7,7 @@ import { Stack, Tooltip, } from 'tgui-core/components'; -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; import { capitalize } from 'tgui-core/string'; import type { Data } from './types'; @@ -104,7 +104,7 @@ export const RIGSuitHardware = (props) => { > void }) => { const onFinish = props.onFinish ? props.onFinish : () => {}; diff --git a/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitModules.tsx b/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitModules.tsx index 6afad23bbf..1161afff11 100644 --- a/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitModules.tsx +++ b/tgui/packages/tgui/interfaces/RIGSuit/RIGSuitModules.tsx @@ -30,118 +30,115 @@ export const RIGSuitModules = (props) => { Selected Primary: {capitalize(primarysystem || 'None')} - {modules && - modules.map((module, i) => ( -
- {module.can_select ? ( - - - - ) : ( - '' - )} - {module.can_use ? ( - - - - ) : ( - '' - )} - {module.can_toggle ? ( - - - - ) : ( - '' - )} - - } - > - {module.damage >= 2 ? ( - -- MODULE DESTROYED -- - ) : ( - - - Engage: {module.engagecost} - Active: {module.activecost} - Passive: {module.passivecost} + {modules?.map((module, i) => ( +
+ {module.can_select ? ( + + - {module.desc} - - )} - {module.charges ? ( - -
- - - {capitalize(module.chargetype)} - - {module.charges.map((charge, i) => ( - -
+ ) : ( + '' + )} + {module.can_use ? ( + + + + ) : ( + '' + )} + {module.can_toggle ? ( + + + + ) : ( + '' + )} + + } + > + {module.damage >= 2 ? ( + -- MODULE DESTROYED -- + ) : ( + + + Engage: {module.engagecost} + Active: {module.activecost} + Passive: {module.passivecost} - ) : ( - '' - )} -
- ))} + {module.desc} +
+ )} + {module.charges ? ( + +
+ + + {capitalize(module.chargetype)} + + {module.charges.map((charge, i) => ( + +
+
+ ) : ( + '' + )} +
+ ))}
); }; diff --git a/tgui/packages/tgui/interfaces/RapidPipeDispenser/LayerSection.tsx b/tgui/packages/tgui/interfaces/RapidPipeDispenser/LayerSection.tsx index e7ade835af..630679231f 100644 --- a/tgui/packages/tgui/interfaces/RapidPipeDispenser/LayerSection.tsx +++ b/tgui/packages/tgui/interfaces/RapidPipeDispenser/LayerSection.tsx @@ -50,7 +50,7 @@ export const LayerSection = (props) => { { return (
- + {message} diff --git a/tgui/packages/tgui/interfaces/ResearchServerController.tsx b/tgui/packages/tgui/interfaces/ResearchServerController.tsx index e0f3e64b4a..a03d4c141b 100644 --- a/tgui/packages/tgui/interfaces/ResearchServerController.tsx +++ b/tgui/packages/tgui/interfaces/ResearchServerController.tsx @@ -131,7 +131,7 @@ const ResearchServerAccess = (props: { server: server }) => { consoles.map((console) => ( } > {desc}
diff --git a/tgui/packages/tgui/interfaces/TEGenerator.tsx b/tgui/packages/tgui/interfaces/TEGenerator.tsx index 9a25b3cb4a..a7f08325dd 100644 --- a/tgui/packages/tgui/interfaces/TEGenerator.tsx +++ b/tgui/packages/tgui/interfaces/TEGenerator.tsx @@ -86,7 +86,7 @@ const TEGCirculator = (props: { name: string; values: Circulator }) => { } = values; return ( -
+
@@ -100,7 +100,7 @@ const TEGCirculator = (props: { name: string; values: Circulator }) => { val.toFixed(2) + '%'} + format={(val) => `${val.toFixed(2)}%`} /> diff --git a/tgui/packages/tgui/interfaces/Tank.tsx b/tgui/packages/tgui/interfaces/Tank.tsx index 78a1d7efcb..09f9d7b746 100644 --- a/tgui/packages/tgui/interfaces/Tank.tsx +++ b/tgui/packages/tgui/interfaces/Tank.tsx @@ -69,7 +69,7 @@ export const Tank = (props) => { bad: [-Infinity, 0.15], }} > - {data.tankPressure + ' kPa'} + {`${data.tankPressure} kPa`} diff --git a/tgui/packages/tgui/interfaces/TelecommsLogBrowser.tsx b/tgui/packages/tgui/interfaces/TelecommsLogBrowser.tsx index b03de83ec2..a5fe0e0325 100644 --- a/tgui/packages/tgui/interfaces/TelecommsLogBrowser.tsx +++ b/tgui/packages/tgui/interfaces/TelecommsLogBrowser.tsx @@ -149,7 +149,7 @@ const TelecommsServerSelection = (props: { {servers.map((server) => (
- {machinelist && machinelist.length ? ( + {machinelist?.length ? ( { list.map((machine) => ( {multitool_buffer ? ( @@ -138,7 +138,7 @@ const TelecommsMultitoolMenuStatus = (props) => { {linked.map((link) => ( { confirmIcon="trash" onClick={() => act('delete', { delete: f.freq })} > - {f.name + ' GHz'} + {`${f.name} GHz`} ))} {!filter || filter.length === 0 ? ( @@ -264,7 +264,7 @@ const TelecommsMultitoolMenuPolymorphicOptions = (props: { selected={!!change_freq} onClick={() => act('change_freq')} > - {change_freq ? 'Yes (' + change_freq + ')' : 'No'} + {change_freq ? `Yes (${change_freq})` : 'No'} ) : ( @@ -272,7 +272,7 @@ const TelecommsMultitoolMenuPolymorphicOptions = (props: { )} {use_broadcast_range || use_receive_range ? ( { v + '°'} + format={(v) => `${v}°`} step={1} minValue={-900} maxValue={900} @@ -113,7 +113,7 @@ export const TelesciConsoleContent = (props) => { v + '/' + maxAllowedDistance + ' m'} + format={(v) => `${v}/${maxAllowedDistance} m`} minValue={0} maxValue={maxAllowedDistance!} step={1} @@ -122,17 +122,16 @@ export const TelesciConsoleContent = (props) => { /> - {sectorOptions && - sectorOptions.map((z) => ( - - ))} + {sectorOptions?.map((z) => ( + + ))} - )))} + locked_records?.map((record) => ( + + ))}
); }; diff --git a/tgui/packages/tgui/interfaces/Uplink/ItemList.tsx b/tgui/packages/tgui/interfaces/Uplink/ItemList.tsx index 2867741d30..922567f1ba 100644 --- a/tgui/packages/tgui/interfaces/Uplink/ItemList.tsx +++ b/tgui/packages/tgui/interfaces/Uplink/ItemList.tsx @@ -34,7 +34,7 @@ export const ItemList = (props: { }) } > - {formatMoney(item.cost) + ' ' + currencySymbol} + {`${formatMoney(item.cost)} ${currencySymbol}`} @@ -56,7 +56,7 @@ export const ItemList = (props: { }) } > - {item.cost + ' ' + currencySymbol} + {`${item.cost} ${currencySymbol}`} } > diff --git a/tgui/packages/tgui/interfaces/Vending.tsx b/tgui/packages/tgui/interfaces/Vending.tsx index b37a76487f..0b19e16384 100644 --- a/tgui/packages/tgui/interfaces/Vending.tsx +++ b/tgui/packages/tgui/interfaces/Vending.tsx @@ -86,7 +86,7 @@ const VendingRow = (props: { product: product }) => { }) } > - {product.price ? 'Buy (' + product.price + '₮)' : 'Vend'} + {product.price ? `Buy (${product.price}₮)` : 'Vend'} @@ -156,7 +156,7 @@ export const VendingProducts = (props: {
{!!coin && (
act('remove_coin')}> Eject Coin diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelCommonElements.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelCommonElements.tsx index 5c9e9ada5b..b3ebc85944 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelCommonElements.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelCommonElements.tsx @@ -1,6 +1,6 @@ import { useBackend } from 'tgui/backend'; import { Box, Button, Stack } from 'tgui-core/components'; -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; export const VorePanelColorBox = (props: { back_color: string; @@ -9,8 +9,8 @@ export const VorePanelColorBox = (props: { }) => { const { back_color, pixelSize = 20, alpha = 255 } = props; - const parentSize = pixelSize + 'px'; - const childSize = pixelSize - 4 + 'px'; + const parentSize = `${pixelSize}px`; + const childSize = `${pixelSize - 4}px`; return ( toggleEditMode(!editMode)} /> diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelEditCheckboxes.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelEditCheckboxes.tsx index 261189ec43..3902e4ff1b 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelEditCheckboxes.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelEditCheckboxes.tsx @@ -45,7 +45,7 @@ export const VorePanelEditCheckboxes = (props: { {options.map((value) => ( act(action, { diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelEditNumber.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelEditNumber.tsx index 4fdfb2a728..a93cd20d32 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelEditNumber.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelEditNumber.tsx @@ -85,7 +85,7 @@ export const VorePanelEditNumber = (props: { ) : ( {value} - {!!unit && ' ' + unit} + {!!unit && ` ${unit}`} ); }; diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelTextArea.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelTextArea.tsx index f42364a3c5..ba502d6d3e 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelTextArea.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePanelTextArea.tsx @@ -78,7 +78,7 @@ const CountedTextElement = (props: { - {currentCount + ' / ' + limit} + {`${currentCount} / ${limit}`} diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePaneldEditTextTabs.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePaneldEditTextTabs.tsx index ecb8022794..7504786212 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePaneldEditTextTabs.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VorePaneldEditTextTabs.tsx @@ -84,7 +84,7 @@ export const VorePanelEditTextTabs = (props: { act(tabAction, { tab: value }); } }} - icon={tabsToIcons && tabsToIcons[value]} + icon={tabsToIcons?.[value]} > {value} @@ -100,9 +100,7 @@ export const VorePanelEditTextTabs = (props: { subAction={button_subAction} editMode={editMode} active={!!button_data} - tooltip={ - (button_data ? 'Dis' : 'En') + 'ables ' + button_tooltip - } + tooltip={`${button_data ? 'Dis' : 'En'}ables ${button_tooltip}`} /> diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VoreUserPreferenceItem.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VoreUserPreferenceItem.tsx index 9b7cca6243..4414961860 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VoreUserPreferenceItem.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelElements/VoreUserPreferenceItem.tsx @@ -21,7 +21,7 @@ export const VoreUserPreferenceItem = (props: { backgroundColor={ back_color ? (test ? back_color.enabled : back_color.disabled) : '' } - tooltip={tooltip.main + ' ' + (test ? tooltip.disable : tooltip.enable)} + tooltip={`${tooltip.main} ${test ? tooltip.disable : tooltip.enable}`} {...rest} > {test ? content.enabled : content.disabled} diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreAbilities.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreAbilities.tsx index 47b32e6757..7fd227ea19 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreAbilities.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreAbilities.tsx @@ -11,7 +11,7 @@ export const VoreAbilities = (props: { abilities: abilities }) => { const { nutrition, size_change } = abilities; return ( -
+
@@ -47,7 +47,7 @@ const SizeChange = (props: { } : { black: [0, 600] } } - format={(value: number) => toFixed(value, 2) + '%'} + format={(value: number) => `${toFixed(value, 2)}%`} value={Math.round(current_size * 10000) / 100} minValue={minimum_size * 100} maxValue={maximum_size * 100} diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreInsidePanel.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreInsidePanel.tsx index 3ed418f7d9..f9d3560729 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreInsidePanel.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreInsidePanel.tsx @@ -65,7 +65,7 @@ export const VoreInsidePanel = (props: {   {desc} - {contents && contents.length ? ( + {contents?.length ? ( act('change_vore_tab', { tab: index })} > {tabToNames[index]} - {!!(index === 6) && '(' + content_length + ')'} + {!!(index === 6) && `(${content_length})`} ))} diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreSoulcatcher.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreSoulcatcher.tsx index d5f1bb5af6..7e26dcc017 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreSoulcatcher.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreSoulcatcher.tsx @@ -6,7 +6,7 @@ import { Section, Stack, } from 'tgui-core/components'; -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; import { noSelectionName } from '../constants'; import type { abilities, DropdownEntry, soulcatcherData } from '../types'; @@ -109,7 +109,7 @@ const VoreSoulcatcherSection = (props: { return (
diff --git a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserGeneral.tsx b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserGeneral.tsx index 42fd8f0e50..e437e89e6e 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserGeneral.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VorePanelMainTabs/VoreUserGeneral.tsx @@ -1,6 +1,6 @@ import { useBackend } from 'tgui/backend'; import { Button, Section, Stack } from 'tgui-core/components'; -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; import type { bellyData, generalPrefData } from '../types'; import { VoreUserPreferencesAesthetic } from '../VoreUserPreferencesTabs/VoreUserPreferencesAesthetic'; diff --git a/tgui/packages/tgui/interfaces/VorePanel/VoreSelectedBellyTabs/DescriptionTab/VoreSelectedBellyDescriptionMatrix.tsx b/tgui/packages/tgui/interfaces/VorePanel/VoreSelectedBellyTabs/DescriptionTab/VoreSelectedBellyDescriptionMatrix.tsx index d8d16feff3..eb3cc88e77 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VoreSelectedBellyTabs/DescriptionTab/VoreSelectedBellyDescriptionMatrix.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VoreSelectedBellyTabs/DescriptionTab/VoreSelectedBellyDescriptionMatrix.tsx @@ -6,7 +6,7 @@ import { Stack, Tabs, } from 'tgui-core/components'; -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; import { messageTabLabel } from '../../constants'; import type { bellyDescriptionData } from '../../types'; @@ -60,9 +60,7 @@ export const VoreSelectedBellyDescriptionMatrix = (props: { )} diff --git a/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesFX.tsx b/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesFX.tsx index 0916b290fe..e0250acfbc 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesFX.tsx +++ b/tgui/packages/tgui/interfaces/VorePanel/VoreUserPreferencesTabs/VoreUserPreferencesFX.tsx @@ -1,7 +1,7 @@ import { LabeledList, Section } from 'tgui-core/components'; -import { type BooleanLike } from 'tgui-core/react'; +import type { BooleanLike } from 'tgui-core/react'; -import { type localPrefs } from '../types'; +import type { localPrefs } from '../types'; import { VorePanelEditNumber } from '../VorePanelElements/VorePanelEditNumber'; import { VoreUserPreferenceItem } from '../VorePanelElements/VoreUserPreferenceItem'; diff --git a/tgui/packages/tgui/interfaces/VorePanel/functions.ts b/tgui/packages/tgui/interfaces/VorePanel/functions.ts index 89387ffcf6..3d63bad76f 100644 --- a/tgui/packages/tgui/interfaces/VorePanel/functions.ts +++ b/tgui/packages/tgui/interfaces/VorePanel/functions.ts @@ -18,7 +18,7 @@ export function sanitize_color(color?: string | null, mirrorBlack?: boolean) { } export function calcLineHeight(lim: number, height: number) { - return (Math.ceil(lim / 25 / height + 0.5) * height).toFixed() + 'px'; + return `${(Math.ceil(lim / 25 / height + 0.5) * height).toFixed()}px`; } export function fixCorruptedData( diff --git a/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportBellyString.tsx b/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportBellyString.tsx index 80fb085e95..f5814b09c3 100644 --- a/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportBellyString.tsx +++ b/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportBellyString.tsx @@ -178,13 +178,13 @@ export const generateBellyString = (belly: Belly, index: number) => { // Liquid Options show_liquids, reagentbellymode, - reagent_chosen, - reagent_name, - reagent_transfer_verb, - gen_time_display, - custom_max_volume, - vorefootsteps_sounds, - reagent_mode_flag_list, + reagent_chosen, + reagent_name, + reagent_transfer_verb, + gen_time_display, + custom_max_volume, + vorefootsteps_sounds, + reagent_mode_flag_list, liquid_overlay, max_liquid_level, reagent_touches, @@ -217,8 +217,16 @@ export const generateBellyString = (belly: Belly, index: number) => { } = belly; let result = ''; - result += '

'; - result += '

'; - result += '
'; + result += + '
'; result += '
'; - result += 'Addons:
' + GetAddons(addons) + '

'; + result += `Addons:
${GetAddons(addons)}

`; result += '== Descriptions ==
'; - result += 'Vore Verb:
' + vore_verb + '

'; - result += 'Release Verb:
' + release_verb + '

'; - result += 'Description:
"' + desc + '"

'; - result += 'Absorbed Description:
"' + absorbed_desc + '"

'; + result += `Vore Verb:
${vore_verb}

`; + result += `Release Verb:
${release_verb}

`; + result += `Description:
"${desc}"

`; + result += `Absorbed Description:
"${absorbed_desc}"

`; result += '
'; result += '== Messages ==
'; - result +='Show All Interactive Messages: ' + (message_mode ? 'Yes' : 'No') + '
'; + result += + 'Show All Interactive Messages: ' + + (message_mode + ? 'Yes' + : 'No') + + '
'; result += '
'; // Start Div messagesTabpanel result += '
'; result += '
'; - result += 'Escape Attempt Messages (Owner)'; - result += 'Escape Attempt Messages (Prey)'; - result += 'Escape Message (Owner)'; - result += 'Escape Message (Prey)'; - result += 'Escape Message (Outside)'; - result += 'Escape Item Messages (Owner)'; - result += 'Escape Item Messages (Prey)'; - result += 'Escape Item Messages (Outside)'; - result += 'Escape Fail Messages (Owner)'; - result += 'Escape Fail Messages (Prey)'; - result += 'Escape Attempt Absorbed Messages (Owner)'; - result += 'Escape Attempt Absorbed Messages (Prey)'; - result += 'Escape Absorbed Messages (Owner)'; - result += 'Escape Absorbed Messages (Prey)'; - result += 'Escape Absorbed Messages (Outside)'; - result += 'Escape Fail Absorbed Messages (Owner)'; - result += 'Escape Fail Absorbed Messages (Prey)'; - result += 'Primary Transfer Messages (Owner)'; - result += 'Primary Transfer Messages (Prey)'; - result += 'Secondary Transfer Messages (Owner)'; - result += 'Secondary Transfer Messages (Prey)'; - result += 'Digest Chance Messages (Owner)'; - result += 'Digest Chance Messages (Prey)'; - result += 'Absorb Chance Messages (Owner)'; - result += 'Absorb Chance Messages (Prey)'; - result += 'Struggle Messages (Outside)'; - result += 'Struggle Messages (Inside)'; - result += 'Absorbed Struggle Messages (Outside)'; - result += 'Absorbed Struggle Messages (Inside)'; - result += 'Digest Messages (Owner)'; - result += 'Digest Messages (Prey)'; - result += 'Absorb Messages (Owner)'; - result += 'Absorb Messages (Prey)'; - result += 'Unabsorb Messages (Owner)'; - result += 'Unabsorb Messages (Prey)'; - result += 'Examine Messages'; - result += 'Examine Messages (Absorbed)'; - result += 'Trash Eater Ingest Messages'; - result += 'Item Expel Messages'; + result += + 'Escape Attempt Messages (Owner)'; + result += + 'Escape Attempt Messages (Prey)'; + result += + 'Escape Message (Owner)'; + result += + 'Escape Message (Prey)'; + result += + 'Escape Message (Outside)'; + result += + 'Escape Item Messages (Owner)'; + result += + 'Escape Item Messages (Prey)'; + result += + 'Escape Item Messages (Outside)'; + result += + 'Escape Fail Messages (Owner)'; + result += + 'Escape Fail Messages (Prey)'; + result += + 'Escape Attempt Absorbed Messages (Owner)'; + result += + 'Escape Attempt Absorbed Messages (Prey)'; + result += + 'Escape Absorbed Messages (Owner)'; + result += + 'Escape Absorbed Messages (Prey)'; + result += + 'Escape Absorbed Messages (Outside)'; + result += + 'Escape Fail Absorbed Messages (Owner)'; + result += + 'Escape Fail Absorbed Messages (Prey)'; + result += + 'Primary Transfer Messages (Owner)'; + result += + 'Primary Transfer Messages (Prey)'; + result += + 'Secondary Transfer Messages (Owner)'; + result += + 'Secondary Transfer Messages (Prey)'; + result += + 'Digest Chance Messages (Owner)'; + result += + 'Digest Chance Messages (Prey)'; + result += + 'Absorb Chance Messages (Owner)'; + result += + 'Absorb Chance Messages (Prey)'; + result += + 'Struggle Messages (Outside)'; + result += + 'Struggle Messages (Inside)'; + result += + 'Absorbed Struggle Messages (Outside)'; + result += + 'Absorbed Struggle Messages (Inside)'; + result += + 'Digest Messages (Owner)'; + result += + 'Digest Messages (Prey)'; + result += + 'Absorb Messages (Owner)'; + result += + 'Absorb Messages (Prey)'; + result += + 'Unabsorb Messages (Owner)'; + result += + 'Unabsorb Messages (Prey)'; + result += + 'Examine Messages'; + result += + 'Examine Messages (Absorbed)'; + result += + 'Trash Eater Ingest Messages'; + result += + 'Item Expel Messages'; result += '
'; result += '
'; result += '
'; - result += '
'; + result += + '
'; escape_attempt_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_attempt_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_messages_outside?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_item_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_item_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_item_messages_outside?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_fail_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_fail_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_attempt_absorbed_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_attempt_absorbed_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_absorbed_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_absorbed_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_absorbed_messages_outside?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_fail_absorbed_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; escape_fail_absorbed_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; primary_transfer_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; primary_transfer_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; secondary_transfer_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; secondary_transfer_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; primary_autotransfer_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; primary_autotransfer_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; secondary_autotransfer_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; secondary_autotransfer_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; digest_chance_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; digest_chance_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; absorb_chance_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; absorb_chance_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; struggle_messages_outside?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; struggle_messages_inside?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; absorbed_struggle_messages_outside?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; absorbed_struggle_messages_inside?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; digest_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; digest_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; absorb_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; absorb_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; unabsorb_messages_owner?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; unabsorb_messages_prey?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; examine_messages?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; examine_messages_absorbed?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; trash_eater_in?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; trash_eater_out?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; @@ -564,67 +828,67 @@ export const generateBellyString = (belly: Belly, index: number) => { result += '
Idle Messages (Hold):

'; emotes_hold?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; result += '
Idle Messages (Hold Absorbed):

'; emotes_holdabsorbed?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; result += '
Idle Messages (Digest):

'; emotes_digest?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; result += '
Idle Messages (Absorb):

'; emotes_absorb?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; result += '
Idle Messages (Unabsorb):

'; emotes_unabsorb?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; result += '
Idle Messages (Drain):

'; emotes_drain?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; result += '
Idle Messages (Heal):

'; emotes_heal?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; result += '
Idle Messages (Size Steal):

'; emotes_steal?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; result += '
Idle Messages (Shrink):

'; emotes_shrink?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; result += '
Idle Messages (Grow):

'; emotes_grow?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; result += '
Idle Messages (Encase In Egg):

'; emotes_egg?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '


'; @@ -632,36 +896,115 @@ export const generateBellyString = (belly: Belly, index: number) => { result += '
'; - result += '
'; + result += `
`; // OPTIONS result += '
'; - result += '

'; - result += '

'; - result += '
'; + result += + '
'; result += '
'; result += '
    '; - result += '
  • Can Taste: ' + (can_taste ? 'Yes' : 'No') + '
  • '; - result += '
  • Feedable: ' + (is_feedable ? 'Yes' : 'No') + '
  • '; - result += '
  • Contaminates: ' + (contaminates ? 'Yes' : 'No') + '
  • '; - result += '
  • Contamination Flavor: ' + contamination_flavor + '
  • '; - result += '
  • Contamination Color: ' + contamination_color + '
  • '; - result += '
  • Nutritional Gain: ' + nutrition_percent + '%
  • '; - result += '
  • Required Examine Size: ' + bulge_size * 100 + '%
  • '; - result += '
  • Display Absorbed Examines: ' + (display_absorbed_examine ? 'True' : 'False') + '
  • '; - result += '
  • Save Digest Mode: ' + (save_digest_mode ? 'True' : 'False') + '
  • '; - result += '
  • Idle Emotes: ' + (emote_active ? 'Active' : 'Inactive') + '
  • '; - result += '
  • Idle Emote Delay: ' + emote_time + ' seconds
  • '; - result += '
  • Shrink/Grow Size: ' + shrink_grow_size * 100 + '%
  • '; - result += '
  • Vore Spawn Blacklist: ' + (vorespawn_blacklist ? 'Yes' : 'No') + '
  • '; - result += '
  • Vore Spawn Whitelist: ' + (vorespawn_whitelist.length ? vorespawn_whitelist.join(', ') : 'Anyone!') + '
  • '; - result += '
  • Vore Spawn Absorbed: ' + (vorespawn_absorbed === 0 ? 'No' : vorespawn_absorbed === 1 ? 'Yes' : 'Prey Choice') + '
  • '; - result += '
  • Egg Type: ' + egg_type + '
  • '; - result += '
  • Selective Mode Preference: ' + selective_preference + '
  • '; + result += + '
  • Can Taste: ' + + (can_taste + ? 'Yes' + : 'No') + + '
  • '; + result += + '
  • Feedable: ' + + (is_feedable + ? 'Yes' + : 'No') + + '
  • '; + result += + '
  • Contaminates: ' + + (contaminates + ? 'Yes' + : 'No') + + '
  • '; + result += + '
  • Contamination Flavor: ' + + contamination_flavor + + '
  • '; + result += + '
  • Contamination Color: ' + + contamination_color + + '
  • '; + result += + '
  • Nutritional Gain: ' + + nutrition_percent + + '%
  • '; + result += + '
  • Required Examine Size: ' + + bulge_size * 100 + + '%
  • '; + result += + '
  • Display Absorbed Examines: ' + + (display_absorbed_examine + ? 'True' + : 'False') + + '
  • '; + result += + '
  • Save Digest Mode: ' + + (save_digest_mode + ? 'True' + : 'False') + + '
  • '; + result += + '
  • Idle Emotes: ' + + (emote_active + ? 'Active' + : 'Inactive') + + '
  • '; + result += + '
  • Idle Emote Delay: ' + + emote_time + + ' seconds
  • '; + result += + '
  • Shrink/Grow Size: ' + + shrink_grow_size * 100 + + '%
  • '; + result += + '
  • Vore Spawn Blacklist: ' + + (vorespawn_blacklist + ? 'Yes' + : 'No') + + '
  • '; + result += + '
  • Vore Spawn Whitelist: ' + + (vorespawn_whitelist.length ? vorespawn_whitelist.join(', ') : 'Anyone!') + + '
  • '; + result += + '
  • Vore Spawn Absorbed: ' + + (vorespawn_absorbed === 0 + ? 'No' + : vorespawn_absorbed === 1 + ? 'Yes' + : 'Prey Choice') + + '
  • '; + result += `
  • Egg Type: ${egg_type}
  • `; + result += + '
  • Selective Mode Preference: ' + + selective_preference + + '
  • '; result += '
'; result += '
'; @@ -669,19 +1012,48 @@ export const generateBellyString = (belly: Belly, index: number) => { // SOUNDS result += '
'; - result += '

'; - result += '

'; - result += '
'; + result += + '
'; result += '
'; result += '
    '; - result += '
  • Fleshy Belly: ' + (is_wet ? 'Yes' : 'No') + '
  • '; - result += '
  • Internal Loop: ' + (wet_loop ? 'Yes' : 'No') + '
  • '; - result += '
  • Use Fancy Sounds: ' + (fancy_vore ? 'Yes' : 'No') + '
  • '; - result += '
  • Vore Sound: ' + vore_sound + '
  • '; - result += '
  • Release Sound: ' + release_sound + '
  • '; + result += + '
  • Fleshy Belly: ' + + (is_wet + ? 'Yes' + : 'No') + + '
  • '; + result += + '
  • Internal Loop: ' + + (wet_loop + ? 'Yes' + : 'No') + + '
  • '; + result += + '
  • Use Fancy Sounds: ' + + (fancy_vore + ? 'Yes' + : 'No') + + '
  • '; + result += `
  • Vore Sound: ${vore_sound}
  • `; + result += + `
  • Release Sound: ${release_sound}
  • `; result += '
'; result += '
'; @@ -689,28 +1061,72 @@ export const generateBellyString = (belly: Belly, index: number) => { // VISUALS result += '
'; - result += '

'; - result += '

'; - result += '
'; result += 'Vore Sprites'; result += '
    '; - result += '
  • Affect Vore Sprites: ' + (affects_vore_sprites ? 'Yes' : 'No') + '
  • '; - result += '
  • Count Absorbed prey for vore sprites: ' + (count_absorbed_prey_for_sprite ? 'Yes' : 'No') + '
  • '; - result += '
  • Animation when prey resist: ' + (resist_triggers_animation ? 'Yes' : 'No') + '
  • '; - result += '
  • Vore Sprite Size Factor: ' + size_factor_for_sprite + '
  • '; - result += '
  • Belly Sprite to affect: ' + belly_sprite_to_affect + '
  • '; + result += + '
  • Affect Vore Sprites: ' + + (affects_vore_sprites + ? 'Yes' + : 'No') + + '
  • '; + result += + '
  • Count Absorbed prey for vore sprites: ' + + (count_absorbed_prey_for_sprite + ? 'Yes' + : 'No') + + '
  • '; + result += + '
  • Animation when prey resist: ' + + (resist_triggers_animation + ? 'Yes' + : 'No') + + '
  • '; + result += + '
  • Vore Sprite Size Factor: ' + + size_factor_for_sprite + + '
  • '; + result += + '
  • Belly Sprite to affect: ' + + belly_sprite_to_affect + + '
  • '; result += '
'; result += 'Belly Fullscreens Preview and Coloring'; result += '
    '; - result += '
  • Color: ' + belly_fullscreen_color + ''; + result += + '
  • Color: ' + + belly_fullscreen_color + + ''; result += '
'; result += 'Vore FX'; result += '
    '; - result += '
  • Disable Prey HUD: ' + (disable_hud ? 'Yes' : 'No') + '
  • '; + result += + '
  • Disable Prey HUD: ' + + (disable_hud + ? 'Yes' + : 'No') + + '
  • '; result += '
'; result += '
'; @@ -718,54 +1134,148 @@ export const generateBellyString = (belly: Belly, index: number) => { // INTERACTIONS result += '
'; - result += '

'; - result += '

'; - result += '
'; + result += + '
'; result += '
'; - result += 'Belly Interactions (' + - (escapable ? 'Enabled' : 'Disabled') + - ')'; + result += + 'Belly Interactions (' + + (escapable + ? 'Enabled' + : 'Disabled') + + ')'; result += '
    '; - result += '
  • Escape Chance: ' + escapechance + '%
  • '; - result += '
  • Escape Chance: ' + escapechance_absorbed + '%
  • '; - result += '
  • Escape Time: ' + escapetime / 10 + 's
  • '; - result += '
  • Transfer Chance: ' + transferchance + '%
  • '; - result += '
  • Transfer Location: ' + transferlocation + '
  • '; - result += '
  • Secondary Transfer Chance: ' + transferchance_secondary + '%
  • '; - result += '
  • Secondary Transfer Location: ' + transferlocation_secondary + '
  • '; - result += '
  • Absorb Chance: ' + absorbchance + '%
  • '; - result += '
  • Digest Chance: ' + digestchance + '%
  • '; - result += '
  • Belch Chance: ' + belchchance + '%
  • '; + result += + `
  • Escape Chance: ${escapechance}%
  • `; + result += + '
  • Escape Chance: ' + + escapechance_absorbed + + '%
  • '; + result += + `
  • Escape Time: ${escapetime / 10}s
  • `; + result += + `
  • Transfer Chance: ${transferchance}%
  • `; + result += + `
  • Transfer Location: ${transferlocation}
  • `; + result += + `
  • Secondary Transfer Chance: ${transferchance_secondary}%
  • `; + result += + `
  • Secondary Transfer Location: ${transferlocation_secondary}
  • `; + result += + `
  • Absorb Chance: ${absorbchance}%
  • `; + result += + `
  • Digest Chance: ${digestchance}%
  • `; + result += + `
  • Belch Chance: ${belchchance}%
  • `; result += '
'; result += '
'; - result += 'Auto-Transfer Options (' + - (autotransfer_enabled ? 'Enabled' : 'Disabled') + - ')'; + result += + 'Auto-Transfer Options (' + + (autotransfer_enabled + ? 'Enabled' + : 'Disabled') + + ')'; result += '
    '; - result += '
  • Auto-Transfer Time: ' + autotransferwait / 10 + 's
  • '; - result += '
  • Auto-Transfer Chance: ' + autotransferchance + '%
  • '; - result += '
  • Auto-Transfer Location: ' + autotransferlocation + '
  • '; - result += '
  • Auto-Transfer Chance: ' + autotransferchance_secondary + '%
  • '; - result += '
  • Auto-Transfer Location: ' + autotransferlocation_secondary + '
  • '; - result += '
  • Auto-Transfer Min Amount: ' + autotransfer_min_amount + '
  • '; - result += '
  • Auto-Transfer Max Amount: ' + autotransfer_max_amount + '
  • '; - result += '
  • Auto-Transfer Primary Chance: ' + autotransferchance + '%
  • '; - result += '
  • Auto-Transfer Primary Location: ' + autotransferlocation + '
  • '; - result += '
  • Auto-Transfer Primary Location Extras: ' + autotransferextralocation.join(', ') + '
  • '; - result += '
  • Auto-Transfer Primary Whitelist (Mobs): ' + GetAutotransferFlags(autotransfer_whitelist, true) + '
  • '; - result += '
  • Auto-Transfer Primary Whitelist (Items): ' + GetAutotransferFlags(autotransfer_whitelist_items, true) + '
  • '; - result += '
  • Auto-Transfer Primary Blacklist (Mobs): ' + GetAutotransferFlags(autotransfer_blacklist, false) + '
  • '; - result += '
  • Auto-Transfer Primary Blacklist (Items): ' + GetAutotransferFlags(autotransfer_blacklist_items, false) + '
  • '; - result += '
  • Auto-Transfer Secondary Chance: ' + autotransferchance_secondary + '%
  • '; - result += '
  • Auto-Transfer Secondary Location: ' + autotransferlocation_secondary + '
  • '; - result += '
  • Auto-Transfer Secondary Location Extras: ' + autotransferextralocation_secondary.join(', ') + '
  • '; - result += '
  • Auto-Transfer Secondary Whitelist (Mobs): ' + GetAutotransferFlags(autotransfer_secondary_whitelist, true) + '
  • '; - result += '
  • Auto-Transfer Secondary Whitelist (Items): ' + GetAutotransferFlags(autotransfer_secondary_whitelist_items, true) + '
  • '; - result += '
  • Auto-Transfer Secondary Blacklist (Mobs): ' + GetAutotransferFlags(autotransfer_secondary_blacklist, false) + '
  • '; - result += '
  • Auto-Transfer Secondary Blacklist (Items): ' + GetAutotransferFlags(autotransfer_secondary_blacklist_items, false) + '
  • '; + result += + '
  • Auto-Transfer Time: ' + + autotransferwait / 10 + + 's
  • '; + result += + '
  • Auto-Transfer Chance: ' + + autotransferchance + + '%
  • '; + result += + '
  • Auto-Transfer Location: ' + + autotransferlocation + + '
  • '; + result += + '
  • Auto-Transfer Chance: ' + + autotransferchance_secondary + + '%
  • '; + result += + '
  • Auto-Transfer Location: ' + + autotransferlocation_secondary + + '
  • '; + result += + '
  • Auto-Transfer Min Amount: ' + + autotransfer_min_amount + + '
  • '; + result += + '
  • Auto-Transfer Max Amount: ' + + autotransfer_max_amount + + '
  • '; + result += + '
  • Auto-Transfer Primary Chance: ' + + autotransferchance + + '%
  • '; + result += + '
  • Auto-Transfer Primary Location: ' + + autotransferlocation + + '
  • '; + result += + '
  • Auto-Transfer Primary Location Extras: ' + + autotransferextralocation.join(', ') + + '
  • '; + result += + '
  • Auto-Transfer Primary Whitelist (Mobs): ' + + GetAutotransferFlags(autotransfer_whitelist, true) + + '
  • '; + result += + '
  • Auto-Transfer Primary Whitelist (Items): ' + + GetAutotransferFlags(autotransfer_whitelist_items, true) + + '
  • '; + result += + '
  • Auto-Transfer Primary Blacklist (Mobs): ' + + GetAutotransferFlags(autotransfer_blacklist, false) + + '
  • '; + result += + '
  • Auto-Transfer Primary Blacklist (Items): ' + + GetAutotransferFlags(autotransfer_blacklist_items, false) + + '
  • '; + result += + '
  • Auto-Transfer Secondary Chance: ' + + autotransferchance_secondary + + '%
  • '; + result += + '
  • Auto-Transfer Secondary Location: ' + + autotransferlocation_secondary + + '
  • '; + result += + '
  • Auto-Transfer Secondary Location Extras: ' + + autotransferextralocation_secondary.join(', ') + + '
  • '; + result += + '
  • Auto-Transfer Secondary Whitelist (Mobs): ' + + GetAutotransferFlags(autotransfer_secondary_whitelist, true) + + '
  • '; + result += + '
  • Auto-Transfer Secondary Whitelist (Items): ' + + GetAutotransferFlags(autotransfer_secondary_whitelist_items, true) + + '
  • '; + result += + '
  • Auto-Transfer Secondary Blacklist (Mobs): ' + + GetAutotransferFlags(autotransfer_secondary_blacklist, false) + + '
  • '; + result += + '
  • Auto-Transfer Secondary Blacklist (Items): ' + + GetAutotransferFlags(autotransfer_secondary_blacklist_items, false) + + '
  • '; result += '
'; result += '
'; @@ -773,24 +1283,64 @@ export const generateBellyString = (belly: Belly, index: number) => { // LIQUID OPTIONS result += '
'; - result += '

'; - result += '

'; - result += '
'; + result += + '
'; result += '
'; result += '
    '; - result += '
  • Generate Liquids: ' + (reagentbellymode ? 'On' : 'Off') + '
  • '; - result += '
  • Liquid Type: ' + reagent_chosen + '
  • '; - result += '
  • Liquid Name: ' + reagent_name + '
  • '; - result += '
  • Transfer Verb: ' + reagent_transfer_verb + '
  • '; - result += '
  • Generation Time: ' + gen_time_display + '
  • '; - result += '
  • Liquid Capacity: ' + custom_max_volume + '
  • '; - result += '
  • Slosh Sounds: ' + (vorefootsteps_sounds ? 'On' : 'Off') + '
  • '; - result += '
  • Liquid Addons: ' + GetLiquidAddons(reagent_mode_flag_list) + '
  • '; + result += + '
  • Generate Liquids: ' + + (reagentbellymode + ? 'On' + : 'Off') + + '
  • '; + result += + `
  • Liquid Type: ${reagent_chosen}
  • `; + result += + `
  • Liquid Name: ${reagent_name}
  • `; + result += + '
  • Transfer Verb: ' + + reagent_transfer_verb + + '
  • '; + result += + '
  • Generation Time: ' + + gen_time_display + + '
  • '; + result += + '
  • Liquid Capacity: ' + + custom_max_volume + + '
  • '; + result += + '
  • Slosh Sounds: ' + + (vorefootsteps_sounds + ? 'On' + : 'Off') + + '
  • '; + result += + '
  • Liquid Addons: ' + + GetLiquidAddons(reagent_mode_flag_list) + + '
  • '; result += '
'; result += '
'; @@ -798,56 +1348,123 @@ export const generateBellyString = (belly: Belly, index: number) => { // LIQUID MESSAGES result += '
'; - result += '

'; - result += '

'; - result += '
'; + result += + '
'; result += '
'; result += '
'; // Start Div liquidMessagesTabpanel result += '
'; - result += ''; result += '
'; result += '
'; - result += '
'; + result += + '
'; fullness1_messages?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; fullness2_messages?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; fullness3_messages?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; fullness4_messages?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; - result += '
'; + result += + '
'; fullness5_messages?.forEach((msg) => { - result += msg + '
'; + result += `${msg}
`; }); result += '
'; diff --git a/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportSoulcatcherString.tsx b/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportSoulcatcherString.tsx index 7b0d14c34d..18d7ab0e77 100644 --- a/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportSoulcatcherString.tsx +++ b/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportSoulcatcherString.tsx @@ -3,46 +3,72 @@ import type { Soulcatcher } from './types'; // prettier-ignore export const generateSoulcatcherString = (soulcatcher: Soulcatcher) => { - const { name, inside_flavor, capture_message, transit_message, release_message, transfer_message, delete_message, linked_belly, setting_flags } = soulcatcher; + const { + name, + inside_flavor, + capture_message, + transit_message, + release_message, + transfer_message, + delete_message, + linked_belly, + setting_flags, + } = soulcatcher; - const index = "sc_1"; + const index = 'sc_1'; let result = ''; - result += '

'; - result += '

'; - result += '
'; + result += + '
'; result += '
'; result += '== Settings ==
'; - const arr = new Array(); + const arr: string[] = []; let parsedFlag = setting_flags; - while(parsedFlag !== 0) { + while (parsedFlag !== 0) { arr.push(String(parsedFlag)); parsedFlag = Math.floor(parsedFlag / 2); } - for(const flag in SoulcatcherSettingsFlag) { - if(arr.includes(flag)) { - result += '' + SoulcatcherSettingsFlag[flag] + ''; + for (const flag in SoulcatcherSettingsFlag) { + if (arr.includes(flag)) { + result += + '' + + SoulcatcherSettingsFlag[flag] + + ''; } else { - result += '' + SoulcatcherSettingsFlag[flag] + ''; - + result += + '' + + SoulcatcherSettingsFlag[flag] + + ''; } - } result += '

'; result += '== Descriptions ==
'; - result += 'Inside Flavor:
' + inside_flavor + '

'; - result += 'Capture Message:
' + capture_message + '

'; - result += 'Transit Message:
' + transit_message + '

'; - result += 'Release Message:
' + release_message + '

'; - result += 'Transfer Message:
' + transfer_message + '

'; - result += 'Delete Message:
' + delete_message + '

'; - result += 'Linked Belly:
' + linked_belly + '

'; - + result += `Inside Flavor:
${inside_flavor}

`; + result += `Capture Message:
${capture_message}

`; + result += `Transit Message:
${transit_message}

`; + result += `Release Message:
${release_message}

`; + result += `Transfer Message:
${transfer_message}

`; + result += `Delete Message:
${delete_message}

`; + result += `Linked Belly:
${linked_belly}

`; result += '
'; result += '
'; // End Div messagesTabpanel diff --git a/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportTimestamp.tsx b/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportTimestamp.tsx index 5e790f11a7..e4dbbabb02 100644 --- a/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportTimestamp.tsx +++ b/tgui/packages/tgui/interfaces/VorePanelExport/VorePanelExportTimestamp.tsx @@ -2,19 +2,19 @@ export const getCurrentTimestamp = (): string => { const now = new Date(); let hours = String(now.getHours()); if (hours.length < 2) { - hours = '0' + hours; + hours = `0${hours}`; } let minutes = String(now.getMinutes()); if (minutes.length < 2) { - minutes = '0' + minutes; + minutes = `0${minutes}`; } let dayofmonth = String(now.getDate()); if (dayofmonth.length < 2) { - dayofmonth = '0' + dayofmonth; + dayofmonth = `0${dayofmonth}`; } let month = String(now.getMonth() + 1); // 0-11 if (month.length < 2) { - month = '0' + month; + month = `0${month}`; } const year = String(now.getFullYear()); diff --git a/tgui/packages/tgui/interfaces/VotePanel.tsx b/tgui/packages/tgui/interfaces/VotePanel.tsx index e87ef82442..523301acd9 100644 --- a/tgui/packages/tgui/interfaces/VotePanel.tsx +++ b/tgui/packages/tgui/interfaces/VotePanel.tsx @@ -28,13 +28,11 @@ export const VotePanel = (props, context) => { mb={1} fluid lineHeight={3} - content={ - choice + - (show_counts ? ' (' + (counts[choice] || 0) + ')' : '') - } onClick={() => act('vote', { target: choice })} selected={choice === user_vote} - /> + > + {choice + (show_counts ? ` (${counts[choice] || 0})` : '')} + ))}
diff --git a/tgui/packages/tgui/interfaces/common/BeakerContents.tsx b/tgui/packages/tgui/interfaces/common/BeakerContents.tsx index fe87607cb9..4095da20c6 100644 --- a/tgui/packages/tgui/interfaces/common/BeakerContents.tsx +++ b/tgui/packages/tgui/interfaces/common/BeakerContents.tsx @@ -1,6 +1,6 @@ import { Box, Stack } from 'tgui-core/components'; -const formatUnits = (a) => a + ' unit' + (a === 1 ? '' : 's'); +const formatUnits = (a) => `${a} unit${a === 1 ? '' : 's'}`; /** * Displays a beaker's contents diff --git a/tgui/packages/tgui/interfaces/common/ComplexModal.tsx b/tgui/packages/tgui/interfaces/common/ComplexModal.tsx index cc7da344f5..22ca961e3a 100644 --- a/tgui/packages/tgui/interfaces/common/ComplexModal.tsx +++ b/tgui/packages/tgui/interfaces/common/ComplexModal.tsx @@ -247,8 +247,8 @@ export const ComplexModal = (props) => { return ( {
); diff --git a/tgui/packages/tgui/interfaces/pAIInterface.tsx b/tgui/packages/tgui/interfaces/pAIInterface.tsx index 8da3084cf2..09671e9a8c 100644 --- a/tgui/packages/tgui/interfaces/pAIInterface.tsx +++ b/tgui/packages/tgui/interfaces/pAIInterface.tsx @@ -30,7 +30,7 @@ export const pAIInterface = (props) => { ))}
-
+
{bought.map((app) => ( @@ -51,7 +51,7 @@ export const pAIInterface = (props) => { disabled={app.ram > available_ram} onClick={() => act('purchase', { purchase: app.id })} > - {app.name + ' (' + app.ram + ')'} + {`${app.name} (${app.ram})`} ))} diff --git a/tgui/packages/tgui/layouts/TitleBar.tsx b/tgui/packages/tgui/layouts/TitleBar.tsx index 810397d7d4..f5b63120c6 100644 --- a/tgui/packages/tgui/layouts/TitleBar.tsx +++ b/tgui/packages/tgui/layouts/TitleBar.tsx @@ -1,4 +1,4 @@ -import { type PropsWithChildren } from 'react'; +import type { PropsWithChildren } from 'react'; import { Button, Icon } from 'tgui-core/components'; import { UI_DISABLED, UI_INTERACTIVE, UI_UPDATE } from 'tgui-core/constants'; import { type BooleanLike, classes } from 'tgui-core/react'; diff --git a/tgui/packages/tgui/layouts/Window.tsx b/tgui/packages/tgui/layouts/Window.tsx index 04d259ec60..84d4d893e7 100644 --- a/tgui/packages/tgui/layouts/Window.tsx +++ b/tgui/packages/tgui/layouts/Window.tsx @@ -15,7 +15,7 @@ import { import { backendSuspendStart, globalStore, useBackend } from 'tgui/backend'; import { UI_DISABLED, UI_INTERACTIVE } from 'tgui/constants'; import { useDebug } from 'tgui/debug'; -import { type Box } from 'tgui-core/components'; +import type { Box } from 'tgui-core/components'; import { type BooleanLike, classes } from 'tgui-core/react'; import { decodeHtmlEntities } from 'tgui-core/string'; diff --git a/tgui/packages/tgui/links.ts b/tgui/packages/tgui/links.ts index 6c2355331f..631fa10faa 100644 --- a/tgui/packages/tgui/links.ts +++ b/tgui/packages/tgui/links.ts @@ -35,7 +35,7 @@ export const captureExternalLinks = () => { // Normalize the URL let url = hrefAttr; if (url.toLowerCase().startsWith('www')) { - url = 'https://' + url; + url = `https://${url}`; } // Open the link Byond.sendMessage({ diff --git a/tgui/packages/tgui/stories/ByondUi.stories.tsx b/tgui/packages/tgui/stories/ByondUi.stories.tsx index 98113bb377..13f57a10ee 100644 --- a/tgui/packages/tgui/stories/ByondUi.stories.tsx +++ b/tgui/packages/tgui/stories/ByondUi.stories.tsx @@ -37,8 +37,8 @@ function Story() { onClick={() => setTimeout(() => { try { - const result = new Function('return (' + code + ')')(); - if (result && result.then) { + const result = new Function(`return (${code})`)(); + if (result?.then) { logger.log('Promise'); result.then(logger.log); } else { diff --git a/tgui/packages/tgui/stories/Tooltip.stories.tsx b/tgui/packages/tgui/stories/Tooltip.stories.tsx index 89a7dae008..2cc1378b54 100644 --- a/tgui/packages/tgui/stories/Tooltip.stories.tsx +++ b/tgui/packages/tgui/stories/Tooltip.stories.tsx @@ -4,7 +4,7 @@ * @license MIT */ -import { type ComponentProps } from 'react'; +import type { ComponentProps } from 'react'; import { Box, Button,