1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-03-03 14:53:01 +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_last_position = {}
local player_death_causes = {} local player_death_causes = {}
Global.register({ Global.register(
player_last_position = player_last_position, {
player_death_causes = player_death_causes player_last_position = player_last_position,
}, function(tbl) player_death_causes = player_death_causes
player_last_position = tbl.player_last_position },
player_death_causes = tbl.player_death_causes function(tbl)
end) 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 --- When the player first logs on, initialize their stats and pull their former playtime
local function player_created(event) local function player_created(event)
@ -189,10 +191,8 @@ Event.on_nth_tick(62, tick)
local Public = {} local Public = {}
-- Returns a dictionary of cause_name -> count -- Returns a dictionary of cause_name -> count
--function Public.get_all_death_causes_by_player(player_index) function Public.get_all_death_causes_by_player(player_index)
-- return player_death_causes[player_index] or {} return player_death_causes[player_index] or {}
--end
function Public.get_all_death_causes_by_player()
return {}
end end
return Public return Public