mechsuits as well
All checks were successful
Build / build (18) (push) Successful in 46s
Build / build (22) (push) Successful in 1m15s
Build / build (20) (push) Successful in 1m14s
Build / build (18) (pull_request) Successful in 45s
Build / build (20) (pull_request) Successful in 1m17s
Build / build (22) (pull_request) Successful in 1m8s
All checks were successful
Build / build (18) (push) Successful in 46s
Build / build (22) (push) Successful in 1m15s
Build / build (20) (push) Successful in 1m14s
Build / build (18) (pull_request) Successful in 45s
Build / build (20) (pull_request) Successful in 1m17s
Build / build (22) (pull_request) Successful in 1m8s
This commit is contained in:
parent
dc1d61f344
commit
f56c451827
@ -506,12 +506,12 @@ export const addItem = async (
|
||||
}
|
||||
case "EntratiMech": {
|
||||
return {
|
||||
...addMechSuit(
|
||||
...(await addMechSuit(
|
||||
inventory,
|
||||
typeName,
|
||||
{},
|
||||
premiumPurchase ? EquipmentFeatures.DOUBLE_CAPACITY : undefined
|
||||
),
|
||||
)),
|
||||
...occupySlot(inventory, InventorySlot.MECHSUITS, premiumPurchase)
|
||||
};
|
||||
}
|
||||
@ -731,16 +731,22 @@ export const addPowerSuit = async (
|
||||
return inventoryChanges;
|
||||
};
|
||||
|
||||
export const addMechSuit = (
|
||||
export const addMechSuit = async (
|
||||
inventory: TInventoryDatabaseDocument,
|
||||
mechsuitName: string,
|
||||
inventoryChanges: IInventoryChanges = {},
|
||||
features: number | undefined = undefined
|
||||
): IInventoryChanges => {
|
||||
): Promise<IInventoryChanges> => {
|
||||
const powersuit = ExportWarframes[mechsuitName] as IPowersuit | undefined;
|
||||
if (powersuit?.exalted) {
|
||||
for (const specialItem of powersuit.exalted) {
|
||||
addSpecialItem(inventory, specialItem, inventoryChanges);
|
||||
const exalted = powersuit?.exalted ?? [];
|
||||
for (const specialItem of exalted) {
|
||||
addSpecialItem(inventory, specialItem, inventoryChanges);
|
||||
}
|
||||
if (powersuit?.additionalItems) {
|
||||
for (const item of powersuit.additionalItems) {
|
||||
if (exalted.indexOf(item) == -1) {
|
||||
combineInventoryChanges(inventoryChanges, await addItem(inventory, item, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
const suitIndex =
|
||||
|
Loading…
x
Reference in New Issue
Block a user