返回提交历史
Modified
src/controllers/api/claimCompletedRecipeController.ts
+1
-1
Modified
src/controllers/api/getNewRewardSeedController.ts
+1
-6
Modified
src/controllers/api/giveKeyChainTriggeredItemsController.ts
+1
-7
Modified
src/controllers/api/giveKeyChainTriggeredMessageController.ts
+1
-1
Modified
src/controllers/api/giveQuestKey.ts
+2
-2
Modified
src/controllers/api/giveStartingGearController.ts
+2
-83
Modified
src/controllers/api/infestedFoundryController.ts
+7
-111
Modified
src/controllers/api/inventoryController.ts
+3
-12
Modified
src/controllers/api/upgradesController.ts
+1
-1
Modified
src/controllers/dynamic/getProfileViewingDataController.ts
+1
-1
Modified
src/helpers/stringHelpers.ts
+10
-0
Added
src/services/infestedFoundryService.ts
+110
-0
Modified
src/services/inventoryService.ts
+81
-13
Modified
src/services/itemDataService.ts
+1
-1
Modified
src/services/missionInventoryUpdateService.ts
+5
-5
Modified
src/services/questService.ts
+7
-12
Modified
src/types/inventoryTypes/inventoryTypes.ts
+2
-0
Modified
src/types/requestTypes.ts
+7
-0
XFEstudio/SpaceNinjaServer
chore: fix controllers exporting non-RequestHandler things (#1468)
I'm surprised JavaScript allows circular includes, but they still don't feel good. Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1468 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
49edebc1
代码差异
18 个文件
+243
-256
@@ -19,7 +19,7 @@ import { IInventoryChanges } from "@/src/types/purchaseTypes";
19
19
import { IEquipmentClient } from "@/src/types/inventoryTypes/commonInventoryTypes";
20
20
import { InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
21
21
22
export interface IClaimCompletedRecipeRequest {
22
interface IClaimCompletedRecipeRequest {
23
23
RecipeIds: IOid[];
24
24
}
25
25
@@ -1,4 +1,5 @@
1
1
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
2
import { generateRewardSeed } from "@/src/services/inventoryService";
2
3
import { getAccountIdForRequest } from "@/src/services/loginService";
3
4
import { logger } from "@/src/utils/logger";
4
5
import { RequestHandler } from "express";
@@ -18,9 +19,3 @@ export const getNewRewardSeedController: RequestHandler = async (req, res) => {
18
19
);
19
20
res.json({ rewardSeed: rewardSeed });
20
21
};
21
22
export function generateRewardSeed(): number {
23
const min = -Number.MAX_SAFE_INTEGER;
24
const max = Number.MAX_SAFE_INTEGER;
25
return Math.floor(Math.random() * (max - min + 1)) + min;
26
}
@@ -2,8 +2,8 @@ import { RequestHandler } from "express";
2
2
import { parseString } from "@/src/helpers/general";
3
3
import { getJSONfromString } from "@/src/helpers/stringHelpers";
4
4
import { getInventory } from "@/src/services/inventoryService";
5
import { IGroup } from "@/src/types/loginTypes";
6
5
import { giveKeyChainItem } from "@/src/services/questService";
6
import { IKeyChainRequest } from "@/src/types/requestTypes";
7
7
8
8
export const giveKeyChainTriggeredItemsController: RequestHandler = async (req, res) => {
9
9
const accountId = parseString(req.query.accountId);
@@ -15,9 +15,3 @@ export const giveKeyChainTriggeredItemsController: RequestHandler = async (req,
15
15
16
16
res.send(inventoryChanges);
17
17
};
18
19
export interface IKeyChainRequest {
20
KeyChain: string;
21
ChainStage: number;
22
Groups?: IGroup[];
23
}
@@ -1,7 +1,7 @@
1
import { IKeyChainRequest } from "@/src/controllers/api/giveKeyChainTriggeredItemsController";
2
1
import { getInventory } from "@/src/services/inventoryService";
3
2
import { getAccountIdForRequest } from "@/src/services/loginService";
4
3
import { giveKeyChainMessage } from "@/src/services/questService";
4
import { IKeyChainRequest } from "@/src/types/requestTypes";
5
5
import { RequestHandler } from "express";
6
6
7
7
export const giveKeyChainTriggeredMessageController: RequestHandler = async (req, res) => {
@@ -20,11 +20,11 @@ export const giveQuestKeyRewardController: RequestHandler = async (req, res) =>
20
20
//TODO: consider whishlist changes
21
21
};
22
22
23
export interface IQuestKeyRewardRequest {
23
interface IQuestKeyRewardRequest {
24
24
reward: IQuestKeyReward;
25
25
}
26
26
27
export interface IQuestKeyReward {
27
interface IQuestKeyReward {
28
28
RewardType: string;
29
29
CouponType: string;
30
30
Icon: string;
@@ -1,20 +1,8 @@
1
1
import { getJSONfromString } from "@/src/helpers/stringHelpers";
2
import { InventoryDocumentProps } from "@/src/models/inventoryModels/inventoryModel";
3
import {
4
addEquipment,
5
addItem,
6
addPowerSuit,
7
combineInventoryChanges,
8
getInventory,
9
updateSlots
10
} from "@/src/services/inventoryService";
2
import { addStartingGear, getInventory } from "@/src/services/inventoryService";
11
3
import { getAccountIdForRequest } from "@/src/services/loginService";
12
import { IInventoryClient, IInventoryDatabase, InventorySlot } from "@/src/types/inventoryTypes/inventoryTypes";
13
import { IInventoryChanges } from "@/src/types/purchaseTypes";
4
import { TPartialStartingGear } from "@/src/types/inventoryTypes/inventoryTypes";
14
5
import { RequestHandler } from "express";
15
import { HydratedDocument } from "mongoose";
16
17
type TPartialStartingGear = Pick<IInventoryClient, "LongGuns" | "Suits" | "Pistols" | "Melee">;
18
6
19
7
export const giveStartingGearController: RequestHandler = async (req, res) => {
20
8
const accountId = await getAccountIdForRequest(req);
@@ -26,72 +14,3 @@ export const giveStartingGearController: RequestHandler = async (req, res) => {
26
14
27
15
res.send(inventoryChanges);
28
16
};
29
30
//TODO: RawUpgrades might need to return a LastAdded
31
const awakeningRewards = [
32
"/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem1",
33
"/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem2",
34
"/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem3",
35
"/Lotus/Types/StoreItems/AvatarImages/AvatarImageItem4",
36
"/Lotus/Types/Restoratives/LisetAutoHack",
37
"/Lotus/Upgrades/Mods/Warframe/AvatarShieldMaxMod"
38
];
39
40
export const addStartingGear = async (
41
inventory: HydratedDocument<IInventoryDatabase, InventoryDocumentProps>,
42
startingGear: TPartialStartingGear | undefined = undefined
43
): Promise<IInventoryChanges> => {
44
const { LongGuns, Pistols, Suits, Melee } = startingGear || {
45
LongGuns: [{ ItemType: "/Lotus/Weapons/Tenno/Rifle/Rifle" }],
46
Pistols: [{ ItemType: "/Lotus/Weapons/Tenno/Pistol/Pistol" }],
47
Suits: [{ ItemType: "/Lotus/Powersuits/Excalibur/Excalibur" }],
48
Melee: [{ ItemType: "/Lotus/Weapons/Tenno/Melee/LongSword/LongSword" }]
49
};
50
51
//TODO: properly merge weapon bin changes it is currently static here
52
const inventoryChanges: IInventoryChanges = {};
53
addEquipment(inventory, "LongGuns", LongGuns[0].ItemType, undefined, inventoryChanges);
54
addEquipment(inventory, "Pistols", Pistols[0].ItemType, undefined, inventoryChanges);
55
addEquipment(inventory, "Melee", Melee[0].ItemType, undefined, inventoryChanges);
56
await addPowerSuit(inventory, Suits[0].ItemType, inventoryChanges);
57
addEquipment(
58
inventory,
59
"DataKnives",
60
"/Lotus/Weapons/Tenno/HackingDevices/TnHackingDevice/TnHackingDeviceWeapon",
61
undefined,
62
inventoryChanges,
63
{ XP: 450_000 }
64
);
65
addEquipment(
66
inventory,
67
"Scoops",
68
"/Lotus/Weapons/Tenno/Speedball/SpeedballWeaponTest",
69
undefined,
70
inventoryChanges
71
);
72
73
updateSlots(inventory, InventorySlot.SUITS, 0, 1);
74
updateSlots(inventory, InventorySlot.WEAPONS, 0, 3);
75
inventoryChanges.SuitBin = { count: 1, platinum: 0, Slots: -1 };
76
inventoryChanges.WeaponBin = { count: 3, platinum: 0, Slots: -3 };
77
78
await addItem(inventory, "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain");
79
inventory.ActiveQuest = "/Lotus/Types/Keys/VorsPrize/VorsPrizeQuestKeyChain";
80
81
inventory.PremiumCredits = 50;
82
inventory.PremiumCreditsFree = 50;
83
inventoryChanges.PremiumCredits = 50;
84
inventoryChanges.PremiumCreditsFree = 50;
85
inventory.RegularCredits = 3000;
86
inventoryChanges.RegularCredits = 3000;
87
88
for (const item of awakeningRewards) {
89
const inventoryDelta = await addItem(inventory, item);
90
combineInventoryChanges(inventoryChanges, inventoryDelta);
91
}
92
93
inventory.PlayedParkourTutorial = true;
94
inventory.ReceivedStartingGear = true;
95
96
return inventoryChanges;
97
};
@@ -6,20 +6,21 @@ import { IOid } from "@/src/types/commonTypes";
6
6
import {
7
7
IConsumedSuit,
8
8
IHelminthFoodRecord,
9
IInfestedFoundryClient,
10
IInfestedFoundryDatabase,
11
9
IInventoryClient,
12
10
IMiscItem,
13
InventorySlot,
14
ITypeCount
11
InventorySlot
15
12
} from "@/src/types/inventoryTypes/inventoryTypes";
16
import { ExportMisc, ExportRecipes } from "warframe-public-export-plus";
13
import { ExportMisc } from "warframe-public-export-plus";
17
14
import { getRecipe } from "@/src/services/itemDataService";
18
import { TInventoryDatabaseDocument } from "@/src/models/inventoryModels/inventoryModel";
19
15
import { toMongoDate } from "@/src/helpers/inventoryHelpers";
20
16
import { logger } from "@/src/utils/logger";
21
17
import { colorToShard } from "@/src/helpers/shardHelper";
22
18
import { config } from "@/src/services/configService";
19
import {
20
addInfestedFoundryXP,
21
applyCheatsToInfestedFoundry,
22
handleSubsumeCompletion
23
} from "@/src/services/infestedFoundryService";
23
24
24
25
export const infestedFoundryController: RequestHandler = async (req, res) => {
25
26
const accountId = await getAccountIdForRequest(req);
@@ -383,116 +384,11 @@ interface IHelminthFeedRequest {
383
384
}[];
384
385
}
385
386
386
export const addInfestedFoundryXP = (infestedFoundry: IInfestedFoundryDatabase, delta: number): ITypeCount[] => {
387
const recipeChanges: ITypeCount[] = [];
388
infestedFoundry.XP ??= 0;
389
const prevXP = infestedFoundry.XP;
390
infestedFoundry.XP += delta;
391
if (prevXP < 2250_00 && infestedFoundry.XP >= 2250_00) {
392
infestedFoundry.Slots ??= 0;
393
infestedFoundry.Slots += 3;
394
}
395
if (prevXP < 5625_00 && infestedFoundry.XP >= 5625_00) {
396
recipeChanges.push({
397
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthShieldsBlueprint",
398
ItemCount: 1
399
});
400
}
401
if (prevXP < 10125_00 && infestedFoundry.XP >= 10125_00) {
402
recipeChanges.push({ ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthHackBlueprint", ItemCount: 1 });
403
}
404
if (prevXP < 15750_00 && infestedFoundry.XP >= 15750_00) {
405
infestedFoundry.Slots ??= 0;
406
infestedFoundry.Slots += 10;
407
}
408
if (prevXP < 22500_00 && infestedFoundry.XP >= 22500_00) {
409
recipeChanges.push({
410
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthAmmoEfficiencyBlueprint",
411
ItemCount: 1
412
});
413
}
414
if (prevXP < 30375_00 && infestedFoundry.XP >= 30375_00) {
415
recipeChanges.push({ ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthStunBlueprint", ItemCount: 1 });
416
}
417
if (prevXP < 39375_00 && infestedFoundry.XP >= 39375_00) {
418
infestedFoundry.Slots ??= 0;
419
infestedFoundry.Slots += 20;
420
}
421
if (prevXP < 60750_00 && infestedFoundry.XP >= 60750_00) {
422
recipeChanges.push({ ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthStatusBlueprint", ItemCount: 1 });
423
}
424
if (prevXP < 73125_00 && infestedFoundry.XP >= 73125_00) {
425
infestedFoundry.Slots = 1;
426
}
427
if (prevXP < 86625_00 && infestedFoundry.XP >= 86625_00) {
428
recipeChanges.push({
429
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthShieldArmorBlueprint",
430
ItemCount: 1
431
});
432
}
433
if (prevXP < 101250_00 && infestedFoundry.XP >= 101250_00) {
434
recipeChanges.push({
435
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthProcBlockBlueprint",
436
ItemCount: 1
437
});
438
}
439
if (prevXP < 117000_00 && infestedFoundry.XP >= 117000_00) {
440
recipeChanges.push({
441
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthEnergyShareBlueprint",
442
ItemCount: 1
443
});
444
}
445
if (prevXP < 133875_00 && infestedFoundry.XP >= 133875_00) {
446
recipeChanges.push({
447
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthMaxStatusBlueprint",
448
ItemCount: 1
449
});
450
}
451
if (prevXP < 151875_00 && infestedFoundry.XP >= 151875_00) {
452
recipeChanges.push({
453
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthTreasureBlueprint",
454
ItemCount: 1
455
});
456
}
457
return recipeChanges;
458
};
459
460
387
interface IHelminthSubsumeRequest {
461
388
SuitId: IOid;
462
389
Recipe: string;
463
390
}
464
391
465
export const handleSubsumeCompletion = (inventory: TInventoryDatabaseDocument): ITypeCount[] => {
466
const [recipeType] = Object.entries(ExportRecipes).find(
467
([_recipeType, recipe]) =>
468
recipe.secretIngredientAction == "SIA_WARFRAME_ABILITY" &&
469
recipe.secretIngredients![0].ItemType == inventory.InfestedFoundry!.LastConsumedSuit!.ItemType
470
)!;
471
inventory.InfestedFoundry!.LastConsumedSuit = undefined;
472
inventory.InfestedFoundry!.AbilityOverrideUnlockCooldown = undefined;
473
const recipeChanges: ITypeCount[] = [
474
{
475
ItemType: recipeType,
476
ItemCount: 1
477
}
478
];
479
addRecipes(inventory, recipeChanges);
480
return recipeChanges;
481
};
482
483
export const applyCheatsToInfestedFoundry = (infestedFoundry: IInfestedFoundryClient): void => {
484
if (config.infiniteHelminthMaterials) {
485
infestedFoundry.Resources = [
486
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthCalx", Count: 1000 },
487
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthBiotics", Count: 1000 },
488
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthSynthetics", Count: 1000 },
489
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthPheromones", Count: 1000 },
490
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthBile", Count: 1000 },
491
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthOxides", Count: 1000 }
492
];
493
}
494
};
495
496
392
interface IHelminthOfferingsUpdate {
497
393
OfferingsIndex: number;
498
394
SuitTypes: string[];
@@ -13,9 +13,10 @@ import {
13
13
ExportResources,
14
14
ExportVirtuals
15
15
} from "warframe-public-export-plus";
16
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "./infestedFoundryController";
16
import { applyCheatsToInfestedFoundry, handleSubsumeCompletion } from "@/src/services/infestedFoundryService";
17
17
import { addMiscItems, allDailyAffiliationKeys, createLibraryDailyTask } from "@/src/services/inventoryService";
18
18
import { logger } from "@/src/utils/logger";
19
import { catBreadHash } from "@/src/helpers/stringHelpers";
19
20
20
21
export const inventoryController: RequestHandler = async (request, response) => {
21
22
const accountId = await getAccountIdForRequest(request);
@@ -269,7 +270,7 @@ export const getInventoryResponse = async (
269
270
return inventoryResponse;
270
271
};
271
272
272
export const addString = (arr: string[], str: string): void => {
273
const addString = (arr: string[], str: string): void => {
273
274
if (!arr.find(x => x == str)) {
274
275
arr.push(str);
275
276
}
@@ -299,13 +300,3 @@ const resourceGetParent = (resourceName: string): string | undefined => {
299
300
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
300
301
return ExportVirtuals[resourceName]?.parentName;
301
302
};
302
303
// This is FNV1a-32 except operating under modulus 2^31 because JavaScript is stinky and likes producing negative integers out of nowhere.
304
export const catBreadHash = (name: string): number => {
305
let hash = 2166136261;
306
for (let i = 0; i != name.length; ++i) {
307
hash = (hash ^ name.charCodeAt(i)) & 0x7fffffff;
308
hash = (hash * 16777619) & 0x7fffffff;
309
}
310
return hash;
311
};
@@ -11,7 +11,7 @@ import { getAccountIdForRequest } from "@/src/services/loginService";
11
11
import { addMiscItems, addRecipes, getInventory, updateCurrency } from "@/src/services/inventoryService";
12
12
import { getRecipeByResult } from "@/src/services/itemDataService";
13
13
import { IInventoryChanges } from "@/src/types/purchaseTypes";
14
import { addInfestedFoundryXP, applyCheatsToInfestedFoundry } from "./infestedFoundryController";
14
import { addInfestedFoundryXP, applyCheatsToInfestedFoundry } from "@/src/services/infestedFoundryService";
15
15
import { config } from "@/src/services/configService";
16
16
17
17
export const upgradesController: RequestHandler = async (req, res) => {
@@ -18,7 +18,7 @@ import {
18
18
ITypeXPItem
19
19
} from "@/src/types/inventoryTypes/inventoryTypes";
20
20
import { RequestHandler } from "express";
21
import { catBreadHash } from "../api/inventoryController";
21
import { catBreadHash } from "@/src/helpers/stringHelpers";
22
22
import { ExportCustoms, ExportDojoRecipes } from "warframe-public-export-plus";
23
23
import { IStatsClient } from "@/src/types/statTypes";
24
24
import { toStoreItem } from "@/src/services/itemDataService";
@@ -27,6 +27,16 @@ export const getIndexAfter = (str: string, searchWord: string): number => {
27
27
return index + searchWord.length;
28
28
};
29
29
30
// This is FNV1a-32 except operating under modulus 2^31 because JavaScript is stinky and likes producing negative integers out of nowhere.
31
export const catBreadHash = (name: string): number => {
32
let hash = 2166136261;
33
for (let i = 0; i != name.length; ++i) {
34
hash = (hash ^ name.charCodeAt(i)) & 0x7fffffff;
35
hash = (hash * 16777619) & 0x7fffffff;
36
}
37
return hash;
38
};
39
30
40
export const regexEscape = (str: string): string => {
31
41
str = str.split(".").join("\\.");
32
42
str = str.split("\\").join("\\\\");
@@ -0,0 +1,110 @@
1
import { ExportRecipes } from "warframe-public-export-plus";
2
import { TInventoryDatabaseDocument } from "../models/inventoryModels/inventoryModel";
3
import { IInfestedFoundryClient, IInfestedFoundryDatabase, ITypeCount } from "../types/inventoryTypes/inventoryTypes";
4
import { addRecipes } from "./inventoryService";
5
import { config } from "./configService";
6
7
export const addInfestedFoundryXP = (infestedFoundry: IInfestedFoundryDatabase, delta: number): ITypeCount[] => {
8
const recipeChanges: ITypeCount[] = [];
9
infestedFoundry.XP ??= 0;
10
const prevXP = infestedFoundry.XP;
11
infestedFoundry.XP += delta;
12
if (prevXP < 2250_00 && infestedFoundry.XP >= 2250_00) {
13
infestedFoundry.Slots ??= 0;
14
infestedFoundry.Slots += 3;
15
}
16
if (prevXP < 5625_00 && infestedFoundry.XP >= 5625_00) {
17
recipeChanges.push({
18
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthShieldsBlueprint",
19
ItemCount: 1
20
});
21
}
22
if (prevXP < 10125_00 && infestedFoundry.XP >= 10125_00) {
23
recipeChanges.push({ ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthHackBlueprint", ItemCount: 1 });
24
}
25
if (prevXP < 15750_00 && infestedFoundry.XP >= 15750_00) {
26
infestedFoundry.Slots ??= 0;
27
infestedFoundry.Slots += 10;
28
}
29
if (prevXP < 22500_00 && infestedFoundry.XP >= 22500_00) {
30
recipeChanges.push({
31
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthAmmoEfficiencyBlueprint",
32
ItemCount: 1
33
});
34
}
35
if (prevXP < 30375_00 && infestedFoundry.XP >= 30375_00) {
36
recipeChanges.push({ ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthStunBlueprint", ItemCount: 1 });
37
}
38
if (prevXP < 39375_00 && infestedFoundry.XP >= 39375_00) {
39
infestedFoundry.Slots ??= 0;
40
infestedFoundry.Slots += 20;
41
}
42
if (prevXP < 60750_00 && infestedFoundry.XP >= 60750_00) {
43
recipeChanges.push({ ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthStatusBlueprint", ItemCount: 1 });
44
}
45
if (prevXP < 73125_00 && infestedFoundry.XP >= 73125_00) {
46
infestedFoundry.Slots = 1;
47
}
48
if (prevXP < 86625_00 && infestedFoundry.XP >= 86625_00) {
49
recipeChanges.push({
50
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthShieldArmorBlueprint",
51
ItemCount: 1
52
});
53
}
54
if (prevXP < 101250_00 && infestedFoundry.XP >= 101250_00) {
55
recipeChanges.push({
56
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthProcBlockBlueprint",
57
ItemCount: 1
58
});
59
}
60
if (prevXP < 117000_00 && infestedFoundry.XP >= 117000_00) {
61
recipeChanges.push({
62
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthEnergyShareBlueprint",
63
ItemCount: 1
64
});
65
}
66
if (prevXP < 133875_00 && infestedFoundry.XP >= 133875_00) {
67
recipeChanges.push({
68
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthMaxStatusBlueprint",
69
ItemCount: 1
70
});
71
}
72
if (prevXP < 151875_00 && infestedFoundry.XP >= 151875_00) {
73
recipeChanges.push({
74
ItemType: "/Lotus/Types/Recipes/AbilityOverrides/HelminthTreasureBlueprint",
75
ItemCount: 1
76
});
77
}
78
return recipeChanges;
79
};
80
81
export const handleSubsumeCompletion = (inventory: TInventoryDatabaseDocument): ITypeCount[] => {
82
const [recipeType] = Object.entries(ExportRecipes).find(
83
([_recipeType, recipe]) =>
84
recipe.secretIngredientAction == "SIA_WARFRAME_ABILITY" &&
85
recipe.secretIngredients![0].ItemType == inventory.InfestedFoundry!.LastConsumedSuit!.ItemType
86
)!;
87
inventory.InfestedFoundry!.LastConsumedSuit = undefined;
88
inventory.InfestedFoundry!.AbilityOverrideUnlockCooldown = undefined;
89
const recipeChanges: ITypeCount[] = [
90
{
91
ItemType: recipeType,
92
ItemCount: 1
93
}
94
];
95
addRecipes(inventory, recipeChanges);
96
return recipeChanges;
97
};
98
99
export const applyCheatsToInfestedFoundry = (infestedFoundry: IInfestedFoundryClient): void => {
100
if (config.infiniteHelminthMaterials) {
101
infestedFoundry.Resources = [
102
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthCalx", Count: 1000 },
103
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthBiotics", Count: 1000 },
104
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthSynthetics", Count: 1000 },
105
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthPheromones", Count: 1000 },
106
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthBile", Count: 1000 },
107
{ ItemType: "/Lotus/Types/Items/InfestedFoundry/HelminthOxides", Count: 1000 }
108
];
109
}
110
};