mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-09 16:07:40 +00:00
filter
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
desc = "Very useful for filtering gasses."
|
desc = "Very useful for filtering gasses."
|
||||||
|
|
||||||
can_unwrench = TRUE
|
can_unwrench = TRUE
|
||||||
|
|
||||||
var/transfer_rate = MAX_TRANSFER_RATE
|
var/transfer_rate = MAX_TRANSFER_RATE
|
||||||
var/filter_type = null
|
var/filter_type = null
|
||||||
var/frequency = 0
|
var/frequency = 0
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export const AtmosFilter = (props, context) => {
|
|||||||
return (
|
return (
|
||||||
<Window
|
<Window
|
||||||
width={390}
|
width={390}
|
||||||
height={187}>
|
height={221}>
|
||||||
<Window.Content>
|
<Window.Content>
|
||||||
<Section>
|
<Section>
|
||||||
<LabeledList>
|
<LabeledList>
|
||||||
@@ -27,7 +27,7 @@ export const AtmosFilter = (props, context) => {
|
|||||||
width="63px"
|
width="63px"
|
||||||
unit="L/s"
|
unit="L/s"
|
||||||
minValue={0}
|
minValue={0}
|
||||||
maxValue={200}
|
maxValue={data.max_rate}
|
||||||
onDrag={(e, value) => act('rate', {
|
onDrag={(e, value) => act('rate', {
|
||||||
rate: value,
|
rate: value,
|
||||||
})} />
|
})} />
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export const AtmosMixer = (props, context) => {
|
|||||||
unit="kPa"
|
unit="kPa"
|
||||||
width="75px"
|
width="75px"
|
||||||
minValue={0}
|
minValue={0}
|
||||||
maxValue={4500}
|
maxValue={data.max_pressure}
|
||||||
step={10}
|
step={10}
|
||||||
onChange={(e, value) => act('pressure', {
|
onChange={(e, value) => act('pressure', {
|
||||||
pressure: value,
|
pressure: value,
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export const AtmosPump = (props, context) => {
|
|||||||
width="63px"
|
width="63px"
|
||||||
unit="L/s"
|
unit="L/s"
|
||||||
minValue={0}
|
minValue={0}
|
||||||
maxValue={200}
|
maxValue={data.max_rate}
|
||||||
onChange={(e, value) => act('rate', {
|
onChange={(e, value) => act('rate', {
|
||||||
rate: value,
|
rate: value,
|
||||||
})} />
|
})} />
|
||||||
@@ -47,7 +47,7 @@ export const AtmosPump = (props, context) => {
|
|||||||
unit="kPa"
|
unit="kPa"
|
||||||
width="75px"
|
width="75px"
|
||||||
minValue={0}
|
minValue={0}
|
||||||
maxValue={4500}
|
maxValue={data.max_pressure}
|
||||||
step={10}
|
step={10}
|
||||||
onChange={(e, value) => act('pressure', {
|
onChange={(e, value) => act('pressure', {
|
||||||
pressure: value,
|
pressure: value,
|
||||||
|
|||||||
47
tgui/packages/tgui/interfaces/AtmosTempGate.js
Normal file
47
tgui/packages/tgui/interfaces/AtmosTempGate.js
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import { useBackend } from '../backend';
|
||||||
|
import { Button, LabeledList, NumberInput, Section } from '../components';
|
||||||
|
import { Window } from '../layouts';
|
||||||
|
|
||||||
|
export const AtmosTempGate = (props, context) => {
|
||||||
|
const { act, data } = useBackend(context);
|
||||||
|
return (
|
||||||
|
<Window
|
||||||
|
width={335}
|
||||||
|
height={115}>
|
||||||
|
<Window.Content>
|
||||||
|
<Section>
|
||||||
|
<LabeledList>
|
||||||
|
<LabeledList.Item label="Power">
|
||||||
|
<Button
|
||||||
|
icon={data.on ? 'power-off' : 'times'}
|
||||||
|
content={data.on ? 'On' : 'Off'}
|
||||||
|
selected={data.on}
|
||||||
|
onClick={() => act('power')} />
|
||||||
|
</LabeledList.Item>
|
||||||
|
<LabeledList.Item label="Heat settings">
|
||||||
|
<NumberInput
|
||||||
|
animated
|
||||||
|
value={parseFloat(data.temperature)}
|
||||||
|
unit="K"
|
||||||
|
width="75px"
|
||||||
|
minValue={data.min_temperature}
|
||||||
|
maxValue={data.max_temperature}
|
||||||
|
step={1}
|
||||||
|
onChange={(e, value) => act('temperature', {
|
||||||
|
temperature: value,
|
||||||
|
})} />
|
||||||
|
<Button
|
||||||
|
ml={1}
|
||||||
|
icon="plus"
|
||||||
|
content="Max"
|
||||||
|
disabled={data.temperature === data.max_temperature}
|
||||||
|
onClick={() => act('temperature', {
|
||||||
|
temperature: 'max',
|
||||||
|
})} />
|
||||||
|
</LabeledList.Item>
|
||||||
|
</LabeledList>
|
||||||
|
</Section>
|
||||||
|
</Window.Content>
|
||||||
|
</Window>
|
||||||
|
);
|
||||||
|
};
|
||||||
47
tgui/packages/tgui/interfaces/AtmosTempPump.js
Normal file
47
tgui/packages/tgui/interfaces/AtmosTempPump.js
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
import { useBackend } from '../backend';
|
||||||
|
import { Button, LabeledList, NumberInput, Section } from '../components';
|
||||||
|
import { Window } from '../layouts';
|
||||||
|
|
||||||
|
export const AtmosTempPump = (props, context) => {
|
||||||
|
const { act, data } = useBackend(context);
|
||||||
|
return (
|
||||||
|
<Window
|
||||||
|
width={335}
|
||||||
|
height={115}>
|
||||||
|
<Window.Content>
|
||||||
|
<Section>
|
||||||
|
<LabeledList>
|
||||||
|
<LabeledList.Item label="Power">
|
||||||
|
<Button
|
||||||
|
icon={data.on ? 'power-off' : 'times'}
|
||||||
|
content={data.on ? 'On' : 'Off'}
|
||||||
|
selected={data.on}
|
||||||
|
onClick={() => act('power')} />
|
||||||
|
</LabeledList.Item>
|
||||||
|
<LabeledList.Item label="Heat transfer rate">
|
||||||
|
<NumberInput
|
||||||
|
animated
|
||||||
|
value={parseFloat(data.rate)}
|
||||||
|
unit="K/s"
|
||||||
|
width="75px"
|
||||||
|
minValue={0}
|
||||||
|
maxValue={data.max_heat_transfer_rate}
|
||||||
|
step={1}
|
||||||
|
onChange={(e, value) => act('rate', {
|
||||||
|
rate: value,
|
||||||
|
})} />
|
||||||
|
<Button
|
||||||
|
ml={1}
|
||||||
|
icon="plus"
|
||||||
|
content="Max"
|
||||||
|
disabled={data.rate === data.max_heat_transfer_rate}
|
||||||
|
onClick={() => act('rate', {
|
||||||
|
rate: 'max',
|
||||||
|
})} />
|
||||||
|
</LabeledList.Item>
|
||||||
|
</LabeledList>
|
||||||
|
</Section>
|
||||||
|
</Window.Content>
|
||||||
|
</Window>
|
||||||
|
);
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user