From e2845bb5caf62d6767f8a4e698430113c7afd755 Mon Sep 17 00:00:00 2001 From: azdful Date: Wed, 23 Jul 2025 09:25:09 -0700 Subject: [PATCH 1/6] Update src/controllers/api/sellController.ts --- src/controllers/api/sellController.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/controllers/api/sellController.ts b/src/controllers/api/sellController.ts index 0dd52bf6..3a04ba3c 100644 --- a/src/controllers/api/sellController.ts +++ b/src/controllers/api/sellController.ts @@ -9,7 +9,8 @@ import { freeUpSlot, combineInventoryChanges, addCrewShipRawSalvage, - addFusionPoints + addFusionPoints, + addCrewShipFusionPoints } from "@/src/services/inventoryService"; import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes"; import { ExportDojoRecipes } from "warframe-public-export-plus"; @@ -26,6 +27,8 @@ export const sellController: RequestHandler = async (req, res) => { requiredFields.add("RegularCredits"); } else if (payload.SellCurrency == "SC_FusionPoints") { requiredFields.add("FusionPoints"); + } else if (payload.SellCurrency == "SC_CrewShipFusionPoints") { + requiredFields.add("CrewShipFusionPoints"); } else { requiredFields.add("MiscItems"); } @@ -79,6 +82,8 @@ export const sellController: RequestHandler = async (req, res) => { inventory.RegularCredits += payload.SellPrice; } else if (payload.SellCurrency == "SC_FusionPoints") { addFusionPoints(inventory, payload.SellPrice); + } else if (payload.SellCurrency == "SC_CrewShipFusionPoints") { + addCrewShipFusionPoints(inventory, payload.SellPrice); } else if (payload.SellCurrency == "SC_PrimeBucks") { addMiscItems(inventory, [ { -- 2.47.2 From 935eb9753a2091b84a001e1d4e6294bda8ea6adb Mon Sep 17 00:00:00 2001 From: azdful Date: Wed, 23 Jul 2025 09:26:00 -0700 Subject: [PATCH 2/6] Update src/types/inventoryTypes/inventoryTypes.ts --- src/types/inventoryTypes/inventoryTypes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/inventoryTypes/inventoryTypes.ts b/src/types/inventoryTypes/inventoryTypes.ts index 9df4e4ba..1da1eaff 100644 --- a/src/types/inventoryTypes/inventoryTypes.ts +++ b/src/types/inventoryTypes/inventoryTypes.ts @@ -215,6 +215,7 @@ export interface IInventoryClient extends IDailyAffiliations, InventoryClientEqu PremiumCredits: number; PremiumCreditsFree: number; FusionPoints: number; + CrewShipFusionPoints: number; //Dirac (pre-rework Railjack) PrimeTokens: number; SuitBin: ISlots; WeaponBin: ISlots; -- 2.47.2 From 27f99ae7fe98e4b32fdf05d8b7a2d349bd113feb Mon Sep 17 00:00:00 2001 From: azdful Date: Wed, 23 Jul 2025 09:27:55 -0700 Subject: [PATCH 3/6] Update src/services/inventoryService.ts --- src/services/inventoryService.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 94736a08..188ca4f1 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -1241,6 +1241,15 @@ export const addFusionPoints = (inventory: TInventoryDatabaseDocument, add: numb return add; }; +export const addCrewShipFusionPoints = (inventory: TInventoryDatabaseDocument, add: number): number => { + if (inventory.CrewShipFusionPoints + add > 2147483647) { + logger.warn(`capping CrewShipFusionPoints balance at 2147483647`); + add = 2147483647 - inventory.CrewShipFusionPoints; + } + inventory.CrewShipFusionPoints += add; + return add; +}; + const standingLimitBinToInventoryKey: Record< Exclude, keyof IDailyAffiliations @@ -2273,4 +2282,4 @@ export const giveNemesisPetRecipe = ( export const getEffectiveAvatarImageType = (inventory: TInventoryDatabaseDocument): string => { return inventory.ActiveAvatarImageType ?? "/Lotus/Types/StoreItems/AvatarImages/AvatarImageDefault"; -}; +}; \ No newline at end of file -- 2.47.2 From 15f3a499bf02b5c97d6d8faba0fad0b93860b61b Mon Sep 17 00:00:00 2001 From: azdful Date: Wed, 23 Jul 2025 09:29:41 -0700 Subject: [PATCH 4/6] Update src/services/inventoryService.ts --- src/services/inventoryService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/inventoryService.ts b/src/services/inventoryService.ts index 188ca4f1..681ed578 100644 --- a/src/services/inventoryService.ts +++ b/src/services/inventoryService.ts @@ -2282,4 +2282,4 @@ export const giveNemesisPetRecipe = ( export const getEffectiveAvatarImageType = (inventory: TInventoryDatabaseDocument): string => { return inventory.ActiveAvatarImageType ?? "/Lotus/Types/StoreItems/AvatarImages/AvatarImageDefault"; -}; \ No newline at end of file +}; -- 2.47.2 From e7cc9c6a68657df0c3a063f3b356e3b39bf4de46 Mon Sep 17 00:00:00 2001 From: azdful Date: Wed, 23 Jul 2025 09:58:42 -0700 Subject: [PATCH 5/6] Update src/models/inventoryModels/inventoryModel.ts --- src/models/inventoryModels/inventoryModel.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/models/inventoryModels/inventoryModel.ts b/src/models/inventoryModels/inventoryModel.ts index 4fb863a6..fcd7f08e 100644 --- a/src/models/inventoryModels/inventoryModel.ts +++ b/src/models/inventoryModels/inventoryModel.ts @@ -1437,6 +1437,8 @@ const inventorySchema = new Schema( PremiumCreditsFree: { type: Number, default: 0 }, //Endo FusionPoints: { type: Number, default: 0 }, + //Dirac + CrewShipFusionPoints: { type: Number, default: 0 }, //Regal Aya PrimeTokens: { type: Number, default: 0 }, -- 2.47.2 From b969b40188ab9a5c20059a97a91204fba8cd8f9a Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Wed, 23 Jul 2025 19:07:03 +0200 Subject: [PATCH 6/6] fix ci --- src/controllers/api/sellController.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/api/sellController.ts b/src/controllers/api/sellController.ts index 3a04ba3c..461d83bd 100644 --- a/src/controllers/api/sellController.ts +++ b/src/controllers/api/sellController.ts @@ -335,7 +335,8 @@ interface ISellRequest { | "SC_FusionPoints" | "SC_DistillPoints" | "SC_CrewShipFusionPoints" - | "SC_Resources"; + | "SC_Resources" + | "somethingelsewemightnotknowabout"; buildLabel: string; } -- 2.47.2