diff --git a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/13AddTrader/types/controllers/BotController.d.ts b/TypeScript/13AddTrader/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/13AddTrader/types/controllers/BotController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/13AddTrader/types/services/FenceService.d.ts b/TypeScript/13AddTrader/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/13AddTrader/types/services/FenceService.d.ts +++ b/TypeScript/13AddTrader/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts b/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts b/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/16ImporterUtil/types/services/FenceService.d.ts b/TypeScript/16ImporterUtil/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/16ImporterUtil/types/services/FenceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/18CustomItemService/types/controllers/BotController.d.ts b/TypeScript/18CustomItemService/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/18CustomItemService/types/controllers/BotController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/18CustomItemService/types/services/FenceService.d.ts b/TypeScript/18CustomItemService/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/18CustomItemService/types/services/FenceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts b/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/1LogToConsole/types/controllers/BotController.d.ts b/TypeScript/1LogToConsole/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/1LogToConsole/types/controllers/BotController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/1LogToConsole/types/services/FenceService.d.ts b/TypeScript/1LogToConsole/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/1LogToConsole/types/services/FenceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts b/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts b/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/20CustomChatBot/types/services/FenceService.d.ts b/TypeScript/20CustomChatBot/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/20CustomChatBot/types/services/FenceService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/22CustomAkiCommand/types/controllers/MatchController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/MatchController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts b/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/22CustomAkiCommand/types/services/ProfileFixerService.d.ts b/TypeScript/22CustomAkiCommand/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/22CustomAkiCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/2EditDatabase/types/controllers/BotController.d.ts b/TypeScript/2EditDatabase/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/2EditDatabase/types/controllers/BotController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/2EditDatabase/types/services/FenceService.d.ts b/TypeScript/2EditDatabase/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/2EditDatabase/types/services/FenceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts b/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts b/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/7OnLoadHook/types/services/FenceService.d.ts b/TypeScript/7OnLoadHook/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/7OnLoadHook/types/services/FenceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts b/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; } diff --git a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts index 3ec1aac..556cc5d 100644 --- a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts @@ -54,9 +54,10 @@ export declare class BotController { * Adjust PMC settings to ensure they engage the correct bot types * @param type what bot the server is requesting settings for * @param diffLevel difficulty level server requested settings for + * @param ignoreRaidSettings should raid settings chosen pre-raid be ignored * @returns Difficulty object */ - getBotDifficulty(type: string, diffLevel: string): Difficulty; + getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty; getAllBotDifficulties(): Record; /** * Generate bot profiles and store in cache diff --git a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts index 6b1a7c3..708cee2 100644 --- a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts @@ -75,10 +75,11 @@ export declare class MatchController { protected sendCoopTakenFenceMessage(sessionId: string): void; /** * Handle when a player extracts using a coop extract - add rep to fence + * @param sessionId Session/player id * @param pmcData Profile * @param extractName Name of extract taken */ - protected handleCoopExtract(pmcData: IPmcData, extractName: string): void; + protected handleCoopExtract(sessionId: string, pmcData: IPmcData, extractName: string): void; /** * Was extract by car * @param extractName name of extract diff --git a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts index dd1dcce..f850eea 100644 --- a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts @@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator { */ protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; /** - * Log errors if mod is not compatible with slot - * @param modToAdd template of mod to check - * @param slotAddedToTemplate slot the item will be placed in - * @param modSlot slot the mod will fill - * @param parentTemplate template of the mods being added - * @param botRole + * Check if mod exists in db + is for a required slot + * @param modToAdd Db template of mod to check + * @param slotAddedToTemplate Slot object the item will be placed as child into + * @param modSlot Slot the mod will fill + * @param parentTemplate Db template of the mods being added + * @param botRole Bots wildspawntype (assault/pmcBot etc) * @returns true if valid */ protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; diff --git a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts index 3e91ef7..9040a7c 100644 --- a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts @@ -363,10 +363,11 @@ export declare class ItemHelper { * Chose a randomly weighted cartridge that fits * @param caliber Desired caliber * @param staticAmmoDist Cartridges and thier weights + * @param fallbackCartridgeTpl If a cartridge cannot be found in the above staticAmmoDist param, use this instead * @param cartridgeWhitelist OPTIONAL whitelist for cartridges * @returns Tpl of cartridge */ - protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, cartridgeWhitelist?: string[]): string; + protected drawAmmoTpl(caliber: string, staticAmmoDist: Record, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string; /** * Create a basic cartrige object * @param parentId container cartridges will be placed in @@ -401,7 +402,7 @@ export declare class ItemHelper { addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record, requiredOnly?: boolean): Item[]; /** * Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter - * @param possibleTpls Tpls to randomply choose from + * @param possibleTpls Tpls to randomly choose from * @param incompatibleModTpls Incompatible tpls to not allow * @returns Chosen tpl or null */ diff --git a/TypeScript/9RouterHooks/types/services/FenceService.d.ts b/TypeScript/9RouterHooks/types/services/FenceService.d.ts index 8967026..16c1b7f 100644 --- a/TypeScript/9RouterHooks/types/services/FenceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/FenceService.d.ts @@ -46,6 +46,21 @@ export declare class FenceService { * @param assort New assorts to replace old with */ setFenceAssort(assort: ITraderAssort): void; + /** + * Replace discount fence assort with new assort + * @param assort New assorts to replace old with + */ + setDiscountFenceAssort(assort: ITraderAssort): void; + /** + * Get main fence assort + * @return ITraderAssort + */ + getMainFenceAssort(): ITraderAssort; + /** + * Get discount fence assort + * @return ITraderAssort + */ + getDiscountFenceAssort(): ITraderAssort; /** * Replace high rep level fence assort with new assort * @param discountAssort New assorts to replace old with @@ -119,8 +134,8 @@ export declare class FenceService { protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; /** * Choose an item at random and remove it + mods from assorts - * @param assort Items to remove from - * @param rootItems Assort root items to pick from to remove + * @param assort Trader assort to remove item from + * @param rootItems Pool of root items to pick from to remove */ protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; /** diff --git a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts index 806a8d9..1045d0a 100644 --- a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts @@ -183,4 +183,9 @@ export declare class ProfileFixerService { * @param pmcProfile Profile to remove dead quests from */ protected removeOrphanedQuests(pmcProfile: IPmcData): void; + /** + * If someone has run a mod from pre-3.8.0, it results in an invalid `nextResupply` value + * Resolve this by setting the nextResupply to 0 if it's null + */ + protected fixNullTraderNextResupply(pmcProfile: IPmcData): void; }