add productCategoryToInventoryBin
This commit is contained in:
parent
56a372ee6f
commit
7a52337af7
@ -172,6 +172,38 @@ export const getInventory = async (
|
|||||||
return inventory;
|
return inventory;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const productCategoryToInventoryBin = (productCategory: string): InventorySlot | undefined => {
|
||||||
|
switch (productCategory) {
|
||||||
|
case "Suits":
|
||||||
|
return InventorySlot.SUITS;
|
||||||
|
case "Pistols":
|
||||||
|
case "LongGuns":
|
||||||
|
case "Melee":
|
||||||
|
return InventorySlot.WEAPONS;
|
||||||
|
case "Sentinels":
|
||||||
|
case "SentinelWeapons":
|
||||||
|
case "KubrowPets":
|
||||||
|
case "MoaPets":
|
||||||
|
return InventorySlot.SENTINELS;
|
||||||
|
case "SpaceSuits":
|
||||||
|
case "Hoverboards":
|
||||||
|
return InventorySlot.SPACESUITS;
|
||||||
|
case "SpaceGuns":
|
||||||
|
case "SpaceMelee":
|
||||||
|
return InventorySlot.SPACEWEAPONS;
|
||||||
|
case "OperatorAmps":
|
||||||
|
return InventorySlot.AMPS;
|
||||||
|
case "CrewShipWeapons":
|
||||||
|
case "CrewShipWeaponSkins":
|
||||||
|
return InventorySlot.RJ_COMPONENT_AND_ARMAMENTS;
|
||||||
|
case "MechSuits":
|
||||||
|
return InventorySlot.MECHSUITS;
|
||||||
|
case "CrewMembers":
|
||||||
|
return InventorySlot.CREWMEMBERS;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
|
||||||
export const occupySlot = (
|
export const occupySlot = (
|
||||||
inventory: TInventoryDatabaseDocument,
|
inventory: TInventoryDatabaseDocument,
|
||||||
bin: InventorySlot,
|
bin: InventorySlot,
|
||||||
|
@ -459,7 +459,8 @@ export enum InventorySlot {
|
|||||||
PVE_LOADOUTS = "PveBonusLoadoutBin",
|
PVE_LOADOUTS = "PveBonusLoadoutBin",
|
||||||
SENTINELS = "SentinelBin",
|
SENTINELS = "SentinelBin",
|
||||||
AMPS = "OperatorAmpBin",
|
AMPS = "OperatorAmpBin",
|
||||||
RJ_COMPONENT_AND_ARMAMENTS = "CrewShipSalvageBin"
|
RJ_COMPONENT_AND_ARMAMENTS = "CrewShipSalvageBin",
|
||||||
|
CREWMEMBERS = "CrewMemberBin"
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ISlots {
|
export interface ISlots {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user