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

XFESpaceNinjaServer

A simple server for a small space ninja game

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

XFEstudio/XFESpaceNinjaServer

chore: use ChallengesFixVersion that client provides (#2190)

It seems that now we're on version 7, so let's just not hard-code it. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2190 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>

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

代码差异

3 个文件 +7 -3
Modified src/controllers/api/updateChallengeProgressController.ts +5 -1
@@ -11,8 +11,11 @@ export const updateChallengeProgressController: RequestHandler = async (req, res
11 11
12 12 const inventory = await getInventory(
13 13 account._id.toString(),
14 "ChallengeProgress SeasonChallengeHistory Affiliations"
14 "ChallengesFixVersion ChallengeProgress SeasonChallengeHistory Affiliations"
15 15 );
16 if (challenges.ChallengesFixVersion !== undefined) {
17 inventory.ChallengesFixVersion = challenges.ChallengesFixVersion;
18 }
16 19 let affiliationMods: IAffiliationMods[] = [];
17 20 if (challenges.ChallengeProgress) {
18 21 affiliationMods = addChallenges(
@@ -40,6 +43,7 @@ export const updateChallengeProgressController: RequestHandler = async (req, res
40 43 };
41 44
42 45 interface IUpdateChallengeProgressRequest {
46 ChallengesFixVersion?: number;
43 47 ChallengeProgress?: IChallengeProgress[];
44 48 SeasonChallengeHistory?: ISeasonChallenge[];
45 49 SeasonChallengeCompletions?: ISeasonChallenge[];
Modified src/models/inventoryModels/inventoryModel.ts +1 -1
@@ -1703,7 +1703,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
1703 1703 LastInventorySync: Schema.Types.ObjectId,
1704 1704 Mailbox: MailboxSchema,
1705 1705 HandlerPoints: Number,
1706 ChallengesFixVersion: { type: Number, default: 6 },
1706 ChallengesFixVersion: Number,
1707 1707 PlayedParkourTutorial: Boolean,
1708 1708 //ActiveLandscapeTraps: [Schema.Types.Mixed],
1709 1709 //RepVotes: [Schema.Types.Mixed],
Modified src/types/inventoryTypes/inventoryTypes.ts +1 -1
@@ -234,7 +234,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu
234 234 HandlerPoints: number;
235 235 MiscItems: IMiscItem[];
236 236 HasOwnedVoidProjectionsPreviously?: boolean;
237 ChallengesFixVersion: number;
237 ChallengesFixVersion?: number;
238 238 ChallengeProgress: IChallengeProgress[];
239 239 RawUpgrades: IRawUpgrade[];
240 240 ReceivedStartingGear: boolean;