mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
[MIRROR] AtmoZphere (tablet program) will show the tile's temperature as both °C and K now. [MDB IGNORE] (#9231)
* AtmoZphere also display the temperature in K (#62533) * AtmoZphere (tablet program) will show the tile's temperature as both °C and K now. Co-authored-by: GuillaumePrata <55374212+GuillaumePrata@users.noreply.github.com>
This commit is contained in:
co-authored by
GuillaumePrata
parent
e58e0a12fb
commit
199f4d7e2b
@@ -27,7 +27,8 @@
|
||||
var/pressure = environment.return_pressure()
|
||||
var/total_moles = environment.total_moles()
|
||||
data["AirPressure"] = round(pressure,0.1)
|
||||
data["AirTemp"] = round(environment.temperature-T0C)
|
||||
data["AirTempC"] = round(environment.temperature-T0C)
|
||||
data["AirTempK"] = round(environment.temperature)
|
||||
if (total_moles)
|
||||
for(var/id in env_gases)
|
||||
var/gas_level = env_gases[id][MOLES]/total_moles
|
||||
@@ -36,7 +37,8 @@
|
||||
data["AirData"] = airlist
|
||||
else
|
||||
data["AirPressure"] = 0
|
||||
data["AirTemp"] = 0
|
||||
data["AirTempC"] = 0
|
||||
data["AirTempK"] = 0
|
||||
data["AirData"] = list(list())
|
||||
return data
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ import { NtosWindow } from '../layouts';
|
||||
export const NtosAtmos = (props, context) => {
|
||||
const { act, data } = useBackend(context);
|
||||
const {
|
||||
AirTemp,
|
||||
AirTempC,
|
||||
AirTempK,
|
||||
AirPressure,
|
||||
} = data;
|
||||
const gases = flow([
|
||||
@@ -25,7 +26,7 @@ export const NtosAtmos = (props, context) => {
|
||||
<Section>
|
||||
<LabeledList>
|
||||
<LabeledList.Item label="Temperature">
|
||||
{AirTemp}°C
|
||||
{AirTempC}°C | {AirTempK}K
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Pressure">
|
||||
{AirPressure} kPa
|
||||
|
||||
Reference in New Issue
Block a user