types update
This commit is contained in:
parent
6d75f99d7a
commit
1b2aaf1e9d
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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[];
|
||||
}
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user