Private
Public Access
1
0

Fixed options

This commit is contained in:
Jan Grießhaber
2026-01-02 00:50:58 +01:00
parent 9256d2d317
commit d803bce9d3
7 changed files with 201 additions and 31 deletions

View File

@@ -1,7 +1,5 @@
function SendPollutionStats()
if not (settings.global["factorio-prometheus-exporter-export_pollution_stats"].value) then
return
end
if options.enablePollution then
local pollutionParts = {}
pollutionParts[#pollutionParts+1] = "---pollution-stats---\n"
for _,surface in pairs(game.surfaces) do
@@ -25,11 +23,10 @@ function SendPollutionStats()
end
helpers.send_udp(udpAddress, table.concat(pollutionParts,"\n"),serverIndex)
end
end
function SendKillStats()
if not (settings.global["factorio-prometheus-exporter-export_kill_stats"].value) then
return
end
if options.enableKills then
local killParts = {}
killParts[#killParts+1] = "---kill-stats---\n"
for _,surface in pairs(game.surfaces) do
@@ -52,4 +49,5 @@ function SendKillStats()
end
helpers.send_udp(udpAddress, table.concat(killParts,"\n"),serverIndex)
end
end