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