improve: purchasing of animation sets, colour plattes, etc. (#394)
This commit is contained in:
parent
1a3b3b9750
commit
887d4eb952
@ -27,7 +27,7 @@ import { logger } from "@/src/utils/logger";
|
|||||||
import { WeaponTypeInternal, getWeaponType, getExalted } from "@/src/services/itemDataService";
|
import { WeaponTypeInternal, getWeaponType, getExalted } from "@/src/services/itemDataService";
|
||||||
import { ISyndicateSacrifice, ISyndicateSacrificeResponse } from "../types/syndicateTypes";
|
import { ISyndicateSacrifice, ISyndicateSacrificeResponse } from "../types/syndicateTypes";
|
||||||
import { IEquipmentClient } from "../types/inventoryTypes/commonInventoryTypes";
|
import { IEquipmentClient } from "../types/inventoryTypes/commonInventoryTypes";
|
||||||
import { ExportCustoms, ExportRecipes, ExportResources } from "warframe-public-export-plus";
|
import { ExportCustoms, ExportFlavour, ExportRecipes, ExportResources } from "warframe-public-export-plus";
|
||||||
|
|
||||||
export const createInventory = async (
|
export const createInventory = async (
|
||||||
accountOwnerId: Types.ObjectId,
|
accountOwnerId: Types.ObjectId,
|
||||||
@ -112,6 +112,13 @@ export const addItem = async (
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
if (typeName in ExportFlavour) {
|
||||||
|
return {
|
||||||
|
InventoryChanges: {
|
||||||
|
FlavourItems: [await addCustomization(typeName, accountId)]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
// Path-based duck typing
|
// Path-based duck typing
|
||||||
switch (typeName.substr(1).split("/")[1]) {
|
switch (typeName.substr(1).split("/")[1]) {
|
||||||
@ -171,12 +178,6 @@ export const addItem = async (
|
|||||||
[weaponType]: [weapon]
|
[weaponType]: [weapon]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
case "Interface":
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
FlavourItems: [await addCustomization(typeName, accountId)]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
case "Objects": {
|
case "Objects": {
|
||||||
// /Lotus/Objects/Tenno/Props/TnoLisetTextProjector (Note Beacon)
|
// /Lotus/Objects/Tenno/Props/TnoLisetTextProjector (Note Beacon)
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId);
|
||||||
@ -196,13 +197,6 @@ export const addItem = async (
|
|||||||
}
|
}
|
||||||
case "Types":
|
case "Types":
|
||||||
switch (typeName.substr(1).split("/")[2]) {
|
switch (typeName.substr(1).split("/")[2]) {
|
||||||
case "AvatarImages":
|
|
||||||
case "SuitCustomizations":
|
|
||||||
return {
|
|
||||||
InventoryChanges: {
|
|
||||||
FlavourItems: [await addCustomization(typeName, accountId)]
|
|
||||||
}
|
|
||||||
};
|
|
||||||
case "Sentinels":
|
case "Sentinels":
|
||||||
// TOOD: Sentinels should also grant their DefaultUpgrades & SentinelWeapon.
|
// TOOD: Sentinels should also grant their DefaultUpgrades & SentinelWeapon.
|
||||||
const sentinel = await addSentinel(typeName, accountId);
|
const sentinel = await addSentinel(typeName, accountId);
|
||||||
|
@ -248,7 +248,7 @@
|
|||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" id="unlockAllFlavourItems" />
|
<input class="form-check-input" type="checkbox" id="unlockAllFlavourItems" />
|
||||||
<label class="form-check-label" for="unlockAllFlavourItems">
|
<label class="form-check-label" for="unlockAllFlavourItems">
|
||||||
Unlock All Flavor Items (Glyphs & co.)
|
Unlock All <abbr title="Animation Sets, Glyphs, Plattes, etc.">Flavor Items</abbr>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user