"noo dont copypaste it" no

This commit is contained in:
Letter N
2020-07-21 22:20:31 +08:00
parent 26cccd84c1
commit 5b73178ba0
150 changed files with 1477 additions and 1362 deletions
@@ -12,7 +12,11 @@ export const Achievements = (props, context) => {
const achievements = data.achievements
.filter(x => x.category === selectedCategory);
return (
<Window resizable>
<Window
title="Achievements"
width={540}
height={680}
resizable>
<Window.Content scrollable>
<Tabs>
{categories.map(category => (
+3 -1
View File
@@ -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 (
<Window>
<Window
width={500}
height={390}>
<Window.Content>
<Section title="Power Status">
<LabeledList>
+4 -1
View File
@@ -5,7 +5,10 @@ import { Window } from '../layouts';
export const AiRestorer = () => {
return (
<Window resizable>
<Window
width={370}
height={360}
resizable>
<Window.Content scrollable>
<AiRestorerContent />
</Window.Content>
+5 -168
View File
@@ -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 (
<Window resizable>
<Window
width={440}
height={650}
resizable>
<Window.Content scrollable>
<InterfaceLockNoticeBox />
<AirAlarmStatus />
@@ -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 (
<Section
level={2}
title={decodeHtmlEntities(long_name)}
buttons={(
<Button
icon={power ? 'power-off' : 'times'}
selected={power}
content={power ? 'On' : 'Off'}
onClick={() => act('power', {
id_tag,
val: Number(!power),
})} />
)}>
<LabeledList>
<LabeledList.Item label="Mode">
{direction === 'release' ? 'Pressurizing' : 'Releasing'}
</LabeledList.Item>
<LabeledList.Item label="Pressure Regulator">
<Button
icon="sign-in-alt"
content="Internal"
selected={incheck}
onClick={() => act('incheck', {
id_tag,
val: checks,
})} />
<Button
icon="sign-out-alt"
content="External"
selected={excheck}
onClick={() => act('excheck', {
id_tag,
val: checks,
})} />
</LabeledList.Item>
{!!incheck && (
<LabeledList.Item label="Internal Target">
<NumberInput
value={Math.round(internal)}
unit="kPa"
width="75px"
minValue={0}
step={10}
maxValue={5066}
onChange={(e, value) => act('set_internal_pressure', {
id_tag,
value,
})} />
<Button
icon="undo"
disabled={intdefault}
content="Reset"
onClick={() => act('reset_internal_pressure', {
id_tag,
})} />
</LabeledList.Item>
)}
{!!excheck && (
<LabeledList.Item label="External Target">
<NumberInput
value={Math.round(external)}
unit="kPa"
width="75px"
minValue={0}
step={10}
maxValue={5066}
onChange={(e, value) => act('set_external_pressure', {
id_tag,
value,
})} />
<Button
icon="undo"
disabled={extdefault}
content="Reset"
onClick={() => act('reset_external_pressure', {
id_tag,
})} />
</LabeledList.Item>
)}
</LabeledList>
</Section>
);
};
// 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 (
<Section
level={2}
title={decodeHtmlEntities(long_name)}
buttons={(
<Button
icon={power ? 'power-off' : 'times'}
content={power ? 'On' : 'Off'}
selected={power}
onClick={() => act('power', {
id_tag,
val: Number(!power),
})} />
)}>
<LabeledList>
<LabeledList.Item label="Mode">
<Button
icon={scrubbing ? 'filter' : 'sign-in-alt'}
color={scrubbing || 'danger'}
content={scrubbing ? 'Scrubbing' : 'Siphoning'}
onClick={() => act('scrubbing', {
id_tag,
val: Number(!scrubbing),
})} />
<Button
icon={widenet ? 'expand' : 'compress'}
selected={widenet}
content={widenet ? 'Expanded range' : 'Normal range'}
onClick={() => act('widenet', {
id_tag,
val: Number(!widenet),
})} />
</LabeledList.Item>
<LabeledList.Item label="Filters">
{scrubbing
&& filter_types.map(filter => (
<Button key={filter.gas_id}
icon={filter.enabled ? 'check-square-o' : 'square-o'}
content={getGasLabel(filter.gas_id, filter.gas_name)}
title={filter.gas_name}
selected={filter.enabled}
onClick={() => act('toggle_filter', {
id_tag,
val: filter.gas_id,
})} />
))
|| 'N/A'}
</LabeledList.Item>
</LabeledList>
</Section>
);
};
// Modes
// --------------------------------------------------------
@@ -12,7 +12,9 @@ export const AirlockElectronics = (props, context) => {
const regions = data.regions || [];
const accesses = data.accesses || [];
return (
<Window>
<Window
width={420}
height={485}>
<Window.Content>
<Section title="Main">
<LabeledList>
@@ -34,14 +36,14 @@ export const AirlockElectronics = (props, context) => {
})} />
<Button
icon={unres_direction & 2 ? 'check-square-o' : 'square-o'}
content="East"
content="South"
selected={unres_direction & 2}
onClick={() => act('direc_set', {
unres_direction: '2',
})} />
<Button
icon={unres_direction & 4 ? 'check-square-o' : 'square-o'}
content="South"
content="East"
selected={unres_direction & 4}
onClick={() => act('direc_set', {
unres_direction: '4',
+32 -28
View File
@@ -6,7 +6,10 @@ import { InterfaceLockNoticeBox } from './common/InterfaceLockNoticeBox';
export const Apc = (props, context) => {
return (
<Window resizable>
<Window
width={450}
height={445}
resizable>
<Window.Content scrollable>
<ApcContent />
</Window.Content>
@@ -82,7 +85,6 @@ const ApcContent = (props, context) => {
</NoticeBox>
);
}
return (
<Fragment>
<InterfaceLockNoticeBox />
@@ -182,32 +184,34 @@ const ApcContent = (props, context) => {
onClick={() => act('overload')} />
</Fragment>
)}>
<LabeledList.Item
label="Cover Lock"
buttons={(
<Button
icon={data.coverLocked ? 'lock' : 'unlock'}
content={data.coverLocked ? 'Engaged' : 'Disengaged'}
disabled={locked}
onClick={() => act('cover')} />
)} />
<LabeledList.Item
label="Emergency Lighting"
buttons={(
<Button
icon="lightbulb-o"
content={data.emergencyLights ? 'Enabled' : 'Disabled'}
disabled={locked}
onClick={() => act('emergency_lighting')} />
)} />
<LabeledList.Item
label="Night Shift Lighting"
buttons={(
<Button
icon="lightbulb-o"
content={data.nightshiftLights ? 'Enabled' : 'Disabled'}
onClick={() => act('toggle_nightshift')} />
)} />
<LabeledList>
<LabeledList.Item
label="Cover Lock"
buttons={(
<Button
icon={data.coverLocked ? 'lock' : 'unlock'}
content={data.coverLocked ? 'Engaged' : 'Disengaged'}
disabled={locked}
onClick={() => act('cover')} />
)} />
<LabeledList.Item
label="Emergency Lighting"
buttons={(
<Button
icon="lightbulb-o"
content={data.emergencyLights ? 'Enabled' : 'Disabled'}
disabled={locked}
onClick={() => act('emergency_lighting')} />
)} />
<LabeledList.Item
label="Night Shift Lighting"
buttons={(
<Button
icon="lightbulb-o"
content={data.nightshiftLights ? 'Enabled' : 'Disabled'}
onClick={() => act('toggle_nightshift')} />
)} />
</LabeledList>
</Section>
</Fragment>
);
@@ -7,7 +7,10 @@ export const AtmosAlertConsole = (props, context) => {
const priorityAlerts = data.priority || [];
const minorAlerts = data.minor || [];
return (
<Window resizable>
<Window
width={350}
height={300}
resizable>
<Window.Content scrollable>
<Section title="Alarms">
<ul>
@@ -25,7 +28,7 @@ export const AtmosAlertConsole = (props, context) => {
onClick={() => act('clear', { zone: alert })} />
</li>
))}
{minorAlerts.length > 0 && (
{minorAlerts.length === 0 && (
<li className="color-good">
No Minor Alerts
</li>
@@ -8,7 +8,10 @@ export const AtmosControlConsole = (props, context) => {
const { act, data } = useBackend(context);
const sensors = data.sensors || [];
return (
<Window resizable>
<Window
width={500}
height={315}
resizable>
<Window.Content scrollable>
<Section
title={!!data.tank && sensors[0]?.long_name}>
+3 -1
View File
@@ -7,7 +7,9 @@ export const AtmosFilter = (props, context) => {
const { act, data } = useBackend(context);
const filterTypes = data.filter_types || [];
return (
<Window>
<Window
width={390}
height={187}>
<Window.Content>
<Section>
<LabeledList>
+3 -1
View File
@@ -5,7 +5,9 @@ import { Window } from '../layouts';
export const AtmosMixer = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window
width={370}
height={165}>
<Window.Content>
<Section>
<LabeledList>
+3 -1
View File
@@ -5,7 +5,9 @@ import { Window } from '../layouts';
export const AtmosPump = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window
width={335}
height={115}>
<Window.Content>
<Section>
<LabeledList>
@@ -17,7 +17,10 @@ export const AutomatedAnnouncement = (props, context) => {
newhead,
} = data;
return (
<Window>
<Window
title="Automated Announcement System"
width={500}
height={225}>
<Window.Content>
<Section
title="Arrival Announcement"
+5 -2
View File
@@ -10,11 +10,14 @@ export const BankMachine = (props, context) => {
station_name,
} = data;
return (
<Window>
<Window
width={335}
height={160}>
<Window.Content>
<Section title={station_name + ' Vault'}>
<LabeledList>
<LabeledList.Item label="Current Balance"
<LabeledList.Item
label="Current Balance"
buttons={(
<Button
icon={siphoning ? 'times' : 'sync'}
+3 -1
View File
@@ -8,7 +8,9 @@ export const Bepis = (props, context) => {
amount,
} = data;
return (
<Window>
<Window
width={500}
height={480}>
<Window.Content>
<Section title="Business Exploration Protocol Incubation Sink">
<Section
@@ -2,7 +2,7 @@ import { classes } from 'common/react';
import { createSearch } from 'common/string';
import { Fragment } from 'inferno';
import { useBackend, useLocalState } from '../backend';
import { Box, Button, Dimmer, Flex, Icon, Input, Section, Table, Tabs, NoticeBox, NumberInput } from '../components';
import { Box, Button, Dimmer, Flex, Icon, Input, NoticeBox, NumberInput, Section, Table, Tabs } from '../components';
import { formatMoney } from '../format';
import { Window } from '../layouts';
@@ -15,7 +15,10 @@ export const Biogenerator = (props, context) => {
processing,
} = data;
return (
<Window resizable>
<Window
width={550}
height={380}
resizable>
{!!processing && (
<Dimmer fontSize="32px">
<Icon name="cog" spin={1} />
@@ -77,6 +80,7 @@ export const BiogeneratorContent = (props, context) => {
<Fragment>
Search
<Input
autoFocus
value={searchText}
onInput={(e, value) => setSearchText(value)}
mx={1} />
@@ -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 (
<Window
width={600}
height={480}
theme="hackerman"
resizable>
<ShipmentSelector />
@@ -12,7 +12,9 @@ export const BluespaceArtillery = (props, context) => {
target,
} = data;
return (
<Window>
<Window
width={400}
height={220}>
<Window.Content>
{!!notice && (
<NoticeBox>
+5 -1
View File
@@ -13,7 +13,11 @@ export const BorgPanel = (props, context) => {
const ais = data.ais || [];
const laws = data.laws || [];
return (
<Window resizable>
<Window
title="Borg Panel"
width={700}
height={700}
resizable>
<Window.Content scrollable>
<Section
title={borg.name}
+4 -1
View File
@@ -6,7 +6,10 @@ import { Window } from '../layouts';
export const BrigTimer = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window resizable>
<Window
width={300}
height={138}
resizable>
<Window.Content scrollable>
<Section
title="Cell Timer"
@@ -50,7 +50,10 @@ export const CameraConsole = (props, context) => {
nextCameraName,
] = prevNextCamera(cameras, activeCamera);
return (
<Window resizable>
<Window
width={870}
height={708}
resizable>
<div className="CameraConsole__left">
<Window.Content scrollable>
<CameraConsoleContent />
@@ -81,7 +84,6 @@ export const CameraConsole = (props, context) => {
className="CameraConsole__map"
params={{
id: mapRef,
parent: config.window,
type: 'map',
}} />
</div>
@@ -100,6 +102,7 @@ export const CameraConsoleContent = (props, context) => {
return (
<Fragment>
<Input
autoFocus
fluid
mb={1}
placeholder="Search for a camera"
+3 -1
View File
@@ -21,7 +21,9 @@ export const Canister = (props, context) => {
restricted,
} = data;
return (
<Window>
<Window
width={300}
height={232}>
<Window.Content>
<Section
title="Canister"
+16 -6
View File
@@ -3,6 +3,8 @@ import { useBackend } from '../backend';
import { Box, Button } from '../components';
import { Window } from '../layouts';
const PX_PER_UNIT = 28;
class PaintCanvas extends Component {
constructor(props) {
super(props);
@@ -58,16 +60,14 @@ class PaintCanvas extends Component {
const {
res = 1,
value,
px_per_unit = 28,
...rest
} = this.props;
const x_size = value.length * px_per_unit;
const y_size = x_size !== 0 ? value[0].length * px_per_unit : 0;
const [width, height] = getImageSize(value);
return (
<canvas
ref={this.canvasRef}
width={x_size || 300}
height={y_size || 300}
width={(width * PX_PER_UNIT) || 300}
height={(height * PX_PER_UNIT) || 300}
{...rest}
onClick={e => 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 (
<Window resizable>
<Window
width={Math.min(400, width * PX_PER_UNIT * 32 + 24)}
height={Math.min(400, height * PX_PER_UNIT * 32 + 24)}
resizable>
<Window.Content scrollable>
<Box textAlign="center">
<PaintCanvas
+4 -1
View File
@@ -14,7 +14,10 @@ export const Cargo = (props, context) => {
const cart = data.cart || [];
const requests = data.requests || [];
return (
<Window resizable>
<Window
width={780}
height={750}
resizable>
<Window.Content scrollable>
<CargoStatus />
<Tabs>
@@ -8,7 +8,10 @@ import { InterfaceLockNoticeBox } from './common/InterfaceLockNoticeBox';
export const CargoExpress = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window resizable>
<Window
width={600}
height={700}
resizable>
<Window.Content scrollable>
<InterfaceLockNoticeBox
accessText="a QM-level ID card" />
@@ -12,7 +12,10 @@ export const CargoHoldTerminal = (props, context) => {
status_report,
} = data;
return (
<Window resizable>
<Window
width={600}
height={230}
resizable>
<Window.Content scrollable>
<Section>
<LabeledList>
@@ -7,7 +7,10 @@ export const CellularEmporium = (props, context) => {
const { act, data } = useBackend(context);
const { abilities } = data;
return (
<Window resizable>
<Window
width={900}
height={480}
resizable>
<Window.Content scrollable>
<Section>
<LabeledList>
@@ -6,7 +6,11 @@ import { Window } from '../layouts';
export const CentcomPodLauncher = () => {
return (
<Window resizable>
<Window
title="Config/Launch Supply Pod"
width={700}
height={700}
resizable>
<Window.Content scrollable>
<CentcomPodLauncherContent />
</Window.Content>
@@ -57,6 +61,42 @@ export const CentcomPodLauncherContent = (props, context) => {
`}
onClick={() => act('bay5')} />
</LabeledList.Item>
{!!data.effectReverse && (
<LabeledList.Item label="Reverse Drop">
<Button
content="Pick Dropoff Location"
selected={data.picking_dropoff_turf}
disabled={!data.effectReverse}
tooltip={multiline`
[NOTE: ONLY WORKS WHEN REVERSE MODE IS ACTIVE]
This will allow you to select a dropoff turf. After
selecting a turf, any pod in 'Reverse Mode' will drop off
it's newly gotten cargo on this turf. Can be used to
transport things or people around the station in a neat,
IC way. Try doing this with the 'Seethrough Pod' style
enabled for extra fun!
`}
onClick={() => act('pickDropoffTurf')} />
<Button
content="Clear Dropoff Location"
disabled={!data.dropoff_turf}
tooltip={multiline`
Clears the selected dropoff turf for reverse mode.
`}
onClick={() => act('clearDropoffTurf')} />
<p>
Reverse Drop-off Location:
{data.dropoff_turf ? data.dropoff_turf : 'None'}
</p>
</LabeledList.Item>
)}
{!data.effectReverse && (
<LabeledList.Item label="Reverse Drop">
<p>
[Enable Reverse Mode for this feature]
</p>
</LabeledList.Item>
)}
<LabeledList.Item label="Teleport to">
<Button
content={data.bay}
@@ -66,7 +106,7 @@ export const CentcomPodLauncherContent = (props, context) => {
disabled={!data.oldArea}
onClick={() => act('teleportBack')} />
</LabeledList.Item>
<LabeledList.Item label="Item Mode" >
<LabeledList.Item label="Item Mode">
<Button
content="Clone Items"
selected={data.launchClone}
@@ -147,6 +187,14 @@ export const CentcomPodLauncherContent = (props, context) => {
onClick={() => act('damageGib')} />
</LabeledList.Item>
<LabeledList.Item label="Effects">
<Button
content="Projectile Cloud"
selected={data.effectShrapnel}
tooltip={multiline`
This will create a cloud of shrapnel on landing,
of any projectile you'd like!
`}
onClick={() => act('effectShrapnel')} />
<Button
content="Stun"
selected={data.effectStun}
@@ -5,7 +5,9 @@ import { Window } from '../layouts';
export const ChemAcclimator = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window
width={320}
height={271}>
<Window.Content>
<Section title="Acclimator">
<LabeledList>
@@ -13,7 +13,10 @@ export const ChemDebugSynthesizer = (props, context) => {
beakerContents = [],
} = data;
return (
<Window resizable>
<Window
width={390}
height={330}
resizable>
<Window.Content scrollable>
<Section
title="Recipient"
@@ -26,7 +26,10 @@ export const ChemDispenser = (props, context) => {
|| data.beakerContents
|| [];
return (
<Window resizable>
<Window
width={565}
height={620}
resizable>
<Window.Content scrollable>
<Section
title="Status"
@@ -86,7 +89,7 @@ export const ChemDispenser = (props, context) => {
key={recipe.name}
icon="tint"
width="129.5px"
lineHeight="21px"
lineHeight={1.75}
content={recipe.name}
onClick={() => act('dispense_recipe', {
recipe: recipe.name,
@@ -119,7 +122,7 @@ export const ChemDispenser = (props, context) => {
key={chemical.id}
icon="tint"
width="129.5px"
lineHeight="21px"
lineHeight={1.75}
content={chemical.title}
onClick={() => act('dispense', {
reagent: chemical.id,
+4 -1
View File
@@ -51,7 +51,10 @@ export const ChemFilter = (props, context) => {
const [leftName, setLeftName] = useLocalState(context, 'leftName', '');
const [rightName, setRightName] = useLocalState(context, 'rightName', '');
return (
<Window resizable>
<Window
width={500}
height={300}
resizable>
<Window.Content scrollable>
<Flex spacing={1}>
<Flex.Item grow={1}>
+4 -1
View File
@@ -18,7 +18,10 @@ export const ChemHeater = (props, context) => {
currentpH,
} = data;
return (
<Window resizable>
<Window
width={275}
height={320}
resizable>
<Window.Content scrollable>
<Section
title="Thermostat"
+54 -75
View File
@@ -7,7 +7,10 @@ export const ChemMaster = (props, context) => {
const { data } = useBackend(context);
const { screen } = data;
return (
<Window resizable>
<Window
width={465}
height={550}
resizable>
<Window.Content scrollable>
{screen === 'analyze' && (
<AnalysisResults />
@@ -220,7 +223,6 @@ const PackagingControls = (props, context) => {
const [
pillAmount,
setPillAmount,
] = useSharedState(context, 'pillAmount', 1);
const [
patchAmount,
@@ -374,79 +376,56 @@ const AnalysisResults = (props, context) => {
screen: 'home',
})} />
)}>
{!fermianalyze && (
<LabeledList>
<LabeledList.Item label="Name">
{analyzeVars.name}
</LabeledList.Item>
<LabeledList.Item label="State">
{analyzeVars.state}
</LabeledList.Item>
<LabeledList.Item label="Color">
<ColorBox color={analyzeVars.color} mr={1} />
{analyzeVars.color}
</LabeledList.Item>
<LabeledList.Item label="Description">
{analyzeVars.description}
</LabeledList.Item>
<LabeledList.Item label="Metabolization Rate">
{analyzeVars.metaRate} u/minute
</LabeledList.Item>
<LabeledList.Item label="Overdose Threshold">
{analyzeVars.overD}
</LabeledList.Item>
<LabeledList.Item label="Addiction Threshold">
{analyzeVars.addicD}
</LabeledList.Item>
</LabeledList>
)}
{!!fermianalyze && (
<LabeledList>
<LabeledList.Item label="Name">
{analyzeVars.name}
</LabeledList.Item>
<LabeledList.Item label="State">
{analyzeVars.state}
</LabeledList.Item>
<LabeledList.Item label="Color">
<ColorBox color={analyzeVars.color} mr={1} />
{analyzeVars.color}
</LabeledList.Item>
<LabeledList.Item label="Description">
{analyzeVars.description}
</LabeledList.Item>
<LabeledList.Item label="Metabolization Rate">
{analyzeVars.metaRate} u/minute
</LabeledList.Item>
<LabeledList.Item label="Overdose Threshold">
{analyzeVars.overD}
</LabeledList.Item>
<LabeledList.Item label="Addiction Threshold">
{analyzeVars.addicD}
</LabeledList.Item>
<LabeledList.Item label="Purity">
{analyzeVars.purityF}
</LabeledList.Item>
<LabeledList.Item label="Inverse Ratio">
{analyzeVars.inverseRatioF}
</LabeledList.Item>
<LabeledList.Item label="Purity E">
{analyzeVars.purityE}
</LabeledList.Item>
<LabeledList.Item label="Lower Optimal Temperature">
{analyzeVars.minTemp}
</LabeledList.Item>
<LabeledList.Item label="Upper Optimal Temperature">
{analyzeVars.maxTemp}
</LabeledList.Item>
<LabeledList.Item label="Explosive Temperature">
{analyzeVars.eTemp}
</LabeledList.Item>
<LabeledList.Item label="pH Peak">
{analyzeVars.pHpeak}
</LabeledList.Item>
</LabeledList>
)}
<LabeledList>
<LabeledList.Item label="Name">
{analyzeVars.name}
</LabeledList.Item>
<LabeledList.Item label="State">
{analyzeVars.state}
</LabeledList.Item>
<LabeledList.Item label="Color">
<ColorBox color={analyzeVars.color} mr={1} />
{analyzeVars.color}
</LabeledList.Item>
<LabeledList.Item label="Description">
{analyzeVars.description}
</LabeledList.Item>
<LabeledList.Item label="Metabolization Rate">
{analyzeVars.metaRate} u/minute
</LabeledList.Item>
<LabeledList.Item label="Overdose Threshold">
{analyzeVars.overD}
</LabeledList.Item>
<LabeledList.Item label="Addiction Threshold">
{analyzeVars.addicD}
</LabeledList.Item>
{!!fermianalyze && ( // why did you do that before? it's fucking bad.
<Fragment>
<LabeledList.Item label="Purity">
{analyzeVars.purityF}
</LabeledList.Item>
<LabeledList.Item label="Inverse Ratio">
{analyzeVars.inverseRatioF}
</LabeledList.Item>
<LabeledList.Item label="Purity E">
{analyzeVars.purityE}
</LabeledList.Item>
<LabeledList.Item label="Lower Optimal Temperature">
{analyzeVars.minTemp}
</LabeledList.Item>
<LabeledList.Item label="Upper Optimal Temperature">
{analyzeVars.maxTemp}
</LabeledList.Item>
<LabeledList.Item label="Explosive Temperature">
{analyzeVars.eTemp}
</LabeledList.Item>
<LabeledList.Item label="pH Peak">
{analyzeVars.pHpeak}
</LabeledList.Item>
</Fragment>
)}
</LabeledList>
</Section>
);
};
@@ -17,7 +17,10 @@ export const ChemReactionChamber = (props, context) => {
const emptying = data.emptying;
const reagents = data.reagents || [];
return (
<Window resizable>
<Window
width={250}
height={225}
resizable>
<Window.Content scrollable>
<Section
title="Reagents"
@@ -11,7 +11,9 @@ export const ChemSplitter = (props, context) => {
max_transfer,
} = data;
return (
<Window>
<Window
width={220}
height={105}>
<Window.Content>
<Section>
<LabeledList>
@@ -12,7 +12,9 @@ export const ChemSynthesizer = (props, context) => {
possible_amounts = [],
} = data;
return (
<Window>
<Window
width={300}
height={375}>
<Window.Content>
<Section>
<Box>
+3 -1
View File
@@ -52,7 +52,9 @@ const SUFFIXES = [
export const CodexGigas = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window
width={450}
height={450}>
<Window.Content>
<Section>
{data.name}
@@ -7,7 +7,11 @@ import { Window } from '../layouts';
export const ComputerFabricator = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window
title="Personal Computer Vendor"
width={500}
height={400}
resizable>
<Window.Content>
<Section italic fontSize="20px">
Your perfect device, only three steps away...
@@ -61,7 +65,7 @@ const CfStep1 = (props, context) => {
content="Laptop"
textAlign="center"
fontSize="30px"
lineHeight="50px"
lineHeight={2}
onClick={() => act('pick_device', {
pick: '1',
})} />
@@ -73,7 +77,7 @@ const CfStep1 = (props, context) => {
content="Tablet"
textAlign="center"
fontSize="30px"
lineHeight="50px"
lineHeight={2}
onClick={() => act('pick_device', {
pick: '2',
})} />
@@ -108,7 +112,7 @@ const CfStep2 = (props, context) => {
`}
position="right" />
</Table.Cell>
<Table.Cell >
<Table.Cell>
<Button
content="Standard"
selected={data.hw_battery === 1}
@@ -335,7 +339,7 @@ const CfStep2 = (props, context) => {
color="good"
textAlign="center"
fontSize="18px"
lineHeight="26px"
lineHeight={2}
onClick={() => act('confirm_order')} />
</Section>
);
@@ -389,7 +393,7 @@ const CfStep3 = (props, context) => {
color="good"
textAlign="center"
fontSize="20px"
lineHeight="28px"
lineHeight={2}
onClick={() => act('purchase')} />
</Section>
);
+4 -1
View File
@@ -7,7 +7,10 @@ export const Crayon = (props, context) => {
const capOrChanges = data.has_cap || data.can_change_colour;
const drawables = data.drawables || [];
return (
<Window resizable>
<Window
width={600}
height={600}
resizable>
<Window.Content scrollable>
{!!capOrChanges && (
<Section title="Basic">
+5 -1
View File
@@ -60,7 +60,11 @@ const HealthStat = props => {
export const CrewConsole = () => {
return (
<Window resizable>
<Window
title="Crew Monitor"
width={800}
height={600}
resizable>
<Window.Content scrollable>
<Section minHeight="540px">
<CrewTable />
+4 -1
View File
@@ -25,7 +25,10 @@ const damageTypes = [
export const Cryo = () => {
return (
<Window resizable>
<Window
width={400}
height={550}
resizable>
<Window.Content scrollable>
<CryoContent />
</Window.Content>
@@ -8,7 +8,9 @@ export const DecalPainter = (props, context) => {
const color_list = data.color_list || [];
const dir_list = data.dir_list || [];
return (
<Window>
<Window
width={500}
height={400}>
<Window.Content>
<Section title="Decal Type">
{decal_list.map(decal => (
@@ -23,7 +23,9 @@ export const DisposalUnit = (props, context) => {
stateText = 'Off';
}
return (
<Window>
<Window
width={300}
height={180}>
<Window.Content>
<Section>
<LabeledList>
+7 -2
View File
@@ -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 (
<Window resizable>
<Window
title="DNA Console"
width={539}
height={710}
resizable>
{!!isPulsingRads && (
<Dimmer
fontSize="14px"
@@ -773,7 +778,7 @@ const DnaConsoleSequencer = (props, context) => {
{mutations.map(mutation => (
<GenomeImage
key={mutation.Alias}
url={mutation.Image}
url={resolveAsset(mutation.Image)}
selected={mutation.Alias === sequencerMutation}
onClick={() => {
act('set_view', {
+3 -1
View File
@@ -17,7 +17,9 @@ export const DnaVault = (props, context) => {
animals_max,
} = data;
return (
<Window>
<Window
width={350}
height={400}>
<Window.Content>
<Section title="DNA Vault Database">
<LabeledList>
@@ -9,7 +9,9 @@ export const EightBallVote = (props, context) => {
shaking,
} = data;
return (
<Window>
<Window
width={400}
height={600}>
<Window.Content>
{!shaking && (
<NoticeBox>
@@ -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 (
<Window>
<Window
width={400}
height={305}>
<Window.Content>
<Section
title="Power"
+3 -1
View File
@@ -13,7 +13,9 @@ export const Electropack = (props, context) => {
maxFrequency,
} = data;
return (
<Window>
<Window
width={260}
height={137}>
<Window.Content>
<Section>
<LabeledList>
@@ -13,7 +13,9 @@ export const EmergencyShuttleConsole = (props, context) => {
authorizations = [],
} = data;
return (
<Window>
<Window
width={400}
height={350}>
<Window.Content>
<Section>
<Box
@@ -100,15 +102,6 @@ export const EmergencyShuttleConsole = (props, context) => {
No Active Authorizations
</Box>
)}
{authorizations.map(authorization => (
<Box
key={authorization.name}
bold
fontSize="16px"
className="candystripe">
{authorization.name} ({authorization.job})
</Box>
))}
</Section>
</Section>
</Section>
@@ -18,7 +18,10 @@ export const EngravedMessage = (props, context) => {
realdate,
} = data;
return (
<Window resizable>
<Window
width={600}
height={300}
resizable>
<Window.Content scrollable>
<Section>
<Box
@@ -10,7 +10,10 @@ export const ExosuitControlConsole = (props, context) => {
mechs = [],
} = data;
return (
<Window resizable>
<Window
width={500}
height={500}
resizable>
<Window.Content scrollable>
{mechs.length === 0 && (
<NoticeBox>
+5 -1
View File
@@ -37,7 +37,11 @@ export const Gps = (props, context) => {
signal => signal.entrytag),
])(data.signals || []);
return (
<Window resizable>
<Window
title="Global Positioning System"
width={470}
height={700}
resizable>
<Window.Content scrollable>
<Section
title="Control"
@@ -9,7 +9,9 @@ export const GravityGenerator = (props, context) => {
operational,
} = data;
return (
<Window>
<Window
width={400}
height={165}>
<Window.Content>
{!operational && (
<NoticeBox>
@@ -8,7 +8,10 @@ export const GulagItemReclaimer = (props, context) => {
mobs = [],
} = data;
return (
<Window resizable>
<Window
width={325}
height={400}
resizable>
<Window.Content scrollable>
{mobs.length === 0 && (
<NoticeBox>
@@ -19,7 +19,9 @@ export const GulagTeleporterConsole = (props, context) => {
prisoner = {},
} = data;
return (
<Window>
<Window
width={350}
height={295}>
<Window.Content>
<Section
title="Teleporter Console"
+4 -1
View File
@@ -12,7 +12,10 @@ export const Holodeck = (props, context) => {
program,
} = data;
return (
<Window resizable>
<Window
width={400}
height={500}
resizable>
<Window.Content scrollable>
<Section
title="Default Programs"
+3 -1
View File
@@ -5,7 +5,9 @@ import { Window } from '../layouts';
export const HypnoChair = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window
width={375}
height={480}>
<Window.Content>
<Section
title="Information"
@@ -5,7 +5,9 @@ import { Window } from '../layouts';
export const ImplantChair = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window
width={375}
height={280}>
<Window.Content>
<Section
title="Occupant Information"
@@ -9,7 +9,9 @@ export const InfraredEmitter = (props, context) => {
visible,
} = data;
return (
<Window>
<Window
width={225}
height={110}>
<Window.Content>
<Section>
<LabeledList>
+4 -1
View File
@@ -16,7 +16,10 @@ export const Intellicard = (props, context) => {
} = data;
const offline = isDead || isBraindead;
return (
<Window resizable>
<Window
width={500}
height={500}
resizable>
<Window.Content scrollable>
<Section
title={name || "Empty Card"}
+3 -1
View File
@@ -6,7 +6,9 @@ import { Window } from '../layouts';
export const KeycardAuth = (props, context) => {
const { act, data } = useBackend(context);
return (
<Window>
<Window
width={375}
height={125}>
<Window.Content>
<Section>
<Box>
@@ -13,7 +13,9 @@ export const LaborClaimConsole = (props, context) => {
unclaimed_points,
} = data;
return (
<Window>
<Window
width={315}
height={430}>
<Window.Content>
<Section>
<LabeledList>
@@ -13,7 +13,11 @@ export const LanguageMenu = (props, context) => {
unknown_languages = [],
} = data;
return (
<Window resizable>
<Window
title="Language Menu"
width={700}
height={600}
resizable>
<Window.Content scrollable>
<Section title="Known Languages">
<LabeledList>
@@ -197,7 +197,10 @@ export const LaunchpadConsole = (props, context) => {
selected_id,
} = data;
return (
<Window resizable>
<Window
width={475}
height={260}
resizable>
<Window.Content scrollable>
{launchpads.length === 0 && (
<NoticeBox>
@@ -10,7 +10,11 @@ export const LaunchpadRemote = (props, context) => {
pad_closed,
} = data;
return (
<Window theme="syndicate">
<Window
title="Briefcase Launchpad Remote"
width={300}
height={240}
theme="syndicate">
<Window.Content>
{!has_pad && (
<NoticeBox>
+125 -68
View File
@@ -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 (
<Window resizable>
<Window
title="Mafia"
theme={role_theme}
width={650}
height={550}
resizable>
<Window.Content>
<Section title={phase}>
{!!role_info && (
<Table>
<Table.Row>
<Table.Cell>
<TimeDisplay auto="down" value={timeleft} />
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell bold>
You are a {role_info.role}
</Table.Cell>
</Table.Row>
<Table.Row bold>
<Table.Cell>
{role_info.desc}
</Table.Cell>
</Table.Row>
{!!role_info.action_log && role_info.action_log.map(log_line => (
<Table.Row key={log_line}>
<Table.Cell>
{role_info.action_log}
</Table.Cell>
</Table.Row>
))}
</Table>
{!!roleinfo && (
<Fragment>
<Box>
<TimeDisplay auto="down" value={timeleft} />
</Box>
<Box>
<b>You are a {roleinfo.role}</b>
</Box>
<Box>
<b>{roleinfo.desc}</b>
</Box>
</Fragment>
)}
</Section>
<Flex>
{!!actions && actions.map(action => {
return (
<Flex.Item key={action}>
<Button
onClick={() => act("mf_action", { atype: action })}>
{action}
</Button>
</Flex.Item>);
})}
{ !!admin_controls && (
<Fragment>
<Flex.Item>
<Button onClick={() => act("next_phase")}>Next Phase</Button>
</Flex.Item>
<FlexItem>
<Button onClick={() => act("new_game")}>New Game</Button>
</FlexItem>
</Fragment>)}
{!!actions && actions.map(action => (
<Flex.Item key={action}>
<Button
onClick={() => act("mf_action", { atype: action })}>
{action}
</Button>
</Flex.Item>
))}
</Flex>
{!!admin_controls && (
<Section
title="ADMIN CONTROLS"
backgroundColor="red">
THESE ARE DEBUG, THEY WILL BREAK THE GAME, DO NOT TOUCH <br />
Also because an admin did it: do not gib/delete/etc
anyone! It will runtime the game to death! <br />
<Button
icon="arrow-right"
onClick={() => act("next_phase")}>
Next Phase
</Button>
<Button
icon="home"
onClick={() => act("players_home")}>
Send All Players Home
</Button>
<Button
icon="radiation"
onClick={() => act("new_game")}>
New Game
</Button>
<br />
<Button
icon="skull"
onClick={() => act("nuke")}
color="black">
Nuke (delete datum + landmarks, hope it fixes everything!)
</Button>
</Section>
)}
<Section title="Players">
<LabeledList>
{!!players && players.map(player => { return (
{!!players && players.map(player => (
<LabeledList.Item
className="candystripe"
key={player.ref}
label={player.name}>
{player.votes !== undefined
{!player.alive && (<Box color="red">DEAD</Box>)}
{player.votes !== undefined && !!player.alive
&& (<Fragment>Votes : {player.votes} </Fragment>)}
{
!!player.actions && player.actions.map(action => {
return (
<Button
key={action}
onClick={
// eslint-disable-next-line indent
() => act("mf_targ_action", { atype: action, target: player.ref })
}>
onClick={() => act('mf_targ_action', {
atype: action,
target: player.ref,
})}>
{action}
</Button>); })
}
</LabeledList.Item>);
})}
</LabeledList.Item>)
)}
</LabeledList>
</Section>
<Section title="Roles">
<Table>
{!!all_roles && all_roles.map(r => (
<Table.Row key={r}>
<Table.Cell bold>
{r}
</Table.Cell>
</Table.Row>
))}
</Table>
</Section>
{!!judgement_phase && (
<Section title="JUDGEMENT">
<Flex justify="space-around">
<Button
icon="smile-beam"
color="good"
onClick={() => act("vote_innocent")}>
INNOCENT!
</Button>
Use these buttons to vote the accused innocent or guilty!
<Button
icon="angry"
color="bad"
onClick={() => act("vote_guilty")}>
GUILTY!
</Button>
</Flex>
</Section>
)}
<Flex mt={1} spacing={1}>
<Flex.Item grow={1} basis={0}>
<Section
title="Roles"
minHeight={10}>
{!!all_roles && all_roles.map(r => (
<Box key={r}>
<Flex justify="space-between">
{r}
<Button
content="?"
onClick={() => act("mf_lookup", {
atype: r.slice(0, -3),
})}
/>
</Flex>
</Box>
))}
</Section>
</Flex.Item>
<Flex.Item grow={2} basis={0}>
<Section
title="Notes"
minHeight={10}>
{roleinfo !== undefined && !!roleinfo.action_log
&& roleinfo.action_log.map(log_line => (
<Box key={log_line}>
{log_line}
</Box>
))}
</Section>
</Flex.Item>
</Flex>
</Window.Content>
</Window>
);
@@ -9,6 +9,8 @@ export const MalfunctionModulePicker = (props, context) => {
} = data;
return (
<Window
width={620}
height={525}
theme="malfunction"
resizable>
<Window.Content scrollable>
@@ -8,7 +8,9 @@ export const MechBayPowerConsole = (props, context) => {
const mech = recharge_port && recharge_port.mech;
const cell = mech && mech.cell;
return (
<Window>
<Window
width={400}
height={200}>
<Window.Content>
<Section
title="Mech status"
+23 -8
View File
@@ -13,7 +13,10 @@ export const MedicalKiosk = (props, context) => {
active_status_4,
} = data;
return (
<Window resizable>
<Window
width={575}
height={420}
resizable>
<Window.Content scrollable>
<Flex mb={1}>
<Flex.Item mr={1}>
@@ -97,7 +100,9 @@ const MedicalKioskScanButton = (props, context) => {
tooltipPosition="right"
content={name}
onClick={() => {
act(`beginScan_${index}`);
if (!paid) {
act(`beginScan_${index}`);
}
setScanIndex(index);
}} />
</Flex.Item>
@@ -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) => {
</LabeledList.Item>
<LabeledList.Divider />
<LabeledList.Item
label="Radiation Status">
{rad_status}
label="Radiation Sickness Status">
{rad_sickness_status}
</LabeledList.Item>
<LabeledList.Item
label="Irradiation Percentage">
{rad_value}%
label="Radiation Sickness Percentage">
{rad_sickness_value}%
</LabeledList.Item>
<LabeledList.Item
label="Radiation Contamination Status">
{rad_contamination_status}
</LabeledList.Item>
<LabeledList.Item
label="Radiation Contamination Percentage">
{rad_contamination_value}%
</LabeledList.Item>
</LabeledList>
</Section>
@@ -9,7 +9,10 @@ export const MiningVendor = (props, context) => {
...data.product_records,
];
return (
<Window resizable>
<Window
width={425}
height={600}
resizable>
<Window.Content scrollable>
<Section title="User">
{data.user && (
@@ -27,7 +30,7 @@ export const MiningVendor = (props, context) => {
</Box>
)}
</Section>
<Section title="Equipment" >
<Section title="Equipment">
<Table>
{inventory.map((product => {
return (
+4 -2
View File
@@ -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 (
<Window>
<Window
width={350}
height={425}>
<Window.Content>
<InterfaceLockNoticeBox />
<Section
@@ -5,7 +5,10 @@ import { Window } from '../layouts';
export const NaniteChamberControl = (props, context) => {
return (
<Window resizable>
<Window
width={380}
height={570}
resizable>
<Window.Content scrollable>
<NaniteChamberControlContent />
</Window.Content>
@@ -10,7 +10,6 @@ export const NaniteDiskBox = (props, context) => {
has_program,
disk,
} = data;
if (!has_disk) {
return (
<NoticeBox>
@@ -18,7 +17,6 @@ export const NaniteDiskBox = (props, context) => {
</NoticeBox>
);
}
if (!has_program) {
return (
<NoticeBox>
@@ -26,7 +24,6 @@ export const NaniteDiskBox = (props, context) => {
</NoticeBox>
);
}
return (
<NaniteInfoBox program={disk} />
);
@@ -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 (
<Section
title={name}
@@ -165,18 +159,16 @@ export const NaniteInfoBox = (props, context) => {
export const NaniteCloudBackupList = (props, context) => {
const { act, data } = useBackend(context);
const cloud_backups = data.cloud_backups || [];
return (
cloud_backups.map(backup => (
<Button
fluid
key={backup.cloud_id}
content={"Backup #" + backup.cloud_id}
textAlign="center"
onClick={() => act('set_view', {
view: backup.cloud_id,
})} />
))
);
return cloud_backups.map(backup => (
<Button
fluid
key={backup.cloud_id}
content={"Backup #" + backup.cloud_id}
textAlign="center"
onClick={() => act('set_view', {
view: backup.cloud_id,
})} />
));
};
export const NaniteCloudBackupDetails = (props, context) => {
@@ -187,9 +179,7 @@ export const NaniteCloudBackupDetails = (props, context) => {
has_program,
cloud_backup,
} = data;
const can_rule = (disk && disk.can_rule) || false;
if (!cloud_backup) {
return (
<NoticeBox>
@@ -197,9 +187,7 @@ export const NaniteCloudBackupDetails = (props, context) => {
</NoticeBox>
);
}
const cloud_programs = data.cloud_programs || [];
return (
<Section
title={"Backup #" + current_view}
@@ -278,9 +266,11 @@ export const NaniteCloudControl = (props, context) => {
current_view,
new_backup_id,
} = data;
return (
<Window resizable>
<Window
width={375}
height={700}
resizable>
<Window.Content scrollable>
<Section
title="Program Disk"
@@ -21,7 +21,10 @@ export const NaniteProgramHub = (props, context) => {
&& programs[selectedCategory]
|| [];
return (
<Window resizable>
<Window
width={500}
height={700}
resizable>
<Window.Content scrollable>
<Section
title="Program Disk"
@@ -5,7 +5,6 @@ import { Window } from '../layouts';
export const NaniteCodes = (props, context) => {
const { act, data } = useBackend(context);
return (
<Section
title="Codes"
@@ -228,7 +227,10 @@ export const NaniteExtraBoolean = (props, context) => {
export const NaniteProgrammer = (props, context) => {
return (
<Window resizable>
<Window
width={420}
height={550}
resizable>
<Window.Content scrollable>
<NaniteProgrammerContent />
</Window.Content>
@@ -251,7 +253,6 @@ export const NaniteProgrammerContent = (props, context) => {
has_extra_settings,
extra_settings = {},
} = data;
if (!has_disk) {
return (
<NoticeBox textAlign="center">
@@ -259,7 +260,6 @@ export const NaniteProgrammerContent = (props, context) => {
</NoticeBox>
);
}
if (!has_program) {
return (
<Section
@@ -272,7 +272,6 @@ export const NaniteProgrammerContent = (props, context) => {
)} />
);
}
return (
<Section
title={name}
@@ -5,7 +5,10 @@ import { Window } from '../layouts';
export const NaniteRemote = (props, context) => {
return (
<Window resizable>
<Window
width={420}
height={500}
resizable>
<Window.Content scrollable>
<NaniteRemoteContent />
</Window.Content>
@@ -51,7 +54,7 @@ export const NaniteRemoteContent = (props, context) => {
icon="lock"
content="Lock Interface"
onClick={() => act('lock')} />
)} >
)}>
<LabeledList>
<LabeledList.Item label="Name">
<Input
@@ -66,7 +69,7 @@ export const NaniteRemoteContent = (props, context) => {
content="Save"
onClick={() => act('save')} />
</LabeledList.Item>
<LabeledList.Item label={comms ? "Comm Code" : "Signal Code"} >
<LabeledList.Item label={comms ? "Comm Code" : "Signal Code"}>
<NumberInput
value={code}
minValue={0}
@@ -135,7 +138,7 @@ export const NaniteRemoteContent = (props, context) => {
{saved_settings.map(setting => (
<Table.Row
key={setting.id}
className="candystripe" >
className="candystripe">
<Table.Cell bold color="label">
{setting.name}:
</Table.Cell>
@@ -4,7 +4,6 @@ import { Window } from '../layouts';
export const NotificationPreferences = (props, context) => {
const { act, data } = useBackend(context);
const ignoresPreSort = data.ignore || [];
const ignores = ignoresPreSort.sort((a, b) => {
const descA = a.desc.toLowerCase();
@@ -17,9 +16,12 @@ export const NotificationPreferences = (props, context) => {
}
return 0;
});
return (
<Window resizable>
<Window
title="Notification Preferences"
width={270}
height={360}
resizable>
<Window.Content scrollable>
<Section title="Ghost Role Notifications">
{ignores.map(ignore => (
+4 -3
View File
@@ -4,16 +4,17 @@ import { Window } from '../layouts';
export const NtnetRelay = (props, context) => {
const { act, data } = useBackend(context);
const {
enabled,
dos_capacity,
dos_overload,
dos_crashed,
} = data;
return (
<Window>
<Window
title="NtNet Quantum Relay"
width={400}
height={300}>
<Window.Content>
<Section
title="Network Buffer"
@@ -3,7 +3,10 @@ import { AiRestorerContent } from './AiRestorer';
export const NtosAiRestorer = () => {
return (
<NtosWindow resizable>
<NtosWindow
width={370}
height={400}
resizable>
<NtosWindow.Content scrollable>
<AiRestorerContent />
</NtosWindow.Content>
+5 -2
View File
@@ -1,3 +1,4 @@
import { resolveAsset } from '../assets';
import { useBackend } from '../backend';
import { AnimatedNumber, Box, Button, Grid, LabeledList, ProgressBar, Section } from '../components';
import { NtosWindow } from '../layouts';
@@ -5,7 +6,9 @@ import { NtosWindow } from '../layouts';
export const NtosArcade = (props, context) => {
const { act, data } = useBackend(context);
return (
<NtosWindow>
<NtosWindow
width={450}
height={350}>
<NtosWindow.Content>
<Section
title="Outbomb Cuban Pete Ultra"
@@ -71,7 +74,7 @@ export const NtosArcade = (props, context) => {
inline
width="156px"
textAlign="center">
<img src={data.BossID} />
<img src={resolveAsset(data.BossID)} />
</Section>
</Grid.Column>
</Grid>
+4 -1
View File
@@ -18,7 +18,10 @@ export const NtosAtmos = (props, context) => {
])(data.AirData || []);
const gasMaxPercentage = Math.max(1, ...gases.map(gas => gas.percentage));
return (
<NtosWindow resizable>
<NtosWindow
width={300}
height={350}
resizable>
<NtosWindow.Content scrollable>
<Section>
<LabeledList>
@@ -0,0 +1,119 @@
import { useBackend } from '../backend';
import { AnimatedNumber, Box, Button, Section, Table } from '../components';
import { formatMoney } from '../format';
import { NtosWindow } from '../layouts';
export const NtosBountyConsole = (props, context) => {
const { act, data } = useBackend(context);
const {
bountydata = [],
} = data;
return (
<NtosWindow
width={750}
height={600}
resizable>
<NtosWindow.Content scrollable>
<Section
title={<BountyHeader />}
buttons={(
<Button
icon="print"
content="Print Bounty List"
onClick={() => act('Print')} />
)}>
<Table border>
<Table.Row
bold
italic
color="label"
fontSize={1.25}>
<Table.Cell p={1} textAlign="center">
Bounty Object
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Description
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Progress
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Value
</Table.Cell>
<Table.Cell p={1} textAlign="center">
Claim
</Table.Cell>
</Table.Row>
{bountydata.map(bounty => (
<Table.Row
key={bounty.name}
backgroundColor={bounty.priority === 1
? 'rgba(252, 152, 3, 0.25)'
: ''}>
<Table.Cell bold p={1}>
{bounty.name}
</Table.Cell>
<Table.Cell
italic
textAlign="center"
p={1}>
{bounty.description}
</Table.Cell>
<Table.Cell
bold
p={1}
textAlign="center">
{bounty.priority === 1
? <Box>High Priority</Box>
: ""}
{bounty.completion_string}
</Table.Cell>
<Table.Cell
bold
p={1}
textAlign="center">
{bounty.reward_string}
</Table.Cell>
<Table.Cell
bold
p={1}>
<Button
fluid
textAlign="center"
icon={bounty.claimed === 1
? "check"
: ""}
content={bounty.claimed === 1
? "Claimed"
: "Claim"}
disabled={bounty.claimed === 1}
color={bounty.can_claim === 1
? 'green'
: 'red'}
onClick={() => act('ClaimBounty', {
bounty: bounty.bounty_ref,
})} />
</Table.Cell>
</Table.Row>
))}
</Table>
</Section>
</NtosWindow.Content>
</NtosWindow>
);
};
const BountyHeader = (props, context) => {
const { act, data } = useBackend(context);
const {
stored_cash,
} = data;
return (
<Box inline bold>
<AnimatedNumber
value={stored_cash}
format={value => formatMoney(value)} />
{' credits'}
</Box>
);
};
+4 -1
View File
@@ -6,7 +6,10 @@ import { AccessList } from './common/AccessList';
export const NtosCard = (props, context) => {
return (
<NtosWindow resizable>
<NtosWindow
width={450}
height={520}
resizable>
<NtosWindow.Content scrollable>
<NtosCardContent />
</NtosWindow.Content>
@@ -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 (
<NtosWindow resizable>
<NtosWindow
theme={PC_device_theme}
width={420}
height={630}
resizable>
<NtosWindow.Content scrollable>
<Section
title="Power Supply"
@@ -72,8 +75,7 @@ export const NtosConfiguration = (props, context) => {
mr={1}
onClick={() => act('PC_toggle_component', {
name: component.name,
})}
/>
})} />
)}
<Box
inline
@@ -1,18 +1,19 @@
import { map } from 'common/collections';
import { useBackend } from '../backend';
import { Button, Section, Table } from '../components';
import { map } from 'common/collections';
import { NtosWindow } from '../layouts';
export const NtosCrewManifest = (props, context) => {
const { act, data } = useBackend(context);
const {
have_printer,
manifest = {},
} = data;
return (
<NtosWindow resizable>
<NtosWindow
width={400}
height={480}
resizable>
<NtosWindow.Content scrollable>
<Section
title="Crew Manifest"
@@ -4,12 +4,11 @@ import { Box, Button, LabeledList, NoticeBox, Section } from '../components';
import { NtosWindow } from '../layouts';
export const NtosCyborgRemoteMonitor = (props, context) => {
const { data } = useBackend(context);
const {
theme,
} = data;
return (
<NtosWindow theme={data.theme}>
<NtosWindow
width={600}
height={800}
resizable>
<NtosWindow.Content scrollable>
<NtosCyborgRemoteMonitorContent />
</NtosWindow.Content>
@@ -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 (
<NtosWindow theme="syndicate">
<NtosWindow
width={600}
height={800}
theme="syndicate">
<NtosWindow.Content scrollable>
<NtosCyborgRemoteMonitorContent />
</NtosWindow.Content>
@@ -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 (
<NtosWindow resizable>
<NtosWindow resizable theme={PC_device_theme}>
<NtosWindow.Content scrollable>
<Section>
<FileTable
@@ -4,7 +4,10 @@ import { NtosWindow } from '../layouts';
export const NtosJobManager = (props, context) => {
return (
<NtosWindow resizable>
<NtosWindow
width={400}
height={620}
resizable>
<NtosWindow.Content scrollable>
<NtosJobManagerContent />
</NtosWindow.Content>
@@ -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 (
<NoticeBox>
@@ -29,7 +30,6 @@ export const NtosJobManagerContent = (props, context) => {
</NoticeBox>
);
}
return (
<Section>
{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,
})}
/>
})} />
</Table.Cell>
<Table.Cell collapsing>
{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,
})}
/>
})} />
<Button
content="Close"
disabled={!slot.status_close}
onClick={() => act('PRG_close_job', {
target: slot.title,
})}
/>
})} />
</Table.Cell>
</Table.Row>
))}
+9 -3
View File
@@ -23,13 +23,21 @@ const PROGRAM_ICONS = {
export const NtosMain = (props, context) => {
const { act, data } = useBackend(context);
const {
device_theme,
programs = [],
has_light,
light_on,
comp_light_color,
} = data;
return (
<NtosWindow resizable>
<NtosWindow
title={device_theme === 'syndicate'
&& 'Syndix Main Menu'
|| 'NtOS Main Menu'}
theme={device_theme}
width={400}
height={500}
resizable>
<NtosWindow.Content scrollable>
{!!has_light && (
<Section>
@@ -55,7 +63,6 @@ export const NtosMain = (props, context) => {
<Table.Cell>
<Button
fluid
lineHeight="24px"
color="transparent"
icon={PROGRAM_ICONS[program.name]
|| 'window-maximize-o'}
@@ -67,7 +74,6 @@ export const NtosMain = (props, context) => {
<Table.Cell collapsing width="18px">
{!!program.running && (
<Button
lineHeight="24px"
color="transparent"
icon="times"
tooltip="Close program"
+7 -11
View File
@@ -1,11 +1,10 @@
import { useBackend } from '../backend';
import { Box, Button, Section, Input, Table, Icon } from '../components';
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Box, Button, Icon, Input, Section, Table } from '../components';
import { NtosWindow } from '../layouts';
export const NtosNetChat = (props, context) => {
const { act, data } = useBackend(context);
const {
can_admin,
adminmode,
@@ -17,17 +16,15 @@ export const NtosNetChat = (props, context) => {
clients = [],
messages = [],
} = data;
const in_channel = (active_channel !== null);
const authorized = (authed || adminmode);
return (
<NtosWindow>
<NtosWindow
width={900}
height={675}>
<NtosWindow.Content>
<Section
height="600px">
<Table
height="580px">
<Section height="600px">
<Table height="580px">
<Table.Row>
<Table.Cell
verticalAlign="top"
@@ -104,7 +101,6 @@ export const NtosNetChat = (props, context) => {
)
)}
</Box>
<Input
fluid
selfClear
+8 -6
View File
@@ -1,12 +1,14 @@
import { Section, Button, LabeledList, Box, NoticeBox } from "../components";
import { useBackend } from "../backend";
import { createLogger } from "../logging";
import { Fragment } from "inferno";
import { NtosWindow } from "../layouts";
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { Box, Button, LabeledList, NoticeBox, Section } from '../components';
import { NtosWindow } from '../layouts';
export const NtosNetDos = (props, context) => {
return (
<NtosWindow theme="syndicate">
<NtosWindow
width={400}
height={250}
theme="syndicate">
<NtosWindow.Content>
<NtosNetDosContent />
</NtosWindow.Content>
@@ -5,6 +5,7 @@ import { NtosWindow } from '../layouts';
export const NtosNetDownloader = (props, context) => {
const { act, data } = useBackend(context);
const {
PC_device_theme,
disk_size,
disk_used,
downloadable_programs = [],
@@ -13,7 +14,11 @@ export const NtosNetDownloader = (props, context) => {
hackedavailable,
} = data;
return (
<NtosWindow resizable>
<NtosWindow
theme={PC_device_theme}
width={480}
height={735}
resizable>
<NtosWindow.Content scrollable>
{!!error && (
<NoticeBox>
@@ -3,7 +3,10 @@ import { PowerMonitorContent } from './PowerMonitor';
export const NtosPowerMonitor = () => {
return (
<NtosWindow resizable>
<NtosWindow
width={550}
height={700}
resizable>
<NtosWindow.Content scrollable>
<PowerMonitorContent />
</NtosWindow.Content>
+15 -13
View File
@@ -1,12 +1,15 @@
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { classes } from 'common/react';
import { Box, Button, LabeledList, NoticeBox, Section, Table, Flex, Icon } from '../components';
import { resolveAsset } from '../assets';
import { useBackend } from '../backend';
import { Box, Button, Flex, Icon, NoticeBox, Section } from '../components';
import { NtosWindow } from '../layouts';
export const NtosRadar = (props, context) => {
return (
<NtosWindow theme="ntos">
<NtosWindow
width={800}
height={600}
theme="ntos">
<NtosRadarContent />
</NtosWindow>
);
@@ -20,9 +23,8 @@ export const NtosRadarContent = (props, context) => {
target = [],
scanning,
} = data;
return (
<Flex
<Flex
direction={"row"}
hight="100%">
<Flex.Item
@@ -67,7 +69,9 @@ export const NtosRadarContent = (props, context) => {
</Flex.Item>
<Flex.Item
style={{
'background-image': 'url("ntosradarbackground.png")',
'background-image': 'url("'
+ resolveAsset('ntosradarbackground.png')
+ '")',
'background-position': 'center',
'background-repeat': 'no-repeat',
'top': '20px',
@@ -90,23 +94,21 @@ export const NtosRadarContent = (props, context) => {
)
: !!target.userot && (
<Box as="img"
src={target.arrowstyle}
src={resolveAsset(target.arrowstyle)}
position="absolute"
top="20px"
left="243px"
style={{
'transform': `rotate(${target.rot}deg)`,
}}
/>
}} />
) || (
<Icon
name={target.pointer}
position="absolute"
size={2}
color={target.color}
top={((target.locy * 10) + 29) + 'px'}
left={((target.locx * 10) + 16) + 'px'}
/>
top={((target.locy * 10) + 19) + 'px'}
left={((target.locx * 10) + 16) + 'px'} />
)}
</Flex.Item>
</Flex>
@@ -1,14 +1,13 @@
import { Fragment } from 'inferno';
import { useBackend } from '../backend';
import { classes } from 'common/react';
import { Box, Button, LabeledList, NoticeBox, Section, Table, Flex, Icon } from '../components';
import { NtosWindow } from '../layouts';
import { NtosRadarContent } from './NtosRadar';
export const NtosRadarSyndicate = (props, context) => {
return (
<NtosWindow theme="syndicate">
<NtosWindow
width={800}
height={600}
theme="syndicate">
<NtosRadarContent />
</NtosWindow>
);
};
};
+14 -14
View File
@@ -1,20 +1,23 @@
import { Section, Button, LabeledList } from "../components";
import { useBackend } from "../backend";
import { NtosWindow } from "../layouts";
import { Section, Button, LabeledList } from '../components';
import { useBackend } from '../backend';
import { NtosWindow } from '../layouts';
export const NtosRevelation = (props, context) => {
const { act, data } = useBackend(context);
return (
<NtosWindow theme="syndicate">
<NtosWindow
width={400}
height={250}
theme="syndicate">
<NtosWindow.Content>
<Section>
<Button.Input
fluid
content="Obfuscate Name..."
onCommit={(e, value) => act('PRG_obfuscate', { new_name: value })}
mb={1}
/>
onCommit={(e, value) => act('PRG_obfuscate', {
new_name: value,
})}
mb={1} />
<LabeledList>
<LabeledList.Item
label="Payload Status"
@@ -22,10 +25,8 @@ export const NtosRevelation = (props, context) => {
<Button
content={data.armed ? 'ARMED' : 'DISARMED'}
color={data.armed ? 'bad' : 'average'}
onClick={() => act('PRG_arm')}
/>
)}
/>
onClick={() => act('PRG_arm')} />
)} />
</LabeledList>
<Button
fluid
@@ -33,8 +34,7 @@ export const NtosRevelation = (props, context) => {
content="ACTIVATE"
textAlign="center"
color="bad"
disabled={!data.armed}
/>
disabled={!data.armed} />
</Section>
</NtosWindow.Content>
</NtosWindow>
@@ -15,7 +15,10 @@ export const NtosRoboControl = (props, context) => {
has_id,
} = data;
return (
<NtosWindow resizable>
<NtosWindow
width={550}
height={550}
resizable>
<NtosWindow.Content scrollable>
<Section title="Robot Control Console">
<LabeledList>
@@ -5,7 +5,10 @@ import { NtosWindow } from '../layouts';
export const NtosShipping = (props, context) => {
const { act, data } = useBackend(context);
return (
<NtosWindow resizable>
<NtosWindow
width={450}
height={350}
resizable>
<NtosWindow.Content scrollable>
<Section
title="NTOS Shipping Hub."
@@ -3,7 +3,10 @@ import { StationAlertConsoleContent } from './StationAlertConsole';
export const NtosStationAlertConsole = () => {
return (
<NtosWindow resizable>
<NtosWindow
width={315}
height={500}
resizable>
<NtosWindow.Content scrollable>
<StationAlertConsoleContent />
</NtosWindow.Content>

Some files were not shown because too many files have changed in this diff Show More