From badd8fa26542e225ff94d1e6947f3c9a4a038f6e Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 29 Jul 2023 13:48:13 +0100 Subject: [PATCH] Update readme + example 1 types --- TypeScript/10ScopesAndTypes/README.md | 6 +-- TypeScript/11BundleLoadingSample/README.md | 6 +-- TypeScript/12ClassExtensionOverride/README.md | 6 +-- TypeScript/13AddTrader/README.md | 6 +-- TypeScript/14AfterDBLoadHook/README.md | 6 +-- TypeScript/15HttpListenerExample/README.md | 8 ++-- TypeScript/16ImporterUtil/README.md | 6 +-- .../17AsyncImporterWithDependency1/README.md | 6 +-- .../17AsyncImporterWithDependency2/README.md | 6 +-- TypeScript/18CustomItemService/README.md | 6 +-- TypeScript/1LogToConsole/README.md | 6 +-- .../types/callbacks/BotCallbacks.d.ts | 1 + .../types/controllers/DialogueController.d.ts | 40 ++++++++++++++----- .../types/controllers/QuestController.d.ts | 2 +- .../types/generators/BotLootGenerator.d.ts | 6 +++ .../helpers/BotWeaponGeneratorHelper.d.ts | 3 +- .../types/helpers/InRaidHelper.d.ts | 14 ++++++- .../types/helpers/QuestHelper.d.ts | 2 +- .../models/eft/common/tables/IQuest.d.ts | 1 + .../types/models/enums/ItemAddedResult.d.ts | 4 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/WildSpawnTypeNumber.d.ts | 5 ++- .../types/models/spt/config/IBotConfig.d.ts | 5 +++ .../types/models/spt/config/IPmcConfig.d.ts | 2 + TypeScript/2EditDatabase/README.md | 6 +-- TypeScript/3GetSptConfigFile/README.md | 6 +-- TypeScript/4UseACustomConfigFile/README.md | 6 +-- TypeScript/5ReplaceMethod/README.md | 6 +-- TypeScript/6ReferenceAnotherClass/README.md | 6 +-- TypeScript/7OnLoadHook/README.md | 6 +-- TypeScript/8OnUpdateHook/README.md | 6 +-- TypeScript/9RouterHooks/README.md | 6 +-- 32 files changed, 129 insertions(+), 75 deletions(-) create mode 100644 TypeScript/1LogToConsole/types/models/enums/ItemAddedResult.d.ts diff --git a/TypeScript/10ScopesAndTypes/README.md b/TypeScript/10ScopesAndTypes/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/10ScopesAndTypes/README.md +++ b/TypeScript/10ScopesAndTypes/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/11BundleLoadingSample/README.md b/TypeScript/11BundleLoadingSample/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/11BundleLoadingSample/README.md +++ b/TypeScript/11BundleLoadingSample/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/12ClassExtensionOverride/README.md b/TypeScript/12ClassExtensionOverride/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/12ClassExtensionOverride/README.md +++ b/TypeScript/12ClassExtensionOverride/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/13AddTrader/README.md b/TypeScript/13AddTrader/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/13AddTrader/README.md +++ b/TypeScript/13AddTrader/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/14AfterDBLoadHook/README.md b/TypeScript/14AfterDBLoadHook/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/14AfterDBLoadHook/README.md +++ b/TypeScript/14AfterDBLoadHook/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/15HttpListenerExample/README.md b/TypeScript/15HttpListenerExample/README.md index 45b764c..678c9d3 100644 --- a/TypeScript/15HttpListenerExample/README.md +++ b/TypeScript/15HttpListenerExample/README.md @@ -13,15 +13,15 @@ A system reboot may be needed after install. ## **IDE:** -The second step is having an IDE ready. For the currect purpose we've setup a VSCodium workspace file. +The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Worspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/16ImporterUtil/README.md b/TypeScript/16ImporterUtil/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/16ImporterUtil/README.md +++ b/TypeScript/16ImporterUtil/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/17AsyncImporterWithDependency1/README.md b/TypeScript/17AsyncImporterWithDependency1/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/README.md +++ b/TypeScript/17AsyncImporterWithDependency1/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/17AsyncImporterWithDependency2/README.md b/TypeScript/17AsyncImporterWithDependency2/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/README.md +++ b/TypeScript/17AsyncImporterWithDependency2/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/18CustomItemService/README.md b/TypeScript/18CustomItemService/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/18CustomItemService/README.md +++ b/TypeScript/18CustomItemService/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/1LogToConsole/README.md b/TypeScript/1LogToConsole/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/1LogToConsole/README.md +++ b/TypeScript/1LogToConsole/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts index 827015e..036e545 100644 --- a/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts @@ -10,6 +10,7 @@ export declare class BotCallbacks { constructor(botController: BotController, httpResponse: HttpResponseUtil); /** * Handle singleplayer/settings/bot/limit + * Is called by client to define each bot roles wave limit * @returns string */ getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string; diff --git a/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts b/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts index 310b9e7..5904c1a 100644 --- a/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts @@ -1,4 +1,5 @@ import { DialogueHelper } from "../helpers/DialogueHelper"; +import { ProfileHelper } from "../helpers/ProfileHelper"; import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "../models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "../models/eft/dialog/IGetMailDialogViewRequestData"; @@ -11,16 +12,19 @@ import { SaveServer } from "../servers/SaveServer"; import { GiftService } from "../services/GiftService"; import { MailSendService } from "../services/MailSendService"; import { HashUtil } from "../utils/HashUtil"; +import { RandomUtil } from "../utils/RandomUtil"; import { TimeUtil } from "../utils/TimeUtil"; export declare class DialogueController { protected logger: ILogger; protected saveServer: SaveServer; protected timeUtil: TimeUtil; protected dialogueHelper: DialogueHelper; + protected profileHelper: ProfileHelper; + protected randomUtil: RandomUtil; protected mailSendService: MailSendService; protected giftService: GiftService; protected hashUtil: HashUtil; - constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, hashUtil: HashUtil); /** Handle onUpdate spt event */ update(): void; /** @@ -69,7 +73,7 @@ export declare class DialogueController { */ protected getDialogByIdFromProfile(profile: IAkiProfile, request: IGetMailDialogViewRequestData): Dialogue; /** - * Get the users involved in a mail between two entities + * Get the users involved in a mail between two entities * @param fullProfile Player profile * @param dialogUsers The participants of the mail * @returns IUserDialogInfo array @@ -88,21 +92,37 @@ export declare class DialogueController { * @returns true if uncollected rewards found */ protected messagesHaveUncollectedRewards(messages: Message[]): boolean; - /** Handle client/mail/dialog/remove */ - removeDialogue(dialogueID: string, sessionID: string): void; - setDialoguePin(dialogueID: string, shouldPin: boolean, sessionID: string): void; - /** Handle client/mail/dialog/read */ - setRead(dialogueIDs: string[], sessionID: string): void; + /** + * Handle client/mail/dialog/remove + * Remove an entire dialog with an entity (trader/user) + * @param dialogueId id of the dialog to remove + * @param sessionId Player id + */ + removeDialogue(dialogueId: string, sessionId: string): void; + /** Handle client/mail/dialog/pin && Handle client/mail/dialog/unpin */ + setDialoguePin(dialogueId: string, shouldPin: boolean, sessionId: string): void; + /** + * Handle client/mail/dialog/read + * Set a dialog to be read (no number alert/attachment alert) + * @param dialogueIds Dialog ids to set as read + * @param sessionId Player profile id + */ + setRead(dialogueIds: string[], sessionId: string): void; /** * Handle client/mail/dialog/getAllAttachments * Get all uncollected items attached to mail in a particular dialog - * @param dialogueID Dialog to get mail attachments from - * @param sessionID Session id + * @param dialogueId Dialog to get mail attachments from + * @param sessionId Session id * @returns */ - getAllAttachments(dialogueID: string, sessionID: string): IGetAllAttachmentsResponse; + getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse; /** client/mail/msg/send */ sendMessage(sessionId: string, request: ISendMessageRequest): string; + /** + * Send responses back to player when they communicate with SPT friend on friends list + * @param sessionId Session Id + * @param request send message request + */ protected handleChatWithSPTFriend(sessionId: string, request: ISendMessageRequest): void; protected getSptFriendData(friendId?: string): IUserDialogInfo; /** diff --git a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts index 27a5a1a..3e8b7dd 100644 --- a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts @@ -132,7 +132,7 @@ export declare class QuestController { */ protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[]; /** - * Fail the quests provided + * Fail the provided quests * Update quest in profile, otherwise add fresh quest object with failed status * @param sessionID session id * @param pmcData player profile diff --git a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts index 6f2f6ec..5e7df96 100644 --- a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts @@ -40,6 +40,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Force healing items onto bot to ensure they can heal in-raid + * @param botInventory Inventory to add items to + * @param botRole Role of bot (sptBear/sptUsec) + */ + protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void; protected getRandomisedCount(min: number, max: number, nValue: number): number; /** * Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached diff --git a/TypeScript/1LogToConsole/types/helpers/BotWeaponGeneratorHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/BotWeaponGeneratorHelper.d.ts index 8a3784b..a50454d 100644 --- a/TypeScript/1LogToConsole/types/helpers/BotWeaponGeneratorHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/BotWeaponGeneratorHelper.d.ts @@ -3,6 +3,7 @@ import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { EquipmentSlots } from "../models/enums/EquipmentSlots"; +import { ItemAddedResult } from "../models/enums/ItemAddedResult"; import { ILogger } from "../models/spt/utils/ILogger"; import { DatabaseServer } from "../servers/DatabaseServer"; import { LocalisationService } from "../services/LocalisationService"; @@ -72,7 +73,7 @@ export declare class BotWeaponGeneratorHelper { * @param inventory Inventory to add item+children into * @returns a `boolean` indicating item was added */ - addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): boolean; + addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult; /** * is the provided item allowed inside a container * @param slot location item wants to be placed in diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index baaf448..463ab6d 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -1,5 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; -import { Victim } from "../models/eft/common/tables/IBotBase"; +import { Quest, Victim } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData"; import { ILostOnDeathConfig } from "../models/spt/config/ILostOnDeathConfig"; @@ -13,6 +13,7 @@ import { JsonUtil } from "../utils/JsonUtil"; import { InventoryHelper } from "./InventoryHelper"; import { ItemHelper } from "./ItemHelper"; import { PaymentHelper } from "./PaymentHelper"; +import { QuestHelper } from "./QuestHelper"; export declare class InRaidHelper { protected logger: ILogger; protected saveServer: SaveServer; @@ -20,12 +21,13 @@ export declare class InRaidHelper { protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; + protected questHelper: QuestHelper; protected paymentHelper: PaymentHelper; protected localisationService: LocalisationService; protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); + constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory @@ -61,6 +63,14 @@ export declare class InRaidHelper { * @returns Reset profile object */ updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData; + /** + * Look for quests not are now status = fail that were not failed pre-raid and run the failQuest() function + * @param sessionId Player id + * @param pmcData Player profile + * @param preRaidQuests Quests prior to starting raid + * @param postRaidQuests Quest after raid + */ + protected processFailedQuests(sessionId: string, pmcData: IPmcData, preRaidQuests: Quest[], postRaidQuests: Quest[]): void; protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void; /** * Take body part effects from client profile and apply to server profile diff --git a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts index dbee0a0..6bbaa0c 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts @@ -116,7 +116,7 @@ export declare class QuestHelper { * Get quests that can be shown to player after failing a quest * @param failedQuestId Id of the quest failed by player * @param sessionId Session id - * @returns + * @returns IQuest array */ failedUnlocked(failedQuestId: string, sessionId: string): IQuest[]; /** diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/IQuest.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/IQuest.d.ts index fa636b4..c6005ca 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IQuest.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IQuest.d.ts @@ -69,6 +69,7 @@ export interface AvailableForProps { zoneId?: string; type?: boolean; countInRaid?: boolean; + globalQuestCounterId?: any; } export interface AvailableForCounter { id: string; diff --git a/TypeScript/1LogToConsole/types/models/enums/ItemAddedResult.d.ts b/TypeScript/1LogToConsole/types/models/enums/ItemAddedResult.d.ts new file mode 100644 index 0000000..e64b660 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/ItemAddedResult.d.ts @@ -0,0 +1,4 @@ +export declare enum ItemAddedResult { + SUCCESS = 1, + NO_SPACE = 2 +} diff --git a/TypeScript/1LogToConsole/types/models/enums/QuestRewardType.d.ts b/TypeScript/1LogToConsole/types/models/enums/QuestRewardType.d.ts index dde0b33..fee0ad2 100644 --- a/TypeScript/1LogToConsole/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/QuestRewardType.d.ts @@ -7,5 +7,6 @@ export declare enum QuestRewardType { ASSORTMENT_UNLOCK = "AssortmentUnlock", PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", - TRADER_STANDING_RESTORE = "TraderStandingRestore" + TRADER_STANDING_RESTORE = "TraderStandingRestore", + STASH_ROWS = "StashRows" } diff --git a/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts index f3a4b36..921e797 100644 --- a/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts @@ -31,5 +31,8 @@ export declare enum WildSpawnTypeNumber { BOSSZRYACHIY = 29, FOLLOWERZRYACHIY = 30, ARENAFIGHTER = 31, - ARENAFIGHTEREVENT = 32 + ARENAFIGHTEREVENT = 32, + CRAZYASSAULTEVENT = 33, + SPTUSEC = 34, + SPTBEAR = 35 } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts index a536106..511b152 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IBotConfig.d.ts @@ -62,6 +62,11 @@ export interface PresetBatch { gifter: number; test: number; exUsec: number; + arenaFighterEvent: number; + arenaFighter: number; + crazyAssaultEvent: number; + sptUsec: number; + sptBear: number; } export interface LootNvalue { scav: number; diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts index fbf0a44..a349ac2 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts @@ -38,6 +38,8 @@ export interface IPmcConfig { enemyTypes: string[]; /** How many levels above player level can a PMC be */ botRelativeLevelDeltaMax: number; + /** Force a number of healing items into PMCs secure container to ensure they can heal */ + forceHealingItemsIntoSecure: boolean; } export interface PmcTypes { usec: string; diff --git a/TypeScript/2EditDatabase/README.md b/TypeScript/2EditDatabase/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/2EditDatabase/README.md +++ b/TypeScript/2EditDatabase/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/3GetSptConfigFile/README.md b/TypeScript/3GetSptConfigFile/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/3GetSptConfigFile/README.md +++ b/TypeScript/3GetSptConfigFile/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/4UseACustomConfigFile/README.md b/TypeScript/4UseACustomConfigFile/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/4UseACustomConfigFile/README.md +++ b/TypeScript/4UseACustomConfigFile/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/5ReplaceMethod/README.md b/TypeScript/5ReplaceMethod/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/5ReplaceMethod/README.md +++ b/TypeScript/5ReplaceMethod/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/6ReferenceAnotherClass/README.md b/TypeScript/6ReferenceAnotherClass/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/6ReferenceAnotherClass/README.md +++ b/TypeScript/6ReferenceAnotherClass/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/7OnLoadHook/README.md b/TypeScript/7OnLoadHook/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/7OnLoadHook/README.md +++ b/TypeScript/7OnLoadHook/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/8OnUpdateHook/README.md b/TypeScript/8OnUpdateHook/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/8OnUpdateHook/README.md +++ b/TypeScript/8OnUpdateHook/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended. diff --git a/TypeScript/9RouterHooks/README.md b/TypeScript/9RouterHooks/README.md index 9e3b8bc..678c9d3 100644 --- a/TypeScript/9RouterHooks/README.md +++ b/TypeScript/9RouterHooks/README.md @@ -15,13 +15,13 @@ A system reboot may be needed after install. The second step is having an IDE ready. We've setup a VSCodium workspace file to help with this. -You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCodium. +You CAN use Visual Studio Code if you so desire, just keep in mind that our dev tests on the mod files was done using VSCode. -You can get VSCodium here: https://vscodium.com/#install +You can get VSCOde here: https://code.visualstudio.com/ ## **Workspace:** -Once you have NodeJS and VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). +Once you have NodeJS and VSCode/VSCodium ready, open the mod.code-workspace file with VSCodium (File->Open Workspace from File...). Once the project loads into VSCodium you will be recommended to install the ESLint plugin. This is HIGHLY recommended.