mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
Made fermichem displays work correctly. (#13577)
This commit is contained in:
@@ -107,7 +107,7 @@
|
|||||||
data["beakerMaxVolume"] = beaker ? beaker.volume : null
|
data["beakerMaxVolume"] = beaker ? beaker.volume : null
|
||||||
//purity and pH accuracy
|
//purity and pH accuracy
|
||||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||||
data["partRating"]= 10**(M.rating-1)
|
data["partRating"]= M.rating
|
||||||
if(M.rating == 4)
|
if(M.rating == 4)
|
||||||
data["showPurity"] = 1
|
data["showPurity"] = 1
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -182,6 +182,13 @@ export const ChemDispenser = (props, context) => {
|
|||||||
units of {chemical.name}
|
units of {chemical.name}
|
||||||
</Box>
|
</Box>
|
||||||
))}
|
))}
|
||||||
|
<Box
|
||||||
|
key={"pH"}>
|
||||||
|
pH:
|
||||||
|
<AnimatedNumber
|
||||||
|
initial={7.0}
|
||||||
|
value={data.beakerCurrentpH} />
|
||||||
|
</Box>
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
</LabeledList>
|
</LabeledList>
|
||||||
</Section>
|
</Section>
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ export const ChemHeater = (props, context) => {
|
|||||||
beakerCurrentVolume,
|
beakerCurrentVolume,
|
||||||
beakerMaxVolume,
|
beakerMaxVolume,
|
||||||
beakerContents = [],
|
beakerContents = [],
|
||||||
currentpH,
|
|
||||||
} = data;
|
} = data;
|
||||||
return (
|
return (
|
||||||
<Window
|
<Window
|
||||||
@@ -64,8 +63,7 @@ export const ChemHeater = (props, context) => {
|
|||||||
buttons={!!isBeakerLoaded && (
|
buttons={!!isBeakerLoaded && (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Box inline color="label" mr={2}>
|
<Box inline color="label" mr={2}>
|
||||||
{beakerCurrentVolume} / {beakerMaxVolume} units,
|
{beakerCurrentVolume} / {beakerMaxVolume} units
|
||||||
{data.currentpH} pH
|
|
||||||
</Box>
|
</Box>
|
||||||
<Button
|
<Button
|
||||||
icon="eject"
|
icon="eject"
|
||||||
@@ -76,6 +74,7 @@ export const ChemHeater = (props, context) => {
|
|||||||
<BeakerContents
|
<BeakerContents
|
||||||
beakerLoaded={isBeakerLoaded}
|
beakerLoaded={isBeakerLoaded}
|
||||||
beakerContents={beakerContents} />
|
beakerContents={beakerContents} />
|
||||||
|
<Box key="pH" color="label">{Number(data.currentpH).toFixed(data.partRating)} pH</Box>
|
||||||
</Section>
|
</Section>
|
||||||
</Window.Content>
|
</Window.Content>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export const BeakerContents = props => {
|
|||||||
)}
|
)}
|
||||||
{beakerContents.map(chemical => (
|
{beakerContents.map(chemical => (
|
||||||
<Box key={chemical.name} color="label">
|
<Box key={chemical.name} color="label">
|
||||||
{chemical.volume} units of {chemical.name}
|
{chemical.volume} units of {chemical.name} {chemical.purity < 1 && "(Purity: "+chemical.purity+")"}
|
||||||
</Box>
|
</Box>
|
||||||
))}
|
))}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user