Update types

This commit is contained in:
Dev 2024-04-26 15:38:19 +01:00
parent 361af8a9d3
commit e2790c4e34
144 changed files with 840 additions and 288 deletions

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

View File

@ -46,6 +46,21 @@ export declare class FenceService {
* @param assort New assorts to replace old with * @param assort New assorts to replace old with
*/ */
setFenceAssort(assort: ITraderAssort): void; 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 * Replace high rep level fence assort with new assort
* @param discountAssort New assorts to replace old with * @param discountAssort New assorts to replace old with
@ -119,8 +134,8 @@ export declare class FenceService {
protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void; protected deleteRandomAssorts(itemCountToReplace: number, assort: ITraderAssort): void;
/** /**
* Choose an item at random and remove it + mods from assorts * Choose an item at random and remove it + mods from assorts
* @param assort Items to remove from * @param assort Trader assort to remove item from
* @param rootItems Assort root items to pick from to remove * @param rootItems Pool of root items to pick from to remove
*/ */
protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void; protected removeRandomItemFromAssorts(assort: ITraderAssort, rootItems: Item[]): void;
/** /**

View File

@ -183,4 +183,9 @@ export declare class ProfileFixerService {
* @param pmcProfile Profile to remove dead quests from * @param pmcProfile Profile to remove dead quests from
*/ */
protected removeOrphanedQuests(pmcProfile: IPmcData): void; 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;
} }

View File

@ -54,9 +54,10 @@ export declare class BotController {
* Adjust PMC settings to ensure they engage the correct bot types * Adjust PMC settings to ensure they engage the correct bot types
* @param type what bot the server is requesting settings for * @param type what bot the server is requesting settings for
* @param diffLevel difficulty level server requested settings for * @param diffLevel difficulty level server requested settings for
* @param ignoreRaidSettings should raid settings chosen pre-raid be ignored
* @returns Difficulty object * @returns Difficulty object
*/ */
getBotDifficulty(type: string, diffLevel: string): Difficulty; getBotDifficulty(type: string, diffLevel: string, ignoreRaidSettings?: boolean): Difficulty;
getAllBotDifficulties(): Record<string, any>; getAllBotDifficulties(): Record<string, any>;
/** /**
* Generate bot profiles and store in cache * Generate bot profiles and store in cache

View File

@ -75,10 +75,11 @@ export declare class MatchController {
protected sendCoopTakenFenceMessage(sessionId: string): void; protected sendCoopTakenFenceMessage(sessionId: string): void;
/** /**
* Handle when a player extracts using a coop extract - add rep to fence * Handle when a player extracts using a coop extract - add rep to fence
* @param sessionId Session/player id
* @param pmcData Profile * @param pmcData Profile
* @param extractName Name of extract taken * @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 * Was extract by car
* @param extractName name of extract * @param extractName name of extract

View File

@ -187,12 +187,12 @@ export declare class BotEquipmentModGenerator {
*/ */
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string; protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
/** /**
* Log errors if mod is not compatible with slot * Check if mod exists in db + is for a required slot
* @param modToAdd template of mod to check * @param modToAdd Db template of mod to check
* @param slotAddedToTemplate slot the item will be placed in * @param slotAddedToTemplate Slot object the item will be placed as child into
* @param modSlot slot the mod will fill * @param modSlot Slot the mod will fill
* @param parentTemplate template of the mods being added * @param parentTemplate Db template of the mods being added
* @param botRole * @param botRole Bots wildspawntype (assault/pmcBot etc)
* @returns true if valid * @returns true if valid
*/ */
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean; protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;

View File

@ -363,10 +363,11 @@ export declare class ItemHelper {
* Chose a randomly weighted cartridge that fits * Chose a randomly weighted cartridge that fits
* @param caliber Desired caliber * @param caliber Desired caliber
* @param staticAmmoDist Cartridges and thier weights * @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 * @param cartridgeWhitelist OPTIONAL whitelist for cartridges
* @returns Tpl of cartridge * @returns Tpl of cartridge
*/ */
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string; protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, fallbackCartridgeTpl: string, cartridgeWhitelist?: string[]): string;
/** /**
* Create a basic cartrige object * Create a basic cartrige object
* @param parentId container cartridges will be placed in * @param parentId container cartridges will be placed in
@ -401,7 +402,7 @@ export declare class ItemHelper {
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[]; addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
/** /**
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter * 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 * @param incompatibleModTpls Incompatible tpls to not allow
* @returns Chosen tpl or null * @returns Chosen tpl or null
*/ */

Some files were not shown because too many files have changed in this diff Show More