From 8470a11f6fd20c8c27be0fbe1505b71112f08865 Mon Sep 17 00:00:00 2001 From: XeonMations Date: Tue, 30 Jul 2024 22:12:59 +0300 Subject: [PATCH] integrity viewing + tuned down power generation --- code/modules/power/rbmk/_rbmk_defines.dm | 2 +- code/modules/power/rbmk/rbmk_core.dm | 2 +- code/modules/power/rbmk/rbmk_monitoring.dm | 2 + .../tgui/interfaces/NtosGhostRbmkStats.js | 3 +- .../packages/tgui/interfaces/NtosRbmkStats.js | 2 + tgui/packages/tgui/interfaces/RbmkStats.js | 75 ------------------- 6 files changed, 8 insertions(+), 78 deletions(-) delete mode 100644 tgui/packages/tgui/interfaces/RbmkStats.js diff --git a/code/modules/power/rbmk/_rbmk_defines.dm b/code/modules/power/rbmk/_rbmk_defines.dm index 4c101cf1b49a5..f1c85033edd67 100644 --- a/code/modules/power/rbmk/_rbmk_defines.dm +++ b/code/modules/power/rbmk/_rbmk_defines.dm @@ -10,7 +10,7 @@ #define RBMK_MAX_CRITICALITY 3 //No more criticality than N for now. -#define RBMK_POWER_FLAVOURISER 8000 //To turn those KWs into something usable +#define RBMK_POWER_FLAVOURISER 800 //To turn those KWs into something usable #define WARNING_TIME_DELAY 60 //to prevent accent sounds from layering #define REACTOR_COUNTDOWN_TIME 30 SECONDS diff --git a/code/modules/power/rbmk/rbmk_core.dm b/code/modules/power/rbmk/rbmk_core.dm index ab71ea95ab978..f0058cb934a22 100644 --- a/code/modules/power/rbmk/rbmk_core.dm +++ b/code/modules/power/rbmk/rbmk_core.dm @@ -120,7 +120,7 @@ Remember kids. If the reactor itself is not physically powered by an APC, it can var/has_reached_emergency = FALSE ///Integrity of the machine, if reaches 900 the machine will explode. 1 so it doesnt stunlock itself and never change for damage calculations - var/critical_threshold_proximity = 1 + var/critical_threshold_proximity = 0 ///Store the integrity for calculations var/critical_threshold_proximity_archived = 0 ///Our "Shit is no longer fucked" message. We send it when critical_threshold_proximity is less then critical_threshold_proximity_archived diff --git a/code/modules/power/rbmk/rbmk_monitoring.dm b/code/modules/power/rbmk/rbmk_monitoring.dm index 713238097a7ca..cfe3811be2cd8 100644 --- a/code/modules/power/rbmk/rbmk_monitoring.dm +++ b/code/modules/power/rbmk/rbmk_monitoring.dm @@ -72,6 +72,7 @@ /datum/computer_file/program/nuclear_monitor/ui_data() var/list/data = list() + data["integrity"] = reactor ? reactor.get_integrity_percent() : 100 data["powerData"] = powerData data["kpaData"] = kpaData data["tempInputData"] = tempInputData @@ -141,6 +142,7 @@ /obj/machinery/atmospherics/components/unary/rbmk/core/ui_data() var/list/data = list() + data["integrity"] = get_integrity_percent() data["coolantInput"] = last_coolant_temperature data["coolantOutput"] = last_output_temperature data["power"] = power diff --git a/tgui/packages/tgui/interfaces/NtosGhostRbmkStats.js b/tgui/packages/tgui/interfaces/NtosGhostRbmkStats.js index ab5e0fdcecae5..3e9cdf08ec1af 100644 --- a/tgui/packages/tgui/interfaces/NtosGhostRbmkStats.js +++ b/tgui/packages/tgui/interfaces/NtosGhostRbmkStats.js @@ -17,9 +17,10 @@ export const NtosGhostRbmkStats = (props, context) => {
act('swap_reactor')} content="Change Reactor" />}> + Reactor Integrity (%): + Reactor Power (%): -
Reactor Pressure (KPA): {data.kpa} KPA diff --git a/tgui/packages/tgui/interfaces/NtosRbmkStats.js b/tgui/packages/tgui/interfaces/NtosRbmkStats.js index d4eada416a847..8d753c942810c 100644 --- a/tgui/packages/tgui/interfaces/NtosRbmkStats.js +++ b/tgui/packages/tgui/interfaces/NtosRbmkStats.js @@ -21,6 +21,8 @@ export const NtosRbmkStats = (props, context) => {
act('swap_reactor')} content="Change Reactor" />}> + Reactor Integrity (%): + Reactor Power (%):
diff --git a/tgui/packages/tgui/interfaces/RbmkStats.js b/tgui/packages/tgui/interfaces/RbmkStats.js deleted file mode 100644 index 7db5f505d4919..0000000000000 --- a/tgui/packages/tgui/interfaces/RbmkStats.js +++ /dev/null @@ -1,75 +0,0 @@ -// NSV13 - -import { map, sortBy } from 'common/collections'; -import { flow } from 'common/fp'; -import { toFixed } from 'common/math'; -import { pureComponentHooks } from 'common/react'; -import { Component, Fragment } from 'inferno'; -import { Box, Button, Chart, ColorBox, Flex, Icon, LabeledList, ProgressBar, Section, Table } from '../components'; -import { Window } from '../layouts'; -import { useBackend, useLocalState } from '../backend'; - -export const RbmkStats = (props, context) => { - const { act, data } = useBackend(context); - const powerData = data.powerData.map((value, i) => [i, value]); - const psiData = data.psiData.map((value, i) => [i, value]); - const tempInputData = data.tempInputData.map((value, i) => [i, value]); - const tempOutputdata = data.tempOutputdata.map((value, i) => [i, value]); - return ( - - -
- Reactor Power (%): - -
- Reactor Pressure (PSI): - - {data.psi} PSI - - Coolant temperature (°C): - - {data.coolantInput} °C - - Outlet temperature (°C): - - {data.coolantOutput} °C - -
-
- - - - -
-
-
- ); -};