From 54799ef61943fdac380369d6a7abf4999bbc0bed Mon Sep 17 00:00:00 2001 From: Cooldude2606 <25043174+Cooldude2606@users.noreply.github.com> Date: Sat, 17 Oct 2026 16:13:17 +0100 Subject: [PATCH 1/2] Included migrated playtime and join count in stats table --- exp_player_statistics/controller.ts | 2 +- exp_player_statistics/messages.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/exp_player_statistics/controller.ts b/exp_player_statistics/controller.ts index 21bd1f95..815eb124 100644 --- a/exp_player_statistics/controller.ts +++ b/exp_player_statistics/controller.ts @@ -49,7 +49,7 @@ export default async function (context: ControllerPluginContext) { const record = players.get(request.name); return new messages.PlayerStatistics(request.name, { ...record?.stats, - ...messages.userStatistics(controller.users.getByName(request.name)), + ...messages.userStatistics(controller.users.getByName(request.name), record?.stats), }, record?.updatedAtMs); }); diff --git a/exp_player_statistics/messages.ts b/exp_player_statistics/messages.ts index ad6f8da3..d984d55f 100644 --- a/exp_player_statistics/messages.ts +++ b/exp_player_statistics/messages.ts @@ -42,11 +42,11 @@ export class PlayerStatistics { } } -/** Statistics clusterio already keeps for every user, shown with the others but never added to */ -export function userStatistics(user?: Pick): Record { +/** Statistics clusterio already keeps for every user, shown with the others but never added to, existing stats may contain legacy values */ +export function userStatistics(user?: Pick, stats: Record = {}): Record { return { - Playtime: Math.floor((user?.playerStats.onlineTimeMs ?? 0) / 60e3), - JoinCount: user?.playerStats.joinCount ?? 0, + Playtime: (stats.Playtime ?? 0) + Math.floor((user?.playerStats.onlineTimeMs ?? 0) / 60e3), + JoinCount: (stats.JoinCount ?? 0) + (user?.playerStats.joinCount ?? 0), }; } From 472db1e22ae49e4c86c8dadacbb0cd922c99fa1b Mon Sep 17 00:00:00 2001 From: Bastiaan <17990055+bbassie@users.noreply.github.com> Date: Sat, 17 Oct 2026 17:14:40 +0200 Subject: [PATCH 2/2] Fix unknown sprite on the readme join button (#510) utility/downloading_white was a 1.1 sprite. Neither 2.0 nor 2.1 has it, so drawing the readme for a modded server crashed on_player_created. utility/downloading exists in both, so no version check is needed. Co-authored-by: Claude Opus 5.5 --- exp_scenario/module/gui/readme.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exp_scenario/module/gui/readme.lua b/exp_scenario/module/gui/readme.lua index c0f55621..61364671 100644 --- a/exp_scenario/module/gui/readme.lua +++ b/exp_scenario/module/gui/readme.lua @@ -180,7 +180,7 @@ function Elements.join_server.refresh(button, server) elseif status == "Modded" then button.enabled = true - button.sprite = "utility/downloading_white" + button.sprite = "utility/downloading" button.hovered_sprite = "utility/downloading" else