mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 14:07:51 +01:00
SMESes now connect when built, and report if they're connected. (#24354)
This commit is contained in:
@@ -44,6 +44,9 @@
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
|
||||
// When (re)built, try to connect to the powernet under us.
|
||||
connect_to_network()
|
||||
|
||||
dir_loop:
|
||||
for(var/d in GLOB.cardinal)
|
||||
var/turf/T = get_step(src, d)
|
||||
@@ -275,7 +278,7 @@
|
||||
inputting = FALSE
|
||||
|
||||
//outputting
|
||||
if(output_attempt)
|
||||
if(output_attempt && powernet)
|
||||
if(outputting)
|
||||
output_used = min( charge/SMESRATE, output_level) //limit output to that stored
|
||||
if(produce_direct_power(output_used)) // add output to powernet if it exists (smes side)
|
||||
@@ -361,6 +364,7 @@
|
||||
"inputLevel_text" = DisplayPower(input_level),
|
||||
"inputLevelMax" = input_level_max,
|
||||
"inputAvailable" = input_available,
|
||||
"outputPowernet" = !isnull(powernet),
|
||||
"outputAttempt" = output_attempt,
|
||||
"outputting" = outputting,
|
||||
"outputLevel" = output_level,
|
||||
|
||||
@@ -25,6 +25,7 @@ export const Smes = (props, context) => {
|
||||
inputLevel,
|
||||
inputLevelMax,
|
||||
inputAvailable,
|
||||
outputPowernet,
|
||||
outputAttempt,
|
||||
outputting,
|
||||
outputLevel,
|
||||
@@ -149,11 +150,13 @@ export const Smes = (props, context) => {
|
||||
}
|
||||
>
|
||||
<Box color={outputState}>
|
||||
{outputting
|
||||
? 'Sending'
|
||||
: charge > 0
|
||||
? 'Not Sending'
|
||||
: 'No Charge'}
|
||||
{outputPowernet
|
||||
? outputting
|
||||
? 'Sending'
|
||||
: charge > 0
|
||||
? 'Not Sending'
|
||||
: 'No Charge'
|
||||
: 'Not Connected'}
|
||||
</Box>
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Target Output">
|
||||
|
||||
+38
-38
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user