mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-21 11:07:12 +01:00
Powering off unpowered but active cores/relays
This commit is contained in:
@@ -156,7 +156,11 @@
|
||||
continue
|
||||
// If another core is active, return FALSE
|
||||
if(C.active)
|
||||
return FALSE
|
||||
if(C.stat & NOPOWER) // If another core has no power but is supposed to be on, we shut it down so we can continue.
|
||||
C.active = FALSE // Since only one active core is allowed per z level, give priority to the one actually working.
|
||||
C.update_icon()
|
||||
else
|
||||
return FALSE
|
||||
// If we got here there isnt an active core on this Z-level. So return true
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -88,7 +88,11 @@
|
||||
continue
|
||||
// If another relay is active, return FALSE
|
||||
if(R.active)
|
||||
return FALSE
|
||||
if(R.stat & NOPOWER) // If another relay has no power but is supposed to be on, we shut it down so we can continue.
|
||||
R.active = FALSE // Since only one active relay is allowed per z level, give priority to the one that's actually working.
|
||||
R.update_icon()
|
||||
else
|
||||
return FALSE
|
||||
// If we got here there isnt an active relay on this Z-level. So return TRUE
|
||||
return TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user