1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2024-12-12 10:04:40 +02:00

restored get_all_death_causes_by_player

This commit is contained in:
grilledham 2019-06-07 10:25:24 +01:00
parent a86df3917b
commit 68c9f0ccf2

View File

@ -47,14 +47,16 @@ local train_kill_causes = {
local player_last_position = {}
local player_death_causes = {}
Global.register({
player_last_position = player_last_position,
player_death_causes = player_death_causes
}, function(tbl)
player_last_position = tbl.player_last_position
player_death_causes = tbl.player_death_causes
end)
Global.register(
{
player_last_position = player_last_position,
player_death_causes = player_death_causes
},
function(tbl)
player_last_position = tbl.player_last_position
player_death_causes = tbl.player_death_causes
end
)
--- When the player first logs on, initialize their stats and pull their former playtime
local function player_created(event)
@ -189,10 +191,8 @@ Event.on_nth_tick(62, tick)
local Public = {}
-- Returns a dictionary of cause_name -> count
--function Public.get_all_death_causes_by_player(player_index)
-- return player_death_causes[player_index] or {}
--end
function Public.get_all_death_causes_by_player()
return {}
function Public.get_all_death_causes_by_player(player_index)
return player_death_causes[player_index] or {}
end
return Public