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, ZephyrScore: Number,
SentinelGameScore: Number, SentinelGameScore: Number,
CaliberChicksScore: Number, CaliberChicksScore: Number,
OlliesCrashCourseScore: Number OlliesCrashCourseScore: Number,
DojoObstacleScore: Number
}); });
statsSchema.set("toJSON", { statsSchema.set("toJSON", {

View File

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

View File

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