XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

feat: track KIM resets (#1528)

This was added in 38.5.0 for FlareRank1Convo3 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1528 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

02a4d2b3
Sainan <63328889+Sainan@users.noreply.github.com>
提交于

代码差异

3 个文件 +5 -0
Modified src/controllers/api/clearDialogueHistoryController.ts +2 -0
@@ -7,6 +7,8 @@ export const clearDialogueHistoryController: RequestHandler = async (req, res) =
7 7 const inventory = await getInventory(accountId);
8 8 const request = JSON.parse(String(req.body)) as IClearDialogueRequest;
9 9 if (inventory.DialogueHistory && inventory.DialogueHistory.Dialogues) {
10 inventory.DialogueHistory.Resets ??= 0;
11 inventory.DialogueHistory.Resets += 1;
10 12 for (const dialogueName of request.Dialogues) {
11 13 const index = inventory.DialogueHistory.Dialogues.findIndex(x => x.DialogueName == dialogueName);
12 14 if (index != -1) {
Modified src/models/inventoryModels/inventoryModel.ts +1 -0
@@ -797,6 +797,7 @@ dialogueSchema.set("toJSON", {
797 797 const dialogueHistorySchema = new Schema<IDialogueHistoryDatabase>(
798 798 {
799 799 YearIteration: { type: Number, required: true },
800 Resets: Number,
800 801 Dialogues: { type: [dialogueSchema], required: false }
801 802 },
802 803 { _id: false }
Modified src/types/inventoryTypes/inventoryTypes.ts +2 -0
@@ -1074,11 +1074,13 @@ export interface IEndlessXpProgress {
1074 1074
1075 1075 export interface IDialogueHistoryClient {
1076 1076 YearIteration: number;
1077 Resets?: number; // added in 38.5.0
1077 1078 Dialogues?: IDialogueClient[];
1078 1079 }
1079 1080
1080 1081 export interface IDialogueHistoryDatabase {
1081 1082 YearIteration: number;
1083 Resets?: number;
1082 1084 Dialogues?: IDialogueDatabase[];
1083 1085 }
1084 1086