Update src/services/inventoryService.ts
This commit is contained in:
parent
935eb9753a
commit
27f99ae7fe
@ -1241,6 +1241,15 @@ export const addFusionPoints = (inventory: TInventoryDatabaseDocument, add: numb
|
|||||||
return add;
|
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<
|
const standingLimitBinToInventoryKey: Record<
|
||||||
Exclude<TStandingLimitBin, "STANDING_LIMIT_BIN_NONE">,
|
Exclude<TStandingLimitBin, "STANDING_LIMIT_BIN_NONE">,
|
||||||
keyof IDailyAffiliations
|
keyof IDailyAffiliations
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user