diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box diff --git a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts index 72d2ff2..270e4af 100644 --- a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts @@ -3,7 +3,7 @@ import { BotHelper } from "../helpers/BotHelper"; import { ProfileHelper } from "../helpers/ProfileHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "../models/eft/common/tables/IBotBase"; -import { Health, IBotType } from "../models/eft/common/tables/IBotType"; +import { Appearance, Health, IBotType } from "../models/eft/common/tables/IBotType"; import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; @@ -68,6 +68,13 @@ export declare class BotGenerator { * @returns IBotBase object */ protected generateBot(sessionId: string, bot: IBotBase, botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails): IBotBase; + /** + * Choose various appearance settings for a bot using weights + * @param bot Bot to adjust + * @param appearance Appearance settings to choose from + * @param botGenerationDetails Generation details + */ + protected setBotAppearance(bot: IBotBase, appearance: Appearance, botGenerationDetails: BotGenerationDetails): void; /** * Create a bot nickname * @param botJsonTemplate x.json from database diff --git a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts index 2dff3cc..d0e8758 100644 --- a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts @@ -7,6 +7,7 @@ import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase" import { IBotType, Inventory, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; +import { EquipmentSlots } from "../models/enums/EquipmentSlots"; import { IBotConfig } from "../models/spt/config/IBotConfig"; import { IPmcConfig } from "../models/spt/config/IPmcConfig"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -44,6 +45,12 @@ export declare class BotLootGenerator { * @param botLevel Level of bot */ generateLoot(sessionId: string, botJsonTemplate: IBotType, isPmc: boolean, botRole: string, botInventory: PmcInventory, botLevel: number): void; + /** + * Get an array of the containers a bot has on them (pockets/backpack/vest) + * @param botInventory Bot to check + * @returns Array of available slots + */ + protected getAvailableContainersBotCanStoreItemsIn(botInventory: PmcInventory): EquipmentSlots[]; /** * Force healing items onto bot to ensure they can heal in-raid * @param botInventory Inventory to add items to diff --git a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts index a627c0f..f71b361 100644 --- a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts @@ -1,4 +1,5 @@ import { IPmcData } from "../models/eft/common/IPmcData"; +import { Inventory } from "../models/eft/common/tables/IBotBase"; import { Item } from "../models/eft/common/tables/IItem"; import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData"; import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject"; @@ -59,9 +60,20 @@ export declare class InventoryHelper { * @param useSortingTable Allow items to go into sorting table when stash has no space * @returns IItemEventRouterResponse */ - addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: { - (): void; - }, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse; + /** + * Take the given item, find a free slot in passed in inventory and place it there + * If no space in inventory, place in sorting table + * @param itemToAdd Item to add to inventory + * @param stashFS2D Two dimentional stash map + * @param sortingTableFS2D Two dimentional sorting table stash map + * @param itemLib + * @param pmcData Player profile + * @param useSortingTable Should sorting table be used for overflow items when no inventory space for item + * @param output Client output object + * @returns Client error output if placing item failed + */ + protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse; /** * Add ammo to ammo boxes * @param itemToAdd Item to check is ammo box