diff --git a/code/modules/tgui/external.dm b/code/modules/tgui/external.dm index bcd97a91245..1168b6c619a 100644 --- a/code/modules/tgui/external.dm +++ b/code/modules/tgui/external.dm @@ -86,7 +86,7 @@ */ /datum/proc/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) SHOULD_CALL_PARENT(TRUE) - SEND_SIGNAL(src, COMSIG_UI_ACT, usr, action) + SEND_SIGNAL(src, COMSIG_UI_ACT, usr, action, params) // If UI is not interactive or usr calling Topic is not the UI user, bail. if(!ui || ui.status != UI_INTERACTIVE) return TRUE diff --git a/tgui/packages/tgui/interfaces/StripMenu.tsx b/tgui/packages/tgui/interfaces/StripMenu.tsx index 2f54ad6fda7..feed1e2d40f 100644 --- a/tgui/packages/tgui/interfaces/StripMenu.tsx +++ b/tgui/packages/tgui/interfaces/StripMenu.tsx @@ -3,7 +3,7 @@ import { BooleanLike } from 'common/react'; import { resolveAsset } from '../assets'; import { useBackend } from '../backend'; -import { Box, Button, Icon, Stack } from '../components'; +import { Box, Button, Icon, Image, Stack } from '../components'; import { Window } from '../layouts'; const ROWS = 5; @@ -28,8 +28,8 @@ const CornerText = (props: { style={{ position: 'relative', left: align === 'left' ? '2px' : '-2px', - 'text-align': align, - 'text-shadow': '1px 1px 1px #555', + textAlign: align, + textShadow: '1px 1px 1px #555', }} > {children} @@ -72,6 +72,11 @@ const ALTERNATE_ACTIONS: Record = { icon: 'tshirt', text: 'Adjust jumpsuit', }, + + adjust_sensor: { + icon: 'microchip', + text: 'Adjust sensors', + }, }; const SLOTS: Record< @@ -107,7 +112,7 @@ const SLOTS: Record< image: 'inventory-mask.png', }, - corgi_collar: { + pet_collar: { displayName: 'collar', gridSpot: getGridSpotKey([1, 2]), image: 'inventory-collar.png', @@ -236,7 +241,7 @@ type StripMenuItem = | { icon: string; name: string; - alternate?: string; + alternate?: string[]; } | { obscured: ObscuringLevel; @@ -283,27 +288,20 @@ export const StripMenu = (props) => { const item = data.items[keyAtSpot]; const slot = SLOTS[keyAtSpot]; - let alternateAction: AlternateAction | undefined; - - let content; - let tooltip; + let content: JSX.Element | undefined; + let alternateActions: JSX.Element[] | undefined; + let tooltip: string | undefined; if (item === null) { tooltip = slot.displayName; } else if ('name' in item) { - if (item.alternate) { - alternateAction = ALTERNATE_ACTIONS[item.alternate]; - } - content = ( - ); @@ -321,7 +319,7 @@ export const StripMenu = (props) => { ml={0} mt={1.3} style={{ - 'text-align': 'center', + textAlign: 'center', height: '100%', width: '100%', }} @@ -361,12 +359,11 @@ export const StripMenu = (props) => { position: 'relative', width: '100%', height: '100%', - padding: 0, + padding: '0', }} > {slot.image && ( - { {slot.additionalComponent} - - {alternateAction !== undefined && ( - - )} + {alternateActions} );