Skip to content

Commit

Permalink
playerdata clock string (#263)
Browse files Browse the repository at this point in the history
* Update statistics.lua

* Update playerdata.lua

* Update statistics.lua

* Update playerdata.lua

* Update playerdata.lua
  • Loading branch information
PHIDIAS0303 authored Dec 26, 2023
1 parent 4fc9fbe commit 7046a3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion modules/data/statistics.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ local function format_clock(value)
hours=true,
minutes=true,
seconds=false,
time=true
time=false,
string=true
})
end

Expand Down
7 changes: 4 additions & 3 deletions modules/gui/playerdata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ local function format_clock(value)
hours=true,
minutes=true,
seconds=false,
time=true
time=false,
string=true
})
end

Expand All @@ -44,7 +45,7 @@ local computed_stats = {
end
},
SessionTime = {
default = '00:00',
default = format_clock(0),
calculate = function(player_name)
return format_clock((playerStats['Playtime']:get(player_name, 0) - playerStats['AfkTime']:get(player_name, 0)) / playerStats['JoinCount']:get(player_name, 1))
end
Expand All @@ -68,7 +69,7 @@ local computed_stats = {
end
},
NetPlayTime = {
default = '00:00',
default = format_clock(0),
calculate = function(player_name)
return format_clock((playerStats['Playtime']:get(player_name, 0) - playerStats['AfkTime']:get(player_name, 0)))
end
Expand Down

0 comments on commit 7046a3e

Please sign in to comment.