From f34b3d3ebe7b9ea69afa3c5f2ec94498df4181af Mon Sep 17 00:00:00 2001 From: dwasint <82520990+dwasint@users.noreply.github.com> Date: Wed, 1 May 2024 19:06:00 -0400 Subject: [PATCH] adds power tracking --- .../code/modules/metrics/subsystem_analytics/generics.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/monkestation/code/modules/metrics/subsystem_analytics/generics.dm b/monkestation/code/modules/metrics/subsystem_analytics/generics.dm index 0a806c365c6e..f8154ed148b6 100644 --- a/monkestation/code/modules/metrics/subsystem_analytics/generics.dm +++ b/monkestation/code/modules/metrics/subsystem_analytics/generics.dm @@ -33,6 +33,14 @@ . = ..() var/list/cust = list() cust["processing_machines"] = length(processing) + cust["total_power_used"] = 0 + cust["total_excess_power"] = 0 + cust["total_power"] = 0 + for(var/datum/powernet/powernet in powernets) + cust["total_excess_power"] += powernet.netexcess + cust["total_power_used"] += powernet.load + cust["total_power"] += powernet.avail + .["custom"] = cust /datum/controller/subsystem/mobs/get_metrics()