chore: fix cyclic include for slotPurchaseNameToSlotName
All checks were successful
Build / build (pull_request) Successful in 1m1s

This commit is contained in:
Sainan 2025-08-13 22:35:00 +02:00
parent 7bc5065251
commit 148a3b454f
2 changed files with 15 additions and 17 deletions

View File

@ -1,5 +1,17 @@
import { slotPurchaseNameToSlotName } from "@/src/services/purchaseService"; import { SlotPurchase, SlotPurchaseName } from "@/src/types/purchaseTypes";
import { SlotPurchaseName } from "@/src/types/purchaseTypes";
export const slotPurchaseNameToSlotName: SlotPurchase = {
SuitSlotItem: { name: "SuitBin", purchaseQuantity: 1 },
TwoSentinelSlotItem: { name: "SentinelBin", purchaseQuantity: 2 },
TwoWeaponSlotItem: { name: "WeaponBin", purchaseQuantity: 2 },
SpaceSuitSlotItem: { name: "SpaceSuitBin", purchaseQuantity: 1 },
TwoSpaceWeaponSlotItem: { name: "SpaceWeaponBin", purchaseQuantity: 2 },
MechSlotItem: { name: "MechBin", purchaseQuantity: 1 },
TwoOperatorWeaponSlotItem: { name: "OperatorAmpBin", purchaseQuantity: 2 },
RandomModSlotItem: { name: "RandomModBin", purchaseQuantity: 3 },
TwoCrewShipSalvageSlotItem: { name: "CrewShipSalvageBin", purchaseQuantity: 2 },
CrewMemberSlotItem: { name: "CrewMemberBin", purchaseQuantity: 1 }
};
export const isSlotPurchaseName = (slotPurchaseName: string): slotPurchaseName is SlotPurchaseName => { export const isSlotPurchaseName = (slotPurchaseName: string): slotPurchaseName is SlotPurchaseName => {
return slotPurchaseName in slotPurchaseNameToSlotName; return slotPurchaseName in slotPurchaseNameToSlotName;

View File

@ -1,4 +1,4 @@
import { parseSlotPurchaseName } from "@/src/helpers/purchaseHelpers"; import { parseSlotPurchaseName, slotPurchaseNameToSlotName } from "@/src/helpers/purchaseHelpers";
import { getSubstringFromKeyword } from "@/src/helpers/stringHelpers"; import { getSubstringFromKeyword } from "@/src/helpers/stringHelpers";
import { import {
addBooster, addBooster,
@ -14,7 +14,6 @@ import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
import { import {
IPurchaseRequest, IPurchaseRequest,
IPurchaseResponse, IPurchaseResponse,
SlotPurchase,
IInventoryChanges, IInventoryChanges,
PurchaseSource, PurchaseSource,
IPurchaseParams IPurchaseParams
@ -472,19 +471,6 @@ export const handleStoreItemAcquisition = async (
return purchaseResponse; return purchaseResponse;
}; };
export const slotPurchaseNameToSlotName: SlotPurchase = {
SuitSlotItem: { name: "SuitBin", purchaseQuantity: 1 },
TwoSentinelSlotItem: { name: "SentinelBin", purchaseQuantity: 2 },
TwoWeaponSlotItem: { name: "WeaponBin", purchaseQuantity: 2 },
SpaceSuitSlotItem: { name: "SpaceSuitBin", purchaseQuantity: 1 },
TwoSpaceWeaponSlotItem: { name: "SpaceWeaponBin", purchaseQuantity: 2 },
MechSlotItem: { name: "MechBin", purchaseQuantity: 1 },
TwoOperatorWeaponSlotItem: { name: "OperatorAmpBin", purchaseQuantity: 2 },
RandomModSlotItem: { name: "RandomModBin", purchaseQuantity: 3 },
TwoCrewShipSalvageSlotItem: { name: "CrewShipSalvageBin", purchaseQuantity: 2 },
CrewMemberSlotItem: { name: "CrewMemberBin", purchaseQuantity: 1 }
};
// // extra = everything above the base +2 slots (depending on slot type) // // extra = everything above the base +2 slots (depending on slot type)
// // new slot above base = extra + 1 and slots +1 // // new slot above base = extra + 1 and slots +1
// // new frame = slots -1 // // new frame = slots -1