Use exp_statistics in place of the legacy statistics

Remove the tracking and config from exp_legacy along with its
exp-statistics locale, which now ships with exp_statistics.

The player stats GUI stays in exp_scenario and reads the new module. It
uses the online player dropdown from exp_scenario's elements, so moving
it would make exp_statistics depend on exp_scenario, and its
exp_scenario.gui.playerdata permission is already in the seeded roles.

The readme data tab shows the statistics from the new module above the
remaining PlayerData.Statistics children, which is only LocalLanguage
now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-14 22:45:15 +00:00
1 parent d1b22dd4e7
commit 237200e6c8
10 files changed
+38 -488

No files matched your search

+9
View File
@@ -6,6 +6,7 @@ local ExpUtil = require("modules/exp_util")
local Gui = require("modules/exp_gui")
local Roles = require("modules/exp_roles")
local Commands = require("modules/exp_commands")
local ExpStatistics = require("modules/exp_statistics")
local PlayerData = require("modules.exp_legacy.expcore.player_data")
local ExpServerList = require("modules/exp_server_list")
local community = require("modules/exp_scenario/config/community_details").config
@@ -582,6 +583,14 @@ define_tab(
default_stringify = function(value)
return format_number(value or 0, false)
end,
extra_rows = function(statistics)
for _, name in ipairs(ExpStatistics.display_order) do
local value = ExpStatistics.format(name, ExpStatistics.get(player_name, name))
local tooltip = { "exp-statistics." .. name .. "-tooltip" }
Gui.elements.centered_label(statistics, 150, { "exp-statistics." .. name }, tooltip)
Gui.elements.centered_label(statistics, 130, { "exp-gui_readme.data-format", value, ExpStatistics.units[name] or "" }, tooltip)
end
end,
}
end