fixes the airlock power buttons for silicons (#76574)

## About The Pull Request

both values tend to be null or 0

## Why It's Good For The Game

fixes #76571

## Changelog
🆑
fix: silicons can depower airlocks via their UI again
/🆑
This commit is contained in:
jimmyl
2023-07-06 11:54:22 -06:00
committed by GitHub
parent d9205ec0ce
commit 2fda4b99fc
+4 -4
View File
@@ -1569,9 +1569,9 @@
var/list/power = list()
power["main"] = remaining_main_outage() ? 0 : 2 // boolean
power["main_timeleft"] = remaining_main_outage()
power["main_timeleft"] = round(remaining_main_outage() / 10)
power["backup"] = remaining_backup_outage() ? 0 : 2 // boolean
power["backup_timeleft"] = remaining_backup_outage()
power["backup_timeleft"] = round(remaining_backup_outage() / 10)
data["power"] = power
data["shock"] = secondsElectrified == MACHINE_NOT_ELECTRIFIED ? 2 : 0
@@ -1609,14 +1609,14 @@
return
switch(action)
if("disrupt-main")
if(remaining_main_outage())
if(!main_power_timer)
loseMainPower()
update_appearance()
else
to_chat(usr, span_warning("Main power is already offline."))
. = TRUE
if("disrupt-backup")
if(remaining_backup_outage())
if(!backup_power_timer)
loseBackupPower()
update_appearance()
else