Fixes DIV0

This commit is contained in:
AffectedArc07
2021-08-15 22:35:41 +01:00
parent ac9ff5359f
commit 51e22b45e0
+4 -1
View File
@@ -64,7 +64,10 @@ SUBSYSTEM_DEF(garbage)
/datum/controller/subsystem/garbage/get_metrics()
. = ..()
var/list/cust = list()
cust["gcr"] = (gcedlasttick / (delslasttick + gcedlasttick))
if((delslasttick + gcedlasttick) == 0) // Account for DIV0
cust["gcr"] = 0
else
cust["gcr"] = (gcedlasttick / (delslasttick + gcedlasttick))
cust["total_harddels"] = totaldels
cust["total_softdels"] = totalgcs
var/i = 0