fix(graftorio): config issues

This commit is contained in:
oof2win2 committed 2022-05-14 22:29:11 +02:00
1 parent 8195107572
commit 2c21f989ae
3 files changed
+13 -8

No files matched your search

+7 -4
View File
@@ -1,12 +1,14 @@
local Commands = require("expcore.commands")
local config = require("config.graftorio")
local general = require("modules.graftorio.general")
local statics = require("modules.graftorio.statics")
local forcestats = {}
local forcestats = nil
local general = nil
if config.modules.forcestats then
forcestats = require("modules.graftorio.forcestats")
end
if config.modules.general then
general = require("modules.graftorio.general")
end
Commands.new_command("collectdata", "Collect data for RCON usage")
:add_param("location", true)
@@ -14,9 +16,10 @@ Commands.new_command("collectdata", "Collect data for RCON usage")
-- this must be first as it overwrites the stats
-- also makes the .other table for all forces
statics.collect_statics()
general.collect_other()
if config.modules.general then general.collect_other() end
if config.modules.forcestats then
forcestats.collect_production()
forcestats.collect_loginet()
end
rcon.print(game.table_to_json(general.data.output))
return Commands.success()