feat(stats): minigame stats #1249

Merged
Sainan merged 3 commits from AMelonInsideLemon/SpaceNinjaServer:stats-minigame into main 2025-03-21 02:40:04 -07:00
3 changed files with 5 additions and 1 deletions
Showing only changes of commit 14acff99a9 - Show all commits

View File

@ -96,7 +96,8 @@ const statsSchema = new Schema<IStatsDatabase>({
ZephyrScore: Number,
SentinelGameScore: Number,
CaliberChicksScore: Number,
OlliesCrashCourseScore: Number
OlliesCrashCourseScore: Number,
DojoObstacleScore: Number
});
statsSchema.set("toJSON", {

View File

@ -309,6 +309,7 @@ export const updateStats = async (playerStats: TStatsDatabaseDocument, payload:
case "SentinelGameScore":
case "CaliberChicksScore":
case "OlliesCrashCourseScore":
case "DojoObstacleScore":
playerStats[category] ??= 0;
playerStats[category] = data;
break;

View File

@ -30,6 +30,7 @@ export interface IStatsClient {
SentinelGameScore?: number;
CaliberChicksScore?: number;
OlliesCrashCourseScore?: number;
DojoObstacleScore?: number;
}
export interface IStatsDatabase extends IStatsClient {
@ -147,6 +148,7 @@ export interface IStatsMax {
SentinelGameScore?: number;
CaliberChicksScore?: number;
OlliesCrashCourseScore?: number;
DojoObstacleScore?: number;
}
export interface IStatsSet {