mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Power monitor update
This commit is contained in:
Vendored
+3
-3
@@ -18,10 +18,10 @@ var/global/datum/repository/apc/apc_repository = new()
|
||||
var/obj/machinery/power/apc/A = term.master
|
||||
L += A
|
||||
|
||||
var/list/Status = list(0,0,1,1) // Status: off, auto-off, on, auto-on
|
||||
var/list/chg = list(0,1,1) // Charging: no, charging, full
|
||||
var/list/Status = list("Off","AOff","On","AOn") // Status: off, auto-off, on, auto-on
|
||||
var/list/chg = list("N","C","F") // Charging: no, charging, full
|
||||
for(var/obj/machinery/power/apc/A in L)
|
||||
apcData[++apcData.len] = list("Name" = html_encode(A.area.name), "Equipment" = Status[A.equipment+1], "Lights" = Status[A.lighting+1], "Environment" = Status[A.environ+1], "CellPct" = A.cell ? round(A.cell.percent(),1) : -1, "CellStatus" = A.cell ? chg[A.charging+1] : 0)
|
||||
apcData[++apcData.len] = list("Name" = html_encode(A.area.name), "Equipment" = Status[A.equipment+1], "Lights" = Status[A.lighting+1], "Environment" = Status[A.environ+1], "CellPct" = A.cell ? round(A.cell.percent(),1) : "M", "CellStatus" = A.cell ? chg[A.charging+1] : "M", "Load" = round(A.lastused_total,1))
|
||||
|
||||
cache_entry.timestamp = world.time + 5 SECONDS
|
||||
cache_entry.data = apcData
|
||||
|
||||
Reference in New Issue
Block a user