feat: web dashboard and playground work

The NexusDashboard-parity dashboard (dDashboardServer) and everything built on it on the experimental branch:
accounts, characters, properties and moderation tools, permissions shared with in-game slash commands, economy
reports, World 3D and property 3D views with client scenery, scheduled events (features, vanity changes, live
events, announcements, restarts), vanity files and events, the CDClient browser, the message inspector with saved
captures, chat filter tools, community challenges, live ops, the AI moderator helper, and the server-side changes
they need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-26 17:52:10 -05:00
parent 854d02f509
commit e213a7aeff
681 changed files with 88310 additions and 1321 deletions

View File

@@ -2,10 +2,12 @@
#define __ILEADERBOARD__H__
#include <cstdint>
#include <map>
#include <optional>
#include <string>
#include <vector>
#include "dCommonVars.h"
#include "eLeaderboardType.h"
class ILeaderboard {
public:
@@ -30,6 +32,21 @@ public:
float tertiaryScore{ 0.0f };
};
// Whether a lower primary score ranks higher: races store the time taken. Foot races store the time left on
// their countdown, so more is better there, like points.
static bool LowerIsBetter(const eLeaderboardType type) {
return type == eLeaderboardType::Racing || type == eLeaderboardType::MonumentRace;
}
// Every score on an activity's leaderboard, best first, in the order the game ranks it (it numbers rows in this order)
std::vector<Entry> GetRankedLeaderboard(const eLeaderboardType type, const uint32_t activityId) {
switch (type) {
case eLeaderboardType::SurvivalNS: return GetNsLeaderboard(activityId);
case eLeaderboardType::Survival: return GetAgsLeaderboard(activityId);
default: return LowerIsBetter(type) ? GetAscendingLeaderboard(activityId) : GetDescendingLeaderboard(activityId);
}
}
// Get the donation total for the given activity id.
virtual std::optional<uint32_t> GetDonationTotal(const uint32_t activityId) = 0;
@@ -43,6 +60,11 @@ public:
virtual void UpdateScore(const LWOOBJID playerId, const uint32_t gameId, const Score& score) = 0;
virtual void IncrementNumWins(const LWOOBJID playerId, const uint32_t gameId) = 0;
virtual void IncrementTimesPlayed(const LWOOBJID playerId, const uint32_t gameId) = 0;
// For the dashboard: how many scores each activity has, and removing scores (e.g. cheated ones)
virtual std::map<uint32_t, uint32_t> GetLeaderboardSizes() = 0;
virtual void DeleteLeaderboardScore(const LWOOBJID playerId, const uint32_t gameId) = 0;
virtual void ResetLeaderboard(const uint32_t gameId) = 0;
};
#endif //!__ILEADERBOARD__H__