diff --git a/tgui/packages/tgui/interfaces/Achievements.js b/tgui/packages/tgui/interfaces/Achievements.js index 464708d248..512c39fb59 100644 --- a/tgui/packages/tgui/interfaces/Achievements.js +++ b/tgui/packages/tgui/interfaces/Achievements.js @@ -12,7 +12,11 @@ export const Achievements = (props, context) => { const achievements = data.achievements .filter(x => x.category === selectedCategory); return ( - + {categories.map(category => ( diff --git a/tgui/packages/tgui/interfaces/AiAirlock.js b/tgui/packages/tgui/interfaces/AiAirlock.js index 4886e71034..a48ce24402 100644 --- a/tgui/packages/tgui/interfaces/AiAirlock.js +++ b/tgui/packages/tgui/interfaces/AiAirlock.js @@ -24,7 +24,9 @@ export const AiAirlock = (props, context) => { const statusBackup = dangerMap[data.power.backup] || dangerMap[0]; const statusElectrify = dangerMap[data.shock] || dangerMap[0]; return ( - +
diff --git a/tgui/packages/tgui/interfaces/AiRestorer.js b/tgui/packages/tgui/interfaces/AiRestorer.js index e91d392d10..9dfacda0c8 100644 --- a/tgui/packages/tgui/interfaces/AiRestorer.js +++ b/tgui/packages/tgui/interfaces/AiRestorer.js @@ -5,7 +5,10 @@ import { Window } from '../layouts'; export const AiRestorer = () => { return ( - + diff --git a/tgui/packages/tgui/interfaces/AirAlarm.js b/tgui/packages/tgui/interfaces/AirAlarm.js index c6f440985a..e669d8d948 100644 --- a/tgui/packages/tgui/interfaces/AirAlarm.js +++ b/tgui/packages/tgui/interfaces/AirAlarm.js @@ -6,12 +6,16 @@ import { Box, Button, LabeledList, NumberInput, Section } from '../components'; import { getGasLabel } from '../constants'; import { Window } from '../layouts'; import { InterfaceLockNoticeBox } from './common/InterfaceLockNoticeBox'; +import { Vent, Scrubber } from './common/AtmosControls'; export const AirAlarm = (props, context) => { const { act, data } = useBackend(context); const locked = data.locked && !data.siliconUser; return ( - + @@ -202,108 +206,6 @@ const AirAlarmControlVents = (props, context) => { )); }; -const Vent = (props, context) => { - const { vent } = props; - const { act } = useBackend(context); - const { - id_tag, - long_name, - power, - checks, - excheck, - incheck, - direction, - external, - internal, - extdefault, - intdefault, - } = vent; - return ( -
act('power', { - id_tag, - val: Number(!power), - })} /> - )}> - - - {direction === 'release' ? 'Pressurizing' : 'Releasing'} - - -
- ); -}; - - // Scrubbers // -------------------------------------------------------- @@ -320,71 +222,6 @@ const AirAlarmControlScrubbers = (props, context) => { )); }; -const Scrubber = (props, context) => { - const { scrubber } = props; - const { act } = useBackend(context); - const { - long_name, - power, - scrubbing, - id_tag, - widenet, - filter_types, - } = scrubber; - return ( -
act('power', { - id_tag, - val: Number(!power), - })} /> - )}> - - -
- ); -}; - - // Modes // -------------------------------------------------------- diff --git a/tgui/packages/tgui/interfaces/AirlockElectronics.js b/tgui/packages/tgui/interfaces/AirlockElectronics.js index 1575bdeb45..a448f55e9b 100644 --- a/tgui/packages/tgui/interfaces/AirlockElectronics.js +++ b/tgui/packages/tgui/interfaces/AirlockElectronics.js @@ -12,7 +12,9 @@ export const AirlockElectronics = (props, context) => { const regions = data.regions || []; const accesses = data.accesses || []; return ( - +
@@ -34,14 +36,14 @@ export const AirlockElectronics = (props, context) => { })} />
); diff --git a/tgui/packages/tgui/interfaces/AtmosAlertConsole.js b/tgui/packages/tgui/interfaces/AtmosAlertConsole.js index 58d4cc7456..1d55ccf595 100644 --- a/tgui/packages/tgui/interfaces/AtmosAlertConsole.js +++ b/tgui/packages/tgui/interfaces/AtmosAlertConsole.js @@ -7,7 +7,10 @@ export const AtmosAlertConsole = (props, context) => { const priorityAlerts = data.priority || []; const minorAlerts = data.minor || []; return ( - +
    @@ -25,7 +28,7 @@ export const AtmosAlertConsole = (props, context) => { onClick={() => act('clear', { zone: alert })} /> ))} - {minorAlerts.length > 0 && ( + {minorAlerts.length === 0 && (
  • No Minor Alerts
  • diff --git a/tgui/packages/tgui/interfaces/AtmosControlConsole.js b/tgui/packages/tgui/interfaces/AtmosControlConsole.js index 7a35db6870..454866aa2f 100644 --- a/tgui/packages/tgui/interfaces/AtmosControlConsole.js +++ b/tgui/packages/tgui/interfaces/AtmosControlConsole.js @@ -8,7 +8,10 @@ export const AtmosControlConsole = (props, context) => { const { act, data } = useBackend(context); const sensors = data.sensors || []; return ( - +
    diff --git a/tgui/packages/tgui/interfaces/AtmosFilter.js b/tgui/packages/tgui/interfaces/AtmosFilter.js index 1bc7e8f63b..8b382cbad9 100644 --- a/tgui/packages/tgui/interfaces/AtmosFilter.js +++ b/tgui/packages/tgui/interfaces/AtmosFilter.js @@ -7,7 +7,9 @@ export const AtmosFilter = (props, context) => { const { act, data } = useBackend(context); const filterTypes = data.filter_types || []; return ( - +
    diff --git a/tgui/packages/tgui/interfaces/AtmosMixer.js b/tgui/packages/tgui/interfaces/AtmosMixer.js index 067118dea1..9ac9dbb878 100644 --- a/tgui/packages/tgui/interfaces/AtmosMixer.js +++ b/tgui/packages/tgui/interfaces/AtmosMixer.js @@ -5,7 +5,9 @@ import { Window } from '../layouts'; export const AtmosMixer = (props, context) => { const { act, data } = useBackend(context); return ( - +
    diff --git a/tgui/packages/tgui/interfaces/AtmosPump.js b/tgui/packages/tgui/interfaces/AtmosPump.js index ec3285cd44..3d3a7de10c 100644 --- a/tgui/packages/tgui/interfaces/AtmosPump.js +++ b/tgui/packages/tgui/interfaces/AtmosPump.js @@ -5,7 +5,9 @@ import { Window } from '../layouts'; export const AtmosPump = (props, context) => { const { act, data } = useBackend(context); return ( - +
    diff --git a/tgui/packages/tgui/interfaces/AutomatedAnnouncement.js b/tgui/packages/tgui/interfaces/AutomatedAnnouncement.js index d7b517d961..0baea4de97 100644 --- a/tgui/packages/tgui/interfaces/AutomatedAnnouncement.js +++ b/tgui/packages/tgui/interfaces/AutomatedAnnouncement.js @@ -17,7 +17,10 @@ export const AutomatedAnnouncement = (props, context) => { newhead, } = data; return ( - +
    { station_name, } = data; return ( - +
    - { amount, } = data; return ( - +
    { processing, } = data; return ( - + {!!processing && ( @@ -77,6 +80,7 @@ export const BiogeneratorContent = (props, context) => { Search setSearchText(value)} mx={1} /> diff --git a/tgui/packages/tgui/interfaces/BlackmarketUplink.js b/tgui/packages/tgui/interfaces/BlackmarketUplink.js index 0d51cc4c36..8cfcff5756 100644 --- a/tgui/packages/tgui/interfaces/BlackmarketUplink.js +++ b/tgui/packages/tgui/interfaces/BlackmarketUplink.js @@ -1,5 +1,5 @@ import { useBackend } from '../backend'; -import { AnimatedNumber, Box, Button, Flex, Modal, Section, Table, Tabs } from '../components'; +import { AnimatedNumber, Box, Button, Flex, Modal, Section, Tabs } from '../components'; import { formatMoney } from '../format'; import { Window } from '../layouts'; @@ -15,6 +15,8 @@ export const BlackMarketUplink = (props, context) => { } = data; return ( diff --git a/tgui/packages/tgui/interfaces/BluespaceArtillery.js b/tgui/packages/tgui/interfaces/BluespaceArtillery.js index 6d2d94f7bf..91f7c50761 100644 --- a/tgui/packages/tgui/interfaces/BluespaceArtillery.js +++ b/tgui/packages/tgui/interfaces/BluespaceArtillery.js @@ -12,7 +12,9 @@ export const BluespaceArtillery = (props, context) => { target, } = data; return ( - + {!!notice && ( diff --git a/tgui/packages/tgui/interfaces/BorgPanel.js b/tgui/packages/tgui/interfaces/BorgPanel.js index 1661940196..7e7aa60d83 100644 --- a/tgui/packages/tgui/interfaces/BorgPanel.js +++ b/tgui/packages/tgui/interfaces/BorgPanel.js @@ -13,7 +13,11 @@ export const BorgPanel = (props, context) => { const ais = data.ais || []; const laws = data.laws || []; return ( - +
    { const { act, data } = useBackend(context); return ( - +
    { nextCameraName, ] = prevNextCamera(cameras, activeCamera); return ( - +
    @@ -81,7 +84,6 @@ export const CameraConsole = (props, context) => { className="CameraConsole__map" params={{ id: mapRef, - parent: config.window, type: 'map', }} />
    @@ -100,6 +102,7 @@ export const CameraConsoleContent = (props, context) => { return ( { restricted, } = data; return ( - +
    this.clickwrapper(e)}> Canvas failed to render. @@ -76,10 +76,20 @@ class PaintCanvas extends Component { } } +const getImageSize = value => { + const width = value.length; + const height = width !== 0 ? value[0].length : 0; + return [width, height]; +}; + export const Canvas = (props, context) => { const { act, data } = useBackend(context); + const [width, height] = getImageSize(data.grid); return ( - + { const cart = data.cart || []; const requests = data.requests || []; return ( - + diff --git a/tgui/packages/tgui/interfaces/CargoExpress.js b/tgui/packages/tgui/interfaces/CargoExpress.js index 4e4ccf6a88..685569f6d5 100644 --- a/tgui/packages/tgui/interfaces/CargoExpress.js +++ b/tgui/packages/tgui/interfaces/CargoExpress.js @@ -8,7 +8,10 @@ import { InterfaceLockNoticeBox } from './common/InterfaceLockNoticeBox'; export const CargoExpress = (props, context) => { const { act, data } = useBackend(context); return ( - + diff --git a/tgui/packages/tgui/interfaces/CargoHoldTerminal.js b/tgui/packages/tgui/interfaces/CargoHoldTerminal.js index aaf66e701c..b20c0c9f9b 100644 --- a/tgui/packages/tgui/interfaces/CargoHoldTerminal.js +++ b/tgui/packages/tgui/interfaces/CargoHoldTerminal.js @@ -12,7 +12,10 @@ export const CargoHoldTerminal = (props, context) => { status_report, } = data; return ( - +
    diff --git a/tgui/packages/tgui/interfaces/CellularEmporium.js b/tgui/packages/tgui/interfaces/CellularEmporium.js index 8e8d58cb94..07989d8bad 100644 --- a/tgui/packages/tgui/interfaces/CellularEmporium.js +++ b/tgui/packages/tgui/interfaces/CellularEmporium.js @@ -7,7 +7,10 @@ export const CellularEmporium = (props, context) => { const { act, data } = useBackend(context); const { abilities } = data; return ( - +
    diff --git a/tgui/packages/tgui/interfaces/CentcomPodLauncher.js b/tgui/packages/tgui/interfaces/CentcomPodLauncher.js index 28ff827f78..05982b2fbf 100644 --- a/tgui/packages/tgui/interfaces/CentcomPodLauncher.js +++ b/tgui/packages/tgui/interfaces/CentcomPodLauncher.js @@ -6,7 +6,11 @@ import { Window } from '../layouts'; export const CentcomPodLauncher = () => { return ( - + @@ -57,6 +61,42 @@ export const CentcomPodLauncherContent = (props, context) => { `} onClick={() => act('bay5')} /> + {!!data.effectReverse && ( + +
    ); @@ -389,7 +393,7 @@ const CfStep3 = (props, context) => { color="good" textAlign="center" fontSize="20px" - lineHeight="28px" + lineHeight={2} onClick={() => act('purchase')} />
    ); diff --git a/tgui/packages/tgui/interfaces/Crayon.js b/tgui/packages/tgui/interfaces/Crayon.js index 68d3bb46fc..05191f8c66 100644 --- a/tgui/packages/tgui/interfaces/Crayon.js +++ b/tgui/packages/tgui/interfaces/Crayon.js @@ -7,7 +7,10 @@ export const Crayon = (props, context) => { const capOrChanges = data.has_cap || data.can_change_colour; const drawables = data.drawables || []; return ( - + {!!capOrChanges && (
    diff --git a/tgui/packages/tgui/interfaces/CrewConsole.js b/tgui/packages/tgui/interfaces/CrewConsole.js index 754574a641..2bdeb43ce6 100644 --- a/tgui/packages/tgui/interfaces/CrewConsole.js +++ b/tgui/packages/tgui/interfaces/CrewConsole.js @@ -60,7 +60,11 @@ const HealthStat = props => { export const CrewConsole = () => { return ( - +
    diff --git a/tgui/packages/tgui/interfaces/Cryo.js b/tgui/packages/tgui/interfaces/Cryo.js index 4ec29490c1..ddcf0d88a7 100644 --- a/tgui/packages/tgui/interfaces/Cryo.js +++ b/tgui/packages/tgui/interfaces/Cryo.js @@ -25,7 +25,10 @@ const damageTypes = [ export const Cryo = () => { return ( - + diff --git a/tgui/packages/tgui/interfaces/DecalPainter.js b/tgui/packages/tgui/interfaces/DecalPainter.js index 36e764bc66..90ab589208 100644 --- a/tgui/packages/tgui/interfaces/DecalPainter.js +++ b/tgui/packages/tgui/interfaces/DecalPainter.js @@ -8,7 +8,9 @@ export const DecalPainter = (props, context) => { const color_list = data.color_list || []; const dir_list = data.dir_list || []; return ( - +
    {decal_list.map(decal => ( diff --git a/tgui/packages/tgui/interfaces/DisposalUnit.js b/tgui/packages/tgui/interfaces/DisposalUnit.js index e734e3b30e..46ef63a993 100644 --- a/tgui/packages/tgui/interfaces/DisposalUnit.js +++ b/tgui/packages/tgui/interfaces/DisposalUnit.js @@ -23,7 +23,9 @@ export const DisposalUnit = (props, context) => { stateText = 'Off'; } return ( - +
    diff --git a/tgui/packages/tgui/interfaces/DnaConsole.js b/tgui/packages/tgui/interfaces/DnaConsole.js index f4fd255120..194b9a4a6b 100644 --- a/tgui/packages/tgui/interfaces/DnaConsole.js +++ b/tgui/packages/tgui/interfaces/DnaConsole.js @@ -3,6 +3,7 @@ import { flow } from 'common/fp'; import { classes } from 'common/react'; import { capitalize } from 'common/string'; import { Fragment } from 'inferno'; +import { resolveAsset } from '../assets'; import { useBackend } from '../backend'; import { Box, Button, Collapsible, Dimmer, Divider, Dropdown, Flex, Icon, LabeledList, NumberInput, ProgressBar, Section } from '../components'; import { Window } from '../layouts'; @@ -75,7 +76,11 @@ export const DnaConsole = (props, context) => { } = data; const { consoleMode } = data.view; return ( - + {!!isPulsingRads && ( { {mutations.map(mutation => ( { act('set_view', { diff --git a/tgui/packages/tgui/interfaces/DnaVault.js b/tgui/packages/tgui/interfaces/DnaVault.js index 6ce2093086..37d6d22737 100644 --- a/tgui/packages/tgui/interfaces/DnaVault.js +++ b/tgui/packages/tgui/interfaces/DnaVault.js @@ -17,7 +17,9 @@ export const DnaVault = (props, context) => { animals_max, } = data; return ( - +
    diff --git a/tgui/packages/tgui/interfaces/EightBallVote.js b/tgui/packages/tgui/interfaces/EightBallVote.js index 340751e1fa..f8ce25f6f8 100644 --- a/tgui/packages/tgui/interfaces/EightBallVote.js +++ b/tgui/packages/tgui/interfaces/EightBallVote.js @@ -9,7 +9,9 @@ export const EightBallVote = (props, context) => { shaking, } = data; return ( - + {!shaking && ( diff --git a/tgui/packages/tgui/interfaces/Electrolyzer.js b/tgui/packages/tgui/interfaces/Electrolyzer.js index f60319269c..4a8641e83b 100644 --- a/tgui/packages/tgui/interfaces/Electrolyzer.js +++ b/tgui/packages/tgui/interfaces/Electrolyzer.js @@ -1,12 +1,14 @@ import { Fragment } from 'inferno'; import { useBackend } from '../backend'; -import { Box, Button, LabeledList, NumberInput, ProgressBar, Section } from '../components'; +import { Button, LabeledList, ProgressBar, Section } from '../components'; import { Window } from '../layouts'; export const Electrolyzer = (props, context) => { const { act, data } = useBackend(context); return ( - +
    { maxFrequency, } = data; return ( - +
    diff --git a/tgui/packages/tgui/interfaces/EmergencyShuttleConsole.js b/tgui/packages/tgui/interfaces/EmergencyShuttleConsole.js index be64709a19..a476907058 100644 --- a/tgui/packages/tgui/interfaces/EmergencyShuttleConsole.js +++ b/tgui/packages/tgui/interfaces/EmergencyShuttleConsole.js @@ -13,7 +13,9 @@ export const EmergencyShuttleConsole = (props, context) => { authorizations = [], } = data; return ( - +
    { No Active Authorizations )} - {authorizations.map(authorization => ( - - {authorization.name} ({authorization.job}) - - ))}
    diff --git a/tgui/packages/tgui/interfaces/EngravedMessage.js b/tgui/packages/tgui/interfaces/EngravedMessage.js index 40d34d0427..e62fbf0ff7 100644 --- a/tgui/packages/tgui/interfaces/EngravedMessage.js +++ b/tgui/packages/tgui/interfaces/EngravedMessage.js @@ -18,7 +18,10 @@ export const EngravedMessage = (props, context) => { realdate, } = data; return ( - +
    { mechs = [], } = data; return ( - + {mechs.length === 0 && ( diff --git a/tgui/packages/tgui/interfaces/Gps.js b/tgui/packages/tgui/interfaces/Gps.js index a5fcb8d194..beffdad9c4 100644 --- a/tgui/packages/tgui/interfaces/Gps.js +++ b/tgui/packages/tgui/interfaces/Gps.js @@ -37,7 +37,11 @@ export const Gps = (props, context) => { signal => signal.entrytag), ])(data.signals || []); return ( - +
    { operational, } = data; return ( - + {!operational && ( diff --git a/tgui/packages/tgui/interfaces/GulagItemReclaimer.js b/tgui/packages/tgui/interfaces/GulagItemReclaimer.js index 846b465998..6f47eed342 100644 --- a/tgui/packages/tgui/interfaces/GulagItemReclaimer.js +++ b/tgui/packages/tgui/interfaces/GulagItemReclaimer.js @@ -8,7 +8,10 @@ export const GulagItemReclaimer = (props, context) => { mobs = [], } = data; return ( - + {mobs.length === 0 && ( diff --git a/tgui/packages/tgui/interfaces/GulagTeleporterConsole.js b/tgui/packages/tgui/interfaces/GulagTeleporterConsole.js index 3b709cbcb0..abb8da8b64 100644 --- a/tgui/packages/tgui/interfaces/GulagTeleporterConsole.js +++ b/tgui/packages/tgui/interfaces/GulagTeleporterConsole.js @@ -19,7 +19,9 @@ export const GulagTeleporterConsole = (props, context) => { prisoner = {}, } = data; return ( - +
    { program, } = data; return ( - +
    { const { act, data } = useBackend(context); return ( - +
    { const { act, data } = useBackend(context); return ( - +
    { visible, } = data; return ( - +
    diff --git a/tgui/packages/tgui/interfaces/Intellicard.js b/tgui/packages/tgui/interfaces/Intellicard.js index 99e653ed31..1a6e3885d9 100644 --- a/tgui/packages/tgui/interfaces/Intellicard.js +++ b/tgui/packages/tgui/interfaces/Intellicard.js @@ -16,7 +16,10 @@ export const Intellicard = (props, context) => { } = data; const offline = isDead || isBraindead; return ( - +
    { const { act, data } = useBackend(context); return ( - +
    diff --git a/tgui/packages/tgui/interfaces/LaborClaimConsole.js b/tgui/packages/tgui/interfaces/LaborClaimConsole.js index b3ee427844..5483b1dd70 100644 --- a/tgui/packages/tgui/interfaces/LaborClaimConsole.js +++ b/tgui/packages/tgui/interfaces/LaborClaimConsole.js @@ -13,7 +13,9 @@ export const LaborClaimConsole = (props, context) => { unclaimed_points, } = data; return ( - +
    diff --git a/tgui/packages/tgui/interfaces/LanguageMenu.js b/tgui/packages/tgui/interfaces/LanguageMenu.js index 80e0168c42..656d4a818e 100644 --- a/tgui/packages/tgui/interfaces/LanguageMenu.js +++ b/tgui/packages/tgui/interfaces/LanguageMenu.js @@ -13,7 +13,11 @@ export const LanguageMenu = (props, context) => { unknown_languages = [], } = data; return ( - +
    diff --git a/tgui/packages/tgui/interfaces/LaunchpadConsole.js b/tgui/packages/tgui/interfaces/LaunchpadConsole.js index 1fd24e981d..83f8d0aa59 100644 --- a/tgui/packages/tgui/interfaces/LaunchpadConsole.js +++ b/tgui/packages/tgui/interfaces/LaunchpadConsole.js @@ -197,7 +197,10 @@ export const LaunchpadConsole = (props, context) => { selected_id, } = data; return ( - + {launchpads.length === 0 && ( diff --git a/tgui/packages/tgui/interfaces/LaunchpadRemote.js b/tgui/packages/tgui/interfaces/LaunchpadRemote.js index 2720914611..2173630c08 100644 --- a/tgui/packages/tgui/interfaces/LaunchpadRemote.js +++ b/tgui/packages/tgui/interfaces/LaunchpadRemote.js @@ -10,7 +10,11 @@ export const LaunchpadRemote = (props, context) => { pad_closed, } = data; return ( - + {!has_pad && ( diff --git a/tgui/packages/tgui/interfaces/MafiaPanel.js b/tgui/packages/tgui/interfaces/MafiaPanel.js index 3412cfed11..e3c2c893ec 100644 --- a/tgui/packages/tgui/interfaces/MafiaPanel.js +++ b/tgui/packages/tgui/interfaces/MafiaPanel.js @@ -1,8 +1,7 @@ -import { useBackend } from '../backend'; -import { Flex, Button, LabeledList, Section, Box, Table, TimeDisplay } from '../components'; import { Fragment } from 'inferno'; +import { useBackend } from '../backend'; +import { Box, Button, Flex, LabeledList, Section, TimeDisplay } from '../components'; import { Window } from '../layouts'; -import { FlexItem } from '../components/Flex'; export const MafiaPanel = (props, context) => { const { act, data } = useBackend(context); @@ -10,97 +9,155 @@ export const MafiaPanel = (props, context) => { players, actions, phase, - role_info, + roleinfo, + role_theme, admin_controls, + judgement_phase, timeleft, - all_roles } = data; + all_roles, + } = data; return ( - +
    - {!!role_info && ( - - - - - - - - - You are a {role_info.role} - - - - - {role_info.desc} - - - {!!role_info.action_log && role_info.action_log.map(log_line => ( - - - {role_info.action_log} - - - ))} -
    + {!!roleinfo && ( + + + + + + You are a {roleinfo.role} + + + {roleinfo.desc} + + )}
    - {!!actions && actions.map(action => { - return ( - - - ); - })} - { !!admin_controls && ( - - - - - - - - )} + {!!actions && actions.map(action => ( + + + + ))} + {!!admin_controls && ( +
    + THESE ARE DEBUG, THEY WILL BREAK THE GAME, DO NOT TOUCH
    + Also because an admin did it: do not gib/delete/etc + anyone! It will runtime the game to death!
    + + + +
    + +
    + )}
    - {!!players && players.map(player => { return ( + {!!players && players.map(player => ( - {player.votes !== undefined + {!player.alive && (DEAD)} + {player.votes !== undefined && !!player.alive && (Votes : {player.votes} )} { !!player.actions && player.actions.map(action => { return ( ); }) } - ); - })} + ) + )}
    -
    - - {!!all_roles && all_roles.map(r => ( - - - {r} - - - ))} -
    -
    + {!!judgement_phase && ( +
    + + + Use these buttons to vote the accused innocent or guilty! + + +
    + )} + + +
    + {!!all_roles && all_roles.map(r => ( + + + {r} +
    +
    + +
    + {roleinfo !== undefined && !!roleinfo.action_log + && roleinfo.action_log.map(log_line => ( + + {log_line} + + ))} +
    +
    +
    ); diff --git a/tgui/packages/tgui/interfaces/MalfunctionModulePicker.js b/tgui/packages/tgui/interfaces/MalfunctionModulePicker.js index 298e56655d..70a1716ed6 100644 --- a/tgui/packages/tgui/interfaces/MalfunctionModulePicker.js +++ b/tgui/packages/tgui/interfaces/MalfunctionModulePicker.js @@ -9,6 +9,8 @@ export const MalfunctionModulePicker = (props, context) => { } = data; return ( diff --git a/tgui/packages/tgui/interfaces/MechBayPowerConsole.js b/tgui/packages/tgui/interfaces/MechBayPowerConsole.js index bed15d261e..22a440791c 100644 --- a/tgui/packages/tgui/interfaces/MechBayPowerConsole.js +++ b/tgui/packages/tgui/interfaces/MechBayPowerConsole.js @@ -8,7 +8,9 @@ export const MechBayPowerConsole = (props, context) => { const mech = recharge_port && recharge_port.mech; const cell = mech && mech.cell; return ( - +
    { active_status_4, } = data; return ( - + @@ -97,7 +100,9 @@ const MedicalKioskScanButton = (props, context) => { tooltipPosition="right" content={name} onClick={() => { - act(`beginScan_${index}`); + if (!paid) { + act(`beginScan_${index}`); + } setScanIndex(index); }} /> @@ -247,8 +252,10 @@ const MedicalKioskScanResults3 = (props, context) => { clone_health, brain_damage, brain_health, - rad_status, - rad_value, + rad_contamination_status, + rad_contamination_value, + rad_sickness_status, + rad_sickness_value, trauma_status, } = data; return ( @@ -282,12 +289,20 @@ const MedicalKioskScanResults3 = (props, context) => { - {rad_status} + label="Radiation Sickness Status"> + {rad_sickness_status} - {rad_value}% + label="Radiation Sickness Percentage"> + {rad_sickness_value}% + + + {rad_contamination_status} + + + {rad_contamination_value}%
    diff --git a/tgui/packages/tgui/interfaces/MiningVendor.js b/tgui/packages/tgui/interfaces/MiningVendor.js index 950deb196b..39ff2969b1 100644 --- a/tgui/packages/tgui/interfaces/MiningVendor.js +++ b/tgui/packages/tgui/interfaces/MiningVendor.js @@ -9,7 +9,10 @@ export const MiningVendor = (props, context) => { ...data.product_records, ]; return ( - +
    {data.user && ( @@ -27,7 +30,7 @@ export const MiningVendor = (props, context) => { )}
    -
    +
    {inventory.map((product => { return ( diff --git a/tgui/packages/tgui/interfaces/Mule.js b/tgui/packages/tgui/interfaces/Mule.js index b6ae6c1f24..71c14ed3b1 100644 --- a/tgui/packages/tgui/interfaces/Mule.js +++ b/tgui/packages/tgui/interfaces/Mule.js @@ -1,6 +1,6 @@ import { Fragment } from 'inferno'; import { useBackend } from '../backend'; -import { Button, Dropdown, Grid, Input, LabeledList, ProgressBar, Section, Flex } from '../components'; +import { Button, Dropdown, Flex, Input, LabeledList, ProgressBar, Section } from '../components'; import { Window } from '../layouts'; import { InterfaceLockNoticeBox } from './common/InterfaceLockNoticeBox'; @@ -24,7 +24,9 @@ export const Mule = (props, context) => { } = data; const locked = data.locked && !data.siliconUser; return ( - +
    { return ( - + diff --git a/tgui/packages/tgui/interfaces/NaniteCloudControl.js b/tgui/packages/tgui/interfaces/NaniteCloudControl.js index 3ecfcef92c..e9eb566464 100644 --- a/tgui/packages/tgui/interfaces/NaniteCloudControl.js +++ b/tgui/packages/tgui/interfaces/NaniteCloudControl.js @@ -10,7 +10,6 @@ export const NaniteDiskBox = (props, context) => { has_program, disk, } = data; - if (!has_disk) { return ( @@ -18,7 +17,6 @@ export const NaniteDiskBox = (props, context) => { ); } - if (!has_program) { return ( @@ -26,7 +24,6 @@ export const NaniteDiskBox = (props, context) => { ); } - return ( ); @@ -34,7 +31,6 @@ export const NaniteDiskBox = (props, context) => { export const NaniteInfoBox = (props, context) => { const { program } = props; - const { name, desc, @@ -52,9 +48,7 @@ export const NaniteInfoBox = (props, context) => { timer_trigger, timer_trigger_delay, } = program; - const extra_settings = program.extra_settings || []; - return (
    { export const NaniteCloudBackupList = (props, context) => { const { act, data } = useBackend(context); const cloud_backups = data.cloud_backups || []; - return ( - cloud_backups.map(backup => ( -
    + + + Bounty Object + + + Description + + + Progress + + + Value + + + Claim + + + {bountydata.map(bounty => ( + + + {bounty.name} + + + {bounty.description} + + + {bounty.priority === 1 + ? High Priority + : ""} + {bounty.completion_string} + + + {bounty.reward_string} + + +
    +
    + + + ); +}; + +const BountyHeader = (props, context) => { + const { act, data } = useBackend(context); + const { + stored_cash, + } = data; + return ( + + formatMoney(value)} /> + {' credits'} + + ); +}; diff --git a/tgui/packages/tgui/interfaces/NtosCard.js b/tgui/packages/tgui/interfaces/NtosCard.js index 95d7754b83..3b114589a9 100644 --- a/tgui/packages/tgui/interfaces/NtosCard.js +++ b/tgui/packages/tgui/interfaces/NtosCard.js @@ -6,7 +6,10 @@ import { AccessList } from './common/AccessList'; export const NtosCard = (props, context) => { return ( - + diff --git a/tgui/packages/tgui/interfaces/NtosConfiguration.js b/tgui/packages/tgui/interfaces/NtosConfiguration.js index 0a86ccb728..2d60a6dd76 100644 --- a/tgui/packages/tgui/interfaces/NtosConfiguration.js +++ b/tgui/packages/tgui/interfaces/NtosConfiguration.js @@ -5,8 +5,8 @@ import { NtosWindow } from '../layouts'; export const NtosConfiguration = (props, context) => { const { act, data } = useBackend(context); - const { + PC_device_theme, power_usage, battery_exists, battery = {}, @@ -14,9 +14,12 @@ export const NtosConfiguration = (props, context) => { disk_used, hardware = [], } = data; - return ( - +
    { mr={1} onClick={() => act('PC_toggle_component', { name: component.name, - })} - /> + })} /> )} { const { act, data } = useBackend(context); - const { have_printer, manifest = {}, } = data; - return ( - +
    { - const { data } = useBackend(context); - const { - theme, - } = data; return ( - + diff --git a/tgui/packages/tgui/interfaces/NtosCyborgRemoteMonitorSyndicate.js b/tgui/packages/tgui/interfaces/NtosCyborgRemoteMonitorSyndicate.js index 07a0038544..efa93513e7 100644 --- a/tgui/packages/tgui/interfaces/NtosCyborgRemoteMonitorSyndicate.js +++ b/tgui/packages/tgui/interfaces/NtosCyborgRemoteMonitorSyndicate.js @@ -1,12 +1,12 @@ -import { Fragment } from 'inferno'; -import { useBackend } from '../backend'; -import { Box, Button, LabeledList, NoticeBox, Section } from '../components'; import { NtosWindow } from '../layouts'; import { NtosCyborgRemoteMonitorContent } from './NtosCyborgRemoteMonitor'; export const NtosCyborgRemoteMonitorSyndicate = (props, context) => { return ( - + diff --git a/tgui/packages/tgui/interfaces/NtosFileManager.js b/tgui/packages/tgui/interfaces/NtosFileManager.js index 9e5da68298..da762e459f 100644 --- a/tgui/packages/tgui/interfaces/NtosFileManager.js +++ b/tgui/packages/tgui/interfaces/NtosFileManager.js @@ -6,12 +6,13 @@ import { NtosWindow } from '../layouts'; export const NtosFileManager = (props, context) => { const { act, data } = useBackend(context); const { + PC_device_theme, usbconnected, files = [], usbfiles = [], } = data; return ( - +
    { return ( - + @@ -14,14 +17,12 @@ export const NtosJobManager = (props, context) => { export const NtosJobManagerContent = (props, context) => { const { act, data } = useBackend(context); - const { authed, cooldown, slots = [], prioritized = [], } = data; - if (!authed) { return ( @@ -29,7 +30,6 @@ export const NtosJobManagerContent = (props, context) => { ); } - return (
    {cooldown > 0 && ( @@ -64,8 +64,7 @@ export const NtosJobManagerContent = (props, context) => { checked={slot.total > 0 && prioritized.includes(slot.title)} onClick={() => act('PRG_priority', { target: slot.title, - })} - /> + })} /> {slot.current} / {slot.total} @@ -76,15 +75,13 @@ export const NtosJobManagerContent = (props, context) => { disabled={!slot.status_open} onClick={() => act('PRG_open_job', { target: slot.title, - })} - /> + })} />
    + ); +}; + + +export const Scrubber = (props, context) => { + const { scrubber } = props; + const { act } = useBackend(context); + const { + long_name, + power, + scrubbing, + id_tag, + widenet, + filter_types, + } = scrubber; + return ( +
    act('power', { + id_tag, + val: Number(!power), + })} /> + )}> + + +
    + ); +}; diff --git a/tgui/packages/tgui/interfaces/manually-routed/KitchenSink.js b/tgui/packages/tgui/interfaces/manually-routed/KitchenSink.js deleted file mode 100644 index fcca031fe9..0000000000 --- a/tgui/packages/tgui/interfaces/manually-routed/KitchenSink.js +++ /dev/null @@ -1,457 +0,0 @@ -import { Fragment } from 'inferno'; -import { useBackend, useLocalState } from '../../backend'; -import { BlockQuote, Box, Button, ByondUi, Collapsible, Flex, Icon, Input, Knob, LabeledList, NumberInput, ProgressBar, Section, Slider, Tabs, Tooltip } from '../../components'; -import { DraggableControl } from '../../components/DraggableControl'; -import { Window } from '../../layouts'; - -const COLORS_ARBITRARY = [ - 'red', - 'orange', - 'yellow', - 'olive', - 'green', - 'teal', - 'blue', - 'violet', - 'purple', - 'pink', - 'brown', - 'grey', -]; - -const COLORS_STATES = [ - 'good', - 'average', - 'bad', - 'black', - 'white', -]; - -const PAGES = [ - { - title: 'Button', - component: () => KitchenSinkButton, - }, - { - title: 'Box', - component: () => KitchenSinkBox, - }, - { - title: 'ProgressBar', - component: () => KitchenSinkProgressBar, - }, - { - title: 'Tabs', - component: () => KitchenSinkTabs, - }, - { - title: 'Tooltip', - component: () => KitchenSinkTooltip, - }, - { - title: 'Input / Control', - component: () => KitchenSinkInput, - }, - { - title: 'Collapsible', - component: () => KitchenSinkCollapsible, - }, - { - title: 'BlockQuote', - component: () => KitchenSinkBlockQuote, - }, - { - title: 'ByondUi', - component: () => KitchenSinkByondUi, - }, - { - title: 'Themes', - component: () => KitchenSinkThemes, - }, -]; - -export const KitchenSink = (props, context) => { - const [theme] = useLocalState(context, 'kitchenSinkTheme'); - const [pageIndex, setPageIndex] = useLocalState(context, 'pageIndex', 0); - const PageComponent = PAGES[pageIndex].component(); - return ( - - -
    - - - - {PAGES.map((page, i) => ( - setPageIndex(i)}> - {page.title} - - ))} - - - - - - -
    -
    -
    - ); -}; - -const KitchenSinkButton = props => { - return ( - - -