Update types for examples
This commit is contained in:
parent
aad0a36b11
commit
ef07efc01b
@ -65,5 +65,10 @@ export declare class DataCallbacks {
|
||||
* Handle client/hideout/qte/list
|
||||
*/
|
||||
getQteList(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||
/**
|
||||
* Handle client/items/prices/
|
||||
* Called when viewing a traders assorts
|
||||
* TODO - fully implement this
|
||||
*/
|
||||
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetItemPricesResponse>;
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ import { DialogueInfo } from "../models/eft/profile/IAkiProfile";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class DialogueCallbacks extends OnUpdate {
|
||||
export declare class DialogueCallbacks implements OnUpdate {
|
||||
protected hashUtil: HashUtil;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { HandbookController } from "../controllers/HandbookController";
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
export declare class HandbookCallbacks extends OnLoad {
|
||||
export declare class HandbookCallbacks implements OnLoad {
|
||||
protected handbookController: HandbookController;
|
||||
constructor(handbookController: HandbookController);
|
||||
onLoad(): Promise<void>;
|
||||
|
@ -2,7 +2,7 @@ import { HideoutController } from "../controllers/HideoutController";
|
||||
import { OnUpdate } from "../di/OnUpdate";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
|
||||
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||
@ -16,7 +16,7 @@ import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootin
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
export declare class HideoutCallbacks extends OnUpdate {
|
||||
export declare class HideoutCallbacks implements OnUpdate {
|
||||
protected hideoutController: HideoutController;
|
||||
protected configServer: ConfigServer;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
@ -53,7 +53,7 @@ export declare class HideoutCallbacks extends OnUpdate {
|
||||
/**
|
||||
* Handle HideoutContinuousProductionStart
|
||||
*/
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutTakeProduction
|
||||
*/
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { HttpServer } from "../servers/HttpServer";
|
||||
export declare class HttpCallbacks extends OnLoad {
|
||||
export declare class HttpCallbacks implements OnLoad {
|
||||
protected httpServer: HttpServer;
|
||||
constructor(httpServer: HttpServer);
|
||||
onLoad(): Promise<void>;
|
||||
|
@ -10,7 +10,7 @@ import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { InsuranceService } from "../services/InsuranceService";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
export declare class InsuranceCallbacks extends OnUpdate {
|
||||
export declare class InsuranceCallbacks implements OnUpdate {
|
||||
protected insuranceController: InsuranceController;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
|
@ -6,7 +6,7 @@ import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HttpFileUtil } from "../utils/HttpFileUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
declare class ModCallbacks extends OnLoad {
|
||||
declare class ModCallbacks implements OnLoad {
|
||||
protected logger: ILogger;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected httpFileUtil: HttpFileUtil;
|
||||
@ -17,8 +17,5 @@ declare class ModCallbacks extends OnLoad {
|
||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||
getBundles(url: string, info: any, sessionID: string): string;
|
||||
getBundle(url: string, info: any, sessionID: string): string;
|
||||
}
|
||||
export { ModCallbacks };
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { PresetController } from "../controllers/PresetController";
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
export declare class PresetCallbacks extends OnLoad {
|
||||
export declare class PresetCallbacks implements OnLoad {
|
||||
protected presetController: PresetController;
|
||||
constructor(presetController: PresetController);
|
||||
onLoad(): Promise<void>;
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { OnUpdate } from "../di/OnUpdate";
|
||||
import { RagfairController } from "../controllers/RagfairController";
|
||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
@ -21,7 +22,7 @@ import { JsonUtil } from "../utils/JsonUtil";
|
||||
/**
|
||||
* Handle ragfair related callback events
|
||||
*/
|
||||
export declare class RagfairCallbacks extends OnLoadOnUpdate {
|
||||
export declare class RagfairCallbacks implements OnLoad, OnUpdate {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected ragfairServer: RagfairServer;
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { OnUpdate } from "../di/OnUpdate";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
export declare class SaveCallbacks extends OnLoadOnUpdate {
|
||||
export declare class SaveCallbacks implements OnLoad, OnUpdate {
|
||||
protected saveServer: SaveServer;
|
||||
constructor(saveServer: SaveServer);
|
||||
onLoad(): Promise<void>;
|
||||
|
@ -6,6 +6,9 @@ import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRag
|
||||
export declare class TradeCallbacks {
|
||||
protected tradeController: TradeController;
|
||||
constructor(tradeController: TradeController);
|
||||
/**
|
||||
* Handle client/game/profile/items/moving TradingConfirm
|
||||
*/
|
||||
processTrade(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
processRagfairTrade(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
@ -1,10 +1,11 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { OnUpdate } from "../di/OnUpdate";
|
||||
import { TraderController } from "../controllers/TraderController";
|
||||
import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IBarterScheme, ITraderAssort, ITraderBase } from "../models/eft/common/tables/ITrader";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
export declare class TraderCallbacks extends OnLoadOnUpdate {
|
||||
export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected traderController: TraderController;
|
||||
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
||||
|
@ -41,6 +41,12 @@ export declare class GameController {
|
||||
protected locationConfig: ILocationConfig;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||
/**
|
||||
* When player logs in, iterate over all active effects and reduce timer
|
||||
* TODO - add body part HP regen
|
||||
* @param pmcProfile
|
||||
*/
|
||||
protected updateProfileHealthValues(pmcProfile: IPmcData): void;
|
||||
/**
|
||||
* Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max
|
||||
*/
|
||||
|
@ -2,25 +2,27 @@ import { HealthHelper } from "../helpers/HealthHelper";
|
||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
||||
import { IHealthTreatmentRequestData } from "../models/eft/health/IHealthTreatmentRequestData";
|
||||
import { IOffraidEatRequestData } from "../models/eft/health/IOffraidEatRequestData";
|
||||
import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealRequestData";
|
||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class HealthController {
|
||||
protected logger: ILogger;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected paymentService: PaymentService;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected healthHelper: HealthHelper;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, healthHelper: HealthHelper);
|
||||
/**
|
||||
* stores in-raid player health
|
||||
* @param pmcData Player profile
|
||||
@ -61,10 +63,11 @@ export declare class HealthController {
|
||||
*/
|
||||
applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void;
|
||||
/**
|
||||
* iterate over treatment request diff and find effects to remove from player limbs
|
||||
* Iterate over treatment request diff and find effects to remove from player limbs
|
||||
* @param sessionId
|
||||
* @param profile Profile to update
|
||||
* @param treatmentRequest client request
|
||||
* @param output response to send to client
|
||||
*/
|
||||
protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData): void;
|
||||
protected removeEffectsAfterPostRaidHeal(sessionId: string, profile: IPmcData, treatmentRequest: IHealthTreatmentRequestData, output: IItemEventRouterResponse): void;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
||||
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
||||
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||
import { IHideoutImproveAreaRequestData } from "../models/eft/hideout/IHideoutImproveAreaRequestData";
|
||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||
import { IHideoutPutItemInRequestData } from "../models/eft/hideout/IHideoutPutItemInRequestData";
|
||||
@ -27,6 +27,7 @@ import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
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 { PlayerService } from "../services/PlayerService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
@ -53,9 +54,10 @@ export declare class HideoutController {
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected fenceService: FenceService;
|
||||
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, localisationService: LocalisationService, 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, fenceService: FenceService);
|
||||
/**
|
||||
* Start a hideout area upgrade
|
||||
* @param pmcData Player profile
|
||||
@ -73,6 +75,7 @@ export declare class HideoutController {
|
||||
*/
|
||||
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutPutItemsInAreaSlots
|
||||
* Create item in hideout slot item array, remove item from player inventory
|
||||
* @param pmcData Profile data
|
||||
* @param addItemToHideoutRequest reqeust from client to place item in area slot
|
||||
@ -122,6 +125,14 @@ export declare class HideoutController {
|
||||
* @returns item event router response
|
||||
*/
|
||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Adjust scav case time based on fence standing
|
||||
*
|
||||
* @param pmcData Player profile
|
||||
* @param productionTime Time to complete scav case in seconds
|
||||
* @returns Adjusted scav case time in seconds
|
||||
*/
|
||||
protected getScavCaseTime(pmcData: IPmcData, productionTime: number): number;
|
||||
/**
|
||||
* Add generated scav case rewards to player profile
|
||||
* @param pmcData player profile to add rewards to
|
||||
@ -136,7 +147,7 @@ export declare class HideoutController {
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
continuousProductionStart(pmcData: IPmcData, request: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
continuousProductionStart(pmcData: IPmcData, request: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Take completed item out of hideout area and place into player inventory
|
||||
* @param pmcData Player profile
|
||||
@ -171,7 +182,7 @@ export declare class HideoutController {
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
registerProduction(pmcData: IPmcData, request: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
registerProduction(pmcData: IPmcData, request: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get quick time event list for hideout
|
||||
* // TODO - implement this
|
||||
|
@ -102,6 +102,13 @@ export declare class QuestController {
|
||||
* @param questRewards Rewards given to player
|
||||
*/
|
||||
protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void;
|
||||
/**
|
||||
* Look for newly available quests after completing a quest with a requirement to wait x minutes (time-locked) before being available and add data to profile
|
||||
* @param pmcData Player profile to update
|
||||
* @param quests Quests to look for wait conditions in
|
||||
* @param completedQuestId Quest just completed
|
||||
*/
|
||||
protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void;
|
||||
/**
|
||||
* Returns a list of quests that should be failed when a quest is completed
|
||||
* @param completedQuestId quest completed id
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
@ -65,6 +66,7 @@ export declare class RepeatableQuestController {
|
||||
protected presetHelper: PresetHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected ragfairServerHelper: RagfairServerHelper;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected localisationService: LocalisationService;
|
||||
@ -73,7 +75,7 @@ export declare class RepeatableQuestController {
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, 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);
|
||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, 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.
|
||||
@ -115,17 +117,18 @@ export declare class RepeatableQuestController {
|
||||
/**
|
||||
* Just for debug reasons. Draws dailies a random assort of dailies extracted from dumps
|
||||
*/
|
||||
generateDebugDailies(dailiesPool: any, factory: any, number: any): any;
|
||||
generateDebugDailies(dailiesPool: any, factory: any, number: number): any;
|
||||
/**
|
||||
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
|
||||
* The templates include Elimination, Completion and Extraction quest types
|
||||
*
|
||||
* @param {string} type quest type: "Elimination", "Completion" or "Extraction"
|
||||
* @param {string} traderId trader from which the quest will be provided
|
||||
* @param {string} side scav daily or pmc daily/weekly quest
|
||||
* @returns {object} a object which contains the base elements for repeatable quests of the requests type
|
||||
* (needs to be filled with reward and conditions by called to make a valid quest)
|
||||
*/
|
||||
generateRepeatableTemplate(type: string, traderId: string): IRepeatableQuest;
|
||||
generateRepeatableTemplate(type: string, traderId: string, side: string): IRepeatableQuest;
|
||||
/**
|
||||
* Generates a valid Exploration quest
|
||||
*
|
||||
|
@ -1,22 +1,30 @@
|
||||
import { RagfairServer } from "../servers/RagfairServer";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TradeHelper } from "../helpers/TradeHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { Upd } from "../models/eft/common/tables/IItem";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IProcessBaseTradeRequestData } from "../models/eft/trade/IProcessBaseTradeRequestData";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { IProcessRagfairTradeRequestData } from "../models/eft/trade/IProcessRagfairTradeRequestData";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { RagfairServer } from "../servers/RagfairServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
declare class TradeController {
|
||||
protected logger: ILogger;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected tradeHelper: TradeHelper;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected ragfairServer: RagfairServer;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil);
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
confirmTrading(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
||||
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IWishlistActionData } from "../models/eft/wishlist/IWishlistActionData";
|
||||
export declare class WishlistController {
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
constructor(eventOutputHolder: EventOutputHolder);
|
||||
|
@ -1,4 +1,4 @@
|
||||
export declare class OnLoad {
|
||||
export interface OnLoad {
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
@ -1,7 +0,0 @@
|
||||
import { OnLoad } from "./OnLoad";
|
||||
import { OnUpdate } from "./OnUpdate";
|
||||
export declare class OnLoadOnUpdate implements OnLoad, OnUpdate {
|
||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export declare class OnUpdate {
|
||||
export interface OnUpdate {
|
||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health as PmcHealth, IBotBase, Info, Skills } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "../models/spt/bots/BotGenerationDetails";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
@ -90,6 +90,13 @@ export declare class BotGenerator {
|
||||
*/
|
||||
protected generateId(bot: IBotBase): IBotBase;
|
||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||
/**
|
||||
* Randomise a bots game version and account category
|
||||
* Chooses from all the game versions (standard, eod etc)
|
||||
* Chooses account type (default, Sherpa, etc)
|
||||
* @param botInfo bot info object to update
|
||||
*/
|
||||
protected getRandomisedGameVersionAndCategory(botInfo: Info): void;
|
||||
/**
|
||||
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
||||
* @param bot bot to add dogtag to
|
||||
|
@ -3,6 +3,7 @@ import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||
/**
|
||||
* Handle the generation of dynamic PMC loot in pockets and backpacks
|
||||
* and the removal of blacklisted items
|
||||
@ -12,10 +13,19 @@ export declare class PMCLootGenerator {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected configServer: ConfigServer;
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected seasonalEventService: SeasonalEventService;
|
||||
protected pocketLootPool: string[];
|
||||
protected backpackLootPool: string[];
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService);
|
||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService);
|
||||
/**
|
||||
* Create an array of loot items a PMC can have in their pockets
|
||||
* @returns string array of tpls
|
||||
*/
|
||||
generatePMCPocketLootPool(): string[];
|
||||
/**
|
||||
* Create an array of loot items a PMC can have in their backpack
|
||||
* @returns string array of tpls
|
||||
*/
|
||||
generatePMCBackpackLootPool(): string[];
|
||||
}
|
||||
|
@ -1,4 +1,7 @@
|
||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Skills, Stats } from "../models/eft/common/tables/IBotBase";
|
||||
@ -11,11 +14,18 @@ import { SaveServer } from "../servers/SaveServer";
|
||||
import { BotLootCacheService } from "../services/BotLootCacheService";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { BotGenerator } from "./BotGenerator";
|
||||
export declare class PlayerScavGenerator {
|
||||
protected logger: ILogger;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected hashUtil: HashUtil;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected saveServer: SaveServer;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected botHelper: BotHelper;
|
||||
@ -26,7 +36,7 @@ export declare class PlayerScavGenerator {
|
||||
protected botGenerator: BotGenerator;
|
||||
protected configServer: ConfigServer;
|
||||
protected playerScavConfig: IPlayerScavConfig;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer);
|
||||
/**
|
||||
* Update a player profile to include a new player scav profile
|
||||
* @param sessionID session id to specify what profile is updated
|
||||
|
@ -4,6 +4,7 @@ import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class RagfairAssortGenerator {
|
||||
@ -11,10 +12,11 @@ export declare class RagfairAssortGenerator {
|
||||
protected hashUtil: HashUtil;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected seasonalEventService: SeasonalEventService;
|
||||
protected configServer: ConfigServer;
|
||||
protected generatedAssortItems: Item[];
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
||||
/**
|
||||
* Get an array of unique items that can be sold on the flea
|
||||
* @returns array of unique items
|
||||
|
@ -2,7 +2,6 @@ import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { Product } from "../models/eft/common/tables/IBotBase";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||
import { IScavCaseConfig } from "../models/spt/config/IScavCaseConfig";
|
||||
import { RewardCountAndPriceDetails, ScavCaseRewardCountsAndPrices } from "../models/spt/hideout/ScavCaseRewardCountsAndPrices";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -28,10 +27,10 @@ export declare class ScavCaseRewardGenerator {
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||
/**
|
||||
* Create an array of rewards that will be given to the player upon completing their scav case build
|
||||
* @param body client request
|
||||
* @param recipeId recipe of the scav case craft
|
||||
* @returns Product array
|
||||
*/
|
||||
generate(body: IHideoutScavCaseStartRequestData): Product[];
|
||||
generate(recipeId: string): Product[];
|
||||
/**
|
||||
* Get all db items that are not blacklisted in scavcase config
|
||||
* @returns filtered array of db items
|
||||
|
@ -17,15 +17,16 @@ export declare class AssortHelper {
|
||||
* @param pmcProfile player profile
|
||||
* @param traderId traders id
|
||||
* @param assort assort items from a trader
|
||||
* @param mergedQuestAssorts An object of quest assort to quest id unlocks for all traders
|
||||
* @returns assort items minus locked quest assorts
|
||||
*/
|
||||
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort, flea?: boolean): ITraderAssort;
|
||||
stripLockedQuestAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort, mergedQuestAssorts: Record<string, Record<string, string>>, flea?: boolean): ITraderAssort;
|
||||
/**
|
||||
* Remove assorts from a trader that have not been unlocked yet
|
||||
* @param pmcProfile player profile
|
||||
* @param traderId traders id
|
||||
* @param assort traders assorts
|
||||
* @returns traders assorts minus locked loyality assorts
|
||||
* @returns traders assorts minus locked loyalty assorts
|
||||
*/
|
||||
stripLockedLoyaltyAssort(pmcProfile: IPmcData, traderId: string, assort: ITraderAssort): ITraderAssort;
|
||||
/**
|
||||
|
@ -20,7 +20,7 @@ export declare class BotDifficultyHelper {
|
||||
getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
|
||||
/**
|
||||
* Get difficulty settings for desired bot type, if not found use assault bot types
|
||||
* @param type bot type to retreive difficulty of
|
||||
* @param type bot type to retrieve difficulty of
|
||||
* @param difficulty difficulty to get settings for (easy/normal etc)
|
||||
* @returns Difficulty object
|
||||
*/
|
||||
|
@ -23,7 +23,7 @@ export declare class BotGeneratorHelper {
|
||||
* Adds properties to an item
|
||||
* e.g. Repairable / HasHinge / Foldable / MaxDurability
|
||||
* @param itemTemplate Item extra properties are being generated for
|
||||
* @param botRole Used by weapons to randomise the durability values. Null for non-equipped items
|
||||
* @param botRole Used by weapons to randomize the durability values. Null for non-equipped items
|
||||
* @returns Item Upd object with extra properties
|
||||
*/
|
||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
||||
@ -53,10 +53,10 @@ export declare class BotGeneratorHelper {
|
||||
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
|
||||
/**
|
||||
* Can item be added to another item without conflict
|
||||
* @param items Items to check compatiblilities with
|
||||
* @param items Items to check compatibilities with
|
||||
* @param tplToCheck Tpl of the item to check for incompatibilities
|
||||
* @param equipmentSlot Slot the item will be placed into
|
||||
* @returns false if no incompatibilties, also has incompatibility reason
|
||||
* @returns false if no incompatibilities, also has incompatibility reason
|
||||
*/
|
||||
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): {
|
||||
incompatible: boolean;
|
||||
|
@ -23,11 +23,11 @@ export declare class BotHelper {
|
||||
*/
|
||||
getBotTemplate(role: string): IBotType;
|
||||
/**
|
||||
* Randomise the chance the PMC will attack their own side
|
||||
* Randomize the chance the PMC will attack their own side
|
||||
* Look up value in bot.json/chanceSameSideIsHostilePercent
|
||||
* @param difficultySettings pmc difficulty settings
|
||||
*/
|
||||
randomisePmcHostility(difficultySettings: Difficulty): void;
|
||||
randomizePmcHostility(difficultySettings: Difficulty): void;
|
||||
/**
|
||||
* Is the passed in bot role a PMC (usec/bear/pmc)
|
||||
* @param botRole bot role to check
|
||||
@ -63,26 +63,26 @@ export declare class BotHelper {
|
||||
rollChanceToBePmc(role: string, botConvertMinMax: MinMax): boolean;
|
||||
botRoleIsPmc(botRole: string): boolean;
|
||||
/**
|
||||
* Get randomisation settings for bot from config/bot.json
|
||||
* Get randomization settings for bot from config/bot.json
|
||||
* @param botLevel level of bot
|
||||
* @param botEquipConfig bot equipment json
|
||||
* @returns RandomisationDetails
|
||||
*/
|
||||
getBotRandomisationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails;
|
||||
getBotRandomizationDetails(botLevel: number, botEquipConfig: EquipmentFilters): RandomisationDetails;
|
||||
/**
|
||||
* Choose between sptBear and sptUsec at random based on the % defined in botConfig.pmc.isUsec
|
||||
* @returns pmc role
|
||||
*/
|
||||
getRandomisedPmcRole(): string;
|
||||
getRandomizedPmcRole(): string;
|
||||
/**
|
||||
* Get the corrisponding side when sptBear or sptUsec is passed in
|
||||
* Get the corresponding side when sptBear or sptUsec is passed in
|
||||
* @param botRole role to get side for
|
||||
* @returns side (usec/bear)
|
||||
*/
|
||||
getPmcSideByRole(botRole: string): string;
|
||||
/**
|
||||
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||
* Get a randomized PMC side based on bot config value 'isUsec'
|
||||
* @returns pmc side as string
|
||||
*/
|
||||
protected getRandomisedPmcSide(): string;
|
||||
protected getRandomizedPmcSide(): string;
|
||||
}
|
||||
|
@ -22,18 +22,18 @@ export declare class BotWeaponGeneratorHelper {
|
||||
protected containerHelper: ContainerHelper;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, inventoryHelper: InventoryHelper, localisationService: LocalisationService, containerHelper: ContainerHelper);
|
||||
/**
|
||||
* Get a randomised number of bullets for a specific magazine
|
||||
* Get a randomized number of bullets for a specific magazine
|
||||
* @param magCounts min and max count of magazines
|
||||
* @param magTemplate magazine to generate bullet count for
|
||||
* @returns bullet count number
|
||||
*/
|
||||
getRandomisedBulletCount(magCounts: MinMax, magTemplate: ITemplateItem): number;
|
||||
getRandomizedBulletCount(magCounts: MinMax, magTemplate: ITemplateItem): number;
|
||||
/**
|
||||
* Get a randomised count of magazines
|
||||
* Get a randomized count of magazines
|
||||
* @param magCounts min and max value returned value can be between
|
||||
* @returns numberical value of magazine count
|
||||
* @returns numerical value of magazine count
|
||||
*/
|
||||
getRandomisedMagazineCount(magCounts: MinMax): number;
|
||||
getRandomizedMagazineCount(magCounts: MinMax): number;
|
||||
/**
|
||||
* Is this magazine cylinder related (revolvers and grenade launchers)
|
||||
* @param magazineParentName the name of the magazines parent
|
||||
@ -49,11 +49,11 @@ export declare class BotWeaponGeneratorHelper {
|
||||
*/
|
||||
createMagazine(magazineTpl: string, ammoTpl: string, magTemplate: ITemplateItem): Item[];
|
||||
/**
|
||||
* Add a specific number of cartrdiges to a bots inventory (defaults to vest and pockets)
|
||||
* Add a specific number of cartridges to a bots inventory (defaults to vest and pockets)
|
||||
* @param ammoTpl Ammo tpl to add to vest/pockets
|
||||
* @param cartridgeCount number of cartridges to add to vest/pockets
|
||||
* @param inventory bot inventory to add cartridges to
|
||||
* @param equipmentSlotsToAddTo what equpiment slots should bullets be added into
|
||||
* @param equipmentSlotsToAddTo what equipment slots should bullets be added into
|
||||
*/
|
||||
addAmmoIntoEquipmentSlots(ammoTpl: string, cartridgeCount: number, inventory: Inventory, equipmentSlotsToAddTo?: EquipmentSlots[]): void;
|
||||
/**
|
||||
@ -63,7 +63,8 @@ export declare class BotWeaponGeneratorHelper {
|
||||
*/
|
||||
getWeaponsDefaultMagazineTpl(weaponTemplate: ITemplateItem): string;
|
||||
/**
|
||||
* Adds an item with all its childern into specified equipmentSlots, wherever it fits.
|
||||
* TODO - move into BotGeneratorHelper, this is not the class for it
|
||||
* Adds an item with all its children into specified equipmentSlots, wherever it fits.
|
||||
* @param equipmentSlots
|
||||
* @param parentId
|
||||
* @param parentTpl
|
||||
|
@ -9,10 +9,10 @@ export declare class DurabilityLimitsHelper {
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(randomUtil: RandomUtil, botHelper: BotHelper, configServer: ConfigServer);
|
||||
getRandomisedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||
getRandomisedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||
getRandomisedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||
getRandomisedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||
getRandomizedMaxWeaponDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||
getRandomizedMaxArmorDurability(itemTemplate: ITemplateItem, botRole: string): number;
|
||||
getRandomizedWeaponDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||
getRandomizedArmorDurability(itemTemplate: ITemplateItem, botRole: string, maxDurability: number): number;
|
||||
protected generateMaxWeaponDurability(botRole: string): number;
|
||||
protected generateMaxPmcArmorDurability(itemMaxDurability: number): number;
|
||||
protected getLowestMaxWeaponFromConfig(botRole: string): number;
|
||||
|
@ -16,7 +16,7 @@ export declare class HealthHelper {
|
||||
protected healthConfig: IHealthConfig;
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer);
|
||||
/**
|
||||
* Resets the profiles vitality/healh and vitality/effects properties to their defaults
|
||||
* Resets the profiles vitality/health and vitality/effects properties to their defaults
|
||||
* @param sessionID Session Id
|
||||
* @returns updated profile
|
||||
*/
|
||||
@ -24,13 +24,13 @@ export declare class HealthHelper {
|
||||
/**
|
||||
* Update player profile with changes from request object
|
||||
* @param pmcData Player profile
|
||||
* @param info Request object
|
||||
* @param request Heal request
|
||||
* @param sessionID Session id
|
||||
* @param addEffects Should effects be added or removed (default - add)
|
||||
*/
|
||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
|
||||
saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
|
||||
/**
|
||||
* Adjust hydration/energy/temprate and body part hp values in player profile
|
||||
* Adjust hydration/energy/temperate and body part hp values in player profile to values in profile.vitality
|
||||
* @param pmcData Profile to update
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
|
@ -2,7 +2,8 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Common, HideoutArea, IHideoutImprovement, Production, Productive } from "../models/eft/common/tables/IBotBase";
|
||||
import { Upd } from "../models/eft/common/tables/IItem";
|
||||
import { StageBonus } from "../models/eft/hideout/IHideoutArea";
|
||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||
import { IHideoutContinuousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
@ -15,7 +16,6 @@ import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PlayerService } from "../services/PlayerService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { InventoryHelper } from "./InventoryHelper";
|
||||
import { ProfileHelper } from "./ProfileHelper";
|
||||
@ -23,7 +23,6 @@ export declare class HideoutHelper {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
@ -37,11 +36,12 @@ export declare class HideoutHelper {
|
||||
static bitcoin: string;
|
||||
static expeditionaryFuelTank: string;
|
||||
static maxSkillPoint: number;
|
||||
private static generatorOffMultipler;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
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;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* This convinience function intialies new Production Object
|
||||
* This convenience function initializes new Production Object
|
||||
* with all the constants.
|
||||
*/
|
||||
initProduction(recipeId: string, productionTime: number): Production;
|
||||
@ -82,6 +82,26 @@ export declare class HideoutHelper {
|
||||
isGeneratorOn: boolean;
|
||||
waterCollectorHasFilter: boolean;
|
||||
}): void;
|
||||
/**
|
||||
* Update a productions progress value based on the amount of time that has passed
|
||||
* @param pmcData Player profile
|
||||
* @param prodId Production id being crafted
|
||||
* @param recipe Recipe data being crafted
|
||||
* @param hideoutProperties
|
||||
*/
|
||||
protected updateProductionProgress(pmcData: IPmcData, prodId: string, recipe: IHideoutProduction, hideoutProperties: {
|
||||
btcFarmCGs?: number;
|
||||
isGeneratorOn: boolean;
|
||||
waterCollectorHasFilter?: boolean;
|
||||
}): void;
|
||||
/**
|
||||
* Check if a productions progress value matches its corresponding recipes production time value
|
||||
* @param pmcData Player profile
|
||||
* @param prodId Production id
|
||||
* @param recipe Recipe being crafted
|
||||
* @returns progress matches productionTime from recipe
|
||||
*/
|
||||
protected doesProgressMatchProductionTime(pmcData: IPmcData, prodId: string): boolean;
|
||||
/**
|
||||
* Update progress timer for scav case
|
||||
* @param pmcData Profile to update
|
||||
@ -106,7 +126,7 @@ export declare class HideoutHelper {
|
||||
* Adjust water filter objects resourceValue or delete when they reach 0 resource
|
||||
* @param waterFilterArea water filter area to update
|
||||
* @param production production object
|
||||
* @param isGeneratorOn is generatory enabled
|
||||
* @param isGeneratorOn is generator enabled
|
||||
* @param pmcData Player profile
|
||||
* @returns Updated HideoutArea object
|
||||
*/
|
||||
@ -114,6 +134,11 @@ export declare class HideoutHelper {
|
||||
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd;
|
||||
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): void;
|
||||
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
|
||||
/**
|
||||
* Get a count of how many BTC can be gathered by the profile
|
||||
* @param pmcData Profile to look up
|
||||
* @returns coin slot count
|
||||
*/
|
||||
protected getBTCSlots(pmcData: IPmcData): number;
|
||||
protected getManagementSkillsSlots(): number;
|
||||
protected hasManagementSkillSlots(pmcData: IPmcData): boolean;
|
||||
@ -133,7 +158,15 @@ export declare class HideoutHelper {
|
||||
*/
|
||||
protected getCraftingSkillProductionTimeReduction(pmcData: IPmcData, productionTime: number): number;
|
||||
isProduction(productive: Productive): productive is Production;
|
||||
getBTC(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Gather crafted BTC from hideout area and add to inventory
|
||||
* Reset production start timestamp if hideout area at full coin capacity
|
||||
* @param pmcData Player profile
|
||||
* @param request Take production request
|
||||
* @param sessionId Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Upgrade hideout wall from starting level to interactable level if enough time has passed
|
||||
* @param pmcProfile Profile to upgrade wall in
|
||||
|
@ -40,7 +40,7 @@ export declare class InRaidHelper {
|
||||
* Remove Labs keycard
|
||||
* @param profileData Profile to update
|
||||
* @param saveProgressRequest post raid save data request data
|
||||
* @param sessionID Sessino id
|
||||
* @param sessionID Session id
|
||||
* @returns Reset profile object
|
||||
*/
|
||||
updateProfileBaseStats(profileData: IPmcData, saveProgressRequest: ISaveProgressRequestData, sessionID: string): IPmcData;
|
||||
@ -66,7 +66,7 @@ export declare class InRaidHelper {
|
||||
* Adds SpawnedInSession property to items found in a raid
|
||||
* Removes SpawnedInSession for non-scav players if item was taken into raid with SpawnedInSession = true
|
||||
* @param preRaidProfile profile to update
|
||||
* @param postRaidProfile profile to upate inventory contents of
|
||||
* @param postRaidProfile profile to update inventory contents of
|
||||
* @param isPlayerScav Was this a p scav raid
|
||||
* @returns
|
||||
*/
|
||||
|
@ -52,7 +52,7 @@ export declare class InventoryHelper {
|
||||
* @param sessionID Session id
|
||||
* @param callback Code to execute later (function)
|
||||
* @param foundInRaid Will results added to inventory be set as found in raid
|
||||
* @param addUpd Additional upd propertys for items being added to inventory
|
||||
* @param addUpd Additional upd properties for items being added to inventory
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: {
|
||||
|
@ -30,7 +30,7 @@ declare class ItemHelper {
|
||||
/**
|
||||
* 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
|
||||
* @returns boolean; true for items that may be in player posession and not quest items
|
||||
* @returns boolean; true for items that may be in player possession and not quest items
|
||||
*/
|
||||
isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean;
|
||||
/**
|
||||
@ -42,7 +42,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
isOfBaseclass(tpl: string, baseClassTpl: string): boolean;
|
||||
/**
|
||||
* Check if item has any of the supplied base clases
|
||||
* Check if item has any of the supplied base classes
|
||||
* @param tpl Item to check base classes of
|
||||
* @param baseClassTpls base classes to check for
|
||||
* @returns true if any supplied base classes match
|
||||
@ -165,7 +165,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
getChildId(item: Item): string;
|
||||
/**
|
||||
* Can the pased in item be stacked
|
||||
* Can the passed in item be stacked
|
||||
* @param tpl item to check
|
||||
* @returns true if it can be stacked
|
||||
*/
|
||||
@ -192,7 +192,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
||||
/**
|
||||
* WARNING, SLOW. Recursivly loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do
|
||||
* WARNING, SLOW. Recursively loop down through an items hierarchy to see if any of the ids match the supplied list, return true if any do
|
||||
* @param {string} tpl
|
||||
* @param {Array} tplsToCheck
|
||||
* @returns boolean
|
||||
@ -220,7 +220,15 @@ declare class ItemHelper {
|
||||
createRandomMagCartridges(magTemplate: ITemplateItem, parentId: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, caliber?: string): Item;
|
||||
protected getRandomValidCaliber(magTemplate: ITemplateItem): string;
|
||||
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string;
|
||||
createCartidges(parentId: string, ammoTpl: string, stackCount: number): Item;
|
||||
/**
|
||||
*
|
||||
* @param parentId container cartridges will be placed in
|
||||
* @param ammoTpl Cartridge to insert
|
||||
* @param stackCount Count of cartridges inside parent
|
||||
* @param location Location inside parent (e.g. 0, 1)
|
||||
* @returns Item
|
||||
*/
|
||||
createCartridges(parentId: string, ammoTpl: string, stackCount: number, location: number): Item;
|
||||
/**
|
||||
* Get the size of a stack, return 1 if no stack object count property found
|
||||
* @param item Item to get stack size of
|
||||
|
@ -6,7 +6,7 @@ export declare class NotificationSendHelper {
|
||||
protected notificationService: NotificationService;
|
||||
constructor(webSocketServer: WebSocketServer, notificationService: NotificationService);
|
||||
/**
|
||||
* Send notification message to the appropiate channel
|
||||
* Send notification message to the appropriate channel
|
||||
*/
|
||||
sendMessage(sessionID: string, notificationMessage: INotification): void;
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ export declare class ProfileHelper {
|
||||
/**
|
||||
* Add experience to a PMC inside the players profile
|
||||
* @param sessionID Session id
|
||||
* @param experienceToAdd Experiecne to add to PMC character
|
||||
* @param experienceToAdd Experience to add to PMC character
|
||||
*/
|
||||
addExperienceToPmc(sessionID: string, experienceToAdd: number): void;
|
||||
getProfileByPmcId(pmcId: string): IPmcData;
|
||||
|
@ -43,7 +43,7 @@ export declare class QuestHelper {
|
||||
* Get status of a quest by quest id
|
||||
* @param pmcData Profile to search
|
||||
* @param questID Quest id to look up
|
||||
* @returns QuestStauts enum
|
||||
* @returns QuestStatus enum
|
||||
*/
|
||||
getQuestStatus(pmcData: IPmcData, questID: string): QuestStatus;
|
||||
/**
|
||||
@ -64,11 +64,10 @@ export declare class QuestHelper {
|
||||
* Increase skill points of a skill on player profile
|
||||
* @param sessionID Session id
|
||||
* @param pmcData Player profile
|
||||
* @param output output object to send back to client
|
||||
* @param skillName Name of skill to increase skill points of
|
||||
* @param progressAmount Amount of skill points to add to skill
|
||||
*/
|
||||
rewardSkillPoints(sessionID: string, pmcData: IPmcData, output: IItemEventRouterResponse, skillName: string, progressAmount: number): void;
|
||||
rewardSkillPoints(sessionID: string, pmcData: IPmcData, skillName: string, progressAmount: number): void;
|
||||
/**
|
||||
* Get quest name by quest id
|
||||
* @param questId id to get
|
||||
@ -76,10 +75,10 @@ export declare class QuestHelper {
|
||||
*/
|
||||
getQuestNameFromLocale(questId: string): string;
|
||||
/**
|
||||
* Check if trader has sufficient loyalty to fullfill quest requirement
|
||||
* Check if trader has sufficient loyalty to fulfill quest requirement
|
||||
* @param questProperties Quest props
|
||||
* @param profile Player profile
|
||||
* @returns true if loyalty is high enough to fulfil quest requirement
|
||||
* @returns true if loyalty is high enough to fulfill quest requirement
|
||||
*/
|
||||
traderStandingRequirementCheck(questProperties: AvailableForProps, profile: IPmcData): boolean;
|
||||
protected processReward(reward: Reward): Reward[];
|
||||
@ -112,12 +111,12 @@ export declare class QuestHelper {
|
||||
*/
|
||||
failedUnlocked(failedQuestId: string, sessionID: string): IQuest[];
|
||||
/**
|
||||
* Adjust quest money rewards by passed in multipler
|
||||
* Adjust quest money rewards by passed in multiplier
|
||||
* @param quest Quest to multiple money rewards
|
||||
* @param multipler Value to adjust money rewards by
|
||||
* @param multiplier Value to adjust money rewards by
|
||||
* @returns Updated quest
|
||||
*/
|
||||
applyMoneyBoost(quest: IQuest, multipler: number): IQuest;
|
||||
applyMoneyBoost(quest: IQuest, multiplier: 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
|
||||
@ -128,12 +127,6 @@ export declare class QuestHelper {
|
||||
* @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
|
||||
*/
|
||||
getQuestsFromDb(): IQuest[];
|
||||
/**
|
||||
* Get quests, strip all requirement conditions except level
|
||||
* @param quests quests to process
|
||||
@ -154,6 +147,12 @@ export declare class QuestHelper {
|
||||
* @returns Item event router response
|
||||
*/
|
||||
failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get List of All Quests from db
|
||||
* NOT CLONED
|
||||
* @returns Array of IQuest objects
|
||||
*/
|
||||
getQuestsFromDb(): IQuest[];
|
||||
/**
|
||||
* Get quest by id from database (repeatables are stored in profile, check there if questId not found)
|
||||
* @param questId Id of quest to find
|
||||
@ -163,14 +162,14 @@ export declare class QuestHelper {
|
||||
getQuestFromDb(questId: string, pmcData: IPmcData): IQuest;
|
||||
/**
|
||||
* Get the locale Id from locale db for a quest message
|
||||
* @param questMessageId Quest mesage id to look up
|
||||
* @param questMessageId Quest message id to look up
|
||||
* @returns Locale Id from locale db
|
||||
*/
|
||||
getQuestLocaleIdFromDb(questMessageId: string): string;
|
||||
/**
|
||||
* Alter a quests state + Add a record to its status timers object
|
||||
* @param pmcData Profile to update
|
||||
* @param newQuestState New state the qeust should be in
|
||||
* @param newQuestState New state the quest should be in
|
||||
* @param questId Id of the quest to alter the status of
|
||||
*/
|
||||
updateQuestState(pmcData: IPmcData, newQuestState: QuestStatus, questId: string): void;
|
||||
|
@ -48,6 +48,12 @@ export declare class RagfairOfferHelper {
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, configServer: ConfigServer);
|
||||
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||
getOffersForBuild(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||
/**
|
||||
* Has a traders offer ran out of stock to sell to player
|
||||
* @param offer Offer to check stock of
|
||||
* @returns true if out of stock
|
||||
*/
|
||||
protected traderOutOfStock(offer: IRagfairOffer): boolean;
|
||||
/**
|
||||
* Check if trader offers' BuyRestrictionMax value has been reached
|
||||
* @param offer offer to check restriction properties of
|
||||
|
@ -30,7 +30,7 @@ export declare class RagfairSellHelper {
|
||||
* Determine if the offer being listed will be sold
|
||||
* @param sellChancePercent chance item will sell
|
||||
* @param itemSellCount count of items to sell
|
||||
* @returns Array of purchases of item(s) lsited
|
||||
* @returns Array of purchases of item(s) listed
|
||||
*/
|
||||
rollForSale(sellChancePercent: number, itemSellCount: number): SellResult[];
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ export declare class RagfairSortHelper {
|
||||
protected localeService: LocaleService;
|
||||
constructor(databaseServer: DatabaseServer, localeService: LocaleService);
|
||||
/**
|
||||
* Sort a list of ragfair offers by something (id/rating/offer name/price/expirty time)
|
||||
* Sort a list of ragfair offers by something (id/rating/offer name/price/expiry time)
|
||||
* @param offers Offers to sort
|
||||
* @param type How to sort it
|
||||
* @param direction Ascending/descending
|
||||
|
@ -24,7 +24,12 @@ export declare class RepairHelper {
|
||||
* @param applyMaxDurabilityDegradation should item have max durability reduced
|
||||
*/
|
||||
updateItemDurability(itemToRepair: Item, itemToRepairDetails: ITemplateItem, isArmor: boolean, amountToRepair: number, useRepairKit: boolean, traderQualityMultipler: number, applyMaxDurabilityDegradation?: boolean): void;
|
||||
protected getRandomisedArmorRepairDegredationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number;
|
||||
protected getRandomisedWeaponRepairDegredationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number;
|
||||
protected getRandomisedArmorRepairDegradationValue(armorMaterial: string, isRepairKit: boolean, armorMax: number, traderQualityMultipler: number): number;
|
||||
protected getRandomisedWeaponRepairDegradationValue(itemProps: Props, isRepairKit: boolean, weaponMax: number, traderQualityMultipler: number): number;
|
||||
/**
|
||||
* Is the supplied tpl a weapon
|
||||
* @param tpl tplId to check is a weapon
|
||||
* @returns true if tpl is a weapon
|
||||
*/
|
||||
isWeaponTemplate(tpl: string): boolean;
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ export declare class TradeHelper {
|
||||
sellItem(pmcData: IPmcData, sellRequest: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Increment the assorts buy count by number of items purchased
|
||||
* Show error on screen if player attepts to buy more than what the buy max allows
|
||||
* Show error on screen if player attempts to buy more than what the buy max allows
|
||||
* @param assortBeingPurchased assort being bought
|
||||
* @param itemsPurchasedCount number of items being bought
|
||||
*/
|
||||
|
@ -35,6 +35,8 @@ export declare class TraderAssortHelper {
|
||||
protected fenceService: FenceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected traderConfig: ITraderConfig;
|
||||
protected mergedQuestAssorts: Record<string, Record<string, string>>;
|
||||
protected createdMergedQuestAssorts: boolean;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Get a traders assorts
|
||||
@ -45,6 +47,10 @@ export declare class TraderAssortHelper {
|
||||
* @returns a traders' assorts
|
||||
*/
|
||||
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
|
||||
/**
|
||||
* Create a dict of all assort id = quest id mappings used to work out what items should be shown to player based on the quests they've started/completed/failed
|
||||
*/
|
||||
protected hydrateMergedQuestAssorts(): void;
|
||||
/**
|
||||
* Reset a traders assorts and move nextResupply value to future
|
||||
* Flag trader as needing a flea offer reset to be picked up by flea update() function
|
||||
@ -61,7 +67,7 @@ export declare class TraderAssortHelper {
|
||||
* Iterate over all assorts barter_scheme values, find barters selling for money and multiply by multipler in config
|
||||
* @param traderAssort Assorts to multiple price of
|
||||
*/
|
||||
protected multiplyItemPricesByConfigMultipler(traderAssort: ITraderAssort): void;
|
||||
protected multiplyItemPricesByConfigMultiplier(traderAssort: ITraderAssort): void;
|
||||
/**
|
||||
* Get an array of pristine trader items prior to any alteration by player (as they were on server start)
|
||||
* @param traderId trader id
|
||||
|
@ -29,6 +29,8 @@ export declare class TraderHelper {
|
||||
protected timeUtil: TimeUtil;
|
||||
protected configServer: ConfigServer;
|
||||
protected traderConfig: ITraderConfig;
|
||||
/** Dictionary of item tpl and the highest trader rouble price */
|
||||
protected highestTraderPriceItems: Record<string, number>;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, localisationService: LocalisationService, fenceService: FenceService, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||
getTrader(traderID: string, sessionID: string): ITraderBase;
|
||||
getTraderAssortsById(traderId: string): ITraderAssort;
|
||||
@ -41,11 +43,11 @@ export declare class TraderHelper {
|
||||
resetTrader(sessionID: string, traderID: string): void;
|
||||
/**
|
||||
* Alter a traders unlocked status
|
||||
* @param traderID Trader to alter
|
||||
* @param traderId Trader to alter
|
||||
* @param status New status to use
|
||||
* @param sessionID Session id
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
setTraderUnlockedState(traderID: string, status: boolean, sessionID: string): void;
|
||||
setTraderUnlockedState(traderId: string, status: boolean, sessionId: string): void;
|
||||
/**
|
||||
* Get a list of items and their prices from player inventory that can be sold to a trader
|
||||
* @param traderID trader id being traded with
|
||||
@ -77,7 +79,7 @@ export declare class TraderHelper {
|
||||
protected getTraderDurabiltyPurchaseThreshold(traderId: string): number;
|
||||
/**
|
||||
* Get the price of passed in item and all of its attached children (mods)
|
||||
* Take into account bonuses/adjsutments e.g. discounts
|
||||
* Take into account bonuses/adjustments e.g. discounts
|
||||
* @param pmcData profile data
|
||||
* @param item item to calculate price of
|
||||
* @param buyPriceCoefficient
|
||||
@ -104,11 +106,11 @@ export declare class TraderHelper {
|
||||
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel): number;
|
||||
/**
|
||||
* Add standing to a trader and level them up if exp goes over level threshold
|
||||
* @param sessionID Session id
|
||||
* @param traderId traders id
|
||||
* @param sessionId Session id
|
||||
* @param traderId Traders id
|
||||
* @param standingToAdd Standing value to add to trader
|
||||
*/
|
||||
addStandingToTrader(sessionID: string, traderId: string, standingToAdd: number): void;
|
||||
addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void;
|
||||
/**
|
||||
* Calculate traders level based on exp amount and increments level if over threshold
|
||||
* @param traderID trader to process
|
||||
@ -147,4 +149,10 @@ export declare class TraderHelper {
|
||||
}[];
|
||||
tid: string;
|
||||
}): void;
|
||||
/**
|
||||
* Get the highest rouble price for an item from traders
|
||||
* @param tpl Item to look up highest pride for
|
||||
* @returns highest rouble cost for item
|
||||
*/
|
||||
getHighestTraderPriceRouble(tpl: string): number;
|
||||
}
|
||||
|
@ -19,4 +19,11 @@ export declare class BundleLoader {
|
||||
getBundle(key: string, local: boolean): BundleInfo;
|
||||
addBundles(modpath: string): void;
|
||||
}
|
||||
export interface BundleManifest {
|
||||
manifest: Array<BundleManifestEntry>;
|
||||
}
|
||||
export interface BundleManifestEntry {
|
||||
key: string;
|
||||
path: string;
|
||||
}
|
||||
export {};
|
||||
|
43
TypeScript/10ScopesAndTypes/types/loaders/ModTypeCheck.d.ts
vendored
Normal file
43
TypeScript/10ScopesAndTypes/types/loaders/ModTypeCheck.d.ts
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
import { IPostAkiLoadMod } from "../models/external/IPostAkiLoadMod";
|
||||
import { IPostAkiLoadModAsync } from "../models/external/IPostAkiLoadModAsync";
|
||||
import { IPostDBLoadMod } from "../models/external/IPostDBLoadMod";
|
||||
import { IPostDBLoadModAsync } from "../models/external/IPostDBLoadModAsync";
|
||||
import { IPreAkiLoadMod } from "../models/external/IPreAkiLoadMod";
|
||||
import { IPreAkiLoadModAsync } from "../models/external/IPreAkiLoadModAsync";
|
||||
export declare class ModTypeCheck {
|
||||
/**
|
||||
* Use defined safe guard to check if the mod is a IPreAkiLoadMod
|
||||
* @returns boolean
|
||||
*/
|
||||
isPreAkiLoad(mod: any): mod is IPreAkiLoadMod;
|
||||
/**
|
||||
* Use defined safe guard to check if the mod is a IPostAkiLoadMod
|
||||
* @returns boolean
|
||||
*/
|
||||
isPostAkiLoad(mod: any): mod is IPostAkiLoadMod;
|
||||
/**
|
||||
* Use defined safe guard to check if the mod is a IPostDBLoadMod
|
||||
* @returns boolean
|
||||
*/
|
||||
isPostDBAkiLoad(mod: any): mod is IPostDBLoadMod;
|
||||
/**
|
||||
* Use defined safe guard to check if the mod is a IPreAkiLoadModAsync
|
||||
* @returns boolean
|
||||
*/
|
||||
isPreAkiLoadAsync(mod: any): mod is IPreAkiLoadModAsync;
|
||||
/**
|
||||
* Use defined safe guard to check if the mod is a IPostAkiLoadModAsync
|
||||
* @returns boolean
|
||||
*/
|
||||
isPostAkiLoadAsync(mod: any): mod is IPostAkiLoadModAsync;
|
||||
/**
|
||||
* Use defined safe guard to check if the mod is a IPostDBLoadModAsync
|
||||
* @returns boolean
|
||||
*/
|
||||
isPostDBAkiLoadAsync(mod: any): mod is IPostDBLoadModAsync;
|
||||
/**
|
||||
* Checks for mod to be compatible with 3.X+
|
||||
* @returns boolean
|
||||
*/
|
||||
isPostV3Compatible(mod: any): boolean;
|
||||
}
|
@ -1,21 +1,17 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { HandbookController } from "../controllers/HandbookController";
|
||||
import { IModLoader } from "../models/spt/mod/IModLoader";
|
||||
import { ModCompilerService } from "../services/ModCompilerService";
|
||||
import { VFS } from "../utils/VFS";
|
||||
import { BundleLoader } from "./BundleLoader";
|
||||
import { ModTypeCheck } from "./ModTypeCheck";
|
||||
import { PreAkiModLoader } from "./PreAkiModLoader";
|
||||
export declare class PostAkiModLoader implements IModLoader {
|
||||
protected bundleLoader: BundleLoader;
|
||||
protected handbookController: HandbookController;
|
||||
protected vfs: VFS;
|
||||
protected modCompilerService: ModCompilerService;
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, preAkiModLoader: PreAkiModLoader);
|
||||
getBundles(local: boolean): string;
|
||||
getBundle(key: string, local: boolean): void;
|
||||
protected modTypeCheck: ModTypeCheck;
|
||||
constructor(bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck);
|
||||
getModPath(mod: string): string;
|
||||
load(): void;
|
||||
protected executeMods(container: DependencyContainer): void;
|
||||
load(): Promise<void>;
|
||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||
protected addBundles(): void;
|
||||
}
|
||||
|
@ -1,11 +1,13 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { ModTypeCheck } from "./ModTypeCheck";
|
||||
import { PreAkiModLoader } from "./PreAkiModLoader";
|
||||
export declare class PostDBModLoader implements OnLoad {
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
constructor(preAkiModLoader: PreAkiModLoader);
|
||||
protected modTypeCheck: ModTypeCheck;
|
||||
constructor(preAkiModLoader: PreAkiModLoader, modTypeCheck: ModTypeCheck);
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
getModPath(mod: string): string;
|
||||
protected executeMods(container: DependencyContainer): void;
|
||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||
}
|
||||
|
@ -1,9 +1,5 @@
|
||||
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";
|
||||
@ -13,6 +9,7 @@ import { ModCompilerService } from "../services/ModCompilerService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { VFS } from "../utils/VFS";
|
||||
import { BundleLoader } from "./BundleLoader";
|
||||
import { ModTypeCheck } from "./ModTypeCheck";
|
||||
export declare class PreAkiModLoader implements IModLoader {
|
||||
protected logger: ILogger;
|
||||
protected vfs: VFS;
|
||||
@ -21,24 +18,22 @@ export declare class PreAkiModLoader implements IModLoader {
|
||||
protected bundleLoader: BundleLoader;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected modTypeCheck: ModTypeCheck;
|
||||
protected static container: DependencyContainer;
|
||||
protected readonly basepath = "user/mods/";
|
||||
protected readonly modOrderPath = "user/mods/order.json";
|
||||
protected order: Record<string, number>;
|
||||
protected imported: Record<string, ModLoader.IMod>;
|
||||
protected imported: Record<string, IPackageJsonData>;
|
||||
protected akiConfig: ICoreConfig;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modTypeCheck: ModTypeCheck);
|
||||
load(container: DependencyContainer): Promise<void>;
|
||||
getBundles(local: boolean): string;
|
||||
getBundle(key: string, local: boolean): void;
|
||||
/**
|
||||
* Returns a list of mods with preserved load order
|
||||
* @returns Array of mod names in load order
|
||||
*/
|
||||
getImportedModsNames(): string[];
|
||||
getImportedModDetails(): Record<string, ModLoader.IMod>;
|
||||
getImportedModDetails(): Record<string, IPackageJsonData>;
|
||||
getModPath(mod: string): string;
|
||||
protected importClass(name: string, filepath: string, container: DependencyContainer): void;
|
||||
protected importMods(): Promise<void>;
|
||||
/**
|
||||
* Check for duplciate mods loaded, show error if duplicate mod found
|
||||
@ -63,29 +58,8 @@ export declare class PreAkiModLoader implements IModLoader {
|
||||
* @returns dictionary <modName - package.json>
|
||||
*/
|
||||
protected getModsPackageData(mods: string[]): Record<string, IPackageJsonData>;
|
||||
/**
|
||||
* Use defined safe guard to check if the mod is a IPreAkiLoadMod
|
||||
* @returns boolean
|
||||
*/
|
||||
protected isPreAkiLoad(mod: any): mod is IPreAkiLoadMod;
|
||||
/**
|
||||
* Use defined safe guard to check if the mod is a IPostAkiLoadMod
|
||||
* @returns boolean
|
||||
*/
|
||||
protected isPostAkiLoad(mod: any): mod is IPostAkiLoadMod;
|
||||
/**
|
||||
* Use defined safe guard to check if the mod is a IPostDBLoadMod
|
||||
* @returns boolean
|
||||
*/
|
||||
protected isPostDBAkiLoad(mod: any): mod is IPostDBLoadMod;
|
||||
/**
|
||||
* Check that the mod is compatible with SPT 3.X.X
|
||||
* @param mod the mod to check
|
||||
* @returns boolean
|
||||
*/
|
||||
protected isModSpt3XXCompatible(mod: any): boolean;
|
||||
protected isModCombatibleWithAki(mod: IPackageJsonData): boolean;
|
||||
protected executeMods(container: DependencyContainer): void;
|
||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||
sortModsLoadOrder(): string[];
|
||||
protected addMod(mod: string): Promise<void>;
|
||||
protected areModDependenciesFulfilled(pkg: IPackageJsonData, loadedMods: Record<string, IPackageJsonData>): boolean;
|
||||
@ -97,6 +71,6 @@ export declare class PreAkiModLoader implements IModLoader {
|
||||
*/
|
||||
protected validMod(modName: string): boolean;
|
||||
protected getLoadOrderRecursive(mod: string, result: Record<string, string>, visited: Record<string, string>): void;
|
||||
protected getLoadOrder(mods: Record<string, ModLoader.IMod>): Record<string, string>;
|
||||
protected getLoadOrder(mods: Record<string, IPackageJsonData>): Record<string, string>;
|
||||
getContainer(): DependencyContainer;
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ export interface Config {
|
||||
TimeBeforeDeployLocal: number;
|
||||
TradingSetting: number;
|
||||
TradingSettings: ITradingSettings;
|
||||
ItemsCommonSettings: IItemsCommonSettings;
|
||||
LoadTimeSpeedProgress: number;
|
||||
BaseLoadTime: number;
|
||||
BaseUnloadTime: number;
|
||||
@ -84,12 +85,16 @@ export interface Config {
|
||||
TestValue: number;
|
||||
Inertia: Inertia;
|
||||
Ballistic: Ballistic;
|
||||
RepairSettings: RepairSettings;
|
||||
}
|
||||
export interface IBufferZone {
|
||||
CustomerAccessTime: number;
|
||||
CustomerCriticalTimeStart: number;
|
||||
CustomerKickNotifTime: number;
|
||||
}
|
||||
export interface IItemsCommonSettings {
|
||||
ItemRemoveAfterInterruptionTime: number;
|
||||
}
|
||||
export interface ITradingSettings {
|
||||
BuyoutRestrictions: IBuyoutRestrictions;
|
||||
}
|
||||
|
@ -180,6 +180,7 @@ export interface Exit {
|
||||
EntryPoints: string;
|
||||
ExfiltrationTime: number;
|
||||
ExfiltrationType: string;
|
||||
RequiredSlot?: string;
|
||||
Id: string;
|
||||
MaxTime: number;
|
||||
MinTime: number;
|
||||
|
@ -104,7 +104,10 @@ export interface BodyPartsHealth {
|
||||
}
|
||||
export interface BodyPartHealth {
|
||||
Health: CurrentMax;
|
||||
Effects?: Record<string, number>;
|
||||
Effects?: Record<string, BodyPartEffectProperties>;
|
||||
}
|
||||
export interface BodyPartEffectProperties {
|
||||
Time: number;
|
||||
}
|
||||
export interface CurrentMax {
|
||||
Current: number;
|
||||
@ -124,7 +127,6 @@ export interface FastPanel {
|
||||
export interface Skills {
|
||||
Common: Common[];
|
||||
Mastering: Mastering[];
|
||||
Bonuses?: any[];
|
||||
Points: number;
|
||||
}
|
||||
export interface Common {
|
||||
@ -270,6 +272,7 @@ export interface Hideout {
|
||||
Production: Record<string, Productive>;
|
||||
Areas: HideoutArea[];
|
||||
Improvements: Record<string, IHideoutImprovement>;
|
||||
sptUpdateLastRunTimestamp: number;
|
||||
}
|
||||
export interface IHideoutImprovement {
|
||||
completed: boolean;
|
||||
@ -277,11 +280,15 @@ export interface IHideoutImprovement {
|
||||
}
|
||||
export interface Productive {
|
||||
Products: Product[];
|
||||
/** Seconds passed of production */
|
||||
Progress?: number;
|
||||
/** Is craft in some state of being worked on by client (crafting/ready to pick up) */
|
||||
inProgress?: boolean;
|
||||
StartTimestamp?: number;
|
||||
SkipTime?: number;
|
||||
/** Seconds needed to fully craft */
|
||||
ProductionTime?: number;
|
||||
sptIsScavCase?: boolean;
|
||||
}
|
||||
export interface Production extends Productive {
|
||||
RecipeId: string;
|
||||
|
@ -17,6 +17,7 @@ export interface Upd {
|
||||
StackObjectsCount?: number;
|
||||
UnlimitedCount?: boolean;
|
||||
Repairable?: Repairable;
|
||||
RecodableComponent?: RecodableComponent;
|
||||
FireMode?: FireMode;
|
||||
SpawnedInSession?: boolean;
|
||||
Light?: Light;
|
||||
@ -59,6 +60,9 @@ export interface Repairable {
|
||||
Durability: number;
|
||||
MaxDurability: number;
|
||||
}
|
||||
export interface RecodableComponent {
|
||||
IsEncoded: boolean;
|
||||
}
|
||||
export interface MedKit {
|
||||
HpResource: number;
|
||||
}
|
||||
|
@ -47,6 +47,7 @@ export interface IRepeatableQuest {
|
||||
canShowNotificationsInGame: boolean;
|
||||
rewards: IRewards;
|
||||
conditions: IConditions;
|
||||
side: string;
|
||||
name: string;
|
||||
note: string;
|
||||
description: string;
|
||||
|
@ -159,7 +159,7 @@ export interface Props {
|
||||
RigLayoutName?: string;
|
||||
MaxDurability?: number;
|
||||
armorZone?: string[];
|
||||
armorClass?: any;
|
||||
armorClass?: string | number;
|
||||
mousePenalty?: number;
|
||||
weaponErgonomicPenalty?: number;
|
||||
BluntThroughput?: number;
|
||||
|
@ -1,4 +1,4 @@
|
||||
export interface IHideoutContinousProductionStartRequestData {
|
||||
export interface IHideoutContinuousProductionStartRequestData {
|
||||
Action: "HideoutContinuousProductionStart";
|
||||
recipeId: string;
|
||||
timestamp: number;
|
@ -1,5 +1,5 @@
|
||||
import { QuestStatus } from "../../../models/enums/QuestStatus";
|
||||
import { Skills } from "../common/tables/IBotBase";
|
||||
import { Health, Productive, Skills, TraderInfo } from "../common/tables/IBotBase";
|
||||
import { Item, Upd } from "../common/tables/IItem";
|
||||
import { IQuest } from "../common/tables/IQuest";
|
||||
import { IPmcDataRepeatableQuest } from "../common/tables/IRepeatableQuests";
|
||||
@ -22,11 +22,12 @@ export interface ProfileChange {
|
||||
ragFairOffers: IRagfairOffer[];
|
||||
builds: BuildChange[];
|
||||
items: ItemChanges;
|
||||
production: Record<string, Production>;
|
||||
production: Record<string, Productive>;
|
||||
/** Hideout area improvement id */
|
||||
improvements: Record<string, Improvement>;
|
||||
skills: Skills;
|
||||
traderRelations: Record<string, TraderRelations>;
|
||||
health: Health;
|
||||
traderRelations: Record<string, TraderInfo>;
|
||||
repeatableQuests?: IPmcDataRepeatableQuest[];
|
||||
recipeUnlocked: Record<string, boolean>;
|
||||
questsStatus: QuestStatusChange[];
|
||||
@ -50,14 +51,6 @@ export interface ItemChanges {
|
||||
change: Product[];
|
||||
del: Product[];
|
||||
}
|
||||
export interface Production {
|
||||
Progress: number;
|
||||
StartTimestamp: number;
|
||||
ProductionTime: number;
|
||||
inProgress: boolean;
|
||||
RecipeId: string;
|
||||
Products: Product[];
|
||||
}
|
||||
export interface Improvement {
|
||||
completed: boolean;
|
||||
improveCompleteTimestamp: number;
|
||||
@ -76,10 +69,3 @@ export interface ItemChangeLocation {
|
||||
r: number;
|
||||
isSearched?: boolean;
|
||||
}
|
||||
export interface TraderRelations {
|
||||
salesSum?: number;
|
||||
standing?: number;
|
||||
loyalty?: number;
|
||||
unlocked?: boolean;
|
||||
disabled?: boolean;
|
||||
}
|
||||
|
@ -6,6 +6,8 @@ export interface IJoinMatchResult {
|
||||
port: number;
|
||||
version: string;
|
||||
location: string;
|
||||
gamemode: string;
|
||||
raidMode: string;
|
||||
mode: string;
|
||||
shortid: string;
|
||||
additional_info: any[];
|
||||
}
|
||||
|
@ -6,7 +6,13 @@ export interface ProfileData {
|
||||
profileid: string;
|
||||
profileToken: string;
|
||||
status: string;
|
||||
sid: string;
|
||||
ip: string;
|
||||
port: number;
|
||||
sid: string;
|
||||
version?: string;
|
||||
location?: string;
|
||||
raidMode?: string;
|
||||
mode?: string;
|
||||
shortId?: string;
|
||||
additional_info?: any[];
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ export interface IRagfairOffer {
|
||||
summaryCost: number;
|
||||
user: IRagfairOfferUser;
|
||||
notAvailable: boolean;
|
||||
/** TODO - implement this value - not currently used */
|
||||
CurrentItemCount: number;
|
||||
priority: boolean;
|
||||
}
|
||||
|
4
TypeScript/10ScopesAndTypes/types/models/external/IPostAkiLoadModAsync.d.ts
vendored
Normal file
4
TypeScript/10ScopesAndTypes/types/models/external/IPostAkiLoadModAsync.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IPostAkiLoadModAsync {
|
||||
postAkiLoadAsync(container: DependencyContainer): Promise<void>;
|
||||
}
|
4
TypeScript/10ScopesAndTypes/types/models/external/IPostDBLoadModAsync.d.ts
vendored
Normal file
4
TypeScript/10ScopesAndTypes/types/models/external/IPostDBLoadModAsync.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IPostDBLoadModAsync {
|
||||
postDBLoadAsync(container: DependencyContainer): Promise<void>;
|
||||
}
|
4
TypeScript/10ScopesAndTypes/types/models/external/IPreAkiLoadModAsync.d.ts
vendored
Normal file
4
TypeScript/10ScopesAndTypes/types/models/external/IPreAkiLoadModAsync.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IPreAkiLoadModAsync {
|
||||
preAkiLoadAsync(container: DependencyContainer): Promise<void>;
|
||||
}
|
@ -6,7 +6,7 @@ import { IHideoutPutItemInRequestData } from "../../eft/hideout/IHideoutPutItemI
|
||||
import { IHideoutTakeItemOutRequestData } from "../../eft/hideout/IHideoutTakeItemOutRequestData";
|
||||
import { IHideoutToggleAreaRequestData } from "../../eft/hideout/IHideoutToggleAreaRequestData";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../../eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
import { IHideoutContinousProductionStartRequestData } from "../../eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||
import { IHideoutContinuousProductionStartRequestData } from "../../eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||
import { IHideoutTakeProductionRequestData } from "../../eft/hideout/IHideoutTakeProductionRequestData";
|
||||
import { IItemEventRouterResponse } from "../../eft/itemEvent/IItemEventRouterResponse";
|
||||
export interface IHideoutCallbacks {
|
||||
@ -17,7 +17,7 @@ export interface IHideoutCallbacks {
|
||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
update(timeSinceLastRun: number): boolean;
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ export interface IBotConfig extends IBaseConfig {
|
||||
showTypeInNickname: boolean;
|
||||
/** Max number of bots that can be spawned in a raid at any one time */
|
||||
maxBotCap: Record<string, number>;
|
||||
chanceAssaultScavHasPlayerScavName: number;
|
||||
/** How many stacks of secret ammo should a bot have in its bot secure container */
|
||||
secureContainerAmmoStackCount: number;
|
||||
/** Batch generation size when type not available in cache */
|
||||
|
@ -4,4 +4,5 @@ export interface ICoreConfig extends IBaseConfig {
|
||||
akiVersion: string;
|
||||
projectName: string;
|
||||
compatibleTarkovVersion: string;
|
||||
commit: string;
|
||||
}
|
||||
|
@ -3,10 +3,5 @@ export interface IHideoutConfig extends IBaseConfig {
|
||||
kind: "aki-hideout";
|
||||
runIntervalSeconds: number;
|
||||
hoursForSkillCrafting: number;
|
||||
generatorSpeedWithoutFuel: number;
|
||||
generatorFuelFlowRate: number;
|
||||
airFilterUnitFlowRate: number;
|
||||
/** SEE HIDEOUTHELPER BEFORE CHANGING CONFIG */
|
||||
gpuBoostRate: number;
|
||||
hideoutWallAppearTimeSeconds: number;
|
||||
}
|
||||
|
@ -5,5 +5,6 @@ export interface IInsuranceConfig extends IBaseConfig {
|
||||
returnChancePercent: Record<string, number>;
|
||||
blacklistedEquipment: string[];
|
||||
slotIdsWithChanceOfNotReturning: string[];
|
||||
returnTimeOverrideSeconds: number;
|
||||
runIntervalSeconds: number;
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ export interface KarmaLevel {
|
||||
modifiers: Modifiers;
|
||||
itemLimits: ItemLimits;
|
||||
equipmentBlacklist: Record<string, string[]>;
|
||||
labsAccessCardChancePercent: number;
|
||||
}
|
||||
export interface Modifiers {
|
||||
equipment: Record<string, number>;
|
||||
|
@ -3,13 +3,24 @@ import { IBaseConfig } from "./IBaseConfig";
|
||||
export interface IQuestConfig extends IBaseConfig {
|
||||
kind: "aki-quest";
|
||||
redeemTime: number;
|
||||
questTemplateIds: IPlayerTypeQuestIds;
|
||||
repeatableQuests: IRepeatableQuestConfig[];
|
||||
locationIdMap: Record<string, string>;
|
||||
bearOnlyQuests: string[];
|
||||
usecOnlyQuests: string[];
|
||||
}
|
||||
export interface IPlayerTypeQuestIds {
|
||||
pmc: IQuestTypeIds;
|
||||
scav: IQuestTypeIds;
|
||||
}
|
||||
export interface IQuestTypeIds {
|
||||
Elimination: string;
|
||||
Completion: string;
|
||||
Exploration: string;
|
||||
}
|
||||
export interface IRepeatableQuestConfig {
|
||||
name: string;
|
||||
side: string;
|
||||
types: string[];
|
||||
resetTime: number;
|
||||
numQuests: number;
|
||||
@ -17,11 +28,12 @@ export interface IRepeatableQuestConfig {
|
||||
rewardScaling: IRewardScaling;
|
||||
locations: Record<ELocationName, string[]>;
|
||||
traderWhitelist: ITraderWhitelist[];
|
||||
questConfig: IQuestConfig;
|
||||
questConfig: IRepeatableQuestTypesConfig;
|
||||
/** Item base types to block when generating rewards */
|
||||
rewardBaseTypeBlacklist: string[];
|
||||
/** Item tplIds to ignore when generating rewards */
|
||||
rewardBlacklist: string[];
|
||||
rewardAmmoStackMinSize: number;
|
||||
}
|
||||
export interface IRewardScaling {
|
||||
levels: number[];
|
||||
@ -35,7 +47,7 @@ export interface ITraderWhitelist {
|
||||
traderId: string;
|
||||
questTypes: string[];
|
||||
}
|
||||
export interface IQuestConfig {
|
||||
export interface IRepeatableQuestTypesConfig {
|
||||
Exploration: IExploration;
|
||||
Completion: ICompletion;
|
||||
Elimination: IElimination;
|
||||
|
@ -16,7 +16,7 @@ export interface Sell {
|
||||
}
|
||||
export interface Chance {
|
||||
base: number;
|
||||
overprices: number;
|
||||
overpriced: number;
|
||||
underpriced: number;
|
||||
}
|
||||
export interface Time {
|
||||
@ -29,6 +29,7 @@ export interface Reputation {
|
||||
loss: number;
|
||||
}
|
||||
export interface Dynamic {
|
||||
purchasesAreFoundInRaid: boolean;
|
||||
barter: Barter;
|
||||
offerAdjustment: OfferAdjustment;
|
||||
expiredOfferThreshold: number;
|
||||
@ -43,9 +44,10 @@ export interface Dynamic {
|
||||
rating: MinMax;
|
||||
currencies: Record<string, number>;
|
||||
showAsSingleStack: string[];
|
||||
removeSeasonalItemsWhenNotInEvent: boolean;
|
||||
blacklist: Blacklist;
|
||||
}
|
||||
export declare class Barter {
|
||||
export interface Barter {
|
||||
enable: boolean;
|
||||
chancePercent: number;
|
||||
itemCountMin: number;
|
||||
@ -54,7 +56,7 @@ export declare class Barter {
|
||||
minRoubleCostToBecomeBarter: number;
|
||||
itemTypeBlacklist: string[];
|
||||
}
|
||||
export declare class OfferAdjustment {
|
||||
export interface OfferAdjustment {
|
||||
maxPriceDifferenceBelowHandbookPercent: number;
|
||||
handbookPriceMultipier: number;
|
||||
priceThreshholdRub: number;
|
||||
|
@ -9,8 +9,6 @@ export interface IRepairConfig extends IBaseConfig {
|
||||
repairKit: RepairKit;
|
||||
}
|
||||
export interface RepairKit {
|
||||
armorChancePercent: number;
|
||||
weaponChancePercent: number;
|
||||
armor: BonusSettings;
|
||||
weapon: BonusSettings;
|
||||
}
|
||||
|
@ -1,10 +0,0 @@
|
||||
export declare namespace ModLoader {
|
||||
interface IMod {
|
||||
name: string;
|
||||
version: string;
|
||||
main?: string;
|
||||
author?: string;
|
||||
license: string;
|
||||
dependencies?: Record<string, string>;
|
||||
}
|
||||
}
|
@ -1,7 +1,5 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
export interface IModLoader {
|
||||
load(container: DependencyContainer): void;
|
||||
getBundles(local: boolean): string;
|
||||
getBundle(key: string, local: boolean): void;
|
||||
getModPath(mod: string): string;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
export interface IPackageJsonData {
|
||||
incompatibilities?: string[];
|
||||
dependencies?: string[];
|
||||
dependencies?: Record<string, string>;
|
||||
modDependencies?: Record<string, string>;
|
||||
name: string;
|
||||
author: string;
|
||||
@ -8,5 +8,6 @@ export interface IPackageJsonData {
|
||||
akiVersion: string;
|
||||
licence: string;
|
||||
main: string;
|
||||
isBundleMod: boolean;
|
||||
contributors: string[];
|
||||
}
|
||||
|
@ -42,8 +42,6 @@ export interface IDatabaseTables {
|
||||
items: Record<string, ITemplateItem>;
|
||||
quests: Record<string, IQuest>;
|
||||
repeatableQuests: IRepeatableQuestDatabase;
|
||||
/** DEPRECATED - Items file found in the client, massivly out of date compared to templates.items, try not to use this, remove ASAP*/
|
||||
clientItems: Record<string, ITemplateItem>;
|
||||
handbook: IHandbookBase;
|
||||
customization: Record<string, ICustomizationItem>;
|
||||
/** The profile templates listed in the launcher on profile creation, split by account type (e.g. Standard) then side (e.g. bear/usec) */
|
||||
|
@ -10,6 +10,7 @@ export interface Config {
|
||||
FirstCycleDelaySeconds: number;
|
||||
FramerateLimit: FramerateLimit;
|
||||
GroupStatusInterval: number;
|
||||
GroupStatusButtonInterval: number;
|
||||
KeepAliveInterval: number;
|
||||
LobbyKeepAliveInterval: number;
|
||||
Mark502and504AsNonImportant: boolean;
|
||||
|
@ -8,6 +8,10 @@ export declare class EventOutputHolder {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected timeUtil: TimeUtil;
|
||||
/** What has client been informed of this game session */
|
||||
protected clientActiveSessionStorage: Record<string, {
|
||||
clientInformed: boolean;
|
||||
}>;
|
||||
constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil);
|
||||
protected output: IItemEventRouterResponse;
|
||||
getOutput(sessionID: string): IItemEventRouterResponse;
|
||||
@ -17,6 +21,11 @@ export declare class EventOutputHolder {
|
||||
* @param sessionID Players id
|
||||
*/
|
||||
resetOutput(sessionID: string): void;
|
||||
/**
|
||||
* Update output object with most recent values from player profile
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
updateOutputProperties(sessionId: string): void;
|
||||
/**
|
||||
* Return all hideout Improvements from player profile, adjust completed Improvements' completed property to be true
|
||||
* @param pmcData Player profile
|
||||
@ -24,9 +33,9 @@ export declare class EventOutputHolder {
|
||||
*/
|
||||
protected getImprovementsFromProfileAndFlagComplete(pmcData: IPmcData): Record<string, IHideoutImprovement>;
|
||||
/**
|
||||
* Return all productions from player profile, adjust completed productions' inprogress property to be false
|
||||
* Return productions from player profile except those completed crafts the client has already seen
|
||||
* @param pmcData Player profile
|
||||
* @returns dictionary of hideout productions
|
||||
*/
|
||||
protected getProductionsFromProfileAndFlagComplete(pmcData: IPmcData): Record<string, Productive>;
|
||||
protected getProductionsFromProfileAndFlagComplete(productions: Record<string, Productive>): Record<string, Productive>;
|
||||
}
|
||||
|
@ -12,5 +12,11 @@ export declare class ItemEventRouter {
|
||||
protected localisationService: LocalisationService;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder);
|
||||
/**
|
||||
*
|
||||
* @param info Event request
|
||||
* @param sessionID Session id
|
||||
* @returns Item response
|
||||
*/
|
||||
handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { CustomizationCallbacks } from "../../callbacks/CustomizationCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class CustomizationItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected customizationCallbacks: CustomizationCallbacks;
|
||||
constructor(customizationCallbacks: CustomizationCallbacks);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { HealthCallbacks } from "../../callbacks/HealthCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class HealthItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected healthCallbacks: HealthCallbacks;
|
||||
constructor(healthCallbacks: HealthCallbacks);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { InsuranceCallbacks } from "../../callbacks/InsuranceCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected insuranceCallbacks: InsuranceCallbacks;
|
||||
constructor(insuranceCallbacks: InsuranceCallbacks);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { NoteCallbacks } from "../../callbacks/NoteCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class NoteItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected noteCallbacks: NoteCallbacks;
|
||||
constructor(noteCallbacks: NoteCallbacks);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { PresetBuildCallbacks } from "../../callbacks/PresetBuildCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class PresetBuildItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected presetBuildCallbacks: PresetBuildCallbacks;
|
||||
constructor(presetBuildCallbacks: PresetBuildCallbacks);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { RagfairCallbacks } from "../../callbacks/RagfairCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class RagfairItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected ragfairCallbacks: RagfairCallbacks;
|
||||
constructor(ragfairCallbacks: RagfairCallbacks);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { RepairCallbacks } from "../../callbacks/RepairCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class RepairItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected repairCallbacks: RepairCallbacks;
|
||||
constructor(repairCallbacks: RepairCallbacks);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { TradeCallbacks } from "../../callbacks/TradeCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class TradeItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected tradeCallbacks: TradeCallbacks;
|
||||
constructor(tradeCallbacks: TradeCallbacks);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { WishlistCallbacks } from "../../callbacks/WishlistCallbacks";
|
||||
import { HandledRoute, ItemEventRouterDefinition } from "../../di/Router";
|
||||
import { IPmcData } from "../../models/eft/common/IPmcData";
|
||||
import { IItemEventRouterResponse } from "../../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
export declare class WishlistItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected wishlistCallbacks: WishlistCallbacks;
|
||||
constructor(wishlistCallbacks: WishlistCallbacks);
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IAkiProfile } from "../../models/eft/profile/IAkiProfile";
|
||||
import { HandledRoute, SaveLoadRouter } from "../../di/Router";
|
||||
import { IAkiProfile } from "../../models/eft/profile/IAkiProfile";
|
||||
export declare class HealthSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IAkiProfile } from "../../models/eft/profile/IAkiProfile";
|
||||
import { HandledRoute, SaveLoadRouter } from "../../di/Router";
|
||||
import { IAkiProfile } from "../../models/eft/profile/IAkiProfile";
|
||||
export declare class InraidSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IAkiProfile } from "../../models/eft/profile/IAkiProfile";
|
||||
import { HandledRoute, SaveLoadRouter } from "../../di/Router";
|
||||
import { IAkiProfile } from "../../models/eft/profile/IAkiProfile";
|
||||
export declare class InsuranceSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { IAkiProfile } from "../../models/eft/profile/IAkiProfile";
|
||||
import { HandledRoute, SaveLoadRouter } from "../../di/Router";
|
||||
import { IAkiProfile } from "../../models/eft/profile/IAkiProfile";
|
||||
export declare class ProfileSaveLoadRouter extends SaveLoadRouter {
|
||||
constructor();
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
|
@ -1,7 +1,7 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "http";
|
||||
import { Serializer } from "../../di/Serializer";
|
||||
import { ImageRouter } from "../ImageRouter";
|
||||
import { IncomingMessage, ServerResponse } from "http";
|
||||
export declare class ImageSerializer extends Serializer {
|
||||
protected imageRouter: ImageRouter;
|
||||
constructor(imageRouter: ImageRouter);
|
||||
|
@ -13,17 +13,18 @@ export declare class AkiHttpListener implements IHttpListener {
|
||||
protected httpRouter: HttpRouter;
|
||||
protected serializers: Serializer[];
|
||||
protected logger: ILogger;
|
||||
protected requestsLogger: 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, localisationService: LocalisationService, httpBufferHandler: HttpBufferHandler);
|
||||
serializers: Serializer[], logger: ILogger, requestsLogger: 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;
|
||||
getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string;
|
||||
protected getBodyInfo(body: Buffer): string;
|
||||
sendJson(resp: ServerResponse, output: any, sessionID: string): void;
|
||||
sendZlibJson(resp: ServerResponse, output: any, sessionID: string): void;
|
||||
protected getBodyInfo(body: Buffer): any;
|
||||
sendJson(resp: ServerResponse, output: string, sessionID: string): void;
|
||||
sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void;
|
||||
}
|
||||
|
@ -58,14 +58,14 @@ export declare class BotEquipmentFilterService {
|
||||
*/
|
||||
protected getBotEquipmentWhitelist(botRole: string, playerLevel: number): EquipmentFilterDetails;
|
||||
/**
|
||||
* Retreive clothing weighting adjustments from bot.json config
|
||||
* Retrieve 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
|
||||
* Retrieve 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
|
||||
@ -73,7 +73,7 @@ export declare class BotEquipmentFilterService {
|
||||
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
|
||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||
* @param baseBotNode bot .json file to update
|
||||
* @param blacklist equipment blacklist
|
||||
* @returns Filtered bot file
|
||||
@ -81,10 +81,10 @@ export declare class BotEquipmentFilterService {
|
||||
protected filterEquipment(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||
/**
|
||||
* Filter bot cartridges based on blacklist and whitelist from config/bot.json
|
||||
* Prioritises whitelist first, if one is found blacklist is ignored
|
||||
* Prioritizes whitelist first, if one is found blacklist is ignored
|
||||
* @param baseBotNode bot .json file to update
|
||||
* @param blacklist equipment on this list should be excluded from the bot
|
||||
* @param whitelist equipment on this list should be used exclusivly
|
||||
* @param whitelist equipment on this list should be used exclusively
|
||||
* @returns Filtered bot file
|
||||
*/
|
||||
protected filterCartridges(baseBotNode: IBotType, blacklist: EquipmentFilterDetails, whitelist: EquipmentFilterDetails): void;
|
||||
|
@ -33,12 +33,22 @@ export declare class FenceService {
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
/** Main assorts you see at all rep levels */
|
||||
protected fenceAssort: ITraderAssort;
|
||||
/** Assorts shown on a separte tab when you max out fence rep */
|
||||
protected fenceDiscountAssort: ITraderAssort;
|
||||
protected traderConfig: ITraderConfig;
|
||||
protected nextMiniRefreshTimestamp: number;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
/**
|
||||
* Replace main fence assort with new assort
|
||||
* @param assort New assorts to replace old with
|
||||
*/
|
||||
protected setFenceAssort(assort: ITraderAssort): void;
|
||||
/**
|
||||
* Replace high rep level fence assort with new assort
|
||||
* @param assort New assorts to replace old with
|
||||
*/
|
||||
protected setFenceDiscountAssort(assort: ITraderAssort): void;
|
||||
/**
|
||||
* Get assorts player can purchase
|
||||
@ -131,9 +141,9 @@ export declare class FenceService {
|
||||
/**
|
||||
* Add preset weapons to fence presets
|
||||
* @param assortCount how many assorts to add to assorts
|
||||
* @param defaultWeaponPresets
|
||||
* @param defaultWeaponPresets a dictionary of default weapon presets
|
||||
* @param assorts object to add presets to
|
||||
* @param loyaltyLevel
|
||||
* @param loyaltyLevel loyalty level to requre item at
|
||||
*/
|
||||
protected addPresets(desiredPresetCount: number, defaultWeaponPresets: Record<string, Preset>, assorts: ITraderAssort, loyaltyLevel: number): void;
|
||||
/**
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user