XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

SpaceNinjaServer

A simple server for a small space ninja game

公开
关注 0 Fork 1 Star 0
返回提交历史

XFEstudio/SpaceNinjaServer

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

887d4eb9
Sainan <sainan@calamity.gg>
提交于

代码差异

2 个文件 +9 -15
Modified src/services/inventoryService.ts +8 -14
@@ -27,7 +27,7 @@ import { logger } from "@/src/utils/logger";
27 27 import { WeaponTypeInternal, getWeaponType, getExalted } from "@/src/services/itemDataService";
28 28 import { ISyndicateSacrifice, ISyndicateSacrificeResponse } from "../types/syndicateTypes";
29 29 import { IEquipmentClient } from "../types/inventoryTypes/commonInventoryTypes";
30 import { ExportCustoms, ExportRecipes, ExportResources } from "warframe-public-export-plus";
30 import { ExportCustoms, ExportFlavour, ExportRecipes, ExportResources } from "warframe-public-export-plus";
31 31
32 32 export const createInventory = async (
33 33 accountOwnerId: Types.ObjectId,
@@ -112,6 +112,13 @@ export const addItem = async (
112 112 }
113 113 };
114 114 }
115 if (typeName in ExportFlavour) {
116 return {
117 InventoryChanges: {
118 FlavourItems: [await addCustomization(typeName, accountId)]
119 }
120 };
121 }
115 122
116 123 // Path-based duck typing
117 124 switch (typeName.substr(1).split("/")[1]) {
@@ -171,12 +178,6 @@ export const addItem = async (
171 178 [weaponType]: [weapon]
172 179 }
173 180 };
174 case "Interface":
175 return {
176 InventoryChanges: {
177 FlavourItems: [await addCustomization(typeName, accountId)]
178 }
179 };
180 181 case "Objects": {
181 182 // /Lotus/Objects/Tenno/Props/TnoLisetTextProjector (Note Beacon)
182 183 const inventory = await getInventory(accountId);
@@ -196,13 +197,6 @@ export const addItem = async (
196 197 }
197 198 case "Types":
198 199 switch (typeName.substr(1).split("/")[2]) {
199 case "AvatarImages":
200 case "SuitCustomizations":
201 return {
202 InventoryChanges: {
203 FlavourItems: [await addCustomization(typeName, accountId)]
204 }
205 };
206 200 case "Sentinels":
207 201 // TOOD: Sentinels should also grant their DefaultUpgrades & SentinelWeapon.
208 202 const sentinel = await addSentinel(typeName, accountId);
Modified static/webui/index.html +1 -1
@@ -248,7 +248,7 @@
248 248 <div class="form-check">
249 249 <input class="form-check-input" type="checkbox" id="unlockAllFlavourItems" />
250 250 <label class="form-check-label" for="unlockAllFlavourItems">
251 Unlock All Flavor Items (Glyphs & co.)
251 Unlock All <abbr title="Animation Sets, Glyphs, Plattes, etc.">Flavor Items</abbr>
252 252 </label>
253 253 </div>
254 254 <div class="form-check">