Add train stats export option and update version to 0.1.18
This commit is contained in:
@@ -59,6 +59,7 @@ script.on_init(function ()
|
||||
options.enablePower = settings.global["factorio-metrics-exporter-export_power_stats"].value
|
||||
options.enableResearch = settings.global["factorio-metrics-exporter-export_research_stats"].value
|
||||
options.enableRobots = settings.global["factorio-metrics-exporter-export_logistic_stats"].value
|
||||
options.enableTrains = settings.global["factorio-metrics-exporter-export_train_stats"].value
|
||||
|
||||
|
||||
end)
|
||||
@@ -77,6 +78,7 @@ script.on_load(function ()
|
||||
options.enablePower = settings.global["factorio-metrics-exporter-export_power_stats"].value
|
||||
options.enableResearch = settings.global["factorio-metrics-exporter-export_research_stats"].value
|
||||
options.enableRobots = settings.global["factorio-metrics-exporter-export_logistic_stats"].value
|
||||
options.enableTrains = settings.global["factorio-metrics-exporter-export_train_stats"].value
|
||||
end)
|
||||
|
||||
script.on_configuration_changed(function()
|
||||
@@ -144,6 +146,9 @@ script.on_event(defines.events.on_runtime_mod_setting_changed, function(event)
|
||||
if event.setting == "factorio-metrics-exporter-export_research_stats" then
|
||||
options.enableResearch = settings.global["factorio-metrics-exporter-export_research_stats"].value
|
||||
end
|
||||
if event.setting == "factorio-metrics-exporter-export_train_stats" then
|
||||
options.enableTrains = settings.global["factorio-metrics-exporter-export_train_stats"].value
|
||||
end
|
||||
|
||||
end)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "factorio-metrics-exporter",
|
||||
"version": "0.1.17",
|
||||
"version": "0.1.18",
|
||||
"title": "Prometheus Metrics Exporter",
|
||||
"author": "Jan Grießhaber",
|
||||
"contact": "jan@griesshaber.systems",
|
||||
|
||||
@@ -19,7 +19,7 @@ end
|
||||
|
||||
function GetLogisticNetworkContents()
|
||||
local resultParts = {}
|
||||
resultParts[#resultParts+1] = "---logistic-grids-contents---\n"
|
||||
resultParts[#resultParts+1] = "---logistic-grids-contents---\n"
|
||||
for _,surface in pairs(game.surfaces) do
|
||||
local grids = game.forces["player"].logistic_networks[surface.name]
|
||||
for _,grid in pairs(grids) do
|
||||
|
||||
Reference in New Issue
Block a user