返回提交历史
Modified
src/services/inventoryService.ts
+2
-2
Modified
src/services/itemDataService.ts
+3
-8
XFEstudio/XFESpaceNinjaServer
chore: simplify getExalted
c6c3e1c0
代码差异
2 个文件
+5
-10
@@ -361,7 +361,7 @@ export const addSentinel = async (sentinelName: string, accountId: string) => {
361
361
362
362
export const addPowerSuit = async (powersuitName: string, accountId: string): Promise<IEquipmentClient> => {
363
363
const specialItems = getExalted(powersuitName);
364
if (specialItems != false) {
364
if (specialItems) {
365
365
for await (const specialItem of specialItems) {
366
366
await addSpecialItem(specialItem, accountId);
367
367
}
@@ -374,7 +374,7 @@ export const addPowerSuit = async (powersuitName: string, accountId: string): Pr
374
374
375
375
export const addMechSuit = async (mechsuitName: string, accountId: string) => {
376
376
const specialItems = getExalted(mechsuitName);
377
if (specialItems != false) {
377
if (specialItems) {
378
378
for await (const specialItem of specialItems) {
379
379
await addSpecialItem(specialItem, accountId);
380
380
}
@@ -45,16 +45,11 @@ export const getRecipe = (uniqueName: string): IRecipe | undefined => {
45
45
return ExportRecipes[uniqueName];
46
46
};
47
47
48
export const getExalted = (uniqueName: string) => {
49
const suit = getSuitByUniqueName(uniqueName);
50
if (suit?.exalted !== undefined) {
51
return suit.exalted;
52
} else {
53
return false;
54
}
48
export const getExalted = (uniqueName: string): string[] | undefined => {
49
return getSuitByUniqueName(uniqueName)?.exalted;
55
50
};
56
51
57
export const getItemCategoryByUniqueName = (uniqueName: string) => {
52
export const getItemCategoryByUniqueName = (uniqueName: string): string => {
58
53
//Lotus/Types/Items/MiscItems/PolymerBundle
59
54
60
55
let splitWord = "Items/";