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

XFESpaceNinjaServer

A simple server for a small space ninja game

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

XFEstudio/XFESpaceNinjaServer

feat: multiple subsumed abilities for one suit (#4322)

Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/4322 Reviewed-by: Sainan <63328889+sainan@users.noreply.github.com> Co-authored-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com> Co-committed-by: AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>

b6fc6de8
AMelonInsideLemon <166175391+AMelonInsideLemon@users.noreply.github.com>
提交于

代码差异

1 个文件 +11 -11
Modified src/services/infestedFoundryService.ts +11 -11
@@ -85,19 +85,19 @@ export const addInfestedFoundryXP = (infestedFoundry: IInfestedFoundryDatabase,
85 85 export const handleSubsumeCompletion = (
86 86 inventory: Pick<TInventoryDatabaseDocument, "InfestedFoundry" | "Recipes">
87 87 ): ITypeCount[] => {
88 const [recipeType] = Object.entries(ExportRecipes).find(
89 ([_recipeType, recipe]) =>
90 recipe.secretIngredientAction == "SIA_WARFRAME_ABILITY" &&
91 recipe.secretIngredients![0].ItemType == inventory.InfestedFoundry!.LastConsumedSuit!.ItemType
92 )!;
88 const recipeTypes = Object.entries(ExportRecipes)
89 .filter(
90 ([_recipeType, recipe]) =>
91 recipe.secretIngredientAction == "SIA_WARFRAME_ABILITY" &&
92 recipe.secretIngredients![0].ItemType == inventory.InfestedFoundry!.LastConsumedSuit!.ItemType
93 )
94 .map(([recipeType]) => recipeType);
93 95 inventory.InfestedFoundry!.LastConsumedSuit = undefined;
94 96 inventory.InfestedFoundry!.AbilityOverrideUnlockCooldown = undefined;
95 const recipeChanges: ITypeCount[] = [
96 {
97 ItemType: recipeType,
98 ItemCount: 1
99 }
100 ];
97 const recipeChanges: ITypeCount[] = recipeTypes.map(recipeType => ({
98 ItemType: recipeType,
99 ItemCount: 1
100 }));
101 101 addRecipes(inventory, recipeChanges);
102 102 return recipeChanges;
103 103 };