Bump for 3.5.0
This commit is contained in:
parent
6428699918
commit
21e81a62d9
Binary file not shown.
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "HideoutArchitect",
|
||||
"version": "1.6.9",
|
||||
"version": "1.7.0",
|
||||
"main": "./src/hideoutarchitect.js",
|
||||
"license": "NCSA Open Source",
|
||||
"author": "Faupi",
|
||||
"akiVersion": "3.4.0",
|
||||
"akiVersion": "3.5.0",
|
||||
"updated by": "CWX",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
Before Width: | Height: | Size: 553 B After Width: | Height: | Size: 553 B |
@ -10,7 +10,7 @@ using UnityEngine;
|
||||
|
||||
namespace HideoutArchitect
|
||||
{
|
||||
[BepInPlugin("com.FAUPI.HideoutArchitect", "FAUPI-HideoutArchitect", "1.6.9")]
|
||||
[BepInPlugin("com.FAUPI.HideoutArchitect", "FAUPI-HideoutArchitect", "1.7.0")]
|
||||
public class HideoutArchitect : BaseUnityPlugin
|
||||
{
|
||||
private void Awake()
|
||||
@ -73,12 +73,12 @@ namespace HideoutArchitect
|
||||
{
|
||||
bool areaActive = area.Status != EAreaStatus.NotSet && area.Template.Enabled == true;
|
||||
|
||||
List<ProductionRequirementsClass> targetedRequirements;
|
||||
List<Requirement> targetedRequirements;
|
||||
switch (ModConfig.NeededForHideoutDefinition)
|
||||
{
|
||||
case ENeededDefinition.NextLevel:
|
||||
case ENeededDefinition.NextLevelReady:
|
||||
targetedRequirements = area.NextStage.Requirements.Value as List<ProductionRequirementsClass>;
|
||||
targetedRequirements = area.NextStage.Requirements.Value as List<Requirement>;
|
||||
break;
|
||||
default:
|
||||
throw new NotImplementedException(Enum.GetName(typeof(ENeededDefinition), ModConfig.NeededForHideoutDefinition));
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "HideoutArchitect",
|
||||
"version": "1.6.9",
|
||||
"version": "1.7.0",
|
||||
"main": "./src/hideoutarchitect.js",
|
||||
"license": "NCSA Open Source",
|
||||
"author": "Faupi",
|
||||
"akiVersion": "3.4.0",
|
||||
"akiVersion": "3.5.0",
|
||||
"updated by": "CWX",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "HideoutArchitect",
|
||||
"version": "1.6.9",
|
||||
"version": "1.7.0",
|
||||
"main": "./src/hideoutarchitect.js",
|
||||
"license": "NCSA Open Source",
|
||||
"author": "Faupi",
|
||||
"akiVersion": "3.4.0",
|
||||
"akiVersion": "3.5.0",
|
||||
"updated by": "CWX",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
|
@ -1,14 +1,16 @@
|
||||
import { HideoutController } from "../controllers/HideoutController";
|
||||
import { RagfairController } from "../controllers/RagfairController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IGlobals } from "../models/eft/common/IGlobals";
|
||||
import { ICustomizationItem } from "../models/eft/common/tables/ICustomizationItem";
|
||||
import { IHandbookBase } from "../models/eft/common/tables/IHandbookBase";
|
||||
import { IQuest } from "../models/eft/common/tables/IQuest";
|
||||
import { IGetItemPricesResponse } from "../models/eft/game/IGetItemPricesResponse";
|
||||
import { IHideoutArea } from "../models/eft/hideout/IHideoutArea";
|
||||
import { IHideoutProduction } from "../models/eft/hideout/IHideoutProduction";
|
||||
import { IHideoutScavCase } from "../models/eft/hideout/IHideoutScavCase";
|
||||
import { IHideoutSettingsBase } from "../models/eft/hideout/IHideoutSettingsBase";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { ILanguageBase } from "../models/spt/server/ILocaleBase";
|
||||
import { ISettingsBase } from "../models/spt/server/ISettingsBase";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
@ -18,7 +20,9 @@ import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
export declare class DataCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer);
|
||||
protected ragfairController: RagfairController;
|
||||
protected hideoutController: HideoutController;
|
||||
constructor(httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, ragfairController: RagfairController, hideoutController: HideoutController);
|
||||
/**
|
||||
* Handles client/settings
|
||||
* @returns ISettingsBase
|
||||
@ -54,7 +58,17 @@ export declare class DataCallbacks {
|
||||
getHideoutAreas(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutArea[]>;
|
||||
gethideoutProduction(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutProduction[]>;
|
||||
getHideoutScavcase(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IHideoutScavCase[]>;
|
||||
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ILanguageBase[]>;
|
||||
getLocalesLanguages(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, string>>;
|
||||
getLocalesMenu(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||
getLocalesGlobal(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||
/**
|
||||
* 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>;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { DialogueController } from "../controllers/DialogueController";
|
||||
import { OnUpdate } from "../di/OnUpdate";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IChatServer } from "../models/eft/dialog/IChatServer";
|
||||
import { IFriendRequestData } from "../models/eft/dialog/IFriendRequestData";
|
||||
import { IGetAllAttachmentsRequestData } from "../models/eft/dialog/IGetAllAttachmentsRequestData";
|
||||
import { IGetAllAttachmentsResponse } from "../models/eft/dialog/IGetAllAttachmentsResponse";
|
||||
@ -20,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;
|
||||
@ -35,7 +36,7 @@ export declare class DialogueCallbacks extends OnUpdate {
|
||||
* Handles client/chatServer/list
|
||||
* @returns
|
||||
*/
|
||||
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||
getChatServerList(url: string, info: IGetChatServerListRequestData, sessionID: string): IGetBodyResponseData<IChatServer[]>;
|
||||
getMailDialogList(url: string, info: IGetMailDialogListRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo[]>;
|
||||
getMailDialogView(url: string, info: IGetMailDialogViewRequestData, sessionID: string): IGetBodyResponseData<IGetMailDialogViewResponseData>;
|
||||
getMailDialogInfo(url: string, info: IGetMailDialogInfoRequestData, sessionID: string): IGetBodyResponseData<DialogueInfo>;
|
||||
@ -52,6 +53,6 @@ export declare class DialogueCallbacks extends OnUpdate {
|
||||
listInbox(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any[]>;
|
||||
friendRequest(url: string, request: IFriendRequestData, sessionID: string): INullResponseData;
|
||||
sendMessage(url: string, request: ISendMessageRequest, sessionID: string): IGetBodyResponseData<number>;
|
||||
onUpdate(timeSinceLastRun: number): boolean;
|
||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
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(): void;
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import { IOffraidHealRequestData } from "../models/eft/health/IOffraidHealReques
|
||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IWorkoutData } from "../models/eft/health/IWorkoutData";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
export declare class HealthCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
@ -21,6 +22,14 @@ export declare class HealthCallbacks {
|
||||
* @returns empty response, no data sent back to client
|
||||
*/
|
||||
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
|
||||
/**
|
||||
* Custom aki server request found in modules/QTEPatch.cs
|
||||
* @param url
|
||||
* @param info HealthListener.Instance.CurrentHealth class
|
||||
* @param sessionID session id
|
||||
* @returns empty response, no data sent back to client
|
||||
*/
|
||||
handleWorkoutEffects(url: string, info: IWorkoutData, sessionID: string): IGetBodyResponseData<string>;
|
||||
/**
|
||||
* Handle Eat
|
||||
* @returns IItemEventRouterResponse
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { HideoutController } from "../controllers/HideoutController";
|
||||
import { OnUpdate } from "../di/OnUpdate";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
||||
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";
|
||||
import { IHideoutSingleProductionStartRequestData } from "../models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
@ -10,10 +12,11 @@ import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideou
|
||||
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||
import { IHideoutUpgradeCompleteRequestData } from "../models/eft/hideout/IHideoutUpgradeCompleteRequestData";
|
||||
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
|
||||
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;
|
||||
@ -21,76 +24,52 @@ export declare class HideoutCallbacks extends OnUpdate {
|
||||
configServer: ConfigServer);
|
||||
/**
|
||||
* Handle HideoutUpgrade
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutUpgradeComplete
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutPutItemsInAreaSlots
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
putItemsInAreaSlots(pmcData: IPmcData, body: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutTakeItemsFromAreaSlots
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutToggleArea
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutSingleProductionStart
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutScavCaseProductionStart
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
scavCaseProductionStart(pmcData: IPmcData, body: IHideoutScavCaseStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutContinuousProductionStart
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutTakeProduction
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
*/
|
||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
onUpdate(timeSinceLastRun: number): boolean;
|
||||
/**
|
||||
* Handle HideoutQuickTimeEvent
|
||||
*/
|
||||
handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
||||
*/
|
||||
recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
||||
*/
|
||||
improveArea(pmcData: IPmcData, request: IHideoutImproveAreaRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
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(): void;
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
getImage(): string;
|
||||
}
|
||||
|
@ -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;
|
||||
@ -27,6 +27,6 @@ export declare class InsuranceCallbacks extends OnUpdate {
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
onUpdate(secondsSinceLastRun: number): boolean;
|
||||
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequest
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||
import { IPutMetricsRequestData } from "../models/eft/match/IPutMetricsRequestData";
|
||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||
import { IUpdatePingRequestData } from "../models/eft/match/IUpdatePingRequestData";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
@ -41,6 +41,6 @@ export declare class MatchCallbacks {
|
||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
|
||||
}
|
||||
|
@ -3,20 +3,19 @@ import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
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;
|
||||
protected postAkiModLoader: PostAkiModLoader;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected httpConfig: IHttpConfig;
|
||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
|
||||
onLoad(): void;
|
||||
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,8 +1,8 @@
|
||||
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(): void;
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
@ -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";
|
||||
@ -14,7 +15,6 @@ import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferReque
|
||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||
import { ISendRagfairReportRequestData } from "../models/eft/ragfair/ISendRagfairReportRequestData";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { RagfairServer } from "../servers/RagfairServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
@ -22,23 +22,26 @@ 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 logger: ILogger;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected ragfairServer: RagfairServer;
|
||||
protected ragfairController: RagfairController;
|
||||
protected configServer: ConfigServer;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
||||
onLoad(): void;
|
||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
|
||||
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
||||
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
|
||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
onUpdate(timeSinceLastRun: number): boolean;
|
||||
/**
|
||||
* Handle /client/items/prices
|
||||
* Called when clicking an item to list on flea
|
||||
*/
|
||||
getFleaPrices(url: string, request: IEmptyRequestData, sessionID: string): IGetBodyResponseData<Record<string, number>>;
|
||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||
sendReport(url: string, info: ISendRagfairReportRequestData, sessionID: string): INullResponseData;
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
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(): void;
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
onUpdate(secondsSinceLastRun: number): boolean;
|
||||
onUpdate(secondsSinceLastRun: number): Promise<boolean>;
|
||||
}
|
||||
|
@ -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,15 +1,16 @@
|
||||
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);
|
||||
onLoad(): void;
|
||||
onUpdate(): boolean;
|
||||
onLoad(): Promise<void>;
|
||||
onUpdate(): Promise<boolean>;
|
||||
getRoute(): string;
|
||||
getTraderSettings(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ITraderBase[]>;
|
||||
/**
|
||||
|
@ -3,6 +3,15 @@ import { ContextVariableType } from "./ContextVariableType";
|
||||
export declare class ApplicationContext {
|
||||
private variables;
|
||||
private static holderMaxSize;
|
||||
/**
|
||||
* Called like:
|
||||
*
|
||||
* const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue<IRegisterPlayerRequestData>();
|
||||
*
|
||||
* const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.MATCH_INFO).getValue<IStartOfflineRaidRequestData>();
|
||||
* @param type
|
||||
* @returns
|
||||
*/
|
||||
getLatestValue(type: ContextVariableType): ContextVariable;
|
||||
getValues(type: ContextVariableType): ContextVariable[];
|
||||
addValue(type: ContextVariableType, value: any): void;
|
||||
|
@ -2,7 +2,9 @@ export declare enum ContextVariableType {
|
||||
/** Logged in users session id */
|
||||
SESSION_ID = 0,
|
||||
/** Currently acive raid information */
|
||||
MATCH_INFO = 1,
|
||||
RAID_CONFIGURATION = 1,
|
||||
/** Timestamp when client first connected */
|
||||
CLIENT_START_TIMESTAMP = 2
|
||||
CLIENT_START_TIMESTAMP = 2,
|
||||
/** When player is loading into map and loot is requested */
|
||||
REGISTER_PLAYER_REQUEST = 3
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ import { BotGenerator } from "../generators/BotGenerator";
|
||||
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
|
||||
import { IBotBase } from "../models/eft/common/tables/IBotBase";
|
||||
import { IBotCore } from "../models/eft/common/tables/IBotCore";
|
||||
@ -23,14 +22,13 @@ export declare class BotController {
|
||||
protected botDifficultyHelper: BotDifficultyHelper;
|
||||
protected botGenerationCacheService: BotGenerationCacheService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected botConfig: IBotConfig;
|
||||
static readonly pmcTypeLabel = "PMC";
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, weightedRandomHelper: WeightedRandomHelper, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
|
||||
/**
|
||||
* Return the number of bot loadout varieties to be generated
|
||||
* @param type bot Type we want the loadout gen count for
|
||||
@ -57,6 +55,12 @@ export declare class BotController {
|
||||
* @returns IBotBase array
|
||||
*/
|
||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||
/**
|
||||
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
|
||||
* @param requestedDifficulty
|
||||
* @returns
|
||||
*/
|
||||
getPMCDifficulty(requestedDifficulty: string): string;
|
||||
/**
|
||||
* Get the max number of bots allowed on a map
|
||||
* Looks up location player is entering when getting cap value
|
||||
|
@ -8,13 +8,15 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
export declare class CustomizationController {
|
||||
protected logger: ILogger;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected saveServer: SaveServer;
|
||||
protected localisationService: LocalisationService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper);
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, saveServer: SaveServer, localisationService: LocalisationService, profileHelper: ProfileHelper);
|
||||
getTraderSuits(traderID: string, sessionID: string): ISuit[];
|
||||
wearClothing(pmcData: IPmcData, body: IWearClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
buyClothing(pmcData: IPmcData, body: IBuyClothingRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
|
@ -27,6 +27,7 @@ export declare class DialogueController {
|
||||
*/
|
||||
getDialogueInfo(dialogueID: string, sessionID: string): DialogueInfo;
|
||||
/**
|
||||
* Handle player clicking 'messenger' and seeing all the messages they've recieved
|
||||
* Set the content of the dialogue on the details panel, showing all the messages
|
||||
* for the specified dialogue.
|
||||
* @param dialogueID Dialog id
|
||||
|
@ -1,59 +1,74 @@
|
||||
import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||
import { HideoutHelper } from "../helpers/HideoutHelper";
|
||||
import { HttpServerHelper } from "../helpers/HttpServerHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { PreAkiModLoader } from "../loaders/PreAkiModLoader";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { Config } from "../models/eft/common/IGlobals";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ICheckVersionResponse } from "../models/eft/game/ICheckVersionResponse";
|
||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||
import { IServerDetails } from "../models/eft/game/IServerDetails";
|
||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { ISeasonalEvent } from "../models/spt/config/ISeasonalEventConfig";
|
||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocaleService } from "../services/LocaleService";
|
||||
import { CustomLocationWaveService } from "../services/CustomLocationWaveService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { OpenZoneService } from "../services/OpenZoneService";
|
||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||
import { Watermark } from "../utils/Watermark";
|
||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class GameController {
|
||||
protected logger: ILogger;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected watermark: Watermark;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
protected localeService: LocaleService;
|
||||
protected hideoutHelper: HideoutHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected gameEventHelper: GameEventHelper;
|
||||
protected customLocationWaveService: CustomLocationWaveService;
|
||||
protected openZoneService: OpenZoneService;
|
||||
protected seasonalEventService: SeasonalEventService;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected configServer: ConfigServer;
|
||||
protected httpConfig: IHttpConfig;
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, watermark: Watermark, httpServerHelper: HttpServerHelper, localeService: LocaleService, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, gameEventHelper: GameEventHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||
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;
|
||||
/**
|
||||
* Check if current date falls inside any of the seasons events pased in, if so, handle them
|
||||
* @param seasonalEvents events to check for
|
||||
* When player logs in, iterate over all active effects and reduce timer
|
||||
* TODO - add body part HP regen
|
||||
* @param pmcProfile
|
||||
*/
|
||||
protected checkForAndEnableSeasonalEvents(seasonalEvents: ISeasonalEvent[]): void;
|
||||
protected updateProfileHealthValues(pmcProfile: IPmcData): void;
|
||||
/**
|
||||
* Make adjusted to server code based on the name of the event passed in
|
||||
* @param globalConfig globals.json
|
||||
* @param eventName Name of the event to enable. e.g. Christmas
|
||||
* Waves with an identical min/max values spawn nothing, the number of bots that spawn is the difference between min and max
|
||||
*/
|
||||
protected updateGlobalEvents(globalConfig: Config, eventName: string): void;
|
||||
protected fixBrokenOfflineMapWaves(): void;
|
||||
/**
|
||||
* Read in data from seasonalEvents.json and add found equipment items to bots
|
||||
* @param eventName Name of the event to read equipment in from config
|
||||
* Make Rogues spawn later to allow for scavs to spawn first instead of rogues filling up all spawn positions
|
||||
*/
|
||||
protected addEventGearToScavs(eventName: string): void;
|
||||
protected fixRoguesSpawningInstantlyOnLighthouse(): void;
|
||||
/**
|
||||
* Set Khorovod(dancing tree) chance to 100% on all maps that support it
|
||||
* Get a list of installed mods and save their details to the profile being used
|
||||
* @param fullProfile Profile to add mod details to
|
||||
*/
|
||||
protected enableDancingTree(): void;
|
||||
protected saveActiveModsToProfile(fullProfile: IAkiProfile): void;
|
||||
/**
|
||||
* Add the logged in players name to PMC name pool
|
||||
* @param pmcProfile
|
||||
*/
|
||||
protected addPlayerToPMCNames(pmcProfile: IPmcData): void;
|
||||
/**
|
||||
* Blank out the "test" mail message from prapor
|
||||
*/
|
||||
protected removePraporTestMessage(): void;
|
||||
/**
|
||||
* Make non-trigger-spawned raiders spawn earlier + always
|
||||
*/
|
||||
@ -61,6 +76,5 @@ export declare class GameController {
|
||||
protected logProfileDetails(fullProfile: IAkiProfile): void;
|
||||
getGameConfig(sessionID: string): IGameConfigResponse;
|
||||
getServer(): IServerDetails[];
|
||||
protected addPumpkinsToScavBackpacks(): void;
|
||||
getValidGameVersion(): ICheckVersionResponse;
|
||||
}
|
||||
|
@ -1,23 +1,28 @@
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||
import { HealthHelper } from "../helpers/HealthHelper";
|
||||
import { InventoryHelper } from "../helpers/InventoryHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
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 { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
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, 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
|
||||
@ -25,7 +30,7 @@ export declare class HealthController {
|
||||
* @param sessionID
|
||||
* @param addEffects Should effects found be added or removed from profile
|
||||
*/
|
||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean): void;
|
||||
saveVitality(pmcData: IPmcData, info: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
|
||||
/**
|
||||
* When healing in menu
|
||||
* @param pmcData
|
||||
@ -34,13 +39,35 @@ export declare class HealthController {
|
||||
* @returns
|
||||
*/
|
||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Consume food/water outside of a raid
|
||||
* @param pmcData Player profile
|
||||
* @param body request Object
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Occurs on post-raid healing page
|
||||
* @param pmcData player profile
|
||||
* @param info Request data from client
|
||||
* @param healthTreatmentRequest Request data from client
|
||||
* @param sessionID Session id
|
||||
* @returns
|
||||
*/
|
||||
healthTreatment(pmcData: IPmcData, info: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
healthTreatment(pmcData: IPmcData, healthTreatmentRequest: IHealthTreatmentRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* applies skills from hideout workout.
|
||||
* @param pmcData Player profile
|
||||
* @param info Request data
|
||||
* @param sessionID
|
||||
*/
|
||||
applyWorkoutChanges(pmcData: IPmcData, info: IWorkoutData, sessionId: string): void;
|
||||
/**
|
||||
* 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, output: IItemEventRouterResponse): void;
|
||||
}
|
||||
|
@ -7,7 +7,9 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { HideoutArea, Product } from "../models/eft/common/tables/IBotBase";
|
||||
import { HideoutUpgradeCompleteRequestData } from "../models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
||||
import { IHideoutContinousProductionStartRequestData } from "../models/eft/hideout/IHideoutContinousProductionStartRequestData";
|
||||
import { IHandleQTEEventRequestData } from "../models/eft/hideout/IHandleQTEEventRequestData";
|
||||
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";
|
||||
import { IHideoutScavCaseStartRequestData } from "../models/eft/hideout/IHideoutScavCaseStartRequestData";
|
||||
@ -16,6 +18,8 @@ import { IHideoutTakeItemOutRequestData } from "../models/eft/hideout/IHideoutTa
|
||||
import { IHideoutTakeProductionRequestData } from "../models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||
import { IHideoutToggleAreaRequestData } from "../models/eft/hideout/IHideoutToggleAreaRequestData";
|
||||
import { IHideoutUpgradeRequestData } from "../models/eft/hideout/IHideoutUpgradeRequestData";
|
||||
import { IQteData } from "../models/eft/hideout/IQteData";
|
||||
import { IRecordShootingRangePoints } from "../models/eft/hideout/IRecordShootingRangePoints";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IHideoutConfig } from "../models/spt/config/IHideoutConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -23,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";
|
||||
@ -49,12 +54,28 @@ 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);
|
||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
upgradeComplete(pmcData: IPmcData, body: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
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
|
||||
* @param request upgrade start request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Complete a hideout area upgrade
|
||||
* @param pmcData Player profile
|
||||
* @param request Completed upgrade request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
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
|
||||
@ -62,7 +83,14 @@ export declare class HideoutController {
|
||||
* @returns IItemEventRouterResponse object
|
||||
*/
|
||||
putItemsInAreaSlots(pmcData: IPmcData, addItemToHideoutRequest: IHideoutPutItemInRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
takeItemsFromAreaSlots(pmcData: IPmcData, body: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Remove item from hideout area and place into player inventory
|
||||
* @param pmcData Player profile
|
||||
* @param request Take item out of area request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
takeItemsFromAreaSlots(pmcData: IPmcData, request: IHideoutTakeItemOutRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Find resource item in hideout area, add copy to player inventory, remove Item from hideout slot
|
||||
* @param sessionID Session id
|
||||
@ -73,7 +101,21 @@ export declare class HideoutController {
|
||||
* @returns IItemEventRouterResponse response
|
||||
*/
|
||||
protected removeResourceFromArea(sessionID: string, pmcData: IPmcData, removeResourceRequest: IHideoutTakeItemOutRequestData, output: IItemEventRouterResponse, hideoutArea: HideoutArea): IItemEventRouterResponse;
|
||||
toggleArea(pmcData: IPmcData, body: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Toggle area on/off
|
||||
* @param pmcData Player profile
|
||||
* @param request Toggle area request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
toggleArea(pmcData: IPmcData, request: IHideoutToggleAreaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Start production for an item from hideout area
|
||||
* @param pmcData Player profile
|
||||
* @param body Start prodution of single item request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
singleProductionStart(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles event after clicking 'start' on the scav case hideout page
|
||||
@ -83,24 +125,96 @@ 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
|
||||
* @param rewards reward items to add to profile
|
||||
* @param recipieId recipie id to save into Production dict
|
||||
*/
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[]): void;
|
||||
continuousProductionStart(pmcData: IPmcData, body: IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
takeProduction(pmcData: IPmcData, body: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
protected addScavCaseRewardsToProfile(pmcData: IPmcData, rewards: Product[], recipieId: string): void;
|
||||
/**
|
||||
* Start production of continuously created item
|
||||
* @param pmcData Player profile
|
||||
* @param request Continious production request
|
||||
* @param sessionID Session id
|
||||
* @returns 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
|
||||
* @param request Remove production from area request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
takeProduction(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Take recipie-type production out of hideout area and place into player inventory
|
||||
* @param sessionID Session id
|
||||
* @param recipe Completed recipie of item
|
||||
* @param pmcData Player profile
|
||||
* @param request Remove production from area request
|
||||
* @param output Output object to update
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
protected handleRecipie(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles giving rewards stored in player profile to player after clicking 'get rewards'
|
||||
* @param sessionID
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param output
|
||||
* @returns
|
||||
* @param sessionID Session id
|
||||
* @param pmcData Player profile
|
||||
* @param request Get rewards from scavcase craft request
|
||||
* @param output Output object to update
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Start area production for item
|
||||
* @param pmcData Player profile
|
||||
* @param request Start production request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
registerProduction(pmcData: IPmcData, request: IHideoutSingleProductionStartRequestData | IHideoutContinuousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get quick time event list for hideout
|
||||
* // TODO - implement this
|
||||
* @param sessionId Session id
|
||||
* @returns IQteData array
|
||||
*/
|
||||
getQteList(sessionId: string): IQteData[];
|
||||
/**
|
||||
* Handle HideoutQuickTimeEvent on client/game/profile/items/moving
|
||||
* Called after completing workout at gym
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Profile to adjust
|
||||
* @param request QTE result object
|
||||
*/
|
||||
handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData): IItemEventRouterResponse;
|
||||
/**
|
||||
* Record a high score from the shooting range into a player profiles overallcounters
|
||||
* @param sessionId Session id
|
||||
* @param pmcData Profile to update
|
||||
* @param request shooting range score request
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle client/game/profile/items/moving - HideoutImproveArea
|
||||
* @param sessionId Session id
|
||||
* @param pmcData profile to improve area in
|
||||
* @param request improve area request data
|
||||
*/
|
||||
improveArea(sessionId: string, pmcData: IPmcData, request: IHideoutImproveAreaRequestData): IItemEventRouterResponse;
|
||||
/**
|
||||
* Function called every x seconds as part of onUpdate event
|
||||
*/
|
||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, body: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
registerProduction(pmcData: IPmcData, body: IHideoutSingleProductionStartRequestData | IHideoutContinousProductionStartRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
update(): void;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { ApplicationContext } from "../context/ApplicationContext";
|
||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||
import { HealthHelper } from "../helpers/HealthHelper";
|
||||
import { InRaidHelper } from "../helpers/InRaidHelper";
|
||||
@ -35,12 +36,13 @@ export declare class InraidController {
|
||||
protected traderHelper: TraderHelper;
|
||||
protected insuranceService: InsuranceService;
|
||||
protected inRaidHelper: InRaidHelper;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected configServer: ConfigServer;
|
||||
protected airdropConfig: IAirdropConfig;
|
||||
protected inraidConfig: IInRaidConfig;
|
||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||
/**
|
||||
* Save locationid to active profiles inraid object
|
||||
* Save locationId to active profiles inraid object AND app context
|
||||
* @param sessionID Session id
|
||||
* @param info Register player request
|
||||
*/
|
||||
|
@ -31,13 +31,23 @@ export declare class InsuranceController {
|
||||
protected configServer: ConfigServer;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, paymentService: PaymentService, insuranceService: InsuranceService, configServer: ConfigServer);
|
||||
/**
|
||||
* Process insurance items prior to being given to player in mail
|
||||
*/
|
||||
processReturn(): void;
|
||||
/**
|
||||
* Add insurance to an item
|
||||
* @param pmcData Player profile
|
||||
* @param body Insurance request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse object to send to client
|
||||
*/
|
||||
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Calculate insurance cost
|
||||
* @param info request object
|
||||
* @param sessionID session id
|
||||
* @returns response object to send to client
|
||||
* @returns IGetInsuranceCostResponseData object to send to client
|
||||
*/
|
||||
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||
}
|
||||
|
@ -129,9 +129,14 @@ export declare class InventoryController {
|
||||
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles sorting of Inventory.
|
||||
* Handle ApplyInventoryChanges
|
||||
* Sorts supplied items.
|
||||
* @param pmcData Player profile
|
||||
* @param request sort request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
|
@ -6,10 +6,9 @@ import { ICreateGroupRequestData } from "../models/eft/match/ICreateGroupRequest
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
|
||||
import { IGetRaidConfigurationRequestData } from "../models/eft/match/IGetRaidConfigurationRequestData";
|
||||
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
|
||||
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
|
||||
import { BotDifficulty } from "../models/enums/BotDifficulty";
|
||||
import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
import { IMatchConfig } from "../models/spt/config/IMatchConfig";
|
||||
@ -42,12 +41,17 @@ export declare class MatchController {
|
||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||
protected getMatch(location: string): any;
|
||||
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
||||
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
|
||||
/**
|
||||
* Handle /client/raid/configuration
|
||||
* @param request
|
||||
* @param sessionID
|
||||
*/
|
||||
startOfflineRaid(request: IGetRaidConfigurationRequestData, sessionID: string): void;
|
||||
/**
|
||||
* Convert a difficulty value from pre-raid screen to a bot difficulty
|
||||
* @param botDifficulty dropdown difficulty
|
||||
* @param botDifficulty dropdown difficulty value
|
||||
* @returns bot difficulty
|
||||
*/
|
||||
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: BotDifficulty): string;
|
||||
protected convertDifficultyDropdownIntoBotDifficulty(botDifficulty: string): string;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { PlayerScavGenerator } from "../generators/PlayerScavGenerator";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { QuestHelper } from "../helpers/QuestHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IMiniProfile } from "../models/eft/launcher/IMiniProfile";
|
||||
@ -24,8 +25,9 @@ export declare class ProfileController {
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected playerScavGenerator: PlayerScavGenerator;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected questHelper: QuestHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, profileHelper: ProfileHelper);
|
||||
constructor(hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, playerScavGenerator: PlayerScavGenerator, traderHelper: TraderHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
||||
getMiniProfiles(): IMiniProfile[];
|
||||
getMiniProfile(sessionID: string): any;
|
||||
getCompleteProfile(sessionID: string): IPmcData[];
|
||||
|
@ -5,6 +5,7 @@ import { QuestConditionHelper } from "../helpers/QuestConditionHelper";
|
||||
import { QuestHelper } from "../helpers/QuestHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||
import { IRepeatableQuest } from "../models/eft/common/tables/IRepeatableQuests";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||
@ -15,11 +16,14 @@ import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocaleService } from "../services/LocaleService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PlayerService } from "../services/PlayerService";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class QuestController {
|
||||
protected logger: ILogger;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected httpResponseUtil: HttpResponseUtil;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected itemHelper: ItemHelper;
|
||||
@ -29,9 +33,10 @@ export declare class QuestController {
|
||||
protected questConditionHelper: QuestConditionHelper;
|
||||
protected playerService: PlayerService;
|
||||
protected localeService: LocaleService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
/**
|
||||
* Get all quests visible to player
|
||||
* Exclude quests with incomplete preconditions (level/loyalty)
|
||||
@ -55,7 +60,30 @@ export declare class QuestController {
|
||||
* @returns client response
|
||||
*/
|
||||
acceptQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get a quests startedMessageText key from db, if no startedMessageText key found, use description key instead
|
||||
* @param startedMessageTextId startedMessageText property from IQuest
|
||||
* @param questDescriptionId description property from IQuest
|
||||
* @returns message id
|
||||
*/
|
||||
protected getMessageIdForQuestStart(startedMessageTextId: string, questDescriptionId: string): string;
|
||||
/**
|
||||
* Handle the client accepting a repeatable quest and starting it
|
||||
* Send starting rewards if any to player and
|
||||
* Send start notification if any to player
|
||||
* @param pmcData Profile to update with new quest
|
||||
* @param acceptedQuest Quest being accepted
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
acceptRepeatableQuest(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Look for an accepted quest inside player profile, return matching
|
||||
* @param pmcData Profile to search through
|
||||
* @param acceptedQuest Quest to search for
|
||||
* @returns IRepeatableQuest
|
||||
*/
|
||||
protected getRepeatableQuestFromProfile(pmcData: IPmcData, acceptedQuest: IAcceptQuestRequestData): IRepeatableQuest;
|
||||
/**
|
||||
* Update completed quest in profile
|
||||
* Add newly unlocked quests to profile
|
||||
@ -67,13 +95,20 @@ export declare class QuestController {
|
||||
*/
|
||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Send a popup to player on completion of a quest
|
||||
* Send a popup to player on successful completion of a quest
|
||||
* @param sessionID session id
|
||||
* @param pmcData player profile
|
||||
* @param completedQuestId completed quest id
|
||||
* @param questRewards rewards given to player
|
||||
* @param pmcData Player profile
|
||||
* @param completedQuestId Completed quest id
|
||||
* @param questRewards Rewards given to player
|
||||
*/
|
||||
protected sendDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void;
|
||||
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
|
||||
|
@ -67,16 +67,16 @@ export declare class RagfairController {
|
||||
protected configServer: ConfigServer;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
|
||||
getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult;
|
||||
/**
|
||||
* Get offers for the client based on type of search being performed
|
||||
* @param searchRequest Client search request data
|
||||
* @param itemsToAdd
|
||||
* @param assorts
|
||||
* @param traderAssorts Trader assorts
|
||||
* @param pmcProfile Player profile
|
||||
* @returns array of offers
|
||||
*/
|
||||
protected getOffersForSearchType(searchRequest: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||
protected getOffersForSearchType(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||
/**
|
||||
* Get categories for the type of search being performed, linked/required/all
|
||||
* @param searchRequest Client search request data
|
||||
@ -100,8 +100,14 @@ export declare class RagfairController {
|
||||
/**
|
||||
* Update a trader flea offer with buy restrictions stored in the traders assort
|
||||
* @param offer flea offer to update
|
||||
* @param profile full profile of player
|
||||
*/
|
||||
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer): void;
|
||||
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, profile: IAkiProfile): void;
|
||||
/**
|
||||
* Adjust ragfair offer stack count to match same value as traders assort stack count
|
||||
* @param offer Flea offer to adjust
|
||||
*/
|
||||
protected setTraderOfferStackSize(offer: IRagfairOffer): void;
|
||||
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
||||
update(): void;
|
||||
@ -114,6 +120,7 @@ export declare class RagfairController {
|
||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||
getAllFleaPrices(): Record<string, number>;
|
||||
getStaticPrices(): Record<string, number>;
|
||||
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
||||
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { HandbookHelper } from "../helpers/HandbookHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
@ -20,6 +21,7 @@ import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { MathUtil } from "../utils/MathUtil";
|
||||
import { ObjectId } from "../utils/ObjectId";
|
||||
@ -56,6 +58,7 @@ export declare class RepeatableQuestController {
|
||||
protected timeUtil: TimeUtil;
|
||||
protected logger: ILogger;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected mathUtil: MathUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
@ -63,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;
|
||||
@ -71,7 +75,7 @@ export declare class RepeatableQuestController {
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, 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.
|
||||
@ -98,6 +102,13 @@ export declare class RepeatableQuestController {
|
||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
||||
*/
|
||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||
/**
|
||||
* Get repeatable quest data from profile from name (daily/weekly), creates base repeatable quest object if none exists
|
||||
* @param repeatableConfig daily/weekly config
|
||||
* @param pmcData Profile to search
|
||||
* @returns IPmcDataRepeatableQuest
|
||||
*/
|
||||
protected getRepeatableQuestSubTypeFromProfile(repeatableConfig: IRepeatableQuestConfig, pmcData: IPmcData): IPmcDataRepeatableQuest;
|
||||
/**
|
||||
* This method is called by GetClientRepeatableQuests and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
||||
@ -106,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
|
||||
*
|
||||
@ -146,6 +158,12 @@ export declare class RepeatableQuestController {
|
||||
* @returns {object} object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
|
||||
*/
|
||||
generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
||||
/**
|
||||
* Cpnvert a location into an quest code can read (e.g. factory4_day into 55f2d3fd4bdc2d5f408b4567)
|
||||
* @param locationKey e.g factory4_day
|
||||
* @returns guid
|
||||
*/
|
||||
protected getQuestLocationByMapId(locationKey: string): string;
|
||||
/**
|
||||
* Exploration repeatable quests can specify a required extraction point.
|
||||
* This method creates the according object which will be appended to the conditions array
|
||||
@ -221,16 +239,17 @@ export declare class RepeatableQuestController {
|
||||
generateRewardItem(tpl: string, value: number, index: number, preset?: any): IReward;
|
||||
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
||||
probabilityObjectArray<K, V>(configArrayInput: ProbabilityObject<K, V>[]): ProbabilityObjectArray<K, V>;
|
||||
changeRepeatableQuest(pmcDataIn: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||
changeRepeatableQuest(pmcData: IPmcData, body: IRepeatableQuestChangeRequest, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
||||
* @returns a list of rewardable items [[_tpl, itemTemplate],...]
|
||||
* Picks rewardable items from items.json. This means they need to fit into the inventory and they shouldn't be keys (debatable)
|
||||
* @param repeatableQuestConfig config file
|
||||
* @returns a list of rewardable items [[_tpl, itemTemplate],...]
|
||||
*/
|
||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig): [string, ITemplateItem][];
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that may be a reward
|
||||
* or content of bot loot. Items that are tested as valid may be in a player backpack or stash.
|
||||
* @param {*} tpl template id of item to check
|
||||
* @param {string} tpl template id of item to check
|
||||
* @returns boolean: true if item is valid reward
|
||||
*/
|
||||
isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig): boolean;
|
||||
|
@ -1,20 +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;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, profileHelper: ProfileHelper, ragfairServer: RagfairServer);
|
||||
protected 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;
|
||||
}
|
||||
|
@ -7,6 +7,7 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { TraderAssortService } from "../services/TraderAssortService";
|
||||
import { TraderPurchasePersisterService } from "../services/TraderPurchasePersisterService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
export declare class TraderController {
|
||||
@ -17,10 +18,11 @@ export declare class TraderController {
|
||||
protected traderHelper: TraderHelper;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected traderAssortService: TraderAssortService;
|
||||
protected traderPurchasePersisterService: TraderPurchasePersisterService;
|
||||
protected fenceService: FenceService;
|
||||
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
|
||||
protected jsonUtil: JsonUtil;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil);
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, timeUtil: TimeUtil, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil);
|
||||
/**
|
||||
* Runs when onLoad event is fired
|
||||
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService
|
||||
|
@ -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 {
|
||||
onLoad(): void;
|
||||
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): boolean;
|
||||
onLoad(): void;
|
||||
getRoute(): string;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
export declare class OnUpdate {
|
||||
onUpdate(timeSinceLastRun: number): boolean;
|
||||
export interface OnUpdate {
|
||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||
getRoute(): string;
|
||||
}
|
||||
|
200
Faupi-HideoutArchitect/server/types/generators/BotEquipmentModGenerator.d.ts
vendored
Normal file
200
Faupi-HideoutArchitect/server/types/generators/BotEquipmentModGenerator.d.ts
vendored
Normal file
@ -0,0 +1,200 @@
|
||||
import { BotGeneratorHelper } from "../helpers/BotGeneratorHelper";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { BotWeaponGeneratorHelper } from "../helpers/BotWeaponGeneratorHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProbabilityHelper } from "../helpers/ProbabilityHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
||||
import { BotModLimits, BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
||||
import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
export declare class BotEquipmentModGenerator {
|
||||
protected logger: ILogger;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected probabilityHelper: ProbabilityHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected botWeaponModLimitService: BotWeaponModLimitService;
|
||||
protected botHelper: BotHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer);
|
||||
/**
|
||||
* Check mods are compatible and add to array
|
||||
* @param equipment Equipment item to add mods to
|
||||
* @param modPool Mod list to choose frm
|
||||
* @param parentId parentid of item to add mod to
|
||||
* @param parentTemplate template objet of item to add mods to
|
||||
* @param modSpawnChances dictionary of mod items and their chance to spawn for this bot type
|
||||
* @param botRole the bot role being generated for
|
||||
* @param forceSpawn should this mod be forced to spawn
|
||||
* @returns Item + compatible mods as an array
|
||||
*/
|
||||
generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, botRole: string, forceSpawn?: boolean): Item[];
|
||||
/**
|
||||
* Add mods to a weapon using the provided mod pool
|
||||
* @param sessionId session id
|
||||
* @param weapon Weapon to add mods to
|
||||
* @param modPool Pool of compatible mods to attach to weapon
|
||||
* @param weaponParentId parentId of weapon
|
||||
* @param parentTemplate Weapon which mods will be generated on
|
||||
* @param modSpawnChances Mod spawn chances
|
||||
* @param ammoTpl Ammo tpl to use when generating magazines/cartridges
|
||||
* @param botRole Role of bot weapon is generated for
|
||||
* @param botLevel lvel of the bot weapon is being generated for
|
||||
* @param modLimits limits placed on certian mod types per gun
|
||||
* @param botEquipmentRole role of bot when accessing bot.json equipment config settings
|
||||
* @returns Weapon + mods array
|
||||
*/
|
||||
generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponParentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number, modLimits: BotModLimits, botEquipmentRole: string): Item[];
|
||||
/**
|
||||
* Is this modslot a front or rear sight
|
||||
* @param modSlot Slot to check
|
||||
* @returns true if it's a front/rear sight
|
||||
*/
|
||||
protected modIsFrontOrRearSight(modSlot: string): boolean;
|
||||
/**
|
||||
* Does the provided mod details show the mod can hold a scope
|
||||
* @param modSlot e.g. mod_scope, mod_mount
|
||||
* @param modsParentId Parent id of mod item
|
||||
* @returns true if it can hold a scope
|
||||
*/
|
||||
protected modSlotCanHoldScope(modSlot: string, modsParentId: string): boolean;
|
||||
/**
|
||||
* Set all scope mod chances to 100%
|
||||
* @param modSpawnChances Chances objet to update
|
||||
*/
|
||||
protected setScopeSpawnChancesToFull(modSpawnChances: ModsChances): void;
|
||||
protected sortModKeys(unsortedKeys: string[]): string[];
|
||||
/**
|
||||
* Get a Slot property for an item (chamber/cartridge/slot)
|
||||
* @param modSlot e.g patron_in_weapon
|
||||
* @param parentTemplate item template
|
||||
* @returns Slot item
|
||||
*/
|
||||
protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot;
|
||||
/**
|
||||
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
|
||||
* never return true for an item that has 0% spawn chance
|
||||
* @param itemSlot slot the item sits in
|
||||
* @param modSlot slot the mod sits in
|
||||
* @param modSpawnChances Chances for various mod spawns
|
||||
* @returns boolean true if it should spawn
|
||||
*/
|
||||
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
||||
/**
|
||||
*
|
||||
* @param modSlot Slot mod will fit into
|
||||
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
||||
* @param modsParent Parent slot the item will be a part of
|
||||
* @param botEquipBlacklist Blacklist to prevent mods from being picked
|
||||
* @param itemModPool Pool of items to pick from
|
||||
* @param weapon array with only weapon tpl in it, ready for mods to be added
|
||||
* @param ammoTpl ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine)
|
||||
* @param parentTemplate Parent item the mod will go into
|
||||
* @returns ITemplateItem
|
||||
*/
|
||||
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem];
|
||||
/**
|
||||
* Create a mod item with parameters as properties
|
||||
* @param modId _id
|
||||
* @param modTpl _tpl
|
||||
* @param parentId parentId
|
||||
* @param modSlot slotId
|
||||
* @param modTemplate Used to add additional properites in the upd object
|
||||
* @returns Item object
|
||||
*/
|
||||
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item;
|
||||
/**
|
||||
* Get a list of containers that hold ammo
|
||||
* e.g. mod_magazine / patron_in_weapon_000
|
||||
* @returns string array
|
||||
*/
|
||||
protected getAmmoContainers(): string[];
|
||||
/**
|
||||
* Get a random mod from an items compatible mods Filter array
|
||||
* @param modTpl ???? default value to return if nothing found
|
||||
* @param parentSlot item mod will go into, used to get combatible items
|
||||
* @param modSlot Slot to get mod to fill
|
||||
* @param items items to ensure picked mod is compatible with
|
||||
* @returns item tpl
|
||||
*/
|
||||
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
|
||||
/**
|
||||
* Log errors if mod is not compatible with slot
|
||||
* @param modToAdd template of mod to check
|
||||
* @param itemSlot slot the item will be placed in
|
||||
* @param modSlot slot the mod will fill
|
||||
* @param parentTemplate template of the mods parent item
|
||||
* @returns true if valid
|
||||
*/
|
||||
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;
|
||||
/**
|
||||
* Find mod tpls of a provided type and add to modPool
|
||||
* @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope)
|
||||
* @param modTemplate db object for modItem we get compatible mods from
|
||||
* @param modPool Pool of mods we are adding to
|
||||
*/
|
||||
protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void;
|
||||
/**
|
||||
* Get the possible items that fit a slot
|
||||
* @param parentItemId item tpl to get compatible items for
|
||||
* @param modSlot Slot item should fit in
|
||||
* @param botEquipBlacklist equipment that should not be picked
|
||||
* @returns array of compatible items for that slot
|
||||
*/
|
||||
protected getDynamicModPool(parentItemId: string, modSlot: string, botEquipBlacklist: EquipmentFilterDetails): string[];
|
||||
/**
|
||||
* Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist
|
||||
* @param allowedMods base mods to filter
|
||||
* @param botEquipBlacklist equipment blacklist
|
||||
* @param modSlot slot mods belong to
|
||||
* @returns Filtered array of mod tpls
|
||||
*/
|
||||
protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[];
|
||||
/**
|
||||
* With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines.
|
||||
* Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0.
|
||||
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||
* @param items The items where the CylinderMagazine's camora are appended to
|
||||
* @param modPool modPool which should include available cartrigdes
|
||||
* @param parentId The CylinderMagazine's UID
|
||||
* @param parentTemplate The CylinderMagazine's template
|
||||
*/
|
||||
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
|
||||
/**
|
||||
* Take a record of camoras and merge the compatable shells into one array
|
||||
* @param camorasWithShells camoras we want to merge into one array
|
||||
* @returns string array of shells fro luitple camora sources
|
||||
*/
|
||||
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
||||
/**
|
||||
* Filter out non-whitelisted weapon scopes
|
||||
* @param weapon Weapon scopes will be added to
|
||||
* @param scopes Full scope pool
|
||||
* @param botWeaponSightWhitelist whitelist of scope types by weapon base type
|
||||
* @returns array of scope tpls that have been filtered
|
||||
*/
|
||||
protected filterSightsByWeaponType(weapon: Item, scopes: string[], botWeaponSightWhitelist: Record<string, string[]>): string[];
|
||||
}
|
@ -1,16 +1,16 @@
|
||||
import { BotDifficultyHelper } from "../helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "../helpers/BotHelper";
|
||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { Health as PmcHealth, IBotBase, Skills } from "../models/eft/common/tables/IBotBase";
|
||||
import { Health, IBotType, Inventory } from "../models/eft/common/tables/IBotType";
|
||||
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";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
@ -29,10 +29,10 @@ export declare class BotGenerator {
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected botHelper: BotHelper;
|
||||
protected botDifficultyHelper: BotDifficultyHelper;
|
||||
protected gameEventHelper: GameEventHelper;
|
||||
protected seasonalEventService: SeasonalEventService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, gameEventHelper: GameEventHelper, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
||||
/**
|
||||
* Generate a player scav bot object
|
||||
* @param role e.g. assault / pmcbot
|
||||
@ -42,23 +42,12 @@ export declare class BotGenerator {
|
||||
*/
|
||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
||||
/**
|
||||
* Generate an array of bot objects based on a condition for a raid with
|
||||
* @param sessionId session id
|
||||
* @param botGenerationDetails details on how to generate the bots
|
||||
* @returns Generated bots in array
|
||||
* Create x number of bots of the type/side/difficulty defined in botGenerationDetails
|
||||
* @param sessionId Session id
|
||||
* @param botGenerationDetails details on how to generate bots
|
||||
* @returns array of bots
|
||||
*/
|
||||
generateByCondition(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase[];
|
||||
/**
|
||||
* Get the PMCs wildSpawnType value
|
||||
* @param role "usec" / "bear"
|
||||
* @returns wildSpawnType value as string
|
||||
*/
|
||||
protected getPmcRoleByDescription(role: string): string;
|
||||
/**
|
||||
* Get a randomised PMC side based on bot config value 'isUsec'
|
||||
* @returns pmc side as string
|
||||
*/
|
||||
protected getRandomisedPmcSide(): string;
|
||||
prepareAndGenerateBots(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase[];
|
||||
/**
|
||||
* Get a clone of the database\bots\base.json file
|
||||
* @returns IBotBase object
|
||||
@ -94,11 +83,6 @@ export declare class BotGenerator {
|
||||
*/
|
||||
protected generateHealth(healthObj: Health, playerScav?: boolean): PmcHealth;
|
||||
protected generateSkills(skillsObj: Skills): Skills;
|
||||
/**
|
||||
* Iterate through bots inventory and loot to find and remove christmas items (as defined in GameEventHelper)
|
||||
* @param nodeInventory Bots inventory to iterate over
|
||||
*/
|
||||
protected removeChristmasItemsFromBotInventory(nodeInventory: Inventory): void;
|
||||
/**
|
||||
* Generate a random Id for a bot and apply to bots _id and aid value
|
||||
* @param bot bot to update
|
||||
@ -107,11 +91,12 @@ export declare class BotGenerator {
|
||||
protected generateId(bot: IBotBase): IBotBase;
|
||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
||||
/**
|
||||
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
|
||||
* @param requestedDifficulty
|
||||
* @returns
|
||||
* 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 getPMCDifficulty(requestedDifficulty: string): string;
|
||||
protected getRandomisedGameVersionAndCategory(botInfo: Info): void;
|
||||
/**
|
||||
* Add a side-specific (usec/bear) dogtag item to a bots inventory
|
||||
* @param bot bot to add dogtag to
|
||||
|
@ -4,13 +4,15 @@ import { WeightedRandomHelper } from "../helpers/WeightedRandomHelper";
|
||||
import { Inventory as PmcInventory } from "../models/eft/common/tables/IBotBase";
|
||||
import { Chances, Generation, IBotType, Inventory, Mods } from "../models/eft/common/tables/IBotType";
|
||||
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
|
||||
import { IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
||||
import { EquipmentFilterDetails, IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotEquipmentModPoolService } from "../services/BotEquipmentModPoolService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { BotEquipmentModGenerator } from "./BotEquipmentModGenerator";
|
||||
import { BotLootGenerator } from "./BotLootGenerator";
|
||||
import { BotWeaponGenerator } from "./BotWeaponGenerator";
|
||||
export declare class BotInventoryGenerator {
|
||||
@ -24,9 +26,11 @@ export declare class BotInventoryGenerator {
|
||||
protected botHelper: BotHelper;
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
||||
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, botWeaponGenerator: BotWeaponGenerator, botLootGenerator: BotLootGenerator, botGeneratorHelper: BotGeneratorHelper, botHelper: BotHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, botEquipmentModGenerator: BotEquipmentModGenerator, configServer: ConfigServer);
|
||||
/**
|
||||
* Add equipment/weapons/loot to bot
|
||||
* @param sessionId Session id
|
||||
@ -62,6 +66,13 @@ export declare class BotInventoryGenerator {
|
||||
* @param randomisationDetails settings from bot.json to adjust how item is generated
|
||||
*/
|
||||
protected generateEquipment(equipmentSlot: string, equipmentPool: Record<string, number>, modPool: Mods, spawnChances: Chances, botRole: string, inventory: PmcInventory, randomisationDetails: RandomisationDetails): void;
|
||||
/**
|
||||
* Get all possible mods for item and filter down based on equipment blacklist from bot.json config
|
||||
* @param itemTpl Item mod pool is being retreived and filtered
|
||||
* @param equipmentBlacklist blacklist to filter mod pool with
|
||||
* @returns Filtered pool of mods
|
||||
*/
|
||||
protected getFilteredDynamicModsForItem(itemTpl: string, equipmentBlacklist: EquipmentFilterDetails[]): Record<string, string[]>;
|
||||
/**
|
||||
* Work out what weapons bot should have equipped and add them to bot inventory
|
||||
* @param templateInventory bot/x.json data from db
|
||||
|
@ -12,10 +12,12 @@ import { IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotWeaponModLimitService } from "../services/BotWeaponModLimitService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { BotEquipmentModGenerator } from "./BotEquipmentModGenerator";
|
||||
import { IInventoryMagGen } from "./weapongen/IInventoryMagGen";
|
||||
export declare class BotWeaponGenerator {
|
||||
protected jsonUtil: JsonUtil;
|
||||
@ -28,11 +30,13 @@ export declare class BotWeaponGenerator {
|
||||
protected randomUtil: RandomUtil;
|
||||
protected configServer: ConfigServer;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
protected botWeaponModLimitService: BotWeaponModLimitService;
|
||||
protected botEquipmentModGenerator: BotEquipmentModGenerator;
|
||||
protected localisationService: LocalisationService;
|
||||
protected inventoryMagGenComponents: IInventoryMagGen[];
|
||||
protected readonly modMagazineSlotId = "mod_magazine";
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, localisationService: LocalisationService, inventoryMagGenComponents: IInventoryMagGen[]);
|
||||
constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, inventoryMagGenComponents: IInventoryMagGen[]);
|
||||
/**
|
||||
* Pick a random weapon based on weightings and generate a functional weapon
|
||||
* @param equipmentSlot Primary/secondary/holster
|
||||
@ -85,9 +89,10 @@ export declare class BotWeaponGenerator {
|
||||
/**
|
||||
* Checks if all required slots are occupied on a weapon and all it's mods
|
||||
* @param weaponItemArray Weapon + mods
|
||||
* @param botRole role of bot weapon is for
|
||||
* @returns true if valid
|
||||
*/
|
||||
protected isWeaponValid(weaponItemArray: Item[]): boolean;
|
||||
protected isWeaponValid(weaponItemArray: Item[], botRole: string): boolean;
|
||||
/**
|
||||
* Generates extra magazines or bullets (if magazine is internal) and adds them to TacticalVest and Pockets.
|
||||
* Additionally, adds extra bullets to SecuredContainer
|
||||
@ -97,6 +102,13 @@ export declare class BotWeaponGenerator {
|
||||
* @param botRole The bot type we're getting generating extra mags for
|
||||
*/
|
||||
addExtraMagazinesToInventory(generatedWeaponResult: GenerateWeaponResult, magCounts: MinMax, inventory: PmcInventory, botRole: string): void;
|
||||
/**
|
||||
* Add Grendaes for UBGL to bots vest and secure container
|
||||
* @param weaponMods Weapon array with mods
|
||||
* @param generatedWeaponResult result of weapon generation
|
||||
* @param inventory bot inventory to add grenades to
|
||||
*/
|
||||
protected addUbglGrenadesToBotInventory(weaponMods: Item[], generatedWeaponResult: GenerateWeaponResult, inventory: PmcInventory): void;
|
||||
/**
|
||||
* Add ammo to the secure container
|
||||
* @param stackCount How many stacks of ammo to add
|
||||
@ -133,6 +145,13 @@ export declare class BotWeaponGenerator {
|
||||
* @param ammoTpl
|
||||
*/
|
||||
protected fillExistingMagazines(weaponMods: Item[], magazine: Item, ammoTpl: string): void;
|
||||
/**
|
||||
* Add desired ammo tpl as item to weaponmods array, placed as child to UBGL
|
||||
* @param weaponMods
|
||||
* @param ubglMod
|
||||
* @param ubglAmmoTpl
|
||||
*/
|
||||
protected fillUbgl(weaponMods: Item[], ubglMod: Item, ubglAmmoTpl: string): void;
|
||||
/**
|
||||
* Add cartridge item to weapon Item array, if it already exists, update
|
||||
* @param weaponMods Weapon items array to amend
|
||||
|
@ -1,5 +1,4 @@
|
||||
import { ContainerHelper } from "../helpers/ContainerHelper";
|
||||
import { GameEventHelper } from "../helpers/GameEventHelper";
|
||||
import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { PresetHelper } from "../helpers/PresetHelper";
|
||||
import { RagfairServerHelper } from "../helpers/RagfairServerHelper";
|
||||
@ -9,6 +8,8 @@ import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticL
|
||||
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { SeasonalEventService } from "../services/SeasonalEventService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { MathUtil } from "../utils/MathUtil";
|
||||
import { ObjectId } from "../utils/ObjectId";
|
||||
@ -26,12 +27,13 @@ export declare class LocationGenerator {
|
||||
protected ragfairServerHelper: RagfairServerHelper;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected mathUtil: MathUtil;
|
||||
protected gameEventHelper: GameEventHelper;
|
||||
protected seasonalEventService: SeasonalEventService;
|
||||
protected containerHelper: ContainerHelper;
|
||||
protected presetHelper: PresetHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected locationConfig: ILocationConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, gameEventHelper: GameEventHelper, containerHelper: ContainerHelper, presetHelper: PresetHelper, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record<string, IStaticLootDetails>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, locationName: string): IStaticContainerProps;
|
||||
protected getLooseLootMultiplerForLocation(location: string): number;
|
||||
protected getStaticLootMultiplerForLocation(location: string): number;
|
||||
@ -47,7 +49,8 @@ export declare class LocationGenerator {
|
||||
* Add forced spawn point loot into loot parameter array
|
||||
* @param loot array to add forced loot to
|
||||
* @param forcedSpawnPoints forced loot to add
|
||||
* @param name of map currently generating forced loot for
|
||||
*/
|
||||
protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[]): void;
|
||||
protected addForcedLoot(loot: SpawnpointTemplate[], forcedSpawnPoints: SpawnpointsForced[], locationName: string): void;
|
||||
protected createItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import { LootRequest } from "../models/spt/services/LootRequest";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
export declare class LootGenerator {
|
||||
@ -14,8 +15,9 @@ export declare class LootGenerator {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected itemFilterService: ItemFilterService;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, itemFilterService: ItemFilterService);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, localisationService: LocalisationService, itemFilterService: ItemFilterService);
|
||||
/**
|
||||
* Generate a list of items based on configuration options parameter
|
||||
* @param options parameters to adjust how loot is generated
|
||||
|
@ -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";
|
||||
@ -10,21 +13,30 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
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;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected fenceService: FenceService;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected localisationService: LocalisationService;
|
||||
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, 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
|
||||
|
@ -7,7 +7,7 @@ import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { IBarterScheme } from "../models/eft/common/tables/ITrader";
|
||||
import { IRagfairOffer, OfferRequirement } from "../models/eft/ragfair/IRagfairOffer";
|
||||
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { Dynamic, IRagfairConfig } from "../models/spt/config/IRagfairConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
@ -88,13 +88,49 @@ export declare class RagfairOfferGenerator {
|
||||
* Create multiple offers for items by using a unique list of items we've generated previously
|
||||
* @param expiredOffers optional, expired offers to regenerate
|
||||
*/
|
||||
generateDynamicOffers(expiredOffers?: Item[]): void;
|
||||
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
||||
protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise<void>;
|
||||
/**
|
||||
* Create one flea offer for a specific item
|
||||
* @param items Item to create offer for
|
||||
* @param isPreset Is item a weapon preset
|
||||
* @param itemDetails raw db item details
|
||||
* @returns
|
||||
*/
|
||||
protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<Item[]>;
|
||||
/**
|
||||
* Generate trader offers on flea using the traders assort data
|
||||
* @param traderID Trader to generate offers for
|
||||
*/
|
||||
generateFleaOffersForTrader(traderID: string): void;
|
||||
protected getItemCondition(userID: string, items: Item[], itemDetails: ITemplateItem): Item[];
|
||||
/**
|
||||
* Get array of an item with its mods + condition properties (e.g durability)
|
||||
* Apply randomisation adjustments to condition if item base is found in ragfair.json/dynamic/condition
|
||||
* @param userID id of owner of item
|
||||
* @param itemWithMods Item and mods, get condition of first item (only first array item is used)
|
||||
* @param itemDetails db details of first item
|
||||
* @returns
|
||||
*/
|
||||
protected getItemCondition(userID: string, itemWithMods: Item[], itemDetails: ITemplateItem): Item[];
|
||||
/**
|
||||
* Get the relevant condition id if item tpl matches in ragfair.json/condition
|
||||
* @param tpl Item to look for matching condition object
|
||||
* @returns condition id
|
||||
*/
|
||||
protected getDynamicConditionIdForTpl(tpl: string): string;
|
||||
/**
|
||||
* Alter an items condition based on its item base type
|
||||
* @param conditionSettingsId also the parentId of item being altered
|
||||
* @param item Item to adjust condition details of
|
||||
* @param itemDetails db item details of first item in array
|
||||
*/
|
||||
protected randomiseItemCondition(conditionSettingsId: string, item: Item, itemDetails: ITemplateItem): void;
|
||||
/**
|
||||
* Adjust an items durability/maxDurability value
|
||||
* @param item item (weapon/armor) to adjust
|
||||
* @param multiplier Value to multiple durability by
|
||||
*/
|
||||
protected randomiseDurabilityValues(item: Item, multiplier: number): void;
|
||||
/**
|
||||
* Add missing conditions to an item if needed
|
||||
* Durabiltiy for repairable items
|
||||
@ -102,7 +138,7 @@ export declare class RagfairOfferGenerator {
|
||||
* @param item item to add conditions to
|
||||
* @returns Item with conditions added
|
||||
*/
|
||||
protected addMissingCondition(item: Item): Item;
|
||||
protected addMissingConditions(item: Item): Item;
|
||||
/**
|
||||
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
|
||||
* @param offerItems Items for sale in offer
|
||||
@ -110,7 +146,7 @@ export declare class RagfairOfferGenerator {
|
||||
*/
|
||||
protected createBarterRequirement(offerItems: Item[]): IBarterScheme[];
|
||||
/**
|
||||
* Get an array of flea prices + item tpl, cached in generator class
|
||||
* Get an array of flea prices + item tpl, cached in generator class inside `allowedFleaPriceItemsForBarter`
|
||||
* @returns array with tpl/price values
|
||||
*/
|
||||
protected getFleaPricesAsArray(): {
|
||||
|
@ -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,21 +27,15 @@ 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
|
||||
*/
|
||||
protected getDbItems(): ITemplateItem[];
|
||||
/**
|
||||
* Check if a template id has a blacklisted parent id
|
||||
* @param tplid template id to check
|
||||
* @returns true if item is blacklisted
|
||||
*/
|
||||
protected itemHasBlacklistedParent(tplid: string): boolean;
|
||||
/**
|
||||
* Pick a number of items to be rewards, the count is defined by the values in
|
||||
* @param items item pool to pick rewards from
|
||||
|
10
Faupi-HideoutArchitect/server/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts
vendored
Normal file
10
Faupi-HideoutArchitect/server/types/generators/weapongen/implementations/UbglExternalMagGen.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { BotWeaponGeneratorHelper } from "../../../helpers/BotWeaponGeneratorHelper";
|
||||
import { IInventoryMagGen } from "../IInventoryMagGen";
|
||||
import { InventoryMagGen } from "../InventoryMagGen";
|
||||
export declare class UbglExternalMagGen implements IInventoryMagGen {
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
constructor(botWeaponGeneratorHelper: BotWeaponGeneratorHelper);
|
||||
getPriority(): number;
|
||||
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
||||
process(inventoryMagGen: InventoryMagGen): void;
|
||||
}
|
@ -2,28 +2,31 @@ import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ITraderAssort } from "../models/eft/common/tables/ITrader";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { ItemHelper } from "./ItemHelper";
|
||||
import { QuestHelper } from "./QuestHelper";
|
||||
export declare class AssortHelper {
|
||||
protected logger: ILogger;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected localisationService: LocalisationService;
|
||||
protected questHelper: QuestHelper;
|
||||
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, questHelper: QuestHelper);
|
||||
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper);
|
||||
/**
|
||||
* Remove assorts from a trader that have not been unlocked yet
|
||||
* @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
|
||||
*/
|
||||
|
@ -1,217 +1,42 @@
|
||||
import { DurabilityLimitsHelper } from "../helpers/DurabilityLimitsHelper";
|
||||
import { Mods, ModsChances } from "../models/eft/common/tables/IBotType";
|
||||
import { Item, Repairable, Upd } from "../models/eft/common/tables/IItem";
|
||||
import { ITemplateItem, Slot } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { EquipmentFilterDetails, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { EquipmentFilters, IBotConfig } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { BotEquipmentFilterService } from "../services/BotEquipmentFilterService";
|
||||
import { ItemFilterService } from "../services/ItemFilterService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { BotHelper } from "./BotHelper";
|
||||
import { BotWeaponGeneratorHelper } from "./BotWeaponGeneratorHelper";
|
||||
import { ContainerHelper } from "./ContainerHelper";
|
||||
import { InventoryHelper } from "./InventoryHelper";
|
||||
import { ItemHelper } from "./ItemHelper";
|
||||
import { ProbabilityHelper } from "./ProbabilityHelper";
|
||||
import { ProfileHelper } from "./ProfileHelper";
|
||||
export declare class BotModLimits {
|
||||
scope: ItemCount;
|
||||
scopeMax: number;
|
||||
scopeBaseTypes: string[];
|
||||
flashlightLaser: ItemCount;
|
||||
flashlightLaserMax: number;
|
||||
flashlgihtLaserBaseTypes: string[];
|
||||
}
|
||||
export declare class ItemCount {
|
||||
count: number;
|
||||
}
|
||||
export declare class BotGeneratorHelper {
|
||||
protected logger: ILogger;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected probabilityHelper: ProbabilityHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected durabilityLimitsHelper: DurabilityLimitsHelper;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected containerHelper: ContainerHelper;
|
||||
protected botEquipmentFilterService: BotEquipmentFilterService;
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
protected botHelper: BotHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botHelper: BotHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
/**
|
||||
* Check mods are compatible and add to array
|
||||
* @param equipment Equipment item to add mods to
|
||||
* @param modPool Mod list to choose frm
|
||||
* @param parentId parentid of item to add mod to
|
||||
* @param parentTemplate template objet of item to add mods to
|
||||
* @param modSpawnChances dictionary of mod items and their chance to spawn for this bot type
|
||||
* @param botRole the bot role being generated for
|
||||
* @param forceSpawn should this mod be forced to spawn
|
||||
* @returns Item + compatible mods as an array
|
||||
*/
|
||||
generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, botRole: string, forceSpawn?: boolean): Item[];
|
||||
/**
|
||||
* Add mods to a weapon using the provided mod pool
|
||||
* @param sessionId session id
|
||||
* @param weapon Weapon to add mods to
|
||||
* @param modPool Pool of compatible mods to attach to weapon
|
||||
* @param weaponParentId parentId of weapon
|
||||
* @param parentWeaponTemplate Weapon which mods will be generated on
|
||||
* @param modSpawnChances Mod spawn chances
|
||||
* @param ammoTpl Ammo tpl to use when generating magazines/cartridges
|
||||
* @param botRole Role of bot weapon is generated for
|
||||
* @returns Weapon + mods array
|
||||
*/
|
||||
generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponParentId: string, parentWeaponTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number): Item[];
|
||||
/**
|
||||
*
|
||||
* @param modSlot Slot mod will fit into
|
||||
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
||||
* @param modsParent Parent slot the item will be a part of
|
||||
* @param botEquipBlacklist Blacklist to prevent mods from being picked
|
||||
* @param itemModPool Pool of items to pick from
|
||||
* @param weapon array with only weapon tpl in it, ready for mods to be added
|
||||
* @param ammoTpl ammo tpl to use if slot requires a cartridge to be added (e.g. mod_magazine)
|
||||
* @param parentTemplate Parent item the mod will go into
|
||||
* @returns ITemplateItem
|
||||
*/
|
||||
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, modsParent: Slot, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem];
|
||||
/**
|
||||
* Find mod tpls of a provided type and add to modPool
|
||||
* @param desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope)
|
||||
* @param modTemplate db object for modItem we get compatible mods from
|
||||
* @param modPool Pool of mods we are adding to
|
||||
*/
|
||||
protected addCompatibleModsForProvidedMod(desiredSlotName: string, modTemplate: ITemplateItem, modPool: Mods, botEquipBlacklist: EquipmentFilterDetails): void;
|
||||
/**
|
||||
* Check if mod item is on limited list + has surpassed the limit set for it
|
||||
* @param botRole role the bot has e.g. assault
|
||||
* @param modTemplate mods template data
|
||||
* @param modLimits limits set for weapon being generated for this bot
|
||||
* @returns true if over item limit
|
||||
*/
|
||||
protected modHasReachedItemLimit(botRole: string, modTemplate: ITemplateItem, modLimits: BotModLimits): boolean;
|
||||
/**
|
||||
* Initalise mod limits to be used when generating a weapon
|
||||
* @param botRole "assault", "bossTagilla" or "pmc"
|
||||
* @returns BotModLimits object
|
||||
*/
|
||||
protected initModLimits(botRole: string): BotModLimits;
|
||||
/**
|
||||
* Generate a pool of mods for this bots mod type if bot has values inside `randomisedWeaponModSlots` array found in bot.json/equipment[botrole]
|
||||
* @param allowedMods Mods to be added to mod pool
|
||||
* @param botEquipBlacklist blacklist of items not allowed to be added to mod pool
|
||||
* @param modSlot Slot to generate mods for
|
||||
* @param itemModPool base mod pool to replace values of
|
||||
*/
|
||||
protected generateDynamicWeaponModPool(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string, itemModPool: Record<string, string[]>): void;
|
||||
/**
|
||||
* Find all compatible mods for equipment item and add to modPool
|
||||
* @param itemDetails item to find mods for
|
||||
* @param modPool ModPool to add mods to
|
||||
* @param equipmentBlacklist equipment not allowed to be used by the bot
|
||||
* @param botEquipmentRole bot type to generate pool for (e.g. assault, pmcBot, pmc for usec/bear)
|
||||
*/
|
||||
generateDynamicModPool(itemDetails: ITemplateItem, modPool: Mods, equipmentBlacklist: EquipmentFilterDetails[], botEquipmentRole: string): void;
|
||||
/**
|
||||
* Take a list of tpls and filter out blacklisted values using itemFilterService + botEquipmentBlacklist
|
||||
* @param allowedMods base mods to filter
|
||||
* @param botEquipBlacklist equipment blacklist
|
||||
* @param modSlot slot mods belong to
|
||||
* @returns Filtered array of mod tpls
|
||||
*/
|
||||
protected filterWeaponModsByBlacklist(allowedMods: string[], botEquipBlacklist: EquipmentFilterDetails, modSlot: string): string[];
|
||||
/**
|
||||
* Check if the specific item type on the weapon has reached the set limit
|
||||
* @param modTpl log mod tpl if over type limit
|
||||
* @param currentCount current number of this item on gun
|
||||
* @param maxLimit mod limit allowed
|
||||
* @param botRole role of bot we're checking weapon of
|
||||
* @returns true if limit reached
|
||||
*/
|
||||
protected weaponModLimitReached(modTpl: string, currentCount: {
|
||||
count: number;
|
||||
}, maxLimit: number, botRole: string): boolean;
|
||||
/**
|
||||
* Log errors if mod is not compatible with slot
|
||||
* @param modToAdd template of mod to check
|
||||
* @param itemSlot slot the item will be placed in
|
||||
* @param modSlot slot the mod will fill
|
||||
* @param parentTemplate tempalte of the mods parent item
|
||||
* @returns true if valid
|
||||
*/
|
||||
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;
|
||||
/**
|
||||
* Create a mod item with parameters as properties
|
||||
* @param modId _id
|
||||
* @param modTpl _tpl
|
||||
* @param parentId parentId
|
||||
* @param modSlot slotId
|
||||
* @param modTemplate Used to add additional properites in the upd object
|
||||
* @returns Item object
|
||||
*/
|
||||
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item;
|
||||
/**
|
||||
* randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo slot
|
||||
* never return true for an item that has 0% spawn chance
|
||||
* @param itemSlot slot the item sits in
|
||||
* @param modSlot slot the mod sits in
|
||||
* @param modSpawnChances Chances for various mod spawns
|
||||
* @returns boolean true if it should spawn
|
||||
*/
|
||||
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
||||
/**
|
||||
* Get a list of containers that hold ammo
|
||||
* e.g. mod_magazine / patron_in_weapon_000
|
||||
* @returns string array
|
||||
*/
|
||||
protected getAmmoContainers(): string[];
|
||||
/**
|
||||
* Get a Slot property for an item (chamber/cartridge/slot)
|
||||
* @param modSlot e.g patron_in_weapon
|
||||
* @param parentTemplate item template
|
||||
* @returns Slot item
|
||||
*/
|
||||
protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot;
|
||||
/**
|
||||
* With the shotgun revolver (60db29ce99594040e04c4a27) 12.12 introduced CylinderMagazines.
|
||||
* Those magazines (e.g. 60dc519adf4c47305f6d410d) have a "Cartridges" entry with a _max_count=0.
|
||||
* Ammo is not put into the magazine directly but assigned to the magazine's slots: The "camora_xxx" slots.
|
||||
* This function is a helper called by generateModsForItem for mods with parent type "CylinderMagazine"
|
||||
* @param items The items where the CylinderMagazine's camora are appended to
|
||||
* @param modPool modPool which should include available cartrigdes
|
||||
* @param parentId The CylinderMagazine's UID
|
||||
* @param parentTemplate The CylinderMagazine's template
|
||||
*/
|
||||
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
|
||||
/**
|
||||
* Take a record of camoras and merge the compatable shells into one array
|
||||
* @param camorasWithShells camoras we want to merge into one array
|
||||
* @returns string array of shells fro luitple camora sources
|
||||
*/
|
||||
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
/**
|
||||
* 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): {
|
||||
upd?: Upd;
|
||||
};
|
||||
/**
|
||||
* Get the chance for the weapon attachment or helmet equipment to be set as activated
|
||||
* @param botRole role of bot with weapon/helmet
|
||||
* @param setting the setting of the weapon attachment/helmet equipment to be activated
|
||||
* @param defaultValue default value for the chance of activation if the botrole or bot equipment role is null
|
||||
* @returns Percent chance to be active
|
||||
*/
|
||||
protected getBotEquipmentSettingFromConfig(botRole: string, setting: keyof EquipmentFilters, defaultValue: number): number;
|
||||
/**
|
||||
* Create a repairable object for a weapon that containers durability + max durability properties
|
||||
* @param itemTemplate weapon object being generated for
|
||||
@ -227,22 +52,16 @@ export declare class BotGeneratorHelper {
|
||||
*/
|
||||
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
|
||||
/**
|
||||
* Get a random mod from an items compatible mods Filter array
|
||||
* @param modTpl ????
|
||||
* @param parentSlot item mod will go into, used to get combatible items
|
||||
* @param modSlot Slot to get mod to fill
|
||||
* @param items items to ensure picked mod is compatible with
|
||||
* @returns item tpl
|
||||
*/
|
||||
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
|
||||
/**
|
||||
* Can an item be added to an item without issue
|
||||
* @param items items to check compatiblilities with
|
||||
* @param tplToCheck tpl of the item to check for incompatibilities
|
||||
* Can item be added to another item without conflict
|
||||
* @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
|
||||
* @returns false if no incompatibilities, also has incompatibility reason
|
||||
*/
|
||||
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): boolean;
|
||||
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): {
|
||||
incompatible: boolean;
|
||||
reason: string;
|
||||
};
|
||||
/**
|
||||
* Convert a bots role to the equipment role used in config/bot.json
|
||||
* @param botRole Role to convert
|
||||
|
@ -1,3 +1,4 @@
|
||||
import { MinMax } from "../models/common/MinMax";
|
||||
import { Difficulty, IBotType } from "../models/eft/common/tables/IBotType";
|
||||
import { EquipmentFilters, IBotConfig, RandomisationDetails } from "../models/spt/config/IBotConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -22,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
|
||||
@ -59,11 +60,29 @@ export declare class BotHelper {
|
||||
* @returns true if should be a pmc
|
||||
*/
|
||||
shouldBotBePmc(botRole: string): boolean;
|
||||
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
|
||||
*/
|
||||
getRandomizedPmcRole(): string;
|
||||
/**
|
||||
* 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 randomized PMC side based on bot config value 'isUsec'
|
||||
* @returns pmc side as string
|
||||
*/
|
||||
protected getRandomizedPmcSide(): string;
|
||||
}
|
||||
|
@ -2,8 +2,10 @@ import { MinMax } from "../models/common/MinMax";
|
||||
import { Inventory } from "../models/eft/common/tables/IBotBase";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { Grid, ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { EquipmentSlots } from "../models/enums/EquipmentSlots";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { ContainerHelper } from "./ContainerHelper";
|
||||
@ -16,21 +18,22 @@ export declare class BotWeaponGeneratorHelper {
|
||||
protected randomUtil: RandomUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected containerHelper: ContainerHelper;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, inventoryHelper: InventoryHelper, 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
|
||||
@ -46,12 +49,13 @@ export declare class BotWeaponGeneratorHelper {
|
||||
*/
|
||||
createMagazine(magazineTpl: string, ammoTpl: string, magTemplate: ITemplateItem): Item[];
|
||||
/**
|
||||
* Add a specific number of cartrdiges to a bots inventory (vest/pocket)
|
||||
* 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 equipment slots should bullets be added into
|
||||
*/
|
||||
addBulletsToVestAndPockets(ammoTpl: string, cartridgeCount: number, inventory: Inventory): void;
|
||||
addAmmoIntoEquipmentSlots(ammoTpl: string, cartridgeCount: number, inventory: Inventory, equipmentSlotsToAddTo?: EquipmentSlots[]): void;
|
||||
/**
|
||||
* Get a weapons default magazine template id
|
||||
* @param weaponTemplate weapon to get default magazine for
|
||||
@ -59,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
|
||||
|
@ -4,6 +4,7 @@ import { MessageType } from "../models/enums/MessageType";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { ItemHelper } from "./ItemHelper";
|
||||
import { NotificationSendHelper } from "./NotificationSendHelper";
|
||||
@ -15,8 +16,9 @@ export declare class DialogueHelper {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected notifierHelper: NotifierHelper;
|
||||
protected notificationSendHelper: NotificationSendHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected itemHelper: ItemHelper;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, itemHelper: ItemHelper);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime: number): MessageContent;
|
||||
/**
|
||||
* Add a templated message to the dialogue.
|
||||
|
@ -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;
|
||||
@ -23,4 +23,6 @@ export declare class DurabilityLimitsHelper {
|
||||
protected getMaxWeaponDeltaFromConfig(botRole: string): number;
|
||||
protected getMinArmorDeltaFromConfig(botRole: string): number;
|
||||
protected getMaxArmorDeltaFromConfig(botRole: string): number;
|
||||
protected getMinArmorLimitPercentFromConfig(botRole: string): number;
|
||||
protected getMinWeaponLimitPercentFromConfig(botRole: string): number;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ISeasonalEvent, ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig";
|
||||
import { ISeasonalEventConfig } from "../models/spt/config/ISeasonalEventConfig";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
export declare class GameEventHelper {
|
||||
@ -6,24 +6,4 @@ export declare class GameEventHelper {
|
||||
protected configServer: ConfigServer;
|
||||
protected seasonalEventConfig: ISeasonalEventConfig;
|
||||
constructor(databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||
get events(): Record<string, string>;
|
||||
get christmasEventItems(): string[];
|
||||
itemIsChristmasRelated(itemId: string): boolean;
|
||||
christmasEventEnabled(): boolean;
|
||||
/**
|
||||
* Get the dates each seasonal event starts and ends
|
||||
* @returns Record with event name + start/end date
|
||||
*/
|
||||
getEventDetails(): ISeasonalEvent[];
|
||||
/**
|
||||
* Is detection of seasonal events enabled (halloween / christmas)
|
||||
* @returns true if seasonal events should be checked for
|
||||
*/
|
||||
isAutomaticEventDetectionEnabled(): boolean;
|
||||
/**
|
||||
* Get a dictionary of gear changes to apply to bots for a specific event e.g. Christmas/Halloween
|
||||
* @param eventName Name of event to get gear changes for
|
||||
* @returns bots with equipment changes
|
||||
*/
|
||||
getEventBotGear(eventName: string): Record<string, Record<string, Record<string, number>>>;
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ export declare class LookupCollection {
|
||||
}
|
||||
export declare class HandbookHelper {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected lookupCacheGenerated: boolean;
|
||||
protected handbookPriceCache: LookupCollection;
|
||||
constructor(databaseServer: DatabaseServer);
|
||||
hydrateLookup(): void;
|
||||
@ -35,18 +36,18 @@ export declare class HandbookHelper {
|
||||
isCategory(category: string): boolean;
|
||||
childrenCategories(x: string): string[];
|
||||
/**
|
||||
* Convert currency into roubles
|
||||
* @param {number} value
|
||||
* @param {string} currencyFrom
|
||||
* @returns get rouble value of inputted currency
|
||||
*/
|
||||
inRUB(value: number, currencyFrom: string): number;
|
||||
/**
|
||||
* Gets Ruble to Currency conversion Value
|
||||
* @param {number} value
|
||||
* @param {string} currencyTo
|
||||
* @returns number
|
||||
* Convert non-roubles into roubles
|
||||
* @param nonRoubleCurrencyCount Currency count to convert
|
||||
* @param currencyTypeFrom What current currency is
|
||||
* @returns Count in roubles
|
||||
*/
|
||||
fromRUB(value: number, currencyTo: string): number;
|
||||
inRUB(nonRoubleCurrencyCount: number, currencyTypeFrom: string): number;
|
||||
/**
|
||||
* Convert roubles into another currency
|
||||
* @param roubleCurrencyCount roubles to convert
|
||||
* @param currencyTypeTo Currency to convert roubles into
|
||||
* @returns currency count in desired type
|
||||
*/
|
||||
fromRUB(roubleCurrencyCount: number, currencyTypeTo: string): number;
|
||||
}
|
||||
export {};
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { ISyncHealthRequestData } from "../models/eft/health/ISyncHealthRequestData";
|
||||
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { Effects, IAkiProfile } from "../models/eft/profile/IAkiProfile";
|
||||
import { IHealthConfig } from "../models/spt/config/IHealthConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
@ -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,28 +24,34 @@ 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): void;
|
||||
saveVitality(pmcData: IPmcData, request: ISyncHealthRequestData, sessionID: string, addEffects?: boolean, deleteExistingEffects?: boolean): void;
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
protected saveHealth(pmcData: IPmcData, sessionID: string): void;
|
||||
/**
|
||||
* Save effects to profile
|
||||
* Works by removing all effects and adding them back from profile
|
||||
* Remoces empty 'Effects' objects if found
|
||||
* Removes empty 'Effects' objects if found
|
||||
* @param pmcData Player profile
|
||||
* @param sessionID Session id
|
||||
* @param sessionId Session id
|
||||
* @param bodyPartsWithEffects dict of body parts with effects that should be added to profile
|
||||
* @param addEffects Should effects be added back to profile
|
||||
* @returns
|
||||
*/
|
||||
protected saveEffects(pmcData: IPmcData, sessionID: string, addEffects: boolean): void;
|
||||
protected saveEffects(pmcData: IPmcData, sessionId: string, bodyPartsWithEffects: Effects, deleteExistingEffects?: boolean): void;
|
||||
/**
|
||||
* Add effect to body part in profile
|
||||
* @param pmcData Player profile
|
||||
* @param effectBodyPart body part to edit
|
||||
* @param effectType Effect to add to body part
|
||||
* @param duration How long the effect has left in seconds (-1 by default, no duration).
|
||||
*/
|
||||
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string): void;
|
||||
protected addEffect(pmcData: IPmcData, effectBodyPart: string, effectType: string, duration?: number): void;
|
||||
protected isEmpty(map: any): boolean;
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Common, HideoutArea, Production, Productive } from "../models/eft/common/tables/IBotBase";
|
||||
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;
|
||||
@ -36,11 +35,13 @@ export declare class HideoutHelper {
|
||||
static waterCollector: string;
|
||||
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;
|
||||
@ -81,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
|
||||
@ -105,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
|
||||
*/
|
||||
@ -113,11 +134,53 @@ 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;
|
||||
protected getHideoutManagementSkill(pmcData: IPmcData): Common;
|
||||
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
||||
/**
|
||||
* Get the crafting skill details from player profile
|
||||
* @param pmcData Player profile
|
||||
* @returns crafting skill, null if not found
|
||||
*/
|
||||
protected getCraftingSkill(pmcData: IPmcData): Common;
|
||||
/**
|
||||
* Adjust craft time based on crafting skill level found in player profile
|
||||
* @param pmcData Player profile
|
||||
* @param productionTime Time to complete hideout craft in seconds
|
||||
* @returns Adjusted craft time in seconds
|
||||
*/
|
||||
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
|
||||
*/
|
||||
unlockHideoutWallInProfile(pmcProfile: IPmcData): void;
|
||||
/**
|
||||
* Hideout improvement is flagged as complete
|
||||
* @param improvement hideout improvement object
|
||||
* @returns true if complete
|
||||
*/
|
||||
protected hideoutImprovementIsComplete(improvement: IHideoutImprovement): boolean;
|
||||
/**
|
||||
* Iterate over hideout improvements not completed and check if they need to be adjusted
|
||||
* @param pmcProfile Profile to adjust
|
||||
*/
|
||||
setHideoutImprovementsToCompleted(pmcProfile: IPmcData): void;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import { ISaveProgressRequestData } from "../models/eft/inRaid/ISaveProgressRequ
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { ProfileFixerService } from "../services/ProfileFixerService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { InventoryHelper } from "./InventoryHelper";
|
||||
@ -16,8 +17,9 @@ export declare class InRaidHelper {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, profileFixerService: ProfileFixerService);
|
||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService);
|
||||
/**
|
||||
* Check an array of items and add an upd object to money items with a stack count of 1
|
||||
* Single stack money items have no upd object and thus no StackObjectsCount, causing issues
|
||||
@ -38,10 +40,16 @@ 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;
|
||||
/**
|
||||
* Take body part effects from client profile and apply to server profile
|
||||
* @param saveProgressRequest post-raid request
|
||||
* @param profileData player profile on server
|
||||
*/
|
||||
protected transferPostRaidLimbEffectsToProfile(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void;
|
||||
/**
|
||||
* Some maps have one-time-use keys (e.g. Labs
|
||||
* Remove the relevant key from an inventory based on the post-raid request data passed in
|
||||
@ -58,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
|
||||
*/
|
||||
|
@ -1,6 +1,7 @@
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Item } from "../models/eft/common/tables/IItem";
|
||||
import { IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||
import { AddItem, IAddItemRequestData } from "../models/eft/inventory/IAddItemRequestData";
|
||||
import { IAddItemTempObject } from "../models/eft/inventory/IAddItemTempObject";
|
||||
import { IInventoryMergeRequestData } from "../models/eft/inventory/IInventoryMergeRequestData";
|
||||
import { IInventoryMoveRequestData } from "../models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventorySplitRequestData } from "../models/eft/inventory/IInventorySplitRequestData";
|
||||
@ -43,7 +44,44 @@ export declare class InventoryHelper {
|
||||
protected configServer: ConfigServer;
|
||||
protected inventoryConfig: IInventoryConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
addItem(pmcData: IPmcData, body: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: any, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse;
|
||||
/**
|
||||
* BUG: Passing the same item multiple times with a count of 1 will cause multiples of that item to be added (e.g. x3 separate objects of tar cola with count of 1 = 9 tarcolas being added to inventory)
|
||||
* @param pmcData Profile to add items to
|
||||
* @param request request data to add items
|
||||
* @param output response to send back to client
|
||||
* @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 properties for items being added to inventory
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: {
|
||||
(): void;
|
||||
}, foundInRaid?: boolean, addUpd?: any): IItemEventRouterResponse;
|
||||
/**
|
||||
* Add ammo to ammo boxes
|
||||
* @param itemToAdd Item to check is ammo box
|
||||
* @param toDo
|
||||
* @param output IItemEventRouterResponse object
|
||||
* @param sessionID Session id
|
||||
* @param pmcData Profile to add ammobox to
|
||||
*/
|
||||
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, toDo: string[][], sessionID: string, output: IItemEventRouterResponse): void;
|
||||
/**
|
||||
*
|
||||
* @param assortItems Items to add to inventory
|
||||
* @param requestItem Details of purchased item to add to inventory
|
||||
* @param result Array split stacks are added to
|
||||
*/
|
||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||
/**
|
||||
* Remove item from player inventory
|
||||
* @param pmcData Profile to remove item from
|
||||
* @param itemId Items id to remove
|
||||
* @param sessionID Session id
|
||||
* @param output Existing IItemEventRouterResponse object to append data to, creates new one by default if not supplied
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): Record<number, number>;
|
||||
|
@ -5,12 +5,15 @@ import { IStaticAmmoDetails } from "../models/eft/common/tables/ILootBase";
|
||||
import { ITemplateItem } from "../models/eft/common/tables/ITemplateItem";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { ItemBaseClassService } from "../services/ItemBaseClassService";
|
||||
import { LocaleService } from "../services/LocaleService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { MathUtil } from "../utils/MathUtil";
|
||||
import { ObjectId } from "../utils/ObjectId";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { HandbookHelper } from "./HandbookHelper";
|
||||
declare class ItemHelper {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
@ -19,22 +22,32 @@ declare class ItemHelper {
|
||||
protected objectId: ObjectId;
|
||||
protected mathUtil: MathUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected itemBaseClassService: ItemBaseClassService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected localeService: LocaleService;
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, localeService: LocaleService);
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, localisationService: LocalisationService, localeService: LocaleService);
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||
* @param {string} tpl the template id / tpl
|
||||
* @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;
|
||||
/**
|
||||
* Check if the tpl / template Id provided is a descendent of the baseclass
|
||||
*
|
||||
* @param {string} tpl the item template id to check
|
||||
* @param {string} baseclassTpl the baseclass to check for
|
||||
* @param {string} baseClassTpl the baseclass to check for
|
||||
* @return {boolean} is the tpl a descendent?
|
||||
*/
|
||||
isOfBaseclass(tpl: string, baseclassTpl: string): boolean;
|
||||
isOfBaseclass(tpl: string, baseClassTpl: string): boolean;
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
isOfBaseclasses(tpl: string, baseClassTpls: string[]): boolean;
|
||||
/**
|
||||
* Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
||||
* found in the handbook. If the price can't be found at all return 0
|
||||
@ -152,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
|
||||
*/
|
||||
@ -179,7 +192,7 @@ declare class ItemHelper {
|
||||
*/
|
||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): any[];
|
||||
/**
|
||||
* 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
|
||||
@ -207,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;
|
||||
}
|
||||
|
@ -5,8 +5,10 @@ export declare class PresetHelper {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected lookup: Record<string, string[]>;
|
||||
protected defaultPresets: Record<string, Preset>;
|
||||
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
||||
hydratePresetStore(input: Record<string, string[]>): void;
|
||||
getDefaultPresets(): Record<string, Preset>;
|
||||
isPreset(id: string): boolean;
|
||||
hasPreset(templateId: string): boolean;
|
||||
getPreset(id: string): Preset;
|
||||
|
@ -5,7 +5,6 @@ import { IValidateNicknameRequestData } from "../models/eft/profile/IValidateNic
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { ProfileSnapshotService } from "../services/ProfileSnapshotService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
@ -20,9 +19,13 @@ export declare class ProfileHelper {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected profileSnapshotService: ProfileSnapshotService;
|
||||
protected fenceService: FenceService;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, fenceService: FenceService);
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService);
|
||||
resetProfileQuestCondition(sessionID: string, conditionId: string): void;
|
||||
/**
|
||||
* Get all profiles from server
|
||||
* @returns Dictionary of profiles
|
||||
*/
|
||||
getProfiles(): Record<string, IAkiProfile>;
|
||||
getCompleteProfile(sessionID: string): IPmcData[];
|
||||
/**
|
||||
* Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen
|
||||
@ -41,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;
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { Quest } from "../models/eft/common/tables/IBotBase";
|
||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "../models/eft/common/tables/IQuest";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IAcceptQuestRequestData } from "../models/eft/quests/IAcceptQuestRequestData";
|
||||
import { ICompleteQuestRequestData } from "../models/eft/quests/ICompleteQuestRequestData";
|
||||
import { IFailQuestRequestData } from "../models/eft/quests/IFailQuestRequestData";
|
||||
import { QuestStatus } from "../models/enums/QuestStatus";
|
||||
import { IQuestConfig } from "../models/spt/config/IQuestConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -10,6 +11,7 @@ import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { LocaleService } from "../services/LocaleService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
@ -32,15 +34,16 @@ export declare class QuestHelper {
|
||||
protected dialogueHelper: DialogueHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, configServer: ConfigServer);
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
@ -52,7 +55,7 @@ export declare class QuestHelper {
|
||||
doesPlayerLevelFulfilCondition(playerLevel: number, condition: AvailableForConditions): boolean;
|
||||
/**
|
||||
* Get the quests found in both arrays (inner join)
|
||||
* @param before Array of qeusts #1
|
||||
* @param before Array of quests #1
|
||||
* @param after Array of quests #2
|
||||
* @returns Reduction of cartesian product between two quest arrays
|
||||
*/
|
||||
@ -61,22 +64,21 @@ 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;
|
||||
getQuestLocale(questId: string): any;
|
||||
rewardSkillPoints(sessionID: string, pmcData: IPmcData, skillName: string, progressAmount: number): void;
|
||||
/**
|
||||
* Debug Routine for showing some information on the
|
||||
* quest list in question.
|
||||
* Get quest name by quest id
|
||||
* @param questId id to get
|
||||
* @returns
|
||||
*/
|
||||
dumpQuests(quests: any): void;
|
||||
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[];
|
||||
@ -88,12 +90,12 @@ export declare class QuestHelper {
|
||||
*/
|
||||
getQuestRewardItems(quest: IQuest, state: QuestStatus): Reward[];
|
||||
/**
|
||||
* Update player profile with quest status (e.g. Fail/Success)
|
||||
* @param pmcData profile to add quest to
|
||||
* @param newState state the new quest should be in when added
|
||||
* @param acceptedQuest Details of quest being added
|
||||
* Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile
|
||||
* @param pmcData Player profile
|
||||
* @param newState State the new quest should be in when returned
|
||||
* @param acceptedQuest Details of accepted quest from client
|
||||
*/
|
||||
addQuestToPMCData(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): void;
|
||||
getQuestReadyForProfile(pmcData: IPmcData, newState: QuestStatus, acceptedQuest: IAcceptQuestRequestData): Quest;
|
||||
/**
|
||||
* TODO: what is going on here
|
||||
* @param acceptedQuestId Quest to add to profile
|
||||
@ -109,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
|
||||
@ -125,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
|
||||
@ -145,45 +141,62 @@ export declare class QuestHelper {
|
||||
getQuestWithOnlyLevelRequirementStartCondition(quest: IQuest): IQuest;
|
||||
/**
|
||||
* Fail a quest in a player profile
|
||||
* @param pmcData Profile
|
||||
* @param failRequest fail quest request data
|
||||
* @param pmcData Player profile
|
||||
* @param failRequest Fail quest request data
|
||||
* @param sessionID Session id
|
||||
* @returns Item event router response
|
||||
*/
|
||||
failQuest(pmcData: IPmcData, failRequest: any, sessionID: string): IItemEventRouterResponse;
|
||||
failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get quest by id from database
|
||||
* @param questId questid to look for
|
||||
* @param pmcData player profile
|
||||
* 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
|
||||
* @param pmcData Player profile
|
||||
* @returns IQuest object
|
||||
*/
|
||||
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 tis status timers object
|
||||
* 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 questId id of the quest to alter the status of
|
||||
* @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;
|
||||
/**
|
||||
* Give player quest rewards - Skills/exp/trader standing/items/assort unlocks
|
||||
* Give player quest rewards - Skills/exp/trader standing/items/assort unlocks - Returns reward items player earned
|
||||
* @param pmcData Player profile
|
||||
* @param body complete quest request
|
||||
* @param state State of the quest now its complete
|
||||
* @param sessionID Seession id
|
||||
* @returns array of reward objects
|
||||
* @param questId questId of quest to get rewards for
|
||||
* @param state State of the quest to get rewards for
|
||||
* @param sessionId Session id
|
||||
* @param questResponse Response to send back to client
|
||||
* @returns Array of reward objects
|
||||
*/
|
||||
applyQuestReward(pmcData: IPmcData, body: ICompleteQuestRequestData, state: QuestStatus, sessionID: string): Reward[];
|
||||
applyQuestReward(pmcData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): Reward[];
|
||||
/**
|
||||
* Get the intel center bonus a player has
|
||||
* WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile
|
||||
* also update client response recipeUnlocked array with craft id
|
||||
* @param pmcData Player profile
|
||||
* @param craftUnlockReward Reward item from quest with craft unlock details
|
||||
* @param questDetails Quest with craft unlock reward
|
||||
* @param sessionID Session id
|
||||
* @param response Response to send back to client
|
||||
*/
|
||||
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: Reward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void;
|
||||
/**
|
||||
* Get players intel center bonus from profile
|
||||
* @param pmcData player profile
|
||||
* @returns bonus in percent
|
||||
* @returns bonus as a percent
|
||||
*/
|
||||
protected getIntelCenterRewardBonus(pmcData: IPmcData): number;
|
||||
/**
|
||||
@ -192,4 +205,10 @@ export declare class QuestHelper {
|
||||
* @returns 'FindItem' condition id
|
||||
*/
|
||||
getFindItemIdForQuestHandIn(itemTpl: string): string;
|
||||
/**
|
||||
* Add all quests to a profile with the provided statuses
|
||||
* @param pmcProfile profile to update
|
||||
* @param statuses statuses quests should have
|
||||
*/
|
||||
addAllQuestsToProfile(pmcProfile: IPmcData, statuses: QuestStatus[]): void;
|
||||
}
|
||||
|
@ -46,8 +46,14 @@ export declare class RagfairOfferHelper {
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
protected questConfig: IQuestConfig;
|
||||
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(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
||||
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
|
||||
@ -64,5 +70,5 @@ export declare class RagfairOfferHelper {
|
||||
protected getProfileOffers(sessionID: string): IRagfairOffer[];
|
||||
protected deleteOfferByOfferId(sessionID: string, offerId: string): void;
|
||||
protected completeOffer(sessionID: string, offer: IRagfairOffer, boughtAmount: number): IItemEventRouterResponse;
|
||||
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], assorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
||||
isDisplayableOffer(info: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
||||
}
|
||||
|
@ -11,12 +11,26 @@ export declare class RagfairSellHelper {
|
||||
protected configServer: ConfigServer;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||
calculateSellChance(baseChancePercent: number, offerPriceRub: number, playerListedPriceRub: number): number;
|
||||
/**
|
||||
* Get the percent chance to sell an item based on its average listed price vs player chosen listing price
|
||||
* @param baseChancePercent Base chance to sell item
|
||||
* @param averageOfferPriceRub Price of average offer in roubles
|
||||
* @param playerListedPriceRub Price player listed item for in roubles
|
||||
* @returns percent value
|
||||
*/
|
||||
calculateSellChance(baseChancePercent: number, averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
||||
/**
|
||||
* Get percent chance to sell an item when price is below items average listing price
|
||||
* @param playerListedPriceRub Price player listed item for in roubles
|
||||
* @param averageOfferPriceRub Price of average offer in roubles
|
||||
* @returns percent value
|
||||
*/
|
||||
protected getSellMultiplierWhenPlayerPriceIsBelowAverageListingPrice(averageOfferPriceRub: number, playerListedPriceRub: number): number;
|
||||
/**
|
||||
* 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[];
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ export declare class RagfairServerHelper {
|
||||
protected isItemBlacklisted(itemTemplateId: string): boolean;
|
||||
isTrader(userID: string): boolean;
|
||||
isPlayer(userID: string): boolean;
|
||||
returnItems(sessionID: string, items: any[]): void;
|
||||
returnItems(sessionID: string, items: Item[]): void;
|
||||
calculateDynamicStackCount(tplId: string, isWeaponPreset: boolean): number;
|
||||
/**
|
||||
* Choose a currency at random with bias
|
||||
|
@ -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
|
||||
|
@ -15,7 +15,7 @@ export declare class RepairHelper {
|
||||
protected repairConfig: IRepairConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer);
|
||||
/**
|
||||
*
|
||||
* Alter an items durability after a repair by trader/repair kit
|
||||
* @param itemToRepair item to update durability details
|
||||
* @param itemToRepairDetails db details of item to repair
|
||||
* @param isArmor Is item being repaired a piece of armor
|
||||
@ -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;
|
||||
}
|
||||
|
@ -6,8 +6,10 @@ import { Item, Upd } from "../models/eft/common/tables/IItem";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IProcessBuyTradeRequestData } from "../models/eft/trade/IProcessBuyTradeRequestData";
|
||||
import { IProcessSellTradeRequestData } from "../models/eft/trade/IProcessSellTradeRequestData";
|
||||
import { ITraderConfig } from "../models/spt/config/ITraderConfig";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { EventOutputHolder } from "../routers/EventOutputHolder";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { RagfairServer } from "../servers/RagfairServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { PaymentService } from "../services/PaymentService";
|
||||
@ -20,28 +22,30 @@ export declare class TradeHelper {
|
||||
protected fenceService: FenceService;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected ragfairServer: RagfairServer;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer);
|
||||
protected configServer: ConfigServer;
|
||||
protected traderConfig: ITraderConfig;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
|
||||
/**
|
||||
* Buy item from flea or trader
|
||||
* @param pmcData
|
||||
* @param pmcData Player profile
|
||||
* @param buyRequestData data from client
|
||||
* @param sessionID
|
||||
* @param foundInRaid
|
||||
* @param sessionID Session id
|
||||
* @param foundInRaid Should item be found in raid
|
||||
* @param upd optional item details used when buying from flea
|
||||
* @returns
|
||||
*/
|
||||
buyItem(pmcData: IPmcData, buyRequestData: IProcessBuyTradeRequestData, sessionID: string, foundInRaid: boolean, upd: Upd): IItemEventRouterResponse;
|
||||
/**
|
||||
* Sell item to trader
|
||||
* @param pmcData
|
||||
* @param body
|
||||
* @param sessionID
|
||||
* @returns
|
||||
* @param pmcData Profile to update
|
||||
* @param sellRequest request data
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
sellItem(pmcData: IPmcData, body: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
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
|
||||
*/
|
||||
|
@ -7,7 +7,9 @@ import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "../servers/ConfigServer";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { LocalisationService } from "../services/LocalisationService";
|
||||
import { TraderAssortService } from "../services/TraderAssortService";
|
||||
import { TraderPurchasePersisterService } from "../services/TraderPurchasePersisterService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { MathUtil } from "../utils/MathUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
@ -27,11 +29,15 @@ export declare class TraderAssortHelper {
|
||||
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
||||
protected ragfairOfferGenerator: RagfairOfferGenerator;
|
||||
protected traderAssortService: TraderAssortService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected traderPurchasePersisterService: TraderPurchasePersisterService;
|
||||
protected traderHelper: TraderHelper;
|
||||
protected fenceService: FenceService;
|
||||
protected configServer: ConfigServer;
|
||||
protected traderConfig: ITraderConfig;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer);
|
||||
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
|
||||
* Can be used for returning ragfair / fence assorts
|
||||
@ -41,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
|
||||
@ -57,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
|
||||
|
@ -8,6 +8,7 @@ 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 { TimeUtil } from "../utils/TimeUtil";
|
||||
import { HandbookHelper } from "./HandbookHelper";
|
||||
@ -23,11 +24,14 @@ export declare class TraderHelper {
|
||||
protected itemHelper: ItemHelper;
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected playerService: PlayerService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected fenceService: FenceService;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected configServer: ConfigServer;
|
||||
protected traderConfig: ITraderConfig;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, saveServer: SaveServer, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemHelper: ItemHelper, handbookHelper: HandbookHelper, playerService: PlayerService, fenceService: FenceService, timeUtil: TimeUtil, configServer: ConfigServer);
|
||||
/** 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;
|
||||
/**
|
||||
@ -39,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
|
||||
@ -53,22 +57,29 @@ export declare class TraderHelper {
|
||||
getPurchasesData(traderID: string, sessionID: string): Record<string, IBarterScheme[][]>;
|
||||
/**
|
||||
* Should item be skipped when selling to trader according to its sell categories and other checks
|
||||
* @param pmcData
|
||||
* @param item
|
||||
* @param sellCategory
|
||||
* @param pmcData Profile
|
||||
* @param item Item to be checked is sellable to trader
|
||||
* @param sellCategory categories trader will buy
|
||||
* @param traderId Trader item is being checked can be sold to
|
||||
* @returns true if should NOT be sold to trader
|
||||
*/
|
||||
protected isItemUnSellableToTrader(pmcData: IPmcData, item: Item, sellCategory: string[]): boolean;
|
||||
protected isItemUnSellableToTrader(pmcData: IPmcData, item: Item, sellCategory: string[], traderId: string): boolean;
|
||||
/**
|
||||
* Can this weapon be sold to a trader with its current durabiltiy level
|
||||
* @param traderID
|
||||
* @param item
|
||||
* @returns boolean
|
||||
* Check if item has durability so low it precludes it from being sold to the trader (inclusive)
|
||||
* @param item Item to check durability of
|
||||
* @param traderId Trader item is sold to
|
||||
* @returns
|
||||
*/
|
||||
protected isWeaponBelowTraderBuyDurability(traderID: string, item: Item): boolean;
|
||||
protected itemIsBelowSellableDurabilityThreshhold(item: Item, traderId: string): boolean;
|
||||
/**
|
||||
* Get the price of an item and all of its attached children
|
||||
* Take into account bonuses/adjsutments e.g. discounts
|
||||
* Get the percentage threshold value a trader will buy armor/weapons above
|
||||
* @param traderId Trader to look up
|
||||
* @returns percentage
|
||||
*/
|
||||
protected getTraderDurabiltyPurchaseThreshold(traderId: string): number;
|
||||
/**
|
||||
* Get the price of passed in item and all of its attached children (mods)
|
||||
* Take into account bonuses/adjustments e.g. discounts
|
||||
* @param pmcData profile data
|
||||
* @param item item to calculate price of
|
||||
* @param buyPriceCoefficient
|
||||
@ -85,14 +96,21 @@ export declare class TraderHelper {
|
||||
* @returns price as number
|
||||
*/
|
||||
protected getRawItemPrice(pmcData: IPmcData, item: Item): number;
|
||||
protected getTraderDiscount(trader: ITraderBase, buyPriceCoefficient: number, fenceInfo: FenceLevel, traderID: string): number;
|
||||
/**
|
||||
* Get discount modifier for desired trader
|
||||
* @param trader Trader to get discount for
|
||||
* @param buyPriceCoefficient
|
||||
* @param fenceInfo fence info, needed if getting fence modifier value
|
||||
* @returns discount modifier value
|
||||
*/
|
||||
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
|
||||
@ -113,10 +131,28 @@ export declare class TraderHelper {
|
||||
getTraderUpdateSeconds(traderId: string): number;
|
||||
/**
|
||||
* check if an item is allowed to be sold to a trader
|
||||
* @param traderFilters array of allowed categories
|
||||
* @param categoriesTraderBuys array of allowed categories
|
||||
* @param tplToCheck itemTpl of inventory
|
||||
* @returns boolean
|
||||
* @returns boolean if item can be sold to trader
|
||||
*/
|
||||
traderFilter(traderFilters: string[], tplToCheck: string): boolean;
|
||||
doesTraderBuyItem(categoriesTraderBuys: string[], tplToCheck: string): boolean;
|
||||
getLoyaltyLevel(traderID: string, pmcData: IPmcData): LoyaltyLevel;
|
||||
/**
|
||||
* Store the purchase of an assort from a trader in the player profile
|
||||
* @param sessionID Session id
|
||||
* @param newPurchaseDetails New item assort id + count
|
||||
*/
|
||||
addTraderPurchasesToPlayerProfile(sessionID: string, newPurchaseDetails: {
|
||||
items: {
|
||||
item_id: string;
|
||||
count: number;
|
||||
}[];
|
||||
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
Faupi-HideoutArchitect/server/types/loaders/ModTypeCheck.d.ts
vendored
Normal file
43
Faupi-HideoutArchitect/server/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);
|
||||
onLoad(): void;
|
||||
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,21 +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 imported: Record<string, ModLoader.IMod>;
|
||||
protected readonly modOrderPath = "user/mods/order.json";
|
||||
protected order: Record<string, number>;
|
||||
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, 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
|
||||
@ -60,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;
|
||||
@ -94,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;
|
||||
}
|
||||
|
@ -29,6 +29,9 @@ export interface Config {
|
||||
GlobalLootChanceModifier: number;
|
||||
TimeBeforeDeploy: number;
|
||||
TimeBeforeDeployLocal: number;
|
||||
TradingSetting: number;
|
||||
TradingSettings: ITradingSettings;
|
||||
ItemsCommonSettings: IItemsCommonSettings;
|
||||
LoadTimeSpeedProgress: number;
|
||||
BaseLoadTime: number;
|
||||
BaseUnloadTime: number;
|
||||
@ -36,6 +39,7 @@ export interface Config {
|
||||
Customization: Customization;
|
||||
UncheckOnShot: boolean;
|
||||
BotsEnabled: boolean;
|
||||
BufferZone: IBufferZone;
|
||||
ArmorMaterials: ArmorMaterials;
|
||||
LegsOverdamage: number;
|
||||
HandsOverdamage: number;
|
||||
@ -55,7 +59,6 @@ export interface Config {
|
||||
StaminaRestoration: StaminaRestoration;
|
||||
StaminaDrain: StaminaDrain;
|
||||
RequirementReferences: RequirementReferences;
|
||||
RepairKitSettings: RepairKitSettings;
|
||||
RestrictionsInRaid: RestrictionsInRaid[];
|
||||
SkillMinEffectiveness: number;
|
||||
SkillFatiguePerPoint: number;
|
||||
@ -82,6 +85,23 @@ 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;
|
||||
}
|
||||
export interface IBuyoutRestrictions {
|
||||
MinDurability: number;
|
||||
MinFoodDrinkResource: number;
|
||||
MinMedsResource: number;
|
||||
}
|
||||
export interface Content {
|
||||
ip: string;
|
||||
@ -321,6 +341,8 @@ export interface Effects {
|
||||
Pain: Pain;
|
||||
PainKiller: PainKiller;
|
||||
SandingScreen: SandingScreen;
|
||||
MildMusclePain: IMusclePainEffect;
|
||||
SevereMusclePain: IMusclePainEffect;
|
||||
Stimulator: Stimulator;
|
||||
Tremor: Tremor;
|
||||
ChronicStaminaFatigue: ChronicStaminaFatigue;
|
||||
@ -457,6 +479,12 @@ export interface PainKiller {
|
||||
export interface SandingScreen {
|
||||
Dummy: number;
|
||||
}
|
||||
export interface IMusclePainEffect {
|
||||
GymEffectivity: number;
|
||||
OfflineDurationMax: number;
|
||||
OfflineDurationMin: number;
|
||||
TraumaChance: number;
|
||||
}
|
||||
export interface Stimulator {
|
||||
BuffLoopTime: number;
|
||||
Buffs: Buffs;
|
||||
@ -803,7 +831,7 @@ export interface SkillsSettings {
|
||||
HMG: any[];
|
||||
Launcher: any[];
|
||||
AttachedLauncher: any[];
|
||||
Melee: any[];
|
||||
Melee: IMeleeSkill;
|
||||
DMR: WeaponSkills;
|
||||
BearAssaultoperations: any[];
|
||||
BearAuthority: any[];
|
||||
@ -847,10 +875,25 @@ export interface SkillsSettings {
|
||||
BotSound: any[];
|
||||
TroubleShooting: TroubleShooting;
|
||||
}
|
||||
export interface IMeleeSkill {
|
||||
BuffSettings: IBuffSettings;
|
||||
}
|
||||
export interface ArmorSkills {
|
||||
BuffMaxCount: number;
|
||||
BuffSettings: IBuffSettings;
|
||||
Counters: IArmorCounters;
|
||||
MoveSpeedPenaltyReductionHVestsReducePerLevel: number;
|
||||
RicochetChanceHVestsCurrentDurabilityThreshold: number;
|
||||
RicochetChanceHVestsEliteLevel: number;
|
||||
RicochetChanceHVestsMaxDurabilityThreshold: number;
|
||||
MeleeDamageLVestsReducePerLevel: number;
|
||||
MoveSpeedPenaltyReductionLVestsReducePerLevel: number;
|
||||
WearAmountRepairLVestsReducePerLevel: number;
|
||||
WearChanceRepairLVestsReduceEliteLevel: number;
|
||||
}
|
||||
export interface IArmorCounters {
|
||||
armorDurability: ISkillCounter;
|
||||
}
|
||||
export interface HideoutManagement {
|
||||
SkillPointsPerAreaUpgrade: number;
|
||||
SkillPointsPerCraft: number;
|
||||
@ -907,6 +950,7 @@ export interface Endurance {
|
||||
MovementAction: number;
|
||||
SprintAction: number;
|
||||
GainPerFatigueStack: number;
|
||||
QTELevelMultipliers: Record<string, Record<string, number>>;
|
||||
}
|
||||
export interface Strength {
|
||||
SprintActionMin: number;
|
||||
@ -915,9 +959,14 @@ export interface Strength {
|
||||
MovementActionMax: number;
|
||||
PushUpMin: number;
|
||||
PushUpMax: number;
|
||||
QTELevelMultipliers: IQTELevelMultiplier[];
|
||||
FistfightAction: number;
|
||||
ThrowAction: number;
|
||||
}
|
||||
export interface IQTELevelMultiplier {
|
||||
Level: number;
|
||||
Multiplier: number;
|
||||
}
|
||||
export interface Vitality {
|
||||
DamageTakenAction: number;
|
||||
HealthNegativeEffect: number;
|
||||
@ -950,22 +999,42 @@ export interface Search {
|
||||
FindAction: number;
|
||||
}
|
||||
export interface WeaponTreatment {
|
||||
BuffMaxCount: number;
|
||||
BuffSettings: IBuffSettings;
|
||||
Counters: IWeaponTreatmentCounters;
|
||||
DurLossReducePerLevel: number;
|
||||
SkillPointsPerRepair: number;
|
||||
Filter: any[];
|
||||
WearAmountRepairGunsReducePerLevel: number;
|
||||
WearChanceRepairGunsReduceEliteLevel: number;
|
||||
}
|
||||
export interface IWeaponTreatmentCounters {
|
||||
firearmsDurability: ISkillCounter;
|
||||
}
|
||||
export interface IBuffSettings {
|
||||
CommonBuffChanceLevelBonus: number;
|
||||
CommonBuffMinChanceValue: number;
|
||||
CurrentDurabilityLossToRemoveBuff?: number;
|
||||
MaxDurabilityLossToRemoveBuff?: number;
|
||||
RareBuffChanceCoff: number;
|
||||
ReceivedDurabilityMaxPercent: number;
|
||||
}
|
||||
export interface MagDrills {
|
||||
RaidLoadedAmmoAction: number;
|
||||
RaidUnloadedAmmoAction: number;
|
||||
MagazineCheckAction: number;
|
||||
}
|
||||
export interface Perception {
|
||||
DependentSkillRatios: ISkillRatio[];
|
||||
OnlineAction: number;
|
||||
UniqueLoot: number;
|
||||
}
|
||||
export interface ISkillRatio {
|
||||
Ratio: number;
|
||||
SkillId: string;
|
||||
}
|
||||
export interface Intellect {
|
||||
Counters: IIntellectCounters;
|
||||
ExamineAction: number;
|
||||
SkillProgress: number;
|
||||
RepairAction: number;
|
||||
@ -973,16 +1042,52 @@ export interface Intellect {
|
||||
WearChanceReduceEliteLevel: number;
|
||||
RepairPointsCostReduction: number;
|
||||
}
|
||||
export interface IIntellectCounters {
|
||||
armorDurability: ISkillCounter;
|
||||
firearmsDurability: ISkillCounter;
|
||||
meleeWeaponDurability: ISkillCounter;
|
||||
}
|
||||
export interface ISkillCounter {
|
||||
divisor: number;
|
||||
points: number;
|
||||
}
|
||||
export interface Attention {
|
||||
DependentSkillRatios: ISkillRatio[];
|
||||
ExamineWithInstruction: number;
|
||||
FindActionFalse: number;
|
||||
FindActionTrue: number;
|
||||
}
|
||||
export interface Charisma {
|
||||
BonusSettings: IBonusSettings;
|
||||
Counters: ICharismaSkillCounters;
|
||||
SkillProgressInt: number;
|
||||
SkillProgressAtn: number;
|
||||
SkillProgressPer: number;
|
||||
}
|
||||
export interface ICharismaSkillCounters {
|
||||
insuranceCost: ISkillCounter;
|
||||
repairCost: ISkillCounter;
|
||||
repeatableQuestCompleteCount: ISkillCounter;
|
||||
restoredHealthCost: ISkillCounter;
|
||||
scavCaseCost: ISkillCounter;
|
||||
}
|
||||
export interface IBonusSettings {
|
||||
EliteBonusSettings: IEliteBonusSettings;
|
||||
LevelBonusSettings: ILevelBonusSettings;
|
||||
}
|
||||
export interface IEliteBonusSettings {
|
||||
FenceStandingLossDiscount: number;
|
||||
RepeatableQuestExtraCount: number;
|
||||
ScavCaseDiscount: number;
|
||||
}
|
||||
export interface ILevelBonusSettings {
|
||||
HealthRestoreDiscount: number;
|
||||
HealthRestoreTraderDiscount: number;
|
||||
InsuranceDiscount: number;
|
||||
InsuranceTraderDiscount: number;
|
||||
PaidExitDiscount: number;
|
||||
RepeatableQuestChangeDiscount: number;
|
||||
}
|
||||
export interface Memory {
|
||||
AnySkillUp: number;
|
||||
SkillProgress: number;
|
||||
@ -1145,11 +1250,30 @@ export interface xyz {
|
||||
export interface Ballistic {
|
||||
GlobalDamageDegradationCoefficient: number;
|
||||
}
|
||||
export interface RepairKitSettings {
|
||||
export interface RepairSettings {
|
||||
ItemEnhancementSettings: IItemEnhancementSettings;
|
||||
MinimumLevelToApplyBuff: number;
|
||||
RepairStrategies: IRepairStrategies;
|
||||
armorClassDivisor: number;
|
||||
durabilityPointCostArmor: number;
|
||||
durabilityPointCostGuns: number;
|
||||
}
|
||||
export interface IItemEnhancementSettings {
|
||||
DamageReduction: IPriceModifier;
|
||||
MalfunctionProtections: IPriceModifier;
|
||||
WeaponSpread: IPriceModifier;
|
||||
}
|
||||
export interface IPriceModifier {
|
||||
PriceModifier: number;
|
||||
}
|
||||
export interface IRepairStrategies {
|
||||
Armor: IRepairStrategy;
|
||||
Firearms: IRepairStrategy;
|
||||
}
|
||||
export interface IRepairStrategy {
|
||||
BuffTypes: string[];
|
||||
Filter: string[];
|
||||
}
|
||||
export interface BotPreset {
|
||||
UseThis: boolean;
|
||||
Role: string;
|
||||
|
@ -118,6 +118,7 @@ export interface BossLocationSpawn {
|
||||
TriggerName: string;
|
||||
Delay?: number;
|
||||
Supports?: BossSupport[];
|
||||
sptId?: string;
|
||||
}
|
||||
export interface BossSupport {
|
||||
BossEscortAmount: string;
|
||||
@ -179,6 +180,7 @@ export interface Exit {
|
||||
EntryPoints: string;
|
||||
ExfiltrationTime: number;
|
||||
ExfiltrationType: string;
|
||||
RequiredSlot?: string;
|
||||
Id: string;
|
||||
MaxTime: number;
|
||||
MinTime: number;
|
||||
@ -202,6 +204,7 @@ export interface Wave {
|
||||
slots_min: number;
|
||||
time_max: number;
|
||||
time_min: number;
|
||||
sptId?: string;
|
||||
}
|
||||
export declare enum WildSpawnType {
|
||||
ASSAULT = "assault",
|
||||
|
@ -21,6 +21,7 @@ export interface IBotBase {
|
||||
Hideout: Hideout;
|
||||
Quests: Quest[];
|
||||
TradersInfo: Record<string, TraderInfo>;
|
||||
UnlockedInfo: IUnlockedInfo;
|
||||
RagfairInfo: RagfairInfo;
|
||||
RepeatableQuests: IPmcDataRepeatableQuest[];
|
||||
Bonuses: Bonus[];
|
||||
@ -31,6 +32,9 @@ export interface IBotBase {
|
||||
/** SPT specific property used during bot generation in raid */
|
||||
sptIsPmc?: boolean;
|
||||
}
|
||||
export interface IUnlockedInfo {
|
||||
unlockedProductionRecipe: string[];
|
||||
}
|
||||
export interface Info {
|
||||
EntryPoint: string;
|
||||
Nickname: string;
|
||||
@ -100,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;
|
||||
@ -120,7 +127,6 @@ export interface FastPanel {
|
||||
export interface Skills {
|
||||
Common: Common[];
|
||||
Mastering: Mastering[];
|
||||
Bonuses?: any[];
|
||||
Points: number;
|
||||
}
|
||||
export interface Common {
|
||||
@ -265,12 +271,24 @@ export interface InsuredItem {
|
||||
export interface Hideout {
|
||||
Production: Record<string, Productive>;
|
||||
Areas: HideoutArea[];
|
||||
Improvements: Record<string, IHideoutImprovement>;
|
||||
sptUpdateLastRunTimestamp: number;
|
||||
}
|
||||
export interface IHideoutImprovement {
|
||||
completed: boolean;
|
||||
improveCompleteTimestamp: number;
|
||||
}
|
||||
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;
|
||||
@ -327,10 +345,12 @@ export interface Quest {
|
||||
statusTimers?: Record<string, number>;
|
||||
/** SPT specific property */
|
||||
completedConditions?: string[];
|
||||
availableAfter?: number;
|
||||
}
|
||||
export interface TraderInfo {
|
||||
loyaltyLevel: number;
|
||||
salesSum: number;
|
||||
disabled: boolean;
|
||||
standing: number;
|
||||
nextResupply: number;
|
||||
unlocked: boolean;
|
||||
|
@ -57,6 +57,10 @@ export interface ModsChances {
|
||||
mod_pistol_grip: number;
|
||||
mod_reciever: number;
|
||||
mod_scope: number;
|
||||
mod_scope_000: number;
|
||||
mod_scope_001: number;
|
||||
mod_scope_002: number;
|
||||
mod_scope_003: number;
|
||||
mod_sight_front: number;
|
||||
mod_sight_rear: number;
|
||||
mod_stock: number;
|
||||
@ -152,4 +156,4 @@ export interface Items {
|
||||
SpecialLoot: string[];
|
||||
TacticalVest: string[];
|
||||
}
|
||||
export declare type Mods = Record<string, Record<string, string[]>>;
|
||||
export type Mods = Record<string, Record<string, string[]>>;
|
||||
|
@ -7,6 +7,7 @@ export interface Item {
|
||||
upd?: Upd;
|
||||
}
|
||||
export interface Upd {
|
||||
Buff?: Buff;
|
||||
OriginalStackObjectsCount?: number;
|
||||
Togglable?: Togglable;
|
||||
Map?: Map;
|
||||
@ -16,6 +17,7 @@ export interface Upd {
|
||||
StackObjectsCount?: number;
|
||||
UnlimitedCount?: boolean;
|
||||
Repairable?: Repairable;
|
||||
RecodableComponent?: RecodableComponent;
|
||||
FireMode?: FireMode;
|
||||
SpawnedInSession?: boolean;
|
||||
Light?: Light;
|
||||
@ -31,6 +33,12 @@ export interface Upd {
|
||||
SideEffect?: SideEffect;
|
||||
RepairKit?: RepairKit;
|
||||
}
|
||||
export interface Buff {
|
||||
rarity: string;
|
||||
buffType: string;
|
||||
value: number;
|
||||
thresholdDurability?: number;
|
||||
}
|
||||
export interface Togglable {
|
||||
On: boolean;
|
||||
}
|
||||
@ -52,6 +60,9 @@ export interface Repairable {
|
||||
Durability: number;
|
||||
MaxDurability: number;
|
||||
}
|
||||
export interface RecodableComponent {
|
||||
IsEncoded: boolean;
|
||||
}
|
||||
export interface MedKit {
|
||||
HpResource: number;
|
||||
}
|
||||
@ -98,7 +109,8 @@ export interface Location {
|
||||
y: number;
|
||||
r: string | number;
|
||||
isSearched?: boolean;
|
||||
rotation?: string;
|
||||
/** SPT property? */
|
||||
rotation?: string | boolean;
|
||||
}
|
||||
export interface SideEffect {
|
||||
Value: number;
|
||||
|
@ -19,6 +19,8 @@ export interface TemplateSide {
|
||||
}
|
||||
export interface ProfileTraderTemplate {
|
||||
initialLoyaltyLevel: number;
|
||||
setQuestsAvailableForStart?: boolean;
|
||||
setQuestsAvailableForFinish?: boolean;
|
||||
initialStanding: number;
|
||||
initialSalesSum: number;
|
||||
jaegerUnlocked: boolean;
|
||||
|
@ -2,7 +2,7 @@ import { QuestRewardType } from "../../../enums/QuestRewardType";
|
||||
import { QuestStatus } from "../../../enums/QuestStatus";
|
||||
import { Item } from "./IItem";
|
||||
export interface IQuest {
|
||||
QuestName: string;
|
||||
QuestName?: string;
|
||||
_id: string;
|
||||
canShowNotificationsInGame: boolean;
|
||||
conditions: Conditions;
|
||||
@ -15,6 +15,7 @@ export interface IQuest {
|
||||
image: string;
|
||||
type: string;
|
||||
isKey: boolean;
|
||||
questStatus: any;
|
||||
restartable: boolean;
|
||||
instantComplete: boolean;
|
||||
secretQuest: boolean;
|
||||
@ -22,7 +23,7 @@ export interface IQuest {
|
||||
successMessageText: string;
|
||||
templateId: string;
|
||||
rewards: Rewards;
|
||||
status: string;
|
||||
status: string | number;
|
||||
KeyQuest: boolean;
|
||||
changeQuestMessageText: string;
|
||||
side: string;
|
||||
@ -37,18 +38,21 @@ export interface Conditions {
|
||||
export interface AvailableForConditions {
|
||||
_parent: string;
|
||||
_props: AvailableForProps;
|
||||
dynamicLocale: boolean;
|
||||
dynamicLocale?: boolean;
|
||||
}
|
||||
export interface AvailableForProps {
|
||||
id: string;
|
||||
index: number;
|
||||
parentId: string;
|
||||
isEncoded: boolean;
|
||||
dynamicLocale: boolean;
|
||||
value?: number;
|
||||
compareMethod?: string;
|
||||
visibilityConditions?: VisibilityCondition[];
|
||||
target?: string | string[];
|
||||
status?: QuestStatus[];
|
||||
availableAfter?: number;
|
||||
dispersion?: number;
|
||||
onlyFoundInRaid?: boolean;
|
||||
oneSessionOnly?: boolean;
|
||||
doNotResetIfCounterCompleted?: boolean;
|
||||
|
@ -25,7 +25,7 @@ export interface IPmcDataRepeatableQuest {
|
||||
endTime: number;
|
||||
changeRequirement: TChangeRequirementRecord;
|
||||
}
|
||||
export declare type TChangeRequirementRecord = Record<string, IChangeRequirement>;
|
||||
export type TChangeRequirementRecord = Record<string, IChangeRequirement>;
|
||||
export interface IChangeRequirement {
|
||||
changeCost: IChangeCost[];
|
||||
changeStandingCost: number;
|
||||
@ -47,6 +47,7 @@ export interface IRepeatableQuest {
|
||||
canShowNotificationsInGame: boolean;
|
||||
rewards: IRewards;
|
||||
conditions: IConditions;
|
||||
side: string;
|
||||
name: string;
|
||||
note: string;
|
||||
description: string;
|
||||
|
@ -29,8 +29,11 @@ export interface Props {
|
||||
IsUnsaleable?: boolean;
|
||||
IsUnbuyable?: boolean;
|
||||
IsUngivable?: boolean;
|
||||
IsUnremovable?: boolean;
|
||||
IsLockedafterEquip?: boolean;
|
||||
IsSpecialSlotOnly?: boolean;
|
||||
QuestItem?: boolean;
|
||||
QuestStashMaxCount?: number;
|
||||
LootExperience?: number;
|
||||
ExamineExperience?: number;
|
||||
HideEntrails?: boolean;
|
||||
@ -156,11 +159,12 @@ export interface Props {
|
||||
RigLayoutName?: string;
|
||||
MaxDurability?: number;
|
||||
armorZone?: string[];
|
||||
armorClass?: any;
|
||||
armorClass?: string | number;
|
||||
mousePenalty?: number;
|
||||
weaponErgonomicPenalty?: number;
|
||||
BluntThroughput?: number;
|
||||
ArmorMaterial?: string;
|
||||
ArmorType?: string;
|
||||
weapClass?: string;
|
||||
weapUseType?: string;
|
||||
ammoCaliber?: string;
|
||||
@ -365,6 +369,8 @@ export interface Props {
|
||||
CanBeHiddenDuringThrow?: boolean;
|
||||
MinTimeToContactExplode?: number;
|
||||
ExplosionEffectType?: string;
|
||||
LinkedWeapon?: string;
|
||||
UseAmmoWithoutShell?: boolean;
|
||||
}
|
||||
export interface IHealthEffect {
|
||||
type: string;
|
||||
|
@ -9,6 +9,7 @@ export interface ITrader {
|
||||
export interface ITraderBase {
|
||||
refreshTraderRagfairOffers: boolean;
|
||||
_id: string;
|
||||
availableInRaid: boolean;
|
||||
avatar: string;
|
||||
balance_dol: number;
|
||||
balance_eur: number;
|
||||
@ -20,6 +21,8 @@ export interface ITraderBase {
|
||||
discount_end: number;
|
||||
gridHeight: number;
|
||||
insurance: Insurance;
|
||||
items_buy: IItemBuyData;
|
||||
items_buy_prohibited: IItemBuyData;
|
||||
location: string;
|
||||
loyaltyLevels: LoyaltyLevel[];
|
||||
medic: boolean;
|
||||
@ -31,6 +34,10 @@ export interface ITraderBase {
|
||||
surname: string;
|
||||
unlockedByDefault: boolean;
|
||||
}
|
||||
export interface IItemBuyData {
|
||||
category: string[];
|
||||
id_list: string[];
|
||||
}
|
||||
export interface Insurance {
|
||||
availability: boolean;
|
||||
excluded_category: string[];
|
||||
@ -54,8 +61,9 @@ export interface Repair {
|
||||
currency: string;
|
||||
currency_coefficient: number;
|
||||
excluded_category: string[];
|
||||
/** Doesn't exist in client object */
|
||||
excluded_id_list: any[];
|
||||
quality: string;
|
||||
quality: number;
|
||||
}
|
||||
export interface ITraderAssort {
|
||||
nextResupply: number;
|
||||
|
16
Faupi-HideoutArchitect/server/types/models/eft/dialog/IChatServer.d.ts
vendored
Normal file
16
Faupi-HideoutArchitect/server/types/models/eft/dialog/IChatServer.d.ts
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
export interface IChatServer {
|
||||
_id: string;
|
||||
RegistrationId: number;
|
||||
VersionId: string;
|
||||
Ip: string;
|
||||
Port: number;
|
||||
DateTime: number;
|
||||
Chats: IChat[];
|
||||
Regions: string[];
|
||||
/** Possibly removed */
|
||||
IsDeveloper?: boolean;
|
||||
}
|
||||
export interface IChat {
|
||||
_id: string;
|
||||
Members: number;
|
||||
}
|
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