Update aki version strings + example mod 1s types
This commit is contained in:
parent
aa74337149
commit
64c9842cee
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"author": "Chomp",
|
||||
"license": "MIT",
|
||||
"main": "src/mod.js",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"isBundleMod": true,
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Shirito",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Alex",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup:environment": "npm i",
|
||||
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist",
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -8,8 +8,29 @@ export declare class BotCallbacks {
|
||||
protected botController: BotController;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
constructor(botController: BotController, httpResponse: HttpResponseUtil);
|
||||
/**
|
||||
* Handle singleplayer/settings/bot/limit
|
||||
* @returns string
|
||||
*/
|
||||
getBotLimit(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||
/**
|
||||
* Handle singleplayer/settings/bot/difficulty
|
||||
* @returns string
|
||||
*/
|
||||
getBotDifficulty(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||
/**
|
||||
* Handle client/game/bot/generate
|
||||
* @returns IGetBodyResponseData
|
||||
*/
|
||||
generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData<IBotBase[]>;
|
||||
/**
|
||||
* Handle singleplayer/settings/bot/maxCap
|
||||
* @returns string
|
||||
*/
|
||||
getBotCap(): string;
|
||||
/**
|
||||
* Handle /singleplayer/settings/bot/getBotBehaviour/
|
||||
* @returns string
|
||||
*/
|
||||
getBotBehaviour(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||
}
|
||||
|
@ -12,6 +12,9 @@ import { ILanguageBase } from "../models/spt/server/ILocaleBase";
|
||||
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
/**
|
||||
* Handle client requests
|
||||
*/
|
||||
export declare class DataCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
|
@ -19,14 +19,77 @@ export declare class HideoutCallbacks extends OnUpdate {
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(hideoutController: HideoutController, // TODO: delay needed
|
||||
configServer: ConfigServer);
|
||||
/**
|
||||
* Handle HideoutUpgrade
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutUpgradeComplete
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutPutItemsInAreaSlots
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutTakeItemsFromAreaSlots
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutToggleArea
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutSingleProductionStart
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutScavCaseProductionStart
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutContinuousProductionStart
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutTakeProduction
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
onUpdate(timeSinceLastRun: number): boolean;
|
||||
getRoute(): string;
|
||||
|
@ -1,23 +1,49 @@
|
||||
import { InraidController } from "../controllers/InraidController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
/**
|
||||
* Handle client requests
|
||||
*/
|
||||
export declare class InraidCallbacks {
|
||||
protected inraidController: InraidController;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected configServer: ConfigServer;
|
||||
protected airdropConfig: IAirdropConfig;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||
constructor(inraidController: InraidController, httpResponse: HttpResponseUtil);
|
||||
/**
|
||||
* Handle client/location/getLocalloot
|
||||
* @param url
|
||||
* @param info register player request
|
||||
* @param sessionID Session id
|
||||
* @returns Null http response
|
||||
*/
|
||||
registerPlayer(url: string, info: IRegisterPlayerRequestData, sessionID: string): INullResponseData;
|
||||
/**
|
||||
* Handle raid/profile/save
|
||||
* @param url
|
||||
* @param info Save progress request
|
||||
* @param sessionID Session id
|
||||
* @returns Null http response
|
||||
*/
|
||||
saveProgress(url: string, info: ISaveProgressRequestData, sessionID: string): INullResponseData;
|
||||
/**
|
||||
* Handle singleplayer/settings/raid/endstate
|
||||
* @returns
|
||||
*/
|
||||
getRaidEndState(): string;
|
||||
getRaidMenuSettings(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||
getWeaponDurability(url: string, info: any, sessionID: string): string;
|
||||
getAirdropConfig(url: string, info: any, sessionID: string): string;
|
||||
/**
|
||||
* Handle singleplayer/settings/raid/menu
|
||||
* @returns JSON as string
|
||||
*/
|
||||
getRaidMenuSettings(): string;
|
||||
/**
|
||||
* Handle singleplayer/settings/weapon/durability
|
||||
* @returns
|
||||
*/
|
||||
getWeaponDurability(): string;
|
||||
/**
|
||||
* Handle singleplayer/airdrop/config
|
||||
* @returns JSON as string
|
||||
*/
|
||||
getAirdropConfig(): string;
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwa
|
||||
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
||||
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||
import { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class InventoryCallbacks {
|
||||
protected inventoryController: InventoryController;
|
||||
@ -36,4 +37,5 @@ export declare class InventoryCallbacks {
|
||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { Warning } from "../models/eft/itemEvent/IItemEventRouterBase";
|
||||
import { IItemEventRouterRequest } from "../models/eft/itemEvent/IItemEventRouterRequest";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
@ -8,4 +9,5 @@ export declare class ItemEventCallbacks {
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
||||
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
||||
protected getErrorCode(warnings: Warning[]): number;
|
||||
}
|
||||
|
@ -21,6 +21,13 @@ export declare class QuestCallbacks {
|
||||
acceptQuest(pmcData: IPmcData, body: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
handoverQuest(pmcData: IPmcData, body: IHandoverQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle client/quest/list
|
||||
* @param url
|
||||
* @param info
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
listQuests(url: string, info: IListQuestsRequestData, sessionID: string): IGetBodyResponseData<IQuest[]>;
|
||||
activityPeriods(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IPmcDataRepeatableQuest[]>;
|
||||
}
|
||||
|
@ -1,4 +1,8 @@
|
||||
export declare enum ContextVariableType {
|
||||
/** Logged in users session id */
|
||||
SESSION_ID = 0,
|
||||
MATCH_INFO = 1
|
||||
/** Currently acive raid information */
|
||||
MATCH_INFO = 1,
|
||||
/** Timestamp when client first connected */
|
||||
CLIENT_START_TIMESTAMP = 2
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { BotGenerator } from "../generators/BotGenerator";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
||||
@ -10,18 +11,19 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
||||
import { PmcAiService } from "../services/PmcAiService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
export declare class BotController {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected botGenerator: BotGenerator;
|
||||
protected botHelper: BotHelper;
|
||||
protected pmcAiService: PmcAiService;
|
||||
protected botGenerationCacheService: BotGenerationCacheService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, pmcAiService: PmcAiService, botGenerationCacheService: BotGenerationCacheService, configServer: ConfigServer, applicationContext: ApplicationContext);
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer, applicationContext: ApplicationContext);
|
||||
/**
|
||||
* Return the number of bot loadout varieties to be generated
|
||||
* @param type bot Type we want the loadout gen count for
|
||||
@ -51,4 +53,5 @@ export declare class BotController {
|
||||
* @returns cap number
|
||||
*/
|
||||
getBotCap(): number;
|
||||
getPmcBotType(botType: string): string;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
@ -14,6 +15,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocaleService } from "../services/LocaleService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||
import { Watermark } from "../utils/Watermark";
|
||||
export declare class GameController {
|
||||
@ -24,14 +26,33 @@ export declare class GameController {
|
||||
protected localeService: LocaleService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected gameEventHelper: GameEventHelper;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected configServer: ConfigServer;
|
||||
protected httpConfig: IHttpConfig;
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, watermark: Watermark, httpServerHelper: HttpServerHelper, localeService: LocaleService, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string): void;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, watermark: Watermark, httpServerHelper: HttpServerHelper, localeService: LocaleService, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, gameEventHelper: GameEventHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||
/**
|
||||
* Check if current date falls inside any of the seasons events pased in, if so, handle them
|
||||
* @param seasonalEvents events to check for
|
||||
*/
|
||||
protected checkForAndEnableSeasonalEvents(seasonalEvents: ISeasonalEvent[]): void;
|
||||
/**
|
||||
* Make adjusted to server code based on the name of the event passed in
|
||||
* @param globalConfig globals.json
|
||||
* @param eventName Name of the event to enable. e.g. Christmas
|
||||
*/
|
||||
protected updateGlobalEvents(globalConfig: Config, eventName: string): void;
|
||||
/**
|
||||
* Read in data from seasonalEvents.json and add found equipment items to bots
|
||||
* @param eventName Name of the event to read equipment in from config
|
||||
*/
|
||||
protected addEventGearToScavs(eventName: string): void;
|
||||
/**
|
||||
* Set Khorovod(dancing tree) chance to 100% on all maps that support it
|
||||
*/
|
||||
protected enableDancingTree(): void;
|
||||
/**
|
||||
* Make non-trigger-spawned raiders spawn earlier + always
|
||||
@ -40,5 +61,6 @@ export declare class GameController {
|
||||
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||
getServer(): IServerDetails[];
|
||||
protected addPumpkinsToScavBackpacks(): void;
|
||||
getValidGameVersion(): ICheckVersionResponse;
|
||||
}
|
||||
|
@ -23,12 +23,13 @@ import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PlayerService } from "../services/PlayerService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class HideoutController {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
@ -45,11 +46,12 @@ export declare class HideoutController {
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected hideoutHelper: HideoutHelper;
|
||||
protected scavCaseRewardGenerator: ScavCaseRewardGenerator;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected static nameBackendCountersCrafting: string;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, configServer: ConfigServer, jsonUtil: JsonUtil);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil);
|
||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
|
@ -6,6 +6,7 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { QuestHelper } from "../helpers/QuestHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { IRegisterPlayerRequestData } from "../models/eft/inRaid/IRegisterPlayerRequestData";
|
||||
import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IAirdropConfig } from "../models/spt/config/IAirdropConfig";
|
||||
@ -17,6 +18,9 @@ import { SaveServer } from "../servers/SaveServer";
|
||||
import { InsuranceService } from "../services/InsuranceService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
/**
|
||||
* Logic for handling In Raid callbacks
|
||||
*/
|
||||
export declare class InraidController {
|
||||
protected logger: ILogger;
|
||||
protected saveServer: SaveServer;
|
||||
@ -35,14 +39,42 @@ export declare class InraidController {
|
||||
protected airdropConfig: IAirdropConfig;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
|
||||
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
||||
saveProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||
/**
|
||||
* Handle updating the profile post-pmc raid
|
||||
* Save locationid to active profiles inraid object
|
||||
* @param sessionID Session id
|
||||
* @param info Register player request
|
||||
*/
|
||||
addPlayer(sessionID: string, info: IRegisterPlayerRequestData): void;
|
||||
/**
|
||||
* Save profile state to disk
|
||||
* Handles pmc/pscav
|
||||
* @param offraidData post-raid request data
|
||||
* @param sessionID Session id
|
||||
*/
|
||||
savePostRaidProgress(offraidData: ISaveProgressRequestData, sessionID: string): void;
|
||||
/**
|
||||
* Handle updating player profile post-pmc raid
|
||||
* @param sessionID session id
|
||||
* @param offraidData post-raid data of raid
|
||||
* @param offraidData post-raid data
|
||||
*/
|
||||
protected savePmcProgress(sessionID: string, offraidData: ISaveProgressRequestData): void;
|
||||
/**
|
||||
* Make changes to pmc profile after they left raid dead,
|
||||
* alter bodypart hp, handle insurance, delete inventory items, remove carried quest items
|
||||
* @param postRaidSaveRequest post-raid save request
|
||||
* @param pmcData pmc profile
|
||||
* @param insuranceEnabled is insurance enabled
|
||||
* @param preRaidGear gear player had before raid
|
||||
* @param sessionID Session id
|
||||
* @returns Updated profile object
|
||||
*/
|
||||
protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, insuranceEnabled: boolean, preRaidGear: Item[], sessionID: string): IPmcData;
|
||||
/**
|
||||
* Adjust player characters bodypart hp if they left raid early
|
||||
* @param postRaidSaveRequest post raid data
|
||||
* @param pmcData player profile
|
||||
*/
|
||||
protected updatePmcHealthPostRaid(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData): void;
|
||||
/**
|
||||
* Reduce body part hp to % of max
|
||||
* @param pmcData profile to edit
|
||||
@ -68,7 +100,31 @@ export declare class InraidController {
|
||||
* @param isPlayerScav Was the player a pScav
|
||||
*/
|
||||
protected markOrRemoveFoundInRaidItems(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void;
|
||||
/**
|
||||
* Update profile after player completes scav raid
|
||||
* @param scavData Scav profile
|
||||
* @param sessionID Session id
|
||||
* @param offraidData Post-raid save request
|
||||
* @param pmcData Pmc profile
|
||||
* @param isDead Is player dead
|
||||
*/
|
||||
protected handlePostRaidPlayerScavProcess(scavData: IPmcData, sessionID: string, offraidData: ISaveProgressRequestData, pmcData: IPmcData, isDead: boolean): void;
|
||||
/**
|
||||
* Update profile with scav karma values based on in-raid actions
|
||||
* @param pmcData Pmc profile
|
||||
* @param offraidData Post-raid save request
|
||||
* @param scavData Scav profile
|
||||
* @param sessionID Session id
|
||||
*/
|
||||
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData, sessionID: string): void;
|
||||
/**
|
||||
* Get the inraid config from configs/inraid.json
|
||||
* @returns InRaid Config
|
||||
*/
|
||||
getInraidConfig(): IInRaidConfig;
|
||||
/**
|
||||
* Get airdrop config from configs/airdrop.json
|
||||
* @returns Airdrop config
|
||||
*/
|
||||
getAirdropConfig(): IAirdropConfig;
|
||||
}
|
||||
|
@ -30,8 +30,7 @@ export declare class InsuranceController {
|
||||
protected insuranceService: InsuranceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, // TODO: delay required
|
||||
insuranceService: InsuranceService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer);
|
||||
processReturn(): void;
|
||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||
import { IInventoryBindRequestData } from "../models/eft/inventory/IInventoryBindRequestData";
|
||||
@ -21,33 +21,46 @@ import { IInventorySwapRequestData } from "../models/eft/inventory/IInventorySwa
|
||||
import { IInventoryTagRequestData } from "../models/eft/inventory/IInventoryTagRequestData";
|
||||
import { IInventoryToggleRequestData } from "../models/eft/inventory/IInventoryToggleRequestData";
|
||||
import { IInventoryTransferRequestData } from "../models/eft/inventory/IInventoryTransferRequestData";
|
||||
import { IOpenRandomLootContainerRequestData } from "../models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
export declare class InventoryController {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected fenceService: FenceService;
|
||||
protected presetHelper: PresetHelper;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder);
|
||||
protected httpResponseUtil: HttpResponseUtil;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, weightedRandomHelper: WeightedRandomHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||
/**
|
||||
* Move Item
|
||||
* change location of item with parentId and slotId
|
||||
* transfers items from one profile to another if fromOwner/toOwner is set in the body.
|
||||
* otherwise, move is contained within the same profile_f.
|
||||
*/
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
* @param pmcData Profile
|
||||
* @param moveRequest Move request data
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Remove Item from Profile
|
||||
* Deep tree item deletion, also removes items from insurance list
|
||||
@ -122,4 +135,12 @@ export declare class InventoryController {
|
||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
|
||||
* @param pmcData Profile data
|
||||
* @param body open loot container request data
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import { LootItem } from "../models/spt/services/LootItem";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
@ -15,12 +16,13 @@ export declare class LocationController {
|
||||
protected hashUtil: HashUtil;
|
||||
protected logger: ILogger;
|
||||
protected locationGenerator: LocationGenerator;
|
||||
protected localisationService: LocalisationService;
|
||||
protected lootGenerator: LootGenerator;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected configServer: ConfigServer;
|
||||
protected airdropConfig: IAirdropConfig;
|
||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger, locationGenerator: LocationGenerator, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||
get(location: string): ILocationBase;
|
||||
generate(name: string): ILocationBase;
|
||||
generateAll(): ILocationsGenerateAllResponse;
|
||||
|
@ -19,7 +19,6 @@ import { SaveServer } from "../servers/SaveServer";
|
||||
import { BotGenerationCacheService } from "../services/BotGenerationCacheService";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { MatchLocationService } from "../services/MatchLocationService";
|
||||
import { PmcAiService } from "../services/PmcAiService";
|
||||
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
|
||||
export declare class MatchController {
|
||||
protected logger: ILogger;
|
||||
@ -30,13 +29,12 @@ export declare class MatchController {
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected configServer: ConfigServer;
|
||||
protected profileSnapshotService: ProfileSnapshotService;
|
||||
protected pmcAiService: PmcAiService;
|
||||
protected botGenerationCacheService: BotGenerationCacheService;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected matchConfig: IMatchConfig;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, pmcAiService: PmcAiService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
|
||||
constructor(logger: ILogger, saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, applicationContext: ApplicationContext);
|
||||
getEnabled(): boolean;
|
||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
|
@ -29,6 +29,7 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { RagfairServer } from "../servers/RagfairServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||
@ -62,9 +63,10 @@ export declare class RagfairController {
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
||||
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
|
||||
/**
|
||||
* Get offers for the client based on type of search being performed
|
||||
@ -103,7 +105,12 @@ export declare class RagfairController {
|
||||
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
||||
update(): void;
|
||||
getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||
/**
|
||||
* Called when creating an offer on flea, fills values in top right corner
|
||||
* @param getPriceRequest
|
||||
* @returns min/avg/max values for an item based on flea offers available
|
||||
*/
|
||||
getItemMinAvgMaxFleaPriceValues(getPriceRequest: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||
getAllFleaPrices(): Record<string, number>;
|
||||
|
@ -17,6 +17,7 @@ import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
@ -64,12 +65,13 @@ export declare class RepeatableQuestController {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected ragfairServerHelper: RagfairServerHelper;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected localisationService: LocalisationService;
|
||||
protected paymentService: PaymentService;
|
||||
protected objectId: ObjectId;
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||
/**
|
||||
* This is the method reached by the /client/repeatalbeQuests/activityPeriods endpoint
|
||||
* Returns an array of objects in the format of repeatable quests to the client.
|
||||
|
@ -1,11 +1,18 @@
|
||||
import { WeatherGenerator } from "../generators/WeatherGenerator";
|
||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class WeatherController {
|
||||
protected weatherGenerator: WeatherGenerator;
|
||||
protected logger: ILogger;
|
||||
protected configServer: ConfigServer;
|
||||
protected weatherConfig: IWeatherConfig;
|
||||
constructor(weatherGenerator: WeatherGenerator, configServer: ConfigServer);
|
||||
constructor(weatherGenerator: WeatherGenerator, logger: ILogger, configServer: ConfigServer);
|
||||
generate(): IWeatherData;
|
||||
/**
|
||||
* Get the current in-raid time (MUST HAVE PLAYER LOGGED INTO CLIENT TO WORK)
|
||||
* @returns Date object
|
||||
*/
|
||||
getCurrentInRaidTime(): Date;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, IBotType, Inventory } from "../models/eft/common/tables/IBotType";
|
||||
@ -9,7 +10,6 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||
import { PmcAiService } from "../services/PmcAiService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
@ -29,12 +29,12 @@ export declare class BotGenerator {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected botInventoryGenerator: BotInventoryGenerator;
|
||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected botHelper: BotHelper;
|
||||
protected gameEventHelper: GameEventHelper;
|
||||
protected pmcAiService: PmcAiService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botEquipmentFilterService: BotEquipmentFilterService, botHelper: BotHelper, gameEventHelper: GameEventHelper, pmcAiService: PmcAiService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||
/**
|
||||
* Generate a player scav bot object
|
||||
* @param role e.g. assault / pmcbot
|
||||
@ -50,6 +50,12 @@ export declare class BotGenerator {
|
||||
* @returns bot array
|
||||
*/
|
||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||
/**
|
||||
* Get the PMCs wildSpawnType value
|
||||
* @param role "usec" / "bear"
|
||||
* @returns wildSpawnType value as string
|
||||
*/
|
||||
protected getPmcRoleByDescription(role: string): string;
|
||||
/**
|
||||
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||
* @returns pmc side as string
|
||||
@ -64,13 +70,13 @@ export declare class BotGenerator {
|
||||
* Create a IBotBase object with equipment/loot/exp etc
|
||||
* @param sessionId Session id
|
||||
* @param bot bots base file
|
||||
* @param role botRole bot will use
|
||||
* @param botRole Role bot will use (bear/usec for PMCs)
|
||||
* @param node Bot template from db/bots/x.json
|
||||
* @param isPmc Is bot to be a PMC
|
||||
* @param isPlayerScav is bot to be a p scav bot
|
||||
* @returns IBotBase object
|
||||
*/
|
||||
protected generateBot(sessionId: string, bot: IBotBase, role: string, node: IBotType, isPmc: boolean, isPlayerScav?: boolean): IBotBase;
|
||||
protected generateBot(sessionId: string, bot: IBotBase, botRole: string, node: IBotType, isPmc: boolean, isPlayerScav?: boolean): IBotBase;
|
||||
/**
|
||||
* Log the number of PMCs generated to the debug console
|
||||
* @param output Generated bot array, ready to send to client
|
||||
|
@ -7,6 +7,7 @@ import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { BotLootGenerator } from "./BotLootGenerator";
|
||||
@ -20,14 +21,40 @@ export declare class BotInventoryGenerator {
|
||||
protected botLootGenerator: BotLootGenerator;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
generateInventory(sessionId: string, templateInventory: Inventory, equipmentChances: Chances, itemGenerationLimitsMinMax: Generation, botRole: string, isPmc: boolean): PmcInventory;
|
||||
/**
|
||||
* Create a pmcInventory object with all the base/generic items needed
|
||||
* @returns PmcInventory object
|
||||
*/
|
||||
protected generateInventoryBase(): PmcInventory;
|
||||
protected generateAndAddEquipmentToBot(templateInventory: Inventory, equipmentChances: Chances, botRole: string, botInventory: PmcInventory): void;
|
||||
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void;
|
||||
/**
|
||||
* Work out what weapons bot should have equipped and add them to bot inventory
|
||||
* @param templateInventory bot json with equipment to use when generating weapons
|
||||
* @param equipmentChances Chances bot can have equipment equipped
|
||||
* @param sessionId Session id
|
||||
* @param botInventory Inventory to add weapons to
|
||||
* @param botRole assault/pmcBot/bossTagilla etc
|
||||
* @param isPmc Is the bot being generated as a pmc
|
||||
* @param itemGenerationLimitsMinMax Limits for items the bot can have
|
||||
*/
|
||||
protected generateAndAddWeaponsToBot(templateInventory: Inventory, equipmentChances: Chances, sessionId: string, botInventory: PmcInventory, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation): void;
|
||||
/**
|
||||
* Calculate if the bot should have weapons in Primary/Secondary/Holster slots
|
||||
* @param equipmentChances Chances bot has certain equipment
|
||||
* @returns What slots bot should have weapons generated for
|
||||
*/
|
||||
protected getDesiredWeaponsForBot(equipmentChances: Chances): {
|
||||
slot: EquipmentSlots;
|
||||
shouldSpawn: boolean;
|
||||
}[];
|
||||
protected addWeaponAndMagazinesToInventory(sessionId: string, weaponSlot: {
|
||||
slot: EquipmentSlots;
|
||||
shouldSpawn: boolean;
|
||||
}, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationLimitsMinMax: Generation): void;
|
||||
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory): void;
|
||||
protected generateInventoryBase(): PmcInventory;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
||||
@ -23,9 +24,10 @@ export declare class BotLootGenerator {
|
||||
protected botWeaponGenerator: BotWeaponGenerator;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
generateLoot(sessionId: string, templateInventory: Inventory, itemCounts: ItemMinMax, isPmc: boolean, botRole: string, botInventory: PmcInventory, equipmentChances: Chances): void;
|
||||
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
||||
/**
|
||||
@ -113,7 +115,7 @@ export declare class BotLootGenerator {
|
||||
* If no limit found for a non pmc bot, fall back to defaults
|
||||
* @param isPmc is the bot we want limits for a pmc
|
||||
* @param botRole what role does the bot have
|
||||
* @returns dictionary of tplIds and limit
|
||||
* @returns Dictionary of tplIds and limit
|
||||
*/
|
||||
protected getItemSpawnLimitsForBotType(isPmc: boolean, botRole: string): Record<string, number>;
|
||||
/**
|
||||
|
@ -12,6 +12,7 @@ import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
@ -27,10 +28,11 @@ export declare class BotWeaponGenerator {
|
||||
protected randomUtil: RandomUtil;
|
||||
protected configServer: ConfigServer;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected inventoryMagGenComponents: IInventoryMagGen[];
|
||||
protected readonly modMagazineSlotId = "mod_magazine";
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, inventoryMagGenComponents: IInventoryMagGen[]);
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, inventoryMagGenComponents: IInventoryMagGen[]);
|
||||
/**
|
||||
* Pick a random weapon based on weightings and generate a functional weapon
|
||||
* @param equipmentSlot Primary/secondary/holster
|
||||
|
@ -1,16 +1,19 @@
|
||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { PaymentHelper } from "../helpers/PaymentHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||
import { IRagfairOffer, OfferRequirement } from "../models/eft/ragfair/IRagfairOffer";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
|
||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||
import { RagfairPriceService } from "../services/RagfairPriceService";
|
||||
@ -27,18 +30,31 @@ export declare class RagfairOfferGenerator {
|
||||
protected timeUtil: TimeUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected ragfairServerHelper: RagfairServerHelper;
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected saveServer: SaveServer;
|
||||
protected presetHelper: PresetHelper;
|
||||
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
||||
protected fenceService: FenceService;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||
protected allowedFleaPriceItemsForBarter: {
|
||||
tpl: string;
|
||||
price: number;
|
||||
}[];
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
|
||||
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||
/**
|
||||
* Calculate the offer price that's listed on the flea listing
|
||||
* @param offerRequirements barter requirements for offer
|
||||
* @returns rouble cost of offer
|
||||
*/
|
||||
protected calculateOfferListingPrice(offerRequirements: OfferRequirement[]): number;
|
||||
/**
|
||||
* Get avatar url from trader table in db
|
||||
* @param isTrader Is user we're getting avatar for a trader
|
||||
@ -87,20 +103,36 @@ export declare class RagfairOfferGenerator {
|
||||
* @returns Item with conditions added
|
||||
*/
|
||||
protected addMissingCondition(item: Item): Item;
|
||||
protected getOfferRequirements(items: Item[]): {
|
||||
count: number;
|
||||
_tpl: string;
|
||||
/**
|
||||
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
|
||||
* @param offerItems Items for sale in offer
|
||||
* @returns barter scheme
|
||||
*/
|
||||
protected createBarterRequirement(offerItems: Item[]): IBarterScheme[];
|
||||
/**
|
||||
* Get an array of flea prices + item tpl, cached in generator class
|
||||
* @returns array with tpl/price values
|
||||
*/
|
||||
protected getFleaPricesAsArray(): {
|
||||
tpl: string;
|
||||
price: number;
|
||||
}[];
|
||||
/**
|
||||
* Create a random currency-based barter scheme for an array of items
|
||||
* @param offerItems Items on offer
|
||||
* @returns Barter scheme for offer
|
||||
*/
|
||||
protected createCurrencyRequirement(offerItems: Item[]): IBarterScheme[];
|
||||
/**
|
||||
* Create a flea offer and store it in the Ragfair server offers array
|
||||
* @param userID owner of the offer
|
||||
* @param time time offer is put up
|
||||
* @param items items in the offer
|
||||
* @param barterScheme
|
||||
* @param loyalLevel
|
||||
* @param barterScheme cost of item (currency or barter)
|
||||
* @param loyalLevel Loyalty level needed to buy item
|
||||
* @param price price of offer
|
||||
* @param sellInOnePiece
|
||||
* @returns
|
||||
* @returns Ragfair offer
|
||||
*/
|
||||
createFleaOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
|
||||
}
|
||||
|
@ -1,38 +1,54 @@
|
||||
import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||
import { IWeather, IWeatherData } from "../models/eft/weather/IWeatherData";
|
||||
import { WindDirection } from "../models/enums/WindDirection";
|
||||
import { IWeatherConfig } from "../models/spt/config/IWeatherConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class WeatherGenerator {
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected logger: ILogger;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected configServer: ConfigServer;
|
||||
protected weatherConfig: IWeatherConfig;
|
||||
constructor(weightedRandomHelper: WeightedRandomHelper, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||
calculateTime(data: IWeatherData): IWeatherData;
|
||||
constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||
calculateGameTime(data: IWeatherData): IWeatherData;
|
||||
/**
|
||||
* Get server uptime seconds multiplied by a multiplier and add to current time as seconds
|
||||
* Format to BSGs requirements
|
||||
* @param computedDate current date
|
||||
* @param currentDate current date
|
||||
* @returns formatted time
|
||||
*/
|
||||
protected getAcceleratedTime(computedDate: Date): string;
|
||||
protected getBsgFormattedInRaidTime(currentDate: Date): string;
|
||||
/**
|
||||
* Get the current in-raid time
|
||||
* @param currentDate (new Date())
|
||||
* @returns Date object of current in-raid time
|
||||
*/
|
||||
getInRaidTime(currentDate: Date): Date;
|
||||
/**
|
||||
* Get current time formatted to fit BSGs requirement
|
||||
* @param computedDate date to format into bsg style
|
||||
* @param date date to format into bsg style
|
||||
* @returns
|
||||
*/
|
||||
protected getNormalTime(computedDate: Date): string;
|
||||
protected getBSGFormattedTime(date: Date): string;
|
||||
/**
|
||||
* Return randomised Weather data
|
||||
* @param weatherData weather input data
|
||||
* Return randomised Weather data with help of config/weather.json
|
||||
* @returns Randomised weather data
|
||||
*/
|
||||
generateWeather(weatherData: IWeatherData): IWeatherData;
|
||||
protected getWeightedFog(): string;
|
||||
generateWeather(): IWeather;
|
||||
/**
|
||||
* Set IWeather date/time/timestamp values to now
|
||||
* @param weather Object to update
|
||||
*/
|
||||
protected setCurrentDateTime(weather: IWeather): void;
|
||||
protected getWeightedWindDirection(): WindDirection;
|
||||
protected getWeightedWindSpeed(): number;
|
||||
protected getWeightedFog(): number;
|
||||
protected getWeightedRain(): number;
|
||||
protected getRandomFloat(node: string): number;
|
||||
protected getRandomInt(node: string): number;
|
||||
}
|
||||
|
@ -1,13 +1,15 @@
|
||||
import { BotWeaponGeneratorHelper } from "../../../helpers/BotWeaponGeneratorHelper";
|
||||
import { ItemHelper } from "../../../helpers/ItemHelper";
|
||||
import { ILogger } from "../../../models/spt/utils/ILogger";
|
||||
import { LocalisationService } from "../../../services/LocalisationService";
|
||||
import { IInventoryMagGen } from "../IInventoryMagGen";
|
||||
import { InventoryMagGen } from "../InventoryMagGen";
|
||||
export declare class ExternalInventoryMagGen implements IInventoryMagGen {
|
||||
protected logger: ILogger;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
constructor(logger: ILogger, itemHelper: ItemHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
|
||||
constructor(logger: ILogger, itemHelper: ItemHelper, localisationService: LocalisationService, botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
|
||||
getPriority(): number;
|
||||
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
||||
process(inventoryMagGen: InventoryMagGen): void;
|
||||
|
@ -8,6 +8,7 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||
import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
@ -43,9 +44,10 @@ export declare class BotGeneratorHelper {
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
/**
|
||||
* Check mods are compatible and add to array
|
||||
* @param equipment Equipment item to add mods to
|
||||
@ -53,9 +55,11 @@ export declare class BotGeneratorHelper {
|
||||
* @param parentId parentid of item to add mod to
|
||||
* @param parentTemplate template objet of item to add mods to
|
||||
* @param modSpawnChances dictionary of mod items and their chance to spawn for this bot type
|
||||
* @param botRole the bot role being generated for
|
||||
* @param forceSpawn should this mod be forced to spawn
|
||||
* @returns Item + compatible mods as an array
|
||||
*/
|
||||
generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances): Item[];
|
||||
generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, botRole: string, forceSpawn?: boolean): Item[];
|
||||
/**
|
||||
* @param sessionId session id
|
||||
* @param weapon Weapon to add mods to
|
||||
@ -70,14 +74,14 @@ export declare class BotGeneratorHelper {
|
||||
generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponParentId: string, parentWeaponTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string): Item[];
|
||||
/**
|
||||
*
|
||||
* @param modSlot
|
||||
* @param isRandomisableSlot
|
||||
* @param modsParent
|
||||
* @param modSlot Slot mod will fit into
|
||||
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
||||
* @param modsParent Parent slot the item will be a part of
|
||||
* @param botEquipBlacklist
|
||||
* @param itemModPool
|
||||
* @param weapon array with only weapon tpl in it, ready for mods to be added
|
||||
* @param ammoTpl ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine)
|
||||
* @param parentTemplate
|
||||
* @param parentTemplate Parent item the mod will go into
|
||||
* @returns
|
||||
*/
|
||||
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, modsParent: Slot, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem];
|
||||
@ -114,8 +118,10 @@ export declare class BotGeneratorHelper {
|
||||
* Find all compatible mods for equipment item and add to modPool
|
||||
* @param itemDetails item to find mods for
|
||||
* @param modPool ModPool to add mods to
|
||||
* @param equipmentBlacklist equipment not allowed to be used by the bot
|
||||
* @param botEquipmentRole bot type to generate pool for (e.g. assault, pmcBot, pmc for usec/bear)
|
||||
*/
|
||||
generateDynamicModPool(itemDetails: ITemplateItem, modPool: Mods): void;
|
||||
generateDynamicModPool(itemDetails: ITemplateItem, modPool: Mods, equipmentBlacklist: EquipmentFilterDetails[], botEquipmentRole: string): void;
|
||||
/**
|
||||
* Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist
|
||||
* @param allowedMods base mods to filter
|
||||
@ -153,7 +159,7 @@ export declare class BotGeneratorHelper {
|
||||
* @param modTemplate Used to add additional properites in the upd object
|
||||
* @returns Item object
|
||||
*/
|
||||
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem): Item;
|
||||
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item;
|
||||
/**
|
||||
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
|
||||
* never return true for an item that has 0% spawn chance
|
||||
@ -197,11 +203,11 @@ export declare class BotGeneratorHelper {
|
||||
/**
|
||||
* Adds properties to an item
|
||||
* e.g. Repairable / HasHinge / Foldable / MaxDurability
|
||||
* @param itemTemplate
|
||||
* @param botRole Used by weapons to randomise the durability values
|
||||
* @param itemTemplate Item extra properties are being generated for
|
||||
* @param botRole Used by weapons to randomise the durability values. Null for non-equipped items
|
||||
* @returns Item Upd object with extra properties
|
||||
*/
|
||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
|
||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
||||
upd?: Upd;
|
||||
};
|
||||
/**
|
||||
@ -230,11 +236,17 @@ export declare class BotGeneratorHelper {
|
||||
/**
|
||||
* Can an item be added to an item without issue
|
||||
* @param items
|
||||
* @param tplToCheck
|
||||
* @param equipmentSlot
|
||||
* @returns true if possible
|
||||
* @param tplToCheck tpl of the item to check for incompatibilities
|
||||
* @param equipmentSlot Slot the item will be placed into
|
||||
* @returns false if no incompatibilties
|
||||
*/
|
||||
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean;
|
||||
/**
|
||||
* Convert a bots role to the equipment role used in config/bot.json
|
||||
* @param botRole Role to convert
|
||||
* @returns Equipment role (e.g. pmc / assault / bossTagilla)
|
||||
*/
|
||||
getBotEquipmentRole(botRole: string): string;
|
||||
}
|
||||
/** TODO - move into own class */
|
||||
export declare class ExhaustableArray<T> {
|
||||
|
@ -3,6 +3,7 @@ import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
export declare class BotHelper {
|
||||
@ -10,9 +11,10 @@ export declare class BotHelper {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
/**
|
||||
* Get difficulty settings for desired bot type, if not found use assault bot types
|
||||
* @param type bot type to retreive difficulty of
|
||||
@ -50,6 +52,11 @@ export declare class BotHelper {
|
||||
* @param difficultySettings pmc difficulty settings
|
||||
*/
|
||||
randomisePmcHostility(difficultySettings: Difficulty): void;
|
||||
/**
|
||||
* Is the passed in bot role a PMC (usec/bear/pmc)
|
||||
* @param botRole bot role to check
|
||||
* @returns true if is pmc
|
||||
*/
|
||||
isBotPmc(botRole: string): boolean;
|
||||
isBotBoss(botRole: string): boolean;
|
||||
isBotFollower(botRole: string): boolean;
|
||||
|
@ -15,4 +15,15 @@ export declare class GameEventHelper {
|
||||
* @returns Record with event name + start/end date
|
||||
*/
|
||||
getEventDetails(): ISeasonalEvent[];
|
||||
/**
|
||||
* Is detection of seasonal events enabled (halloween / christmas)
|
||||
* @returns true if seasonal events should be checked for
|
||||
*/
|
||||
isAutomaticEventDetectionEnabled(): boolean;
|
||||
/**
|
||||
* Get a dictionary of gear changes to apply to bots for a specific event e.g. Christmas/Halloween
|
||||
* @param eventName Name of event to get gear changes for
|
||||
* @returns bots with equipment changes
|
||||
*/
|
||||
getEventBotGear(eventName: string): Record<string, Record<string, Record<string, number>>>;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PlayerService } from "../services/PlayerService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
@ -29,13 +30,14 @@ export declare class HideoutHelper {
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected playerService: PlayerService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
static bitcoinFarm: string;
|
||||
static waterCollector: string;
|
||||
static bitcoin: string;
|
||||
static expeditionaryFuelTank: string;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* This convinience function intialies new Production Object
|
||||
|
@ -5,11 +5,12 @@ import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMe
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IInventoryConfig } from "../models/spt/config/IInventoryConfig";
|
||||
import { IInventoryConfig, RewardDetails } from "../models/spt/config/IInventoryConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
@ -38,9 +39,10 @@ export declare class InventoryHelper {
|
||||
protected itemHelper: ItemHelper;
|
||||
protected containerHelper: ContainerHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected inventoryConfig: IInventoryConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse;
|
||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
@ -76,6 +78,12 @@ export declare class InventoryHelper {
|
||||
* Internal helper function to handle cartridges in inventory if any of them exist.
|
||||
*/
|
||||
protected handleCartridges(items: Item[], body: IInventoryMoveRequestData): void;
|
||||
/**
|
||||
* Get details for how a random loot container should be handled, max rewards, possible reward tpls
|
||||
* @param itemTpl Container being opened
|
||||
* @returns Reward details
|
||||
*/
|
||||
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
||||
}
|
||||
declare namespace InventoryHelper {
|
||||
interface InventoryItemHash {
|
||||
|
@ -5,6 +5,7 @@ import { IStaticAmmoDetails } from "../models/eft/common/tables/ILootBase";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocaleService } from "../services/LocaleService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { MathUtil } from "../utils/MathUtil";
|
||||
@ -18,7 +19,8 @@ declare class ItemHelper {
|
||||
protected objectId: ObjectId;
|
||||
protected mathUtil: MathUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer);
|
||||
protected localeService: LocaleService;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, localeService: LocaleService);
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||
* @param {string} tpl the template id / tpl
|
||||
@ -212,6 +214,12 @@ declare class ItemHelper {
|
||||
* @returns size of stack
|
||||
*/
|
||||
getItemStackSize(item: Item): number;
|
||||
/**
|
||||
* Get the name of an item from the locale file using the item tpl
|
||||
* @param itemTpl Tpl of item to get name of
|
||||
* @returns Name of item
|
||||
*/
|
||||
getItemName(itemTpl: string): string;
|
||||
}
|
||||
declare namespace ItemHelper {
|
||||
interface ItemSize {
|
||||
|
@ -50,6 +50,12 @@ export declare class QuestHelper {
|
||||
* @returns true if player level is greater than or equal to quest
|
||||
*/
|
||||
doesPlayerLevelFulfilCondition(playerLevel: number, condition: AvailableForConditions): boolean;
|
||||
/**
|
||||
* Get the quests found in both arrays (inner join)
|
||||
* @param before Array of qeusts #1
|
||||
* @param after Array of quests #2
|
||||
* @returns Reduction of cartesian product between two quest arrays
|
||||
*/
|
||||
getDeltaQuests(before: IQuest[], after: IQuest[]): IQuest[];
|
||||
/**
|
||||
* Increase skill points of a skill on player profile
|
||||
@ -66,38 +72,85 @@ export declare class QuestHelper {
|
||||
* quest list in question.
|
||||
*/
|
||||
dumpQuests(quests: any): void;
|
||||
loyaltyRequirementCheck(loyaltyRequirementProperties: AvailableForProps, profile: IPmcData): boolean;
|
||||
protected processReward(reward: Reward): any[];
|
||||
/**
|
||||
* Check if trader has sufficient loyalty to fullfill quest requirement
|
||||
* @param questProperties Quest props
|
||||
* @param profile Player profile
|
||||
* @returns true if loyalty is high enough to fulfil quest requirement
|
||||
*/
|
||||
traderStandingRequirementCheck(questProperties: AvailableForProps, profile: IPmcData): boolean;
|
||||
protected processReward(reward: Reward): Reward[];
|
||||
/**
|
||||
* Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success)
|
||||
* @param quest quest to get rewards for
|
||||
* @param state Quest status that holds the items (Started, Success, Fail)
|
||||
* @returns array of items with the correct maxStack
|
||||
*/
|
||||
getQuestRewardItems(quest: IQuest, state: QuestStatus): Reward[];
|
||||
/**
|
||||
* Add quest with new state value to pmc profile
|
||||
* Update player profile with quest status (e.g. Fail/Success)
|
||||
* @param pmcData profile to add quest to
|
||||
* @param newState state the new quest should be in when added
|
||||
* @param acceptedQuest Details of quest being added
|
||||
*/
|
||||
addQuestToPMCData(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): void;
|
||||
acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[];
|
||||
failedUnlocked(failedQuestId: string, sessionID: string): IQuest[];
|
||||
applyMoneyBoost(quest: IQuest, moneyBoost: number): IQuest;
|
||||
changeItemStack(pmcData: IPmcData, id: string, value: number, sessionID: string, output: any): void;
|
||||
/**
|
||||
* Get List of All Quests as an array
|
||||
* TODO: what is going on here
|
||||
* @param acceptedQuestId Quest to add to profile
|
||||
* @param sessionID Session id
|
||||
* @returns Array of quests in profile + quest passed in as param
|
||||
*/
|
||||
acceptedUnlocked(acceptedQuestId: string, sessionID: string): IQuest[];
|
||||
/**
|
||||
* TODO: what is going on here
|
||||
* @param failedQuestId
|
||||
* @param sessionID Session id
|
||||
* @returns
|
||||
*/
|
||||
failedUnlocked(failedQuestId: string, sessionID: string): IQuest[];
|
||||
/**
|
||||
* Adjust quest money rewards by passed in multipler
|
||||
* @param quest Quest to multiple money rewards
|
||||
* @param multipler Value to adjust money rewards by
|
||||
* @returns Updated quest
|
||||
*/
|
||||
applyMoneyBoost(quest: IQuest, multipler: number): IQuest;
|
||||
/**
|
||||
* Sets the item stack to new value, or delete the item if value <= 0
|
||||
* // TODO maybe merge this function and the one from customization
|
||||
* @param pmcData Profile
|
||||
* @param itemId id of item to adjust stack size of
|
||||
* @param newStackSize Stack size to adjust to
|
||||
* @param sessionID Session id
|
||||
* @param output ItemEvent router response
|
||||
*/
|
||||
changeItemStack(pmcData: IPmcData, itemId: string, newStackSize: number, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
/**
|
||||
* Get List of All Quests from db
|
||||
* NOT CLONED
|
||||
* @returns Array of IQuest objects
|
||||
*/
|
||||
questValues(): IQuest[];
|
||||
getQuestsFromDb(): IQuest[];
|
||||
/**
|
||||
* Reest AvailableForStart conditions for quests
|
||||
* @param quests queststo clean
|
||||
* Get quests, strip all requirement conditions except level
|
||||
* @param quests quests to process
|
||||
* @returns quest array without conditions
|
||||
*/
|
||||
protected cleanQuestList(quests: IQuest[]): IQuest[];
|
||||
protected getQuestsWithOnlyLevelRequirementStartCondition(quests: IQuest[]): IQuest[];
|
||||
/**
|
||||
* Reset AvailableForStart conditions on a quest
|
||||
* Remove all quest conditions except for level requirement
|
||||
* @param quest quest to clean
|
||||
* @returns reset IQuest object
|
||||
*/
|
||||
cleanQuestConditions(quest: IQuest): IQuest;
|
||||
failQuest(pmcData: IPmcData, body: any, sessionID: string): any;
|
||||
getQuestWithOnlyLevelRequirementStartCondition(quest: IQuest): IQuest;
|
||||
/**
|
||||
* Fail a quest in a player profile
|
||||
* @param pmcData Profile
|
||||
* @param failRequest fail quest request data
|
||||
* @param sessionID Session id
|
||||
* @returns Item event router response
|
||||
*/
|
||||
failQuest(pmcData: IPmcData, failRequest: any, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get quest by id from database
|
||||
* @param questId questid to look for
|
||||
@ -105,7 +158,12 @@ export declare class QuestHelper {
|
||||
* @returns IQuest object
|
||||
*/
|
||||
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
||||
getQuestLocaleIdFromDb(messageId: string): string;
|
||||
/**
|
||||
* Get the locale Id from locale db for a quest message
|
||||
* @param questMessageId Quest mesage id to look up
|
||||
* @returns Locale Id from locale db
|
||||
*/
|
||||
getQuestLocaleIdFromDb(questMessageId: string): string;
|
||||
/**
|
||||
* Alter a quests state + Add a record to tis status timers object
|
||||
* @param pmcData Profile to update
|
||||
@ -128,5 +186,10 @@ export declare class QuestHelper {
|
||||
* @returns bonus in percent
|
||||
*/
|
||||
protected getIntelCenterRewardBonus(pmcData: IPmcData): number;
|
||||
getFindItemIdForQuestItem(itemTpl: string): string;
|
||||
/**
|
||||
* Find quest with 'findItem' requirement that needs the item tpl be handed in
|
||||
* @param itemTpl item tpl to look for
|
||||
* @returns 'FindItem' condition id
|
||||
*/
|
||||
getFindItemIdForQuestHandIn(itemTpl: string): string;
|
||||
}
|
||||
|
@ -44,10 +44,20 @@ export declare class RagfairServerHelper {
|
||||
isPlayer(userID: string): boolean;
|
||||
returnItems(sessionID: string, items: any[]): void;
|
||||
calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number;
|
||||
/**
|
||||
* Choose a currency at random with bias
|
||||
* @returns currency tpl
|
||||
*/
|
||||
getDynamicOfferCurrency(): string;
|
||||
getMemberType(userID: string): MemberCategory;
|
||||
getNickname(userID: string): string;
|
||||
getPresetItems(item: any): Item[];
|
||||
getPresetItemsByTpl(item: Item): Item[];
|
||||
/**
|
||||
* Generate new unique ids for the children while preserving hierarchy
|
||||
* @param item base item
|
||||
* @param preset
|
||||
* @returns Item array with new IDs
|
||||
*/
|
||||
reparentPresets(item: Item, preset: Item[]): Item[];
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ export declare class RagfairSortHelper {
|
||||
protected sortOffersByRating(a: IRagfairOffer, b: IRagfairOffer): number;
|
||||
protected sortOffersByName(a: IRagfairOffer, b: IRagfairOffer): number;
|
||||
/**
|
||||
* Order two offers by price value
|
||||
* Order two offers by rouble price value
|
||||
* @param a Offer a
|
||||
* @param b Offer b
|
||||
* @returns
|
||||
|
@ -1,29 +1,31 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { IPostAkiLoadMod } from "../models/external/IPostAkiLoadMod";
|
||||
import { IPostDBLoadMod } from "../models/external/IPostDBLoadMod";
|
||||
import { IPreAkiLoadMod } from "../models/external/IPreAkiLoadMod";
|
||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||
import { ModLoader } from "../models/spt/mod/IMod";
|
||||
import { IModLoader } from "../models/spt/mod/IModLoader";
|
||||
import { IPackageJsonData } from "../models/spt/mod/IPackageJsonData";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { ModCompilerService } from "../services/ModCompilerService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { VFS } from "../utils/VFS";
|
||||
import { BundleLoader } from "./BundleLoader";
|
||||
import { IPostAkiLoadMod } from "../models/external/IPostAkiLoadMod";
|
||||
import { IPreAkiLoadMod } from "../models/external/IPreAkiLoadMod";
|
||||
import { IPostDBLoadMod } from "../models/external/IPostDBLoadMod";
|
||||
export declare class PreAkiModLoader implements IModLoader {
|
||||
protected logger: ILogger;
|
||||
protected vfs: VFS;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected modCompilerService: ModCompilerService;
|
||||
protected bundleLoader: BundleLoader;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected static container: DependencyContainer;
|
||||
protected readonly basepath = "user/mods/";
|
||||
protected imported: Record<string, ModLoader.IMod>;
|
||||
protected akiConfig: ICoreConfig;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
load(container: DependencyContainer): Promise<void>;
|
||||
getBundles(local: boolean): string;
|
||||
getBundle(key: string, local: boolean): void;
|
||||
|
@ -2,6 +2,7 @@ export interface IGenerateBotsRequestData {
|
||||
conditions: Condition[];
|
||||
}
|
||||
export interface Condition {
|
||||
/** e.g. assault/pmcBot/bossKilla */
|
||||
Role: string;
|
||||
Limit: number;
|
||||
Difficulty: string;
|
||||
|
@ -591,6 +591,7 @@ export interface HealPrice {
|
||||
export interface ProfileHealthSettings {
|
||||
BodyPartsSettings: BodyPartsSettings;
|
||||
HealthFactorsSettings: HealthFactorsSettings;
|
||||
DefaultStimulatorBuff: string;
|
||||
}
|
||||
export interface BodyPartsSettings {
|
||||
Head: BodyPartsSetting;
|
||||
|
@ -13,8 +13,8 @@ export interface IBotType {
|
||||
skills: Skills;
|
||||
}
|
||||
export interface Appearance {
|
||||
body: string[];
|
||||
feet: string[];
|
||||
body: Record<string, number>;
|
||||
feet: Record<string, number>;
|
||||
hands: string[];
|
||||
head: string[];
|
||||
voice: string[];
|
||||
|
@ -254,7 +254,7 @@ export interface Props {
|
||||
foodUseTime?: number;
|
||||
foodEffectType?: string;
|
||||
StimulatorBuffs?: string;
|
||||
effects_health?: any;
|
||||
effects_health?: IHealthEffect[] | Record<string, Record<string, number>>;
|
||||
effects_damage?: any;
|
||||
MaximumNumberOfUsage?: number;
|
||||
knifeHitDelay?: number;
|
||||
@ -366,6 +366,10 @@ export interface Props {
|
||||
MinTimeToContactExplode?: number;
|
||||
ExplosionEffectType?: string;
|
||||
}
|
||||
export interface IHealthEffect {
|
||||
type: string;
|
||||
value: number;
|
||||
}
|
||||
export interface Prefab {
|
||||
path: string;
|
||||
rcid: string;
|
||||
|
11
TypeScript/1LogToConsole/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts
vendored
Normal file
11
TypeScript/1LogToConsole/types/models/eft/inventory/IOpenRandomLootContainerRequestData.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import { IInventoryBaseActionRequestData } from "./IInventoryBaseActionRequestData";
|
||||
export interface IOpenRandomLootContainerRequestData extends IInventoryBaseActionRequestData {
|
||||
Action: "OpenRandomLootContainer";
|
||||
/** Container item opened */
|
||||
item: string;
|
||||
to: To[];
|
||||
}
|
||||
export interface To {
|
||||
/** Player character (pmc/scav) id items will be sent to */
|
||||
id: string;
|
||||
}
|
@ -10,8 +10,9 @@ export interface IItemEventRouterBase {
|
||||
export declare type TProfileChanges = Record<string, ProfileChange>;
|
||||
export interface Warning {
|
||||
index: number;
|
||||
err: string;
|
||||
errmsg: string;
|
||||
code?: string;
|
||||
data?: any;
|
||||
}
|
||||
export interface ProfileChange {
|
||||
_id: string;
|
||||
|
@ -2,8 +2,10 @@ import { BotAmount } from "../../enums/BotAmount";
|
||||
import { BotDifficulty } from "../../enums/BotDifficulty";
|
||||
export interface IStartOfflineRaidRequestData {
|
||||
locationName: string;
|
||||
/** Current time, not in-game time */
|
||||
startTime: number;
|
||||
dateTime: string;
|
||||
/** CURR = am, past = pm */
|
||||
dateTime: "CURR" | "PAST";
|
||||
gameSettings: GameSettings;
|
||||
}
|
||||
export interface GameSettings {
|
||||
|
@ -7,19 +7,19 @@ export interface IRagfairOffer {
|
||||
requirements: OfferRequirement[];
|
||||
root: string;
|
||||
intId: number;
|
||||
/** Handbook price */
|
||||
itemsCost: number;
|
||||
/** Rouble price */
|
||||
requirementsCost: number;
|
||||
sptRequirementsCostRouble: number;
|
||||
startTime: number;
|
||||
endTime: number;
|
||||
sellInOnePiece: boolean;
|
||||
name?: string;
|
||||
shortName?: string;
|
||||
loyaltyLevel: number;
|
||||
buyRestrictionMax?: number;
|
||||
buyRestrictionCurrent?: number;
|
||||
locked: boolean;
|
||||
unlimitedCount: boolean;
|
||||
/** Rouble price */
|
||||
summaryCost: number;
|
||||
user: IRagfairOfferUser;
|
||||
notAvailable: boolean;
|
||||
@ -33,11 +33,11 @@ export interface OfferRequirement {
|
||||
}
|
||||
export interface IRagfairOfferUser {
|
||||
id: string;
|
||||
nickname: string;
|
||||
rating: number;
|
||||
nickname?: string;
|
||||
rating?: number;
|
||||
memberType: MemberCategory;
|
||||
avatar: string;
|
||||
isRatingGrowing: boolean;
|
||||
avatar?: string;
|
||||
isRatingGrowing?: boolean;
|
||||
}
|
||||
export interface SellResult {
|
||||
sellTime: number;
|
||||
|
@ -1,17 +1,18 @@
|
||||
import { WindDirection } from "../../../models/enums/WindDirection";
|
||||
export interface IWeatherData {
|
||||
acceleration: number;
|
||||
time: string;
|
||||
date: string;
|
||||
weather: IWeather;
|
||||
weather?: IWeather;
|
||||
}
|
||||
export interface IWeather {
|
||||
pressure: number;
|
||||
temp: number;
|
||||
fog: string;
|
||||
fog: number;
|
||||
rain_intensity: number;
|
||||
rain: any;
|
||||
rain: number;
|
||||
wind_gustiness: number;
|
||||
wind_direction: any;
|
||||
wind_direction: WindDirection;
|
||||
wind_speed: number;
|
||||
cloud: number;
|
||||
time: string;
|
||||
|
67
TypeScript/1LogToConsole/types/models/enums/BackendErrorCodes.d.ts
vendored
Normal file
67
TypeScript/1LogToConsole/types/models/enums/BackendErrorCodes.d.ts
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
export declare enum BackendErrorCodes {
|
||||
NONE = 0,
|
||||
UNKNOWN_ERROR = 200,
|
||||
NOT_AUTHORIZED = 201,
|
||||
NEED_AUTHORIZATION_CODE = 209,
|
||||
WRONG_AUTHORIZATION_CODE = 211,
|
||||
NEED_CAPTCHA = 214,
|
||||
NO_NEED_CAPTCHA = 215,
|
||||
CAPTCHA_FAILED = 218,
|
||||
CAPTCHA_BRUTE_FORCED = 219,
|
||||
NO_ROOM_IN_STASH = 223,
|
||||
NICKNAME_NOT_UNIQUE = 225,
|
||||
NICKNAME_NOT_VALID = 226,
|
||||
UNSUPPORTED_CLIENT_VERSION = 232,
|
||||
REPORT_NOT_ALLOWED = 238,
|
||||
NICKNAME_IS_ABUSIVE = 241,
|
||||
NICKNAME_CHANGE_TIMEOUT = 242,
|
||||
NOT_MODIFIED = 304,
|
||||
HTTP_BAD_REQUEST = 400,
|
||||
HTTP_NOT_AUTHORIZED = 401,
|
||||
HTTP_FORBIDDEN = 403,
|
||||
HTTP_NOT_FOUND = 404,
|
||||
HTTP_METHOD_NOT_ALLOWED = 405,
|
||||
UNKNOWN_TRADING_ERROR = 500,
|
||||
HTTPNOTIMPLEMENTED = 501,
|
||||
HTTPBADGATEWAY = 502,
|
||||
HTTPSERVICEUNAVAILABLE = 503,
|
||||
HTTPGATEWAYTIMEOUT = 504,
|
||||
TRADEROUTOFMONEY = 505,
|
||||
HTTPVARIANTALSONEGOTIATES = 506,
|
||||
PRICECHANGED = 509,
|
||||
TRADERDISABLED = 512,
|
||||
ITEMHASBEENSOLD = 513,
|
||||
NOTENOUGHSPACEFORMONEY = 518,
|
||||
HTTPINVALIDSSLCERTIFICATE = 526,
|
||||
UNKNOWNRAGFAIRERROR = 550,
|
||||
UNKNOWNRAGFAIRERROR2 = 551,
|
||||
UNKNOWNMATCHMAKERERROR = 600,
|
||||
SESSIONPARAMETERSERROR = 601,
|
||||
SESSIONLOST = 602,
|
||||
SERVERNOTREGISTERED = 604,
|
||||
UNKNOWNQUESTERROR = 700,
|
||||
QUESTBADPARAM = 702,
|
||||
QUESTNOTFOUND = 703,
|
||||
QUESTISUNAVAILABLE = 704,
|
||||
NOFREESPACEFORREWARDS = 705,
|
||||
WRONGQUESTSTATUS = 706,
|
||||
CANTCOMPLETEQUEST = 707,
|
||||
UNKNOWNMAILERROR = 900,
|
||||
TOOMANYFRIENDREQUESTS = 925,
|
||||
UNKNOWNSCRIPTEXECUTIONERROR = 1000,
|
||||
UNKNOWNREPAIRINGERROR = 1200,
|
||||
UNKNOWNINSURANCEERROR = 1300,
|
||||
UNKNOWNCURRENCYEXCHANGEERROR = 1400,
|
||||
OFFERNOTFOUND = 1503,
|
||||
NOTENOUGHSPACE = 1505,
|
||||
OFFEROUTOFSTOCK = 1506,
|
||||
OFFERSOLD = 1507,
|
||||
RAGFAIRUNAVAILABLE = 1511,
|
||||
BANNEDERRORCODE = 1513,
|
||||
INSUFFICIENTNUMBERINSTOCK = 1516,
|
||||
TOOMANYITEMSTOSELL = 1517,
|
||||
EXAMINATIONFAILED = 22001,
|
||||
ITEMALREADYEXAMINED = 22002,
|
||||
UNKNOWNNGINXERROR = 9000,
|
||||
PARSERESPONSEERROR = 9001
|
||||
}
|
11
TypeScript/1LogToConsole/types/models/enums/HideoutEventActions.d.ts
vendored
Normal file
11
TypeScript/1LogToConsole/types/models/enums/HideoutEventActions.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
export declare enum HideoutEventActions {
|
||||
HIDEOUT_UPGRADE = "HideoutUpgrade",
|
||||
HIDEOUT_UPGRADE_COMPLETE = "HideoutUpgradeComplete",
|
||||
HIDEOUT_PUT_ITEMS_IN_AREA_SLOTS = "HideoutPutItemsInAreaSlots",
|
||||
HIDEOUT_TAKE_ITEMS_FROM_AREA_SLOTS = "HideoutTakeItemsFromAreaSlots",
|
||||
HIDEOUT_TOGGLE_AREA = "HideoutToggleArea",
|
||||
HIDEOUT_SINGLE_PRODUCTION_START = "HideoutSingleProductionStart",
|
||||
HIDEOUT_SCAV_CASE_PRODUCTION_START = "HideoutScavCaseProductionStart",
|
||||
HIDEOUT_CONTINUOUS_PRODUCTION_START = "HideoutContinuousProductionStart",
|
||||
HIDEOUT_TAKE_PRODUCTION = "HideoutTakeProduction"
|
||||
}
|
19
TypeScript/1LogToConsole/types/models/enums/ItemEventActions.d.ts
vendored
Normal file
19
TypeScript/1LogToConsole/types/models/enums/ItemEventActions.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
export declare enum ItemEventActions {
|
||||
MOVE = "Move",
|
||||
REMOVE = "Remove",
|
||||
SPLIT = "Split",
|
||||
MERGE = "Merge",
|
||||
TRANSFER = "Transfer",
|
||||
SWAP = "Swap",
|
||||
FOLD = "Fold",
|
||||
TOGGLE = "Toggle",
|
||||
TAG = "Tag",
|
||||
BIND = "Bind",
|
||||
EXAMINE = "Examine",
|
||||
READ_ENCYCLOPEDIA = "ReadEncyclopedia",
|
||||
APPLY_INVENTORY_CHANGES = "ApplyInventoryChanges",
|
||||
CREATE_MAP_MARKER = "CreateMapMarker",
|
||||
DELETE_MAP_MARKER = "DeleteMapMarker",
|
||||
EDIT_MAP_MARKER = "EditMapMarker",
|
||||
OPEN_RANDOM_LOOT_CONTAINER = "OpenRandomLootContainer"
|
||||
}
|
19
TypeScript/1LogToConsole/types/models/enums/WeatherType.d.ts
vendored
Normal file
19
TypeScript/1LogToConsole/types/models/enums/WeatherType.d.ts
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
export declare enum WeatherType {
|
||||
CLEAR_DAY = 1,
|
||||
CLEAR_WIND = 2,
|
||||
CLEAR_NIGHT = 3,
|
||||
PARTLY_CLOUD_DAY = 4,
|
||||
PARTLY_CLOUD_NIGHT = 5,
|
||||
CLEAR_FOG_DAY = 6,
|
||||
CLEAR_FOG_NIGHT = 7,
|
||||
CLOUDFOG = 8,
|
||||
FOG = 9,
|
||||
MOSTLY_CLOUD = 10,
|
||||
LIGHT_RAIN = 11,
|
||||
RAIN = 12,
|
||||
CLOUD_WIND = 13,
|
||||
CLOUD_WIND_RAIN = 14,
|
||||
FULL_CLOUD = 15,
|
||||
THUNDER_CLOUD = 16,
|
||||
NONE = 0
|
||||
}
|
33
TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts
vendored
Normal file
33
TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
export declare enum WildSpawnTypeNumber {
|
||||
ASSAULT = 1,
|
||||
MARKSMAN = 2,
|
||||
BOSSTEST = 4,
|
||||
BOSSBULLY = 8,
|
||||
FOLLOWERTEST = 16,
|
||||
FOLLOWERBULLY = 32,
|
||||
BOSSKILLA = 64,
|
||||
BOSSKOJANIY = 128,
|
||||
FOLLOWERKOJANIY = 256,
|
||||
PMCBOT = 512,
|
||||
CURSEDASSAULT = 1024,
|
||||
BOSSGLUHAR = 2048,
|
||||
FOLLOWERGLUHARASSAULT = 4096,
|
||||
FOLLOWERGLUHARSECURITY = 8192,
|
||||
FOLLOWERGLUHARSCOUT = 16384,
|
||||
FOLLOWERGLUHARSNIPE = 32768,
|
||||
FOLLOWERSANITAR = 65536,
|
||||
BOSSSANITAR = 131072,
|
||||
TEST = 262144,
|
||||
ASSAULTGROUP = 524288,
|
||||
SECTANTWARRIOR = 1048576,
|
||||
SECTANTPRIEST = 2097152,
|
||||
BOSSTAGILLA = 4194304,
|
||||
FOLLOWERTAGILLA = 8388608,
|
||||
EXUSEC = 16777216,
|
||||
GIFTER = 33554432,
|
||||
BOSSKNIGHT = 67108864,
|
||||
FOLLOWERBIGPIPE = 134217728,
|
||||
FOLLOWERBIRDEYE = 268435456,
|
||||
SPTUSEC = 536870912,
|
||||
SPTBEAR = 1073741824
|
||||
}
|
10
TypeScript/1LogToConsole/types/models/enums/WindDirection.d.ts
vendored
Normal file
10
TypeScript/1LogToConsole/types/models/enums/WindDirection.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
export declare enum WindDirection {
|
||||
EAST = 1,
|
||||
NORTH = 2,
|
||||
WEST = 3,
|
||||
SOUTH = 4,
|
||||
SE = 5,
|
||||
SW = 6,
|
||||
NW = 7,
|
||||
NE = 8
|
||||
}
|
@ -66,8 +66,12 @@ export interface EquipmentFilters {
|
||||
weaponModLimits: ModLimits;
|
||||
randomisedWeaponModSlots?: string[];
|
||||
randomisedArmorSlots?: string[];
|
||||
faceShieldIsActiveChancePercent?: number;
|
||||
lightLaserIsActiveChancePercent?: number;
|
||||
blacklist: EquipmentFilterDetails[];
|
||||
whitelist: EquipmentFilterDetails[];
|
||||
clothing: WeightingAdjustmentDetails[];
|
||||
weightingAdjustments: WeightingAdjustmentDetails[];
|
||||
}
|
||||
export interface ModLimits {
|
||||
/** How many scopes are allowed on a weapon - hard coded to work with OPTIC_SCOPE, ASSAULT_SCOPE, COLLIMATOR, COMPACT_COLLIMATOR */
|
||||
@ -80,3 +84,8 @@ export interface EquipmentFilterDetails {
|
||||
equipment: Record<string, string[]>;
|
||||
cartridge: Record<string, string[]>;
|
||||
}
|
||||
export interface WeightingAdjustmentDetails {
|
||||
levelRange: MinMax;
|
||||
add: Record<string, Record<string, number>>;
|
||||
edit: Record<string, Record<string, number>>;
|
||||
}
|
||||
|
@ -2,4 +2,10 @@ import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IInventoryConfig extends IBaseConfig {
|
||||
kind: "aki-inventory";
|
||||
newItemsMarkedFound: boolean;
|
||||
randomLootContainers: Record<string, RewardDetails>;
|
||||
}
|
||||
export interface RewardDetails {
|
||||
rewardCount: number;
|
||||
foundInRaid: boolean;
|
||||
rewardTplPool: Record<string, number>;
|
||||
}
|
||||
|
@ -1,5 +1,10 @@
|
||||
import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface ILocaleConfig extends IBaseConfig {
|
||||
kind: "aki-locale";
|
||||
desiredLocale: string;
|
||||
/** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */
|
||||
gameLocale: string;
|
||||
/** e.g. ru/en/cn/fr etc, or 'system', will take computer locale setting */
|
||||
serverLocale: string;
|
||||
/** Languages server can be translated into */
|
||||
serverSupportedLocales: string[];
|
||||
}
|
||||
|
@ -6,9 +6,11 @@ export interface IPmcConfig {
|
||||
looseWeaponInBackpackChancePercent: number;
|
||||
looseWeaponInBackpackLootMinMax: MinMax;
|
||||
isUsec: number;
|
||||
usecType: string;
|
||||
bearType: string;
|
||||
chanceSameSideIsHostilePercent: number;
|
||||
/** key: location, value: type for usec/bear */
|
||||
pmcType: Record<string, PmcTypes>;
|
||||
pmcType: Record<string, Record<string, Record<string, number>>>;
|
||||
maxBackpackLootTotalRub: number;
|
||||
maxPocketLootTotalRub: number;
|
||||
maxVestLootTotalRub: number;
|
||||
|
@ -28,12 +28,8 @@ export interface Reputation {
|
||||
gain: number;
|
||||
loss: number;
|
||||
}
|
||||
export declare class OfferAdjustment {
|
||||
maxPriceDifferenceBelowHandbookPercent: number;
|
||||
handbookPriceMultipier: number;
|
||||
priceThreshholdRub: number;
|
||||
}
|
||||
export interface Dynamic {
|
||||
barter: Barter;
|
||||
offerAdjustment: OfferAdjustment;
|
||||
expiredOfferThreshold: number;
|
||||
offerItemCount: MinMax;
|
||||
@ -49,6 +45,20 @@ export interface Dynamic {
|
||||
showAsSingleStack: string[];
|
||||
blacklist: Blacklist;
|
||||
}
|
||||
export declare class Barter {
|
||||
enable: boolean;
|
||||
chancePercent: number;
|
||||
itemCountMin: number;
|
||||
itemCountMax: number;
|
||||
priceRangeVariancePercent: number;
|
||||
minRoubleCostToBecomeBarter: number;
|
||||
itemTypeBlacklist: string[];
|
||||
}
|
||||
export declare class OfferAdjustment {
|
||||
maxPriceDifferenceBelowHandbookPercent: number;
|
||||
handbookPriceMultipier: number;
|
||||
priceThreshholdRub: number;
|
||||
}
|
||||
export interface Condition {
|
||||
conditionChance: number;
|
||||
min: number;
|
||||
|
@ -1,6 +1,9 @@
|
||||
import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface ISeasonalEventConfig extends IBaseConfig {
|
||||
kind: "aki-seasonalevents";
|
||||
enableSeasonalEventDetection: boolean;
|
||||
/** event / botType / equipSlot / itemid */
|
||||
eventGear: Record<string, Record<string, Record<string, Record<string, number>>>>;
|
||||
events: ISeasonalEvent[];
|
||||
}
|
||||
export interface ISeasonalEvent {
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { WindDirection } from "../../../models/enums/WindDirection";
|
||||
import { MinMax } from "../../common/MinMax";
|
||||
import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IWeatherConfig extends IBaseConfig {
|
||||
@ -7,12 +8,16 @@ export interface IWeatherConfig extends IBaseConfig {
|
||||
}
|
||||
export interface Weather {
|
||||
clouds: MinMax;
|
||||
windSpeed: MinMax;
|
||||
windDirection: MinMax;
|
||||
windSpeed: WeatherSettings<number>;
|
||||
windDirection: WeatherSettings<WindDirection>;
|
||||
windGustiness: MinMax;
|
||||
rain: MinMax;
|
||||
rain: WeatherSettings<number>;
|
||||
rainIntensity: MinMax;
|
||||
fog: MinMax;
|
||||
fog: WeatherSettings<string>;
|
||||
temp: MinMax;
|
||||
pressure: MinMax;
|
||||
}
|
||||
export interface WeatherSettings<T> {
|
||||
values: T[];
|
||||
weights: number[];
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { HideoutCallbacks } from "../../callbacks/HideoutCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class HideoutItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected hideoutCallbacks: HideoutCallbacks;
|
||||
constructor(hideoutCallbacks: HideoutCallbacks);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { InventoryCallbacks } from "../../callbacks/InventoryCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class InventoryItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected inventoryCallbacks: InventoryCallbacks;
|
||||
constructor(inventoryCallbacks: InventoryCallbacks);
|
||||
|
@ -4,6 +4,7 @@ import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { ConfigServer } from "./ConfigServer";
|
||||
import { DatabaseServer } from "./DatabaseServer";
|
||||
import { IHttpListener } from "./http/IHttpListener";
|
||||
@ -12,11 +13,12 @@ export declare class HttpServer {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected httpListeners: IHttpListener[];
|
||||
protected configServer: ConfigServer;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected webSocketServer: WebSocketServer;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, httpServerHelper: HttpServerHelper, httpListeners: IHttpListener[], configServer: ConfigServer, applicationContext: ApplicationContext, webSocketServer: WebSocketServer);
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, httpServerHelper: HttpServerHelper, localisationService: LocalisationService, httpListeners: IHttpListener[], configServer: ConfigServer, applicationContext: ApplicationContext, webSocketServer: WebSocketServer);
|
||||
protected httpConfig: IHttpConfig;
|
||||
getCookies(req: http.IncomingMessage): any;
|
||||
handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
|
@ -1,20 +1,22 @@
|
||||
import { SaveLoadRouter } from "../di/Router";
|
||||
import { IAkiProfile, Info } from "../models/eft/profile/IAkiProfile";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { VFS } from "../utils/VFS";
|
||||
import { SaveLoadRouter } from "../di/Router";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
export declare class SaveServer {
|
||||
protected vfs: VFS;
|
||||
protected saveLoadRouters: SaveLoadRouter[];
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected localisationService: LocalisationService;
|
||||
protected logger: ILogger;
|
||||
protected profileFilepath: string;
|
||||
protected profiles: {};
|
||||
protected onSave: {};
|
||||
protected saveMd5: {};
|
||||
constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, logger: ILogger);
|
||||
constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger);
|
||||
load(): void;
|
||||
save(): void;
|
||||
getProfile(sessionId: string): IAkiProfile;
|
||||
|
@ -1,18 +1,20 @@
|
||||
/// <reference types="node" />
|
||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||
import WebSocket from "ws";
|
||||
import http, { IncomingMessage } from "http";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import WebSocket from "ws";
|
||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||
import { INotification } from "../models/eft/notifier/INotifier";
|
||||
import { ConfigServer } from "./ConfigServer";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { ConfigServer } from "./ConfigServer";
|
||||
export declare class WebSocketServer {
|
||||
protected logger: ILogger;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected configServer: ConfigServer;
|
||||
protected localisationService: LocalisationService;
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, httpServerHelper: HttpServerHelper);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, httpServerHelper: HttpServerHelper);
|
||||
protected httpConfig: IHttpConfig;
|
||||
protected defaultNotification: INotification;
|
||||
protected webSockets: Record<string, WebSocket.WebSocket>;
|
||||
|
@ -1,22 +1,24 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "http";
|
||||
import { IHttpListener } from "./IHttpListener";
|
||||
import { Serializer } from "../../di/Serializer";
|
||||
import { ILogger } from "../../models/spt/utils/ILogger";
|
||||
import { HttpRouter } from "../../routers/HttpRouter";
|
||||
import { LocalisationService } from "../../services/LocalisationService";
|
||||
import { HttpResponseUtil } from "../../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../../utils/JsonUtil";
|
||||
import { HttpBufferHandler } from "./HttpBufferHandler";
|
||||
import { IHttpListener } from "./IHttpListener";
|
||||
export declare class AkiHttpListener implements IHttpListener {
|
||||
protected httpRouter: HttpRouter;
|
||||
protected serializers: Serializer[];
|
||||
protected logger: ILogger;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected localisationService: LocalisationService;
|
||||
protected httpBufferHandler: HttpBufferHandler;
|
||||
constructor(httpRouter: HttpRouter, // TODO: delay required
|
||||
serializers: Serializer[], logger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, httpBufferHandler: HttpBufferHandler);
|
||||
serializers: Serializer[], logger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService, httpBufferHandler: HttpBufferHandler);
|
||||
canHandle(_: string, req: IncomingMessage): boolean;
|
||||
handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void;
|
||||
sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void;
|
||||
|
@ -1,12 +1,12 @@
|
||||
import { IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { EquipmentFilters, EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { EquipmentFilters, EquipmentFilterDetails, IBotConfig, WeightingAdjustmentDetails } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class BotEquipmentFilterService {
|
||||
protected logger: ILogger;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
protected botEquipmentFilterlists: Record<string, EquipmentFilters>;
|
||||
protected botEquipmentConfig: Record<string, EquipmentFilters>;
|
||||
constructor(logger: ILogger, configServer: ConfigServer);
|
||||
/**
|
||||
* Filter a bots data to exclude equipment and cartridges defines in the botConfig
|
||||
@ -30,6 +30,20 @@ export declare class BotEquipmentFilterService {
|
||||
* @returns EquipmentFilterDetails object
|
||||
*/
|
||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||
/**
|
||||
* Retreive clothing weighting adjustments from bot.json config
|
||||
* @param botRole Bot type to get adjustments for
|
||||
* @param playerLevel level of player
|
||||
* @returns Weighting adjustments for bots clothing
|
||||
*/
|
||||
protected getBotClothingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
||||
/**
|
||||
* Retreive item weighting adjustments from bot.json config
|
||||
* @param botRole Bot type to get adjustments for
|
||||
* @param playerLevel level of player
|
||||
* @returns Weighting adjustments for bot items
|
||||
*/
|
||||
protected getBotWeightingAdjustments(botRole: string, playerLevel: number): WeightingAdjustmentDetails;
|
||||
/**
|
||||
* Filter bot equipment based on blacklist and whitelist from config/bot.json
|
||||
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||
@ -47,4 +61,10 @@ export declare class BotEquipmentFilterService {
|
||||
* @returns Filtered bot file
|
||||
*/
|
||||
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||
/**
|
||||
* Add/Edit weighting changes to bot items using values from config/bot.json/equipment
|
||||
* @param weightingAdjustments Weighting change to apply to bot
|
||||
* @param botItemPool Bot item dictionary to adjust
|
||||
*/
|
||||
protected adjustWeighting(weightingAdjustments: WeightingAdjustmentDetails, botItemPool: Record<string, any>): void;
|
||||
}
|
||||
|
@ -1,14 +1,42 @@
|
||||
import { ILocaleConfig } from "../models/spt/config/ILocaleConfig";
|
||||
import { ILocaleGlobalBase } from "../models/spt/server/ILocaleBase";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
/**
|
||||
* Handles getting locales from config or users machine
|
||||
*/
|
||||
export declare class LocaleService {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected configServer: ConfigServer;
|
||||
protected localeConfig: ILocaleConfig;
|
||||
constructor(logger: ILogger, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||
/**
|
||||
* Gets the locale key from the locale.json file
|
||||
* Get the eft globals db file based on the configured locale in config/locale.json, if not found, fall back to 'en'
|
||||
* @returns ILocaleGlobalBase
|
||||
*/
|
||||
getLocaleDb(): ILocaleGlobalBase;
|
||||
/**
|
||||
* Gets the game locale key from the locale.json file,
|
||||
* if value is 'system' get system locale
|
||||
* @returns locale e.g en/ge/cz/cn
|
||||
*/
|
||||
getDesiredLocale(): string;
|
||||
getDesiredGameLocale(): string;
|
||||
/**
|
||||
* Gets the game locale key from the locale.json file,
|
||||
* if value is 'system' get system locale
|
||||
* @returns locale e.g en/ge/cz/cn
|
||||
*/
|
||||
getDesiredServerLocale(): string;
|
||||
/**
|
||||
* Get array of languages supported for localisation
|
||||
* @returns array of locales e.g. en/fr/cn
|
||||
*/
|
||||
getServerSupportedLocales(): string[];
|
||||
/**
|
||||
* Get the locale of the computer running the server
|
||||
* @returns langage part of locale e.g. 'en' part of 'en-US'
|
||||
*/
|
||||
protected getPlatformLocale(): string;
|
||||
}
|
||||
|
21
TypeScript/1LogToConsole/types/services/LocalisationService.d.ts
vendored
Normal file
21
TypeScript/1LogToConsole/types/services/LocalisationService.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
import { I18n } from "i18n";
|
||||
import { ILocaleConfig } from "../models/spt/config/ILocaleConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { LocaleService } from "./LocaleService";
|
||||
/**
|
||||
* Handles translating server text into different langauges
|
||||
*/
|
||||
export declare class LocalisationService {
|
||||
protected logger: ILogger;
|
||||
protected localeService: LocaleService;
|
||||
protected localeConfig: ILocaleConfig;
|
||||
protected i18n: I18n;
|
||||
constructor(logger: ILogger, localeService: LocaleService);
|
||||
/**
|
||||
* Get a localised value using the passed in key
|
||||
* @param key Key to loop up locale for
|
||||
* @param args optional arguments
|
||||
* @returns Localised string
|
||||
*/
|
||||
getText(key: string, args?: any): string;
|
||||
}
|
@ -11,6 +11,7 @@ import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTr
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { LocalisationService } from "./LocalisationService";
|
||||
export declare class PaymentService {
|
||||
protected logger: ILogger;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
@ -19,8 +20,9 @@ export declare class PaymentService {
|
||||
protected traderHelper: TraderHelper;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper);
|
||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper);
|
||||
/**
|
||||
* Take money and insert items into return to server request
|
||||
* @param {Object} pmcData
|
||||
@ -50,7 +52,7 @@ export declare class PaymentService {
|
||||
* @param pmcData Player profile to find and remove currency from
|
||||
* @param currencyTpl Type of currency to pay
|
||||
* @param amountToPay money value to pay
|
||||
* @param sessionID Sessino id
|
||||
* @param sessionID Session id
|
||||
* @param output output object to send to client
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
|
@ -2,10 +2,12 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IPlayerIncrementSkillLevelRequestData } from "../models/eft/player/IPlayerIncrementSkillLevelRequestData";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "./LocalisationService";
|
||||
export declare class PlayerService {
|
||||
protected logger: ILogger;
|
||||
protected localisationService: LocalisationService;
|
||||
protected databaseServer: DatabaseServer;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer);
|
||||
constructor(logger: ILogger, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||
/**
|
||||
* increases the profile skill and updates any output
|
||||
* @param {Object} pmcData
|
||||
|
@ -1,27 +0,0 @@
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
/** Storing/retreving pmcRoles set at the start of a raid - its done at that point as we know what location the player is heading to */
|
||||
export declare class PmcAiService {
|
||||
protected logger: ILogger;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
protected usecRole: string;
|
||||
protected bearRole: string;
|
||||
constructor(logger: ILogger, configServer: ConfigServer);
|
||||
/**
|
||||
* Convert from pmc side (usec/bear) to the side as defined in the bot config (usecType/bearType)
|
||||
* @param pmcSide eft side (usec/bear)
|
||||
* @returns pmc side as defined in config
|
||||
*/
|
||||
getPmcRole(pmcSide: "usec" | "bear" | string): string;
|
||||
/**
|
||||
* Set the roles for pmcs
|
||||
* @param location map location to look up and use as pmc types
|
||||
*/
|
||||
setPmcRolesByLocation(location: string): void;
|
||||
/**
|
||||
* Clear the saved role from usec/bear PMCs
|
||||
*/
|
||||
clearPmcRoles(): void;
|
||||
}
|
@ -8,12 +8,14 @@ import { HideoutAreas } from "../models/enums/HideoutAreas";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { Watermark } from "../utils/Watermark";
|
||||
import { LocalisationService } from "./LocalisationService";
|
||||
export declare class ProfileFixerService {
|
||||
protected logger: ILogger;
|
||||
protected watermark: Watermark;
|
||||
protected hideoutHelper: HideoutHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected databaseServer: DatabaseServer;
|
||||
constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, databaseServer: DatabaseServer);
|
||||
constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, localisationService: LocalisationService, databaseServer: DatabaseServer);
|
||||
/**
|
||||
* Find issues in the pmc profile data that may cause issues and fix them
|
||||
* @param pmcProfile profile to check and fix
|
||||
|
@ -11,6 +11,7 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { LocalisationService } from "./LocalisationService";
|
||||
import { RagfairCategoriesService } from "./RagfairCategoriesService";
|
||||
export declare class RagfairOfferService {
|
||||
protected logger: ILogger;
|
||||
@ -22,12 +23,13 @@ export declare class RagfairOfferService {
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected playerOffersLoaded: boolean;
|
||||
protected expiredOffers: Item[];
|
||||
protected offers: IRagfairOffer[];
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
/**
|
||||
* Get all offers
|
||||
* @returns IRagfairOffer array
|
||||
|
@ -1,14 +1,16 @@
|
||||
import { TimeUtil } from "./TimeUtil";
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { OnUpdate } from "../di/OnUpdate";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { TimeUtil } from "./TimeUtil";
|
||||
export declare class App {
|
||||
protected logger: ILogger;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected localisationService: LocalisationService;
|
||||
protected onLoadComponents: OnLoad[];
|
||||
protected onUpdateComponents: OnUpdate[];
|
||||
protected onUpdateLastRun: {};
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, localisationService: LocalisationService, onLoadComponents: OnLoad[], onUpdateComponents: OnUpdate[]);
|
||||
load(): void;
|
||||
protected update(onUpdateComponents: OnUpdate[]): void;
|
||||
protected logUpdateException(err: any, updateable: OnUpdate): void;
|
||||
|
@ -3,15 +3,17 @@ 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 { LocalisationService } from "../services/LocalisationService";
|
||||
import { JsonUtil } from "./JsonUtil";
|
||||
import { VFS } from "./VFS";
|
||||
export declare class DatabaseImporter extends OnLoad {
|
||||
protected logger: ILogger;
|
||||
protected vfs: VFS;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected localisationService: LocalisationService;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected imageRouter: ImageRouter;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, databaseServer: DatabaseServer, imageRouter: ImageRouter);
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, localisationService: LocalisationService, databaseServer: DatabaseServer, imageRouter: ImageRouter);
|
||||
onLoad(): void;
|
||||
/**
|
||||
* Read all json files in database folder and map into a json object
|
||||
|
@ -1,10 +1,13 @@
|
||||
import { JsonUtil } from "./JsonUtil";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { BackendErrorCodes } from "../models/enums/BackendErrorCodes";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { JsonUtil } from "./JsonUtil";
|
||||
export declare class HttpResponseUtil {
|
||||
protected jsonUtil: JsonUtil;
|
||||
constructor(jsonUtil: JsonUtil);
|
||||
protected localisationService: LocalisationService;
|
||||
constructor(jsonUtil: JsonUtil, localisationService: LocalisationService);
|
||||
protected clearString(s: string): any;
|
||||
noBody(data: any): any;
|
||||
getBody<T>(data: T, err?: number, errmsg?: any): IGetBodyResponseData<T>;
|
||||
@ -12,5 +15,5 @@ export declare class HttpResponseUtil {
|
||||
emptyResponse(): IGetBodyResponseData<string>;
|
||||
nullResponse(): INullResponseData;
|
||||
emptyArrayResponse(): IGetBodyResponseData<any[]>;
|
||||
appendErrorToOutput(output: IItemEventRouterResponse, message?: string, title?: string): IItemEventRouterResponse;
|
||||
appendErrorToOutput(output: IItemEventRouterResponse, message?: string, errorCode?: BackendErrorCodes): IItemEventRouterResponse;
|
||||
}
|
||||
|
@ -110,6 +110,12 @@ export declare class RandomUtil {
|
||||
getIntEx(max: number): number;
|
||||
getFloat(min: number, max: number): number;
|
||||
getBool(): boolean;
|
||||
/**
|
||||
* Check if number passes a check out of 100
|
||||
* @param chancePercent value check needs to be above
|
||||
* @returns true if value passes check
|
||||
*/
|
||||
getChance100(chancePercent: number): boolean;
|
||||
getStringArrayValue(arr: string[]): string;
|
||||
getArrayValue<T>(arr: T[]): T;
|
||||
getKey(node: any): string;
|
||||
|
@ -1,20 +1,15 @@
|
||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
export declare class WatermarkLocale {
|
||||
protected locales: {
|
||||
"en-US": {
|
||||
description: string[];
|
||||
warning: string[];
|
||||
modding: string[];
|
||||
};
|
||||
"zh-CN": {
|
||||
description: string[];
|
||||
warning: string[];
|
||||
modding: string[];
|
||||
};
|
||||
protected localisationService: LocalisationService;
|
||||
constructor(localisationService: LocalisationService);
|
||||
protected watermark: {
|
||||
description: string[];
|
||||
warning: string[];
|
||||
modding: string[];
|
||||
};
|
||||
getLocale(): string;
|
||||
getDescription(): string[];
|
||||
getWarning(): string[];
|
||||
getModding(): string[];
|
||||
@ -22,9 +17,10 @@ export declare class WatermarkLocale {
|
||||
export declare class Watermark {
|
||||
protected logger: ILogger;
|
||||
protected configServer: ConfigServer;
|
||||
protected localisationService: LocalisationService;
|
||||
protected watermarkLocale?: WatermarkLocale;
|
||||
protected akiConfig: ICoreConfig;
|
||||
constructor(logger: ILogger, configServer: ConfigServer, watermarkLocale?: WatermarkLocale);
|
||||
constructor(logger: ILogger, configServer: ConfigServer, localisationService: LocalisationService, watermarkLocale?: WatermarkLocale);
|
||||
protected text: string[];
|
||||
protected versionLabel: string;
|
||||
initialize(): void;
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.2.4",
|
||||
"akiVersion": "3.3.0",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./packageBuild.ts"
|
||||
|
Loading…
x
Reference in New Issue
Block a user