forked from OpenWF/SpaceNinjaServer
		
	chore: fix cyclic include for slotPurchaseNameToSlotName (#2618)
Reviewed-on: OpenWF/SpaceNinjaServer#2618 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									e97b107853
								
							
						
					
					
						commit
						79c5f7a67a
					
				@ -1,5 +1,17 @@
 | 
			
		||||
import { slotPurchaseNameToSlotName } from "@/src/services/purchaseService";
 | 
			
		||||
import { SlotPurchaseName } from "@/src/types/purchaseTypes";
 | 
			
		||||
import { SlotPurchase, 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 => {
 | 
			
		||||
    return slotPurchaseName in slotPurchaseNameToSlotName;
 | 
			
		||||
 | 
			
		||||
@ -1,4 +1,4 @@
 | 
			
		||||
import { parseSlotPurchaseName } from "@/src/helpers/purchaseHelpers";
 | 
			
		||||
import { parseSlotPurchaseName, slotPurchaseNameToSlotName } from "@/src/helpers/purchaseHelpers";
 | 
			
		||||
import { getSubstringFromKeyword } from "@/src/helpers/stringHelpers";
 | 
			
		||||
import {
 | 
			
		||||
    addBooster,
 | 
			
		||||
@ -14,7 +14,6 @@ import { IMiscItem } from "@/src/types/inventoryTypes/inventoryTypes";
 | 
			
		||||
import {
 | 
			
		||||
    IPurchaseRequest,
 | 
			
		||||
    IPurchaseResponse,
 | 
			
		||||
    SlotPurchase,
 | 
			
		||||
    IInventoryChanges,
 | 
			
		||||
    PurchaseSource,
 | 
			
		||||
    IPurchaseParams
 | 
			
		||||
@ -472,19 +471,6 @@ export const handleStoreItemAcquisition = async (
 | 
			
		||||
    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)
 | 
			
		||||
// // new slot above base = extra + 1 and slots +1
 | 
			
		||||
// // new frame = slots -1
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user