返回提交历史
Modified
src/controllers/api/startRecipeController.ts
+9
-8
XFEstudio/XFESpaceNinjaServer
feat: helminth charger incubation (#3745)
Closes #3698 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/3745 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
4f7b45a0
代码差异
1 个文件
+9
-8
@@ -87,14 +87,15 @@ export const startRecipeController: RequestHandler = async (req, res) => {
87
87
88
88
let inventoryChanges: IInventoryChanges | undefined;
89
89
if (recipe.secretIngredientAction == "SIA_CREATE_KUBROW") {
90
inventoryChanges = addKubrowPet(
91
inventory,
92
getRandomElement(recipe.secretIngredients!)!.ItemType,
93
undefined,
94
false,
95
{},
96
account.BuildLabel
97
);
90
const infestedSuitId = startRecipeRequest.Ids[startRecipeRequest.Ids.length - 1];
91
const infestedSuit = infestedSuitId.length == 24 ? inventory.Suits.id(infestedSuitId) : undefined;
92
const resultSuitType = infestedSuit
93
? "/Lotus/Types/Game/KubrowPet/ChargerKubrowPetPowerSuit"
94
: getRandomElement(recipe.secretIngredients!)!.ItemType;
95
if (infestedSuit) {
96
infestedSuit.InfestationDate = new Date();
97
}
98
inventoryChanges = addKubrowPet(inventory, resultSuitType, undefined, false, {}, account.BuildLabel);
98
99
pr.KubrowPet = new Types.ObjectId(fromOid(inventoryChanges.KubrowPets![0].ItemId));
99
100
} else if (recipe.secretIngredientAction == "SIA_DISTILL_PRINT") {
100
101
pr.KubrowPet = new Types.ObjectId(startRecipeRequest.Ids[recipe.ingredients.length]);