improve: purchasing of animation sets, colour plattes, etc. (#394)

This commit is contained in:
Sainan 2024-06-24 12:30:32 +02:00 committed by GitHub
parent 1a3b3b9750
commit 887d4eb952
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 15 deletions

View File

@ -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);

View File

@ -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">