diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/10ScopesAndTypes/types/services/CustomHandbookItemService.d.ts b/TypeScript/10ScopesAndTypes/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/10ScopesAndTypes/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/10ScopesAndTypes/types/services/CustomItemService.d.ts b/TypeScript/10ScopesAndTypes/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/10ScopesAndTypes/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/10ScopesAndTypes/types/services/CustomTraderAssortService.d.ts b/TypeScript/10ScopesAndTypes/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/10ScopesAndTypes/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/10ScopesAndTypes/types/services/customPresetService.d.ts b/TypeScript/10ScopesAndTypes/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/10ScopesAndTypes/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts b/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/11BundleLoadingSample/types/services/CustomHandbookItemService.d.ts b/TypeScript/11BundleLoadingSample/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/11BundleLoadingSample/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/11BundleLoadingSample/types/services/CustomItemService.d.ts b/TypeScript/11BundleLoadingSample/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/11BundleLoadingSample/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/11BundleLoadingSample/types/services/CustomTraderAssortService.d.ts b/TypeScript/11BundleLoadingSample/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/11BundleLoadingSample/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/11BundleLoadingSample/types/services/customPresetService.d.ts b/TypeScript/11BundleLoadingSample/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/11BundleLoadingSample/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts b/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/12ClassExtensionOverride/types/services/CustomHandbookItemService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/12ClassExtensionOverride/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/12ClassExtensionOverride/types/services/CustomItemService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/12ClassExtensionOverride/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/12ClassExtensionOverride/types/services/CustomTraderAssortService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/12ClassExtensionOverride/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/12ClassExtensionOverride/types/services/customPresetService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/12ClassExtensionOverride/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/13AddTrader/types/services/CustomHandbookItemService.d.ts b/TypeScript/13AddTrader/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/13AddTrader/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/13AddTrader/types/services/CustomItemService.d.ts b/TypeScript/13AddTrader/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/13AddTrader/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/13AddTrader/types/services/CustomTraderAssortService.d.ts b/TypeScript/13AddTrader/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/13AddTrader/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/13AddTrader/types/services/customPresetService.d.ts b/TypeScript/13AddTrader/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/13AddTrader/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/13AddTrader/types/utils/DatabaseImporter.d.ts b/TypeScript/13AddTrader/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/13AddTrader/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/13AddTrader/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/14AfterDBLoadHook/types/services/CustomHandbookItemService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/14AfterDBLoadHook/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/14AfterDBLoadHook/types/services/CustomItemService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/14AfterDBLoadHook/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/14AfterDBLoadHook/types/services/CustomPresetService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/CustomPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/14AfterDBLoadHook/types/services/CustomPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/14AfterDBLoadHook/types/services/CustomTraderAssortService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/14AfterDBLoadHook/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/14AfterDBLoadHook/types/utils/DatabaseImporter.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/1LogToConsole/types/services/CustomHandbookItemService.d.ts b/TypeScript/1LogToConsole/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/1LogToConsole/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/1LogToConsole/types/services/CustomItemService.d.ts b/TypeScript/1LogToConsole/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/1LogToConsole/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/1LogToConsole/types/services/CustomTraderAssortService.d.ts b/TypeScript/1LogToConsole/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/1LogToConsole/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/1LogToConsole/types/services/customPresetService.d.ts b/TypeScript/1LogToConsole/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/1LogToConsole/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts b/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/1LogToConsole/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/2EditDatabase/types/services/CustomHandbookItemService.d.ts b/TypeScript/2EditDatabase/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/2EditDatabase/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/2EditDatabase/types/services/CustomItemService.d.ts b/TypeScript/2EditDatabase/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/2EditDatabase/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/2EditDatabase/types/services/CustomTraderAssortService.d.ts b/TypeScript/2EditDatabase/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/2EditDatabase/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/2EditDatabase/types/services/customPresetService.d.ts b/TypeScript/2EditDatabase/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/2EditDatabase/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/2EditDatabase/types/utils/DatabaseImporter.d.ts b/TypeScript/2EditDatabase/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/2EditDatabase/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/2EditDatabase/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/3GetSptConfigFile/types/services/CustomHandbookItemService.d.ts b/TypeScript/3GetSptConfigFile/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/3GetSptConfigFile/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/3GetSptConfigFile/types/services/CustomItemService.d.ts b/TypeScript/3GetSptConfigFile/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/3GetSptConfigFile/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/3GetSptConfigFile/types/services/CustomPresetService.d.ts b/TypeScript/3GetSptConfigFile/types/services/CustomPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/3GetSptConfigFile/types/services/CustomPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/3GetSptConfigFile/types/services/CustomTraderAssortService.d.ts b/TypeScript/3GetSptConfigFile/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/3GetSptConfigFile/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/3GetSptConfigFile/types/utils/DatabaseImporter.d.ts b/TypeScript/3GetSptConfigFile/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/4UseACustomConfigFile/types/services/CustomHandbookItemService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/4UseACustomConfigFile/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/4UseACustomConfigFile/types/services/CustomItemService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/4UseACustomConfigFile/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/4UseACustomConfigFile/types/services/CustomTraderAssortService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/4UseACustomConfigFile/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/4UseACustomConfigFile/types/services/customPresetService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/4UseACustomConfigFile/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/5ReplaceMethod/types/services/CustomHandbookItemService.d.ts b/TypeScript/5ReplaceMethod/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/5ReplaceMethod/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/5ReplaceMethod/types/services/CustomItemService.d.ts b/TypeScript/5ReplaceMethod/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/5ReplaceMethod/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/5ReplaceMethod/types/services/CustomTraderAssortService.d.ts b/TypeScript/5ReplaceMethod/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/5ReplaceMethod/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/5ReplaceMethod/types/services/customPresetService.d.ts b/TypeScript/5ReplaceMethod/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/5ReplaceMethod/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts b/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/6ReferenceAnotherClass/types/services/CustomHandbookItemService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/CustomItemService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/CustomTraderAssortService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/customPresetService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/7OnLoadHook/types/services/CustomHandbookItemService.d.ts b/TypeScript/7OnLoadHook/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/7OnLoadHook/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/7OnLoadHook/types/services/CustomItemService.d.ts b/TypeScript/7OnLoadHook/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/7OnLoadHook/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/7OnLoadHook/types/services/CustomTraderAssortService.d.ts b/TypeScript/7OnLoadHook/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/7OnLoadHook/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/7OnLoadHook/types/services/customPresetService.d.ts b/TypeScript/7OnLoadHook/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/7OnLoadHook/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts b/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/8OnUpdateHook/types/services/CustomHandbookItemService.d.ts b/TypeScript/8OnUpdateHook/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/8OnUpdateHook/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/8OnUpdateHook/types/services/CustomItemService.d.ts b/TypeScript/8OnUpdateHook/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/8OnUpdateHook/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/8OnUpdateHook/types/services/CustomTraderAssortService.d.ts b/TypeScript/8OnUpdateHook/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/8OnUpdateHook/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/8OnUpdateHook/types/services/customPresetService.d.ts b/TypeScript/8OnUpdateHook/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/8OnUpdateHook/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts b/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void; diff --git a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts index f118872..80dc37c 100644 --- a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts @@ -2,7 +2,7 @@ import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper"; import { ItemHelper } from "../helpers/ItemHelper"; import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper"; import { Inventory as PmcInventory } from "../models/eft/common/IPmcData"; -import { Inventory, MinMax, Mods, ModsChances } from "../models/eft/common/tables/IBotType"; +import { Inventory, MinMax, ModsChances } from "../models/eft/common/tables/IBotType"; import { Item } from "../models/eft/common/tables/IItem"; import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; import { ILogger } from "../models/spt/utils/ILogger"; @@ -22,35 +22,6 @@ export declare class BotWeaponGenerator { private readonly modMagazineSlotId; constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil); generateWeapon(equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, magCounts: MinMax, botRole: string, isPmc: boolean, inventory: PmcInventory): void; - /** - * Create a list of mods for a weapon defined by the weaponTpl parameter - * @param weaponTpl Weapon to generate mods for - */ - protected getWeaponMods(weaponTpl: string): Mods; - /** - * Get a dictionary of items and their attachments - * @param itemTpl item to look up attachments for - * @param weaponModsResult Mods array to add to - */ - protected getItemAttachmentsRecursive(itemTpl: string, weaponModsResult: Mods): void; - protected isTplAnOptic(tplToCheck: string): boolean; - /** - * Get a weapon tpl from a bot jsons inventory - * @param weaponSlot slot to get randomised tpl for - * @param templateInventory - * @returns - */ - protected getRandomisedWeaponTplForSlot(weaponSlot: string, templateInventory: Inventory): string; - /** - * Get an array with a single object being the the weapon as defined by the weaponTpl parameter - * @param weaponTpl weapon to generate array around - * @param equipmentId - * @param weaponSlot - * @param itemTemplate - * @param botRole bot we're generating for - * @returns Item array - */ - protected getWeaponBase(weaponTpl: string, equipmentId: string, weaponSlot: string, itemTemplate: ITemplateItem, botRole: string): Item[]; /** * Get the mods necessary to kit out a weapon to its preset level * @param weaponTpl weapon to find preset for diff --git a/TypeScript/9RouterHooks/types/services/CustomHandbookItemService.d.ts b/TypeScript/9RouterHooks/types/services/CustomHandbookItemService.d.ts deleted file mode 100644 index 1c25b99..0000000 --- a/TypeScript/9RouterHooks/types/services/CustomHandbookItemService.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { HandbookItem } from "../models/eft/common/tables/IHandbookBase"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomHandbookItemService { - protected logger: ILogger; - private customHandbookItems; - constructor(logger: ILogger); - /** - * Add handbook item - * @param handbookItem item to add - */ - add(handbookItem: HandbookItem): void; - get(): HandbookItem[]; -} diff --git a/TypeScript/9RouterHooks/types/services/CustomItemService.d.ts b/TypeScript/9RouterHooks/types/services/CustomItemService.d.ts deleted file mode 100644 index d5806b4..0000000 --- a/TypeScript/9RouterHooks/types/services/CustomItemService.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomItemService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customItems; - constructor(logger: ILogger, databaseServer: DatabaseServer); - add(itemToAdd: ITemplateItem): void; - get(): ITemplateItem[]; -} diff --git a/TypeScript/9RouterHooks/types/services/CustomTraderAssortService.d.ts b/TypeScript/9RouterHooks/types/services/CustomTraderAssortService.d.ts deleted file mode 100644 index e63d67b..0000000 --- a/TypeScript/9RouterHooks/types/services/CustomTraderAssortService.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { CustomTraderAssortData } from "../models/spt/services/CustomTraderAssortData"; -import { ILogger } from "../models/spt/utils/ILogger"; -import { DatabaseServer } from "../servers/DatabaseServer"; -export declare class CustomTraderAssortService { - protected logger: ILogger; - protected databaseServer: DatabaseServer; - private customAssorts; - constructor(logger: ILogger, databaseServer: DatabaseServer); - /** - * Add assorts to a specific trader - */ - add(assortsToAdd: CustomTraderAssortData): void; - get(): CustomTraderAssortData[]; -} diff --git a/TypeScript/9RouterHooks/types/services/customPresetService.d.ts b/TypeScript/9RouterHooks/types/services/customPresetService.d.ts deleted file mode 100644 index 84a8baf..0000000 --- a/TypeScript/9RouterHooks/types/services/customPresetService.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Preset } from "../models/eft/common/IGlobals"; -import { CustomPreset } from "../models/spt/services/CustomPreset"; -import { ILogger } from "../models/spt/utils/ILogger"; -export declare class CustomPresetService { - protected logger: ILogger; - private customPresets; - constructor(logger: ILogger); - /** - * Add custom preset to internal array - * @param presetKey presets key - * @param presetToAdd preset item to add - */ - add(presetKey: string, presetToAdd: Preset): void; - /** - * Get all custom presets - * @returns - */ - get(): CustomPreset[]; -} diff --git a/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts b/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts index b3156ea..483e135 100644 --- a/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts +++ b/TypeScript/9RouterHooks/types/utils/DatabaseImporter.d.ts @@ -3,10 +3,6 @@ import { IDatabaseTables } from "../models/spt/server/IDatabaseTables"; import { ILogger } from "../models/spt/utils/ILogger"; import { ImageRouter } from "../routers/ImageRouter"; import { DatabaseServer } from "../servers/DatabaseServer"; -import { CustomHandbookItemService } from "../services/CustomHandbookItemService"; -import { CustomItemService } from "../services/CustomItemService"; -import { CustomPresetService } from "../services/CustomPresetService"; -import { CustomTraderAssortService } from "../services/CustomTraderAssortService"; import { JsonUtil } from "./JsonUtil"; import { VFS } from "./VFS"; export declare class DatabaseImporter extends OnLoad { @@ -14,38 +10,14 @@ export declare class DatabaseImporter extends OnLoad { protected vfs: VFS; protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; - protected customItemService: CustomItemService; - protected customTraderAssortService: CustomTraderAssortService; - protected customHandbookItemService: CustomHandbookItemService; - protected customPresetService: CustomPresetService; protected imageRouter: ImageRouter; - constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, customItemService: CustomItemService, customTraderAssortService: CustomTraderAssortService, customHandbookItemService: CustomHandbookItemService, customPresetService: CustomPresetService, imageRouter: ImageRouter); + constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter); onLoad(): void; /** * Read all json files in database folder and map into a json object * @param filepath path to database folder */ protected hydrateDatabase(filepath: string): void; - /** - * Get all items added through CustomItemService and add to database.templates.items - * @param dataToImport db data to amend - */ - protected addCustomItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all assorts added through CustomTraderAssortService and add to database.traders[x].assort - * @param dataToImport db data to amend - */ - protected addCustomTraderAssortsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom handbook items added through CustomHandbookItemService and add to database.templates.handbook.items - * @param dataToImport db data to amend - */ - protected addCustomHandbookItemsToDb(dataToImport: IDatabaseTables): void; - /** - * Get all custom preset items added through CustomPresetService and add to database.globals.ItemPresets - * @param dataToImport - */ - protected addCustomPresetsToDb(dataToImport: IDatabaseTables): void; getRoute(): string; loadRecursive(filepath: string): IDatabaseTables; loadImages(filepath: string): void;