Added event on player death with timestamp
Added english locale for combinator
This commit is contained in:
@@ -221,6 +221,8 @@ script.on_event(defines.events.on_player_died, function(event)
|
|||||||
end
|
end
|
||||||
--Log player death count
|
--Log player death count
|
||||||
storage.playerDeathCount[event.player_index] = (storage.playerDeathCount[event.player_index] or 0) + 1
|
storage.playerDeathCount[event.player_index] = (storage.playerDeathCount[event.player_index] or 0) + 1
|
||||||
|
|
||||||
|
onPlayerDeath(event)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -82,6 +82,10 @@ function GetPlayerDeaths()
|
|||||||
return table.concat(deathParts, "\n")
|
return table.concat(deathParts, "\n")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function onPlayerDeath(event)
|
||||||
|
helpers.send_udp(udpAddress,("---player-died---\n%s:%s:%d"):format(event.player_index,game.players[event.player_index].name,event.tick),serverIndex)
|
||||||
|
end
|
||||||
|
|
||||||
function GetPlayerDeathCauses()
|
function GetPlayerDeathCauses()
|
||||||
local deathParts = {}
|
local deathParts = {}
|
||||||
deathParts[#deathParts + 1] = "---player-death-cause---\n"
|
deathParts[#deathParts + 1] = "---player-death-cause---\n"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "factorio-metrics-exporter",
|
"name": "factorio-metrics-exporter",
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"title": "Prometheus Metrics Exporter",
|
"title": "Prometheus Metrics Exporter",
|
||||||
"author": "Jan Grießhaber",
|
"author": "Jan Grießhaber",
|
||||||
"contact": "jan@griesshaber.systems",
|
"contact": "jan@griesshaber.systems",
|
||||||
|
|||||||
@@ -32,3 +32,7 @@ factorio-metrics-exporter-enable_denkmalschutz=Enable the fun option of Denkmals
|
|||||||
factorio-metrics-exporter-autotrain_group_name=Set the name of the traingroup you want to use for the autotrain metric
|
factorio-metrics-exporter-autotrain_group_name=Set the name of the traingroup you want to use for the autotrain metric
|
||||||
factorio-metrics-exporter-autotrain_depot_name=Set the name of the depot you want to use for the autotrain metric
|
factorio-metrics-exporter-autotrain_depot_name=Set the name of the depot you want to use for the autotrain metric
|
||||||
factorio-metrics-exporter-export_train_trips=Enable sending of train trup statistics.
|
factorio-metrics-exporter-export_train_trips=Enable sending of train trup statistics.
|
||||||
|
[item-name]
|
||||||
|
metrics-combinator=Metrics combinator
|
||||||
|
[item-description]
|
||||||
|
metrics-combinator=Connect this item to a circuit network, set a name and check the enable checkbox to export the values of this circuit network
|
||||||
Reference in New Issue
Block a user