Private
Public Access
1
0

Added event on player death with timestamp

Added english locale for combinator
This commit is contained in:
Jan Grießhaber
2026-01-06 11:26:47 +01:00
parent d58c24b8d4
commit 765cd0bdd9
4 changed files with 12 additions and 2 deletions

View File

@@ -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)

View File

@@ -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"

View File

@@ -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",

View File

@@ -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