Added english locale
This commit is contained in:
12
control.lua
12
control.lua
@@ -34,7 +34,7 @@ script.on_init(function ()
|
|||||||
storage.labs = {}
|
storage.labs = {}
|
||||||
sendIndex = 0
|
sendIndex = 0
|
||||||
|
|
||||||
options.enableMod = settings.global["factorio-prometheus-exporter-exporter_enable"].value
|
options.enableMod = settings.global["factorio-prometheus-exporter-enable"].value
|
||||||
options.enableProduction = settings.global["factorio-prometheus-exporter-export_production_stats"].value
|
options.enableProduction = settings.global["factorio-prometheus-exporter-export_production_stats"].value
|
||||||
options.enablePollution = settings.global["factorio-prometheus-exporter-export_pollution_stats"].value
|
options.enablePollution = settings.global["factorio-prometheus-exporter-export_pollution_stats"].value
|
||||||
options.enableFluid = settings.global["factorio-prometheus-exporter-export_fluid_stats"].value
|
options.enableFluid = settings.global["factorio-prometheus-exporter-export_fluid_stats"].value
|
||||||
@@ -42,7 +42,7 @@ script.on_init(function ()
|
|||||||
options.enableKills = settings.global["factorio-prometheus-exporter-export_kill_stats"].value
|
options.enableKills = settings.global["factorio-prometheus-exporter-export_kill_stats"].value
|
||||||
options.enablePower = settings.global["factorio-prometheus-exporter-export_power_stats"].value
|
options.enablePower = settings.global["factorio-prometheus-exporter-export_power_stats"].value
|
||||||
options.enableResearch = settings.global["factorio-prometheus-exporter-export_research_stats"].value
|
options.enableResearch = settings.global["factorio-prometheus-exporter-export_research_stats"].value
|
||||||
options.enableRobots = settings.global["factorio-prometheus-exporter_export_logistic_stats"].value
|
options.enableRobots = settings.global["factorio-prometheus-exporter-export_logistic_stats"].value
|
||||||
|
|
||||||
|
|
||||||
end)
|
end)
|
||||||
@@ -52,7 +52,7 @@ script.on_load(function ()
|
|||||||
log("tickInterval: "..tickInterval)
|
log("tickInterval: "..tickInterval)
|
||||||
log("udpAddress: "..udpAddress)
|
log("udpAddress: "..udpAddress)
|
||||||
|
|
||||||
options.enableMod = settings.global["factorio-prometheus-exporter-exporter_enable"].value
|
options.enableMod = settings.global["factorio-prometheus-exporter-enable"].value
|
||||||
options.enableProduction = settings.global["factorio-prometheus-exporter-export_production_stats"].value
|
options.enableProduction = settings.global["factorio-prometheus-exporter-export_production_stats"].value
|
||||||
options.enablePollution = settings.global["factorio-prometheus-exporter-export_pollution_stats"].value
|
options.enablePollution = settings.global["factorio-prometheus-exporter-export_pollution_stats"].value
|
||||||
options.enableFluid = settings.global["factorio-prometheus-exporter-export_fluid_stats"].value
|
options.enableFluid = settings.global["factorio-prometheus-exporter-export_fluid_stats"].value
|
||||||
@@ -60,11 +60,10 @@ script.on_load(function ()
|
|||||||
options.enableKills = settings.global["factorio-prometheus-exporter-export_kill_stats"].value
|
options.enableKills = settings.global["factorio-prometheus-exporter-export_kill_stats"].value
|
||||||
options.enablePower = settings.global["factorio-prometheus-exporter-export_power_stats"].value
|
options.enablePower = settings.global["factorio-prometheus-exporter-export_power_stats"].value
|
||||||
options.enableResearch = settings.global["factorio-prometheus-exporter-export_research_stats"].value
|
options.enableResearch = settings.global["factorio-prometheus-exporter-export_research_stats"].value
|
||||||
options.enableRobots = settings.global["factorio-prometheus-exporter_export_logistic_stats"].value
|
options.enableRobots = settings.global["factorio-prometheus-exporter-export_logistic_stats"].value
|
||||||
end)
|
end)
|
||||||
|
|
||||||
script.on_configuration_changed(function()
|
script.on_configuration_changed(function()
|
||||||
|
|
||||||
storage.electricGrids = storage.electricGrids or {}
|
storage.electricGrids = storage.electricGrids or {}
|
||||||
storage.labs = storage.labs or {}
|
storage.labs = storage.labs or {}
|
||||||
storage.playerDeathCount = storage.playerDeathCount or {}
|
storage.playerDeathCount = storage.playerDeathCount or {}
|
||||||
@@ -72,7 +71,6 @@ script.on_configuration_changed(function()
|
|||||||
storage.totalLabCount = storage.totalLabCount or 0
|
storage.totalLabCount = storage.totalLabCount or 0
|
||||||
storage.totalReseachProductivity = storage.totalReseachProductivity or 0
|
storage.totalReseachProductivity = storage.totalReseachProductivity or 0
|
||||||
storage.totalResearchSpeed = storage.totalResearchSpeed or 0
|
storage.totalResearchSpeed = storage.totalResearchSpeed or 0
|
||||||
|
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -110,7 +108,6 @@ script.on_event(defines.events.on_runtime_mod_setting_changed, function(event)
|
|||||||
options.enablePlayers = settings.global["factorio-prometheus-exporter-export_player_stats"].value
|
options.enablePlayers = settings.global["factorio-prometheus-exporter-export_player_stats"].value
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if event.setting == "factorio-prometheus-exporter-export_kill_stats" then
|
if event.setting == "factorio-prometheus-exporter-export_kill_stats" then
|
||||||
options.enableKills = settings.global["factorio-prometheus-exporter-export_kill_stats"].value
|
options.enableKills = settings.global["factorio-prometheus-exporter-export_kill_stats"].value
|
||||||
end
|
end
|
||||||
@@ -187,3 +184,4 @@ script.on_event(defines.events.on_robot_mined_entity,PurgeNetworks,{{filter = "t
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[mod-setting-name]
|
||||||
|
factorio-prometheus-exporter-export_production_stats = Enable ProductionD
|
||||||
|
factorio-prometheus-exporter-export_logistic_stats=Enable LogisticsD
|
||||||
|
factorio-prometheus-exporter-export_pollution_stats=Enable PollutionD
|
||||||
|
[mod-setting-description]
|
||||||
|
factorio-prometheus-exporter-export_production_stats = Enables sending of the production statistics per surface. Not very expensive
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
[mod-setting-name]
|
||||||
|
factorio-prometheus-exporter-enable=Enable Mod
|
||||||
|
factorio-prometheus-exporter-tick-interval=Tick Interval
|
||||||
|
factorio-prometheus-exporter-udp-address=UDP Port
|
||||||
|
factorio-prometheus-exporter-export_production_stats=Enable Production
|
||||||
|
factorio-prometheus-exporter-export_fluid_stats=Enable Fluids
|
||||||
|
factorio-prometheus-exporter-export_logistic_stats=Enable Logistics
|
||||||
|
factorio-prometheus-exporter-export_pollution_stats=Enable Pollution
|
||||||
|
factorio-prometheus-exporter-export_kill_stats=Enable Kills
|
||||||
|
factorio-prometheus-exporter-export_research_stats=Enable Research
|
||||||
|
factorio-prometheus-exporter-export_power_stats=Enable Power
|
||||||
|
factorio-prometheus-exporter-export_player_stats=Enable Player
|
||||||
|
factorio-prometheus-exporter-export_train_stats=Enable Train
|
||||||
|
[mod-setting-description]
|
||||||
|
factorio-prometheus-exporter-export_production_stats=Enables sending of the production statistics per surface. Not very expensive
|
||||||
|
factorio-prometheus-exporter-enable=Enable sending of the UDP packets
|
||||||
|
factorio-prometheus-exporter-tick-interval=Set the tick interval at which metrics are collected
|
||||||
|
factorio-prometheus-exporter-udp-address=Choose a udp port to send the data to, must be enable with --enable-lua-udp <sending_port> when starting factorio. It is important to use a different port the target port!
|
||||||
|
factorio-prometheus-exporter-export_fluid_stats=Enables the sending of fluid production statistics. Not very expensive
|
||||||
|
factorio-prometheus-exporter-export_logistic_stats=Enables sending of logistic network statistics. Moderatly expensive
|
||||||
|
factorio-prometheus-exporter-export_pollution_stats=Enable sending of Pollution related statistics. Not very expensive
|
||||||
|
factorio-prometheus-exporter-export_kill_stats=Enable sending of kill statistics. Not very expensive
|
||||||
|
factorio-prometheus-exporter-export_research_stats=Enable sending of research statistics. Moderatly expensive
|
||||||
|
factorio-prometheus-exporter-export_power_stats=Enable Power. Not yet implemented!
|
||||||
|
factorio-prometheus-exporter-export_player_stats=Enable sending of player statistics
|
||||||
|
factorio-prometheus-exporter-export_train_stats=Enable sending of train statistics. Not yet implemented!
|
||||||
@@ -14,6 +14,7 @@ function GenerateLabInfo()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
LabsScanned = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
10
settings.lua
10
settings.lua
@@ -16,7 +16,7 @@ data:extend({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type = "int-setting",
|
type = "int-setting",
|
||||||
name = "factorio-prometheus-exporter-udp-address",
|
name = "factorio-prometheus-exporter-udp-port",
|
||||||
setting_type = "startup",
|
setting_type = "startup",
|
||||||
allow_blank = false,
|
allow_blank = false,
|
||||||
default_value = 52555,
|
default_value = 52555,
|
||||||
@@ -77,5 +77,13 @@ data:extend({
|
|||||||
setting_type = "runtime-global",
|
setting_type = "runtime-global",
|
||||||
default_value = true,
|
default_value = true,
|
||||||
order = "i"
|
order = "i"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "bool-setting",
|
||||||
|
name = "factorio-prometheus-exporter-export_train_stats",
|
||||||
|
setting_type = "runtime-global",
|
||||||
|
default_value = true,
|
||||||
|
order = "i"
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user