mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-02-09 13:37:02 +02:00
Added safety checks.
Added: if play_table then if play_table[player.name] then t = play_table[player.name] end end
This commit is contained in:
parent
1f69e21f11
commit
2b76400228
@ -87,8 +87,9 @@ end
|
||||
local function get_rank(player)
|
||||
local play_table = play_time.get_session_table()
|
||||
|
||||
local t = play_table[player.name]
|
||||
|
||||
if play_table then
|
||||
if play_table[player.name] then t = play_table[player.name] end
|
||||
end
|
||||
|
||||
local m = (player.online_time + t) / 3600
|
||||
|
||||
@ -138,7 +139,9 @@ local function get_sorted_list(sort_by)
|
||||
player_list[i].name = player.name
|
||||
|
||||
|
||||
t = play_table[player.name]
|
||||
if play_table then
|
||||
if play_table[player.name] then t = play_table[player.name] end
|
||||
end
|
||||
|
||||
player_list[i].total_played_time = get_formatted_playtime(t + player.online_time)
|
||||
player_list[i].total_played_ticks = t + player.online_time
|
||||
|
Loading…
x
Reference in New Issue
Block a user