parent
abbd1e9649
commit
36f643f3a6
@ -1,4 +1,4 @@
|
|||||||
# Mod examples for v3.7.6
|
# Mod examples for v3.8.0
|
||||||
|
|
||||||
A collection of example mods that perform typical actions in SPT
|
A collection of example mods that perform typical actions in SPT
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"main": "src/mod.js",
|
"main": "src/mod.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "Chomp",
|
"author": "Chomp",
|
||||||
"akiVersion": "~3.7",
|
"akiVersion": "~3.8",
|
||||||
"loadBefore": [],
|
"loadBefore": [],
|
||||||
"loadAfter": [],
|
"loadAfter": [],
|
||||||
"incompatibilities": [],
|
"incompatibilities": [],
|
||||||
@ -15,16 +15,16 @@
|
|||||||
"buildinfo": "node ./build.mjs --verbose"
|
"buildinfo": "node ./build.mjs --verbose"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "18.18.4",
|
"@types/node": "20.11",
|
||||||
"@typescript-eslint/eslint-plugin": "6.7.5",
|
"@typescript-eslint/eslint-plugin": "7.2",
|
||||||
"@typescript-eslint/parser": "6.7.5",
|
"@typescript-eslint/parser": "7.2",
|
||||||
"archiver": "^6.0",
|
"archiver": "^6.0",
|
||||||
"eslint": "8.51.0",
|
"eslint": "8.57",
|
||||||
"fs-extra": "^11.1",
|
"fs-extra": "11.2",
|
||||||
"ignore": "^5.2",
|
"ignore": "^5.2",
|
||||||
"os": "^0.1",
|
"os": "^0.1",
|
||||||
"tsyringe": "4.8.0",
|
"tsyringe": "4.8.0",
|
||||||
"typescript": "5.2.2",
|
"typescript": "5.4",
|
||||||
"winston": "3.11.0"
|
"winston": "3.12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,5 +2,5 @@ export declare class ErrorHandler {
|
|||||||
private logger;
|
private logger;
|
||||||
private readLine;
|
private readLine;
|
||||||
constructor();
|
constructor();
|
||||||
handleCriticalError(err: any): void;
|
handleCriticalError(err: Error): void;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
export declare class Program {
|
export declare class Program {
|
||||||
private errorHandler;
|
private errorHandler;
|
||||||
constructor();
|
constructor();
|
||||||
start(): void;
|
start(): Promise<void>;
|
||||||
}
|
}
|
||||||
|
21
TypeScript/10ScopesAndTypes/types/callbacks/AchievementCallbacks.d.ts
vendored
Normal file
21
TypeScript/10ScopesAndTypes/types/callbacks/AchievementCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import { AchievementController } from "@spt-aki/controllers/AchievementController";
|
||||||
|
import { ProfileController } from "@spt-aki/controllers/ProfileController";
|
||||||
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { ICompletedAchievementsResponse } from "@spt-aki/models/eft/profile/ICompletedAchievementsResponse";
|
||||||
|
import { IGetAchievementsResponse } from "@spt-aki/models/eft/profile/IGetAchievementsResponse";
|
||||||
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
|
export declare class AchievementCallbacks {
|
||||||
|
protected achievementController: AchievementController;
|
||||||
|
protected profileController: ProfileController;
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
constructor(achievementController: AchievementController, profileController: ProfileController, httpResponse: HttpResponseUtil);
|
||||||
|
/**
|
||||||
|
* Handle client/achievement/list
|
||||||
|
*/
|
||||||
|
getAchievements(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IGetAchievementsResponse>;
|
||||||
|
/**
|
||||||
|
* Handle client/achievement/statistic
|
||||||
|
*/
|
||||||
|
statistic(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<ICompletedAchievementsResponse>;
|
||||||
|
}
|
34
TypeScript/10ScopesAndTypes/types/callbacks/BuildsCallbacks.d.ts
vendored
Normal file
34
TypeScript/10ScopesAndTypes/types/callbacks/BuildsCallbacks.d.ts
vendored
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
import { BuildController } from "@spt-aki/controllers/BuildController";
|
||||||
|
import { ISetMagazineRequest } from "@spt-aki/models/eft/builds/ISetMagazineRequest";
|
||||||
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
|
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
||||||
|
import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
|
import { IRemoveBuildRequestData } from "@spt-aki/models/eft/presetBuild/IRemoveBuildRequestData";
|
||||||
|
import { IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
|
export declare class BuildsCallbacks {
|
||||||
|
protected httpResponse: HttpResponseUtil;
|
||||||
|
protected buildController: BuildController;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, buildController: BuildController);
|
||||||
|
/**
|
||||||
|
* Handle client/builds/list
|
||||||
|
*/
|
||||||
|
getBuilds(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IUserBuilds>;
|
||||||
|
/**
|
||||||
|
* Handle client/builds/magazine/save
|
||||||
|
*/
|
||||||
|
createMagazineTemplate(url: string, request: ISetMagazineRequest, sessionID: string): INullResponseData;
|
||||||
|
/**
|
||||||
|
* Handle client/builds/weapon/save
|
||||||
|
*/
|
||||||
|
setWeapon(url: string, info: IPresetBuildActionRequestData, sessionID: string): INullResponseData;
|
||||||
|
/**
|
||||||
|
* Handle client/builds/equipment/save
|
||||||
|
*/
|
||||||
|
setEquipment(url: string, info: IPresetBuildActionRequestData, sessionID: string): INullResponseData;
|
||||||
|
/**
|
||||||
|
* Handle client/builds/delete
|
||||||
|
*/
|
||||||
|
deleteBuild(url: string, info: IRemoveBuildRequestData, sessionID: string): INullResponseData;
|
||||||
|
}
|
@ -1,18 +1,13 @@
|
|||||||
import { BundleLoader } from "@spt-aki/loaders/BundleLoader";
|
import { BundleLoader } from "@spt-aki/loaders/BundleLoader";
|
||||||
import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil";
|
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
export declare class BundleCallbacks {
|
export declare class BundleCallbacks {
|
||||||
protected logger: ILogger;
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected httpFileUtil: HttpFileUtil;
|
|
||||||
protected bundleLoader: BundleLoader;
|
protected bundleLoader: BundleLoader;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected httpConfig: IHttpConfig;
|
protected httpConfig: IHttpConfig;
|
||||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
constructor(httpResponse: HttpResponseUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||||
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/bundles
|
* Handle singleplayer/bundles
|
||||||
*/
|
*/
|
||||||
|
@ -1,14 +1,28 @@
|
|||||||
import { ClientLogController } from "@spt-aki/controllers/ClientLogController";
|
import { ClientLogController } from "@spt-aki/controllers/ClientLogController";
|
||||||
|
import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder";
|
||||||
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
||||||
import { IClientLogRequest } from "@spt-aki/models/spt/logging/IClientLogRequest";
|
import { IClientLogRequest } from "@spt-aki/models/spt/logging/IClientLogRequest";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
/** Handle client logging related events */
|
/** Handle client logging related events */
|
||||||
export declare class ClientLogCallbacks {
|
export declare class ClientLogCallbacks {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected clientLogController: ClientLogController;
|
protected clientLogController: ClientLogController;
|
||||||
constructor(httpResponse: HttpResponseUtil, clientLogController: ClientLogController);
|
protected configServer: ConfigServer;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected modLoadOrder: ModLoadOrder;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, clientLogController: ClientLogController, configServer: ConfigServer, localisationService: LocalisationService, modLoadOrder: ModLoadOrder);
|
||||||
/**
|
/**
|
||||||
* Handle /singleplayer/log
|
* Handle /singleplayer/log
|
||||||
*/
|
*/
|
||||||
clientLog(url: string, info: IClientLogRequest, sessionID: string): INullResponseData;
|
clientLog(url: string, info: IClientLogRequest, sessionID: string): INullResponseData;
|
||||||
|
/**
|
||||||
|
* Handle /singleplayer/release
|
||||||
|
*/
|
||||||
|
releaseNotes(): string;
|
||||||
|
/**
|
||||||
|
* Handle /singleplayer/enableBSGlogging
|
||||||
|
*/
|
||||||
|
bsgLogging(): string;
|
||||||
}
|
}
|
||||||
|
@ -71,8 +71,8 @@ export declare class GameCallbacks implements OnLoad {
|
|||||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/getRaidTime
|
* Handle singleplayer/settings/getRaidTime
|
||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): IGetRaidTimeResponse;
|
getRaidTime(url: string, request: IGetRaidTimeRequest, sessionID: string): IGetRaidTimeResponse;
|
||||||
}
|
}
|
||||||
|
@ -26,11 +26,11 @@ export declare class HideoutCallbacks implements OnUpdate {
|
|||||||
/**
|
/**
|
||||||
* Handle HideoutUpgrade event
|
* Handle HideoutUpgrade event
|
||||||
*/
|
*/
|
||||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle HideoutUpgradeComplete event
|
* Handle HideoutUpgradeComplete event
|
||||||
*/
|
*/
|
||||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle HideoutPutItemsInAreaSlots
|
* Handle HideoutPutItemsInAreaSlots
|
||||||
*/
|
*/
|
||||||
@ -62,11 +62,11 @@ export declare class HideoutCallbacks implements OnUpdate {
|
|||||||
/**
|
/**
|
||||||
* Handle HideoutQuickTimeEvent
|
* Handle HideoutQuickTimeEvent
|
||||||
*/
|
*/
|
||||||
handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string): IItemEventRouterResponse;
|
handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
||||||
*/
|
*/
|
||||||
recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string): IItemEventRouterResponse;
|
recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
||||||
*/
|
*/
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import { InraidController } from "@spt-aki/controllers/InraidController";
|
import { InraidController } from "@spt-aki/controllers/InraidController";
|
||||||
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
||||||
|
import { IItemDeliveryRequestData } from "@spt-aki/models/eft/inRaid/IItemDeliveryRequestData";
|
||||||
import { IRegisterPlayerRequestData } from "@spt-aki/models/eft/inRaid/IRegisterPlayerRequestData";
|
import { IRegisterPlayerRequestData } from "@spt-aki/models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
@ -47,4 +49,19 @@ export declare class InraidCallbacks {
|
|||||||
* @returns JSON as string
|
* @returns JSON as string
|
||||||
*/
|
*/
|
||||||
getAirdropConfig(): string;
|
getAirdropConfig(): string;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/btr/config
|
||||||
|
* @returns JSON as string
|
||||||
|
*/
|
||||||
|
getBTRConfig(): string;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/traderServices/getTraderServices
|
||||||
|
*/
|
||||||
|
getTraderServices(url: string, info: IEmptyRequestData, sessionId: string): string;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/traderServices/itemDelivery
|
||||||
|
*/
|
||||||
|
itemDelivery(url: string, request: IItemDeliveryRequestData, sessionId: string): INullResponseData;
|
||||||
|
getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string;
|
||||||
|
getSandboxMaxPatrolValue(url: string, info: IEmptyRequestData, sessionId: string): string;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { InventoryController } from "@spt-aki/controllers/InventoryController";
|
import { InventoryController } from "@spt-aki/controllers/InventoryController";
|
||||||
|
import { QuestController } from "@spt-aki/controllers/QuestController";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IInventoryBindRequestData } from "@spt-aki/models/eft/inventory/IInventoryBindRequestData";
|
import { IInventoryBindRequestData } from "@spt-aki/models/eft/inventory/IInventoryBindRequestData";
|
||||||
import { IInventoryCreateMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryCreateMarkerRequestData";
|
import { IInventoryCreateMarkerRequestData } from "@spt-aki/models/eft/inventory/IInventoryCreateMarkerRequestData";
|
||||||
@ -18,34 +19,43 @@ import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInve
|
|||||||
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||||
import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData";
|
import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData";
|
||||||
|
import { ISetFavoriteItems } from "@spt-aki/models/eft/inventory/ISetFavoriteItems";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IFailQuestRequestData } from "@spt-aki/models/eft/quests/IFailQuestRequestData";
|
||||||
export declare class InventoryCallbacks {
|
export declare class InventoryCallbacks {
|
||||||
protected inventoryController: InventoryController;
|
protected inventoryController: InventoryController;
|
||||||
constructor(inventoryController: InventoryController);
|
protected questController: QuestController;
|
||||||
/** Handle Move event */
|
constructor(inventoryController: InventoryController, questController: QuestController);
|
||||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
/** Handle client/game/profile/items/moving Move event */
|
||||||
|
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/** Handle Remove event */
|
/** Handle Remove event */
|
||||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/** Handle Split event */
|
/** Handle Split event */
|
||||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, request: IInventoryTransferRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/** Handle Swap */
|
/** Handle Swap */
|
||||||
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
unbindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
unbindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/** Handle ReadEncyclopedia */
|
/** Handle ReadEncyclopedia */
|
||||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/** Handle ApplyInventoryChanges */
|
/** Handle ApplyInventoryChanges */
|
||||||
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/** Handle OpenRandomLootContainer */
|
/** Handle OpenRandomLootContainer */
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
redeemProfileReward(pmcData: IPmcData, body: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse;
|
redeemProfileReward(pmcData: IPmcData, body: IRedeemProfileRequestData, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
setFavoriteItem(pmcData: IPmcData, body: ISetFavoriteItems, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* TODO - MOVE INTO QUEST CODE
|
||||||
|
* Handle game/profile/items/moving - QuestFail
|
||||||
|
*/
|
||||||
|
failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -9,5 +9,11 @@ export declare class ItemEventCallbacks {
|
|||||||
protected itemEventRouter: ItemEventRouter;
|
protected itemEventRouter: ItemEventRouter;
|
||||||
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
||||||
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData<IItemEventRouterResponse>;
|
||||||
|
/**
|
||||||
|
* Return true if the passed in list of warnings contains critical issues
|
||||||
|
* @param warnings The list of warnings to check for critical errors
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
private isCriticalError;
|
||||||
protected getErrorCode(warnings: Warning[]): number;
|
protected getErrorCode(warnings: Warning[]): number;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,14 @@
|
|||||||
import { MatchController } from "@spt-aki/controllers/MatchController";
|
import { MatchController } from "@spt-aki/controllers/MatchController";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
||||||
import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest";
|
import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest";
|
||||||
import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse";
|
import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse";
|
||||||
import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest";
|
import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest";
|
||||||
import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData";
|
import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest";
|
||||||
import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse";
|
import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse";
|
||||||
import { IGetProfileRequestData } from "@spt-aki/models/eft/match/IGetProfileRequestData";
|
|
||||||
import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData";
|
import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData";
|
||||||
import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData";
|
import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData";
|
||||||
import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult";
|
import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult";
|
||||||
@ -39,29 +37,27 @@ export declare class MatchCallbacks {
|
|||||||
sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData<string>;
|
sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData<string>;
|
||||||
/** Handle client/match/group/invite/accept */
|
/** Handle client/match/group/invite/accept */
|
||||||
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
|
acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData<IAcceptGroupInviteResponse[]>;
|
||||||
|
/** Handle client/match/group/invite/decline */
|
||||||
|
declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData<any>;
|
||||||
/** Handle client/match/group/invite/cancel */
|
/** Handle client/match/group/invite/cancel */
|
||||||
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
|
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
|
||||||
/** Handle client/match/group/transfer */
|
/** Handle client/match/group/transfer */
|
||||||
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
|
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
|
||||||
/** Handle client/match/group/invite/cancel-all */
|
/** Handle client/match/group/invite/cancel-all */
|
||||||
cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||||
/** @deprecated - not called on raid start/end or game start/exit */
|
/** @deprecated - not called on raid start/end or game start/exit */
|
||||||
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
|
putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData;
|
||||||
/** Handle raid/profile/list */
|
|
||||||
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
|
||||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
||||||
/** Handle match/group/start_game */
|
/** Handle match/group/start_game */
|
||||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
|
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
|
||||||
/** Handle client/getMetricsConfig */
|
/** Handle client/getMetricsConfig */
|
||||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||||
/**
|
/**
|
||||||
* @deprecated - not called on raid start/end or game start/exit
|
* Called periodically while in a group
|
||||||
* Handle client/match/group/status
|
* Handle client/match/group/status
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<IGetGroupStatusResponse>;
|
getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<IGetGroupStatusResponse>;
|
||||||
/** Handle client/match/group/create */
|
|
||||||
createGroup(url: string, info: ICreateGroupRequestData, sessionID: string): IGetBodyResponseData<any>;
|
|
||||||
/** Handle client/match/group/delete */
|
/** Handle client/match/group/delete */
|
||||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||||
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
||||||
@ -71,4 +67,6 @@ export declare class MatchCallbacks {
|
|||||||
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||||
/** Handle client/raid/configuration */
|
/** Handle client/raid/configuration */
|
||||||
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
|
getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
|
||||||
|
/** Handle client/raid/configuration-by-profile */
|
||||||
|
getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData;
|
||||||
}
|
}
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
import { PresetBuildController } from "@spt-aki/controllers/PresetBuildController";
|
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/IPresetBuildActionRequestData";
|
|
||||||
import { IRemoveBuildRequestData } from "@spt-aki/models/eft/presetBuild/IRemoveBuildRequestData";
|
|
||||||
import { IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
|
||||||
export declare class PresetBuildCallbacks {
|
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected presetBuildController: PresetBuildController;
|
|
||||||
constructor(httpResponse: HttpResponseUtil, presetBuildController: PresetBuildController);
|
|
||||||
/** Handle client/handbook/builds/my/list */
|
|
||||||
getHandbookUserlist(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<IUserBuilds>;
|
|
||||||
/** Handle SaveWeaponBuild event */
|
|
||||||
saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/** Handle removeBuild event*/
|
|
||||||
removeBuild(pmcData: IPmcData, body: IRemoveBuildRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/** Handle RemoveWeaponBuild event*/
|
|
||||||
removeWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/** Handle SaveEquipmentBuild event */
|
|
||||||
saveEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/** Handle RemoveEquipmentBuild event*/
|
|
||||||
removeEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,4 +1,5 @@
|
|||||||
import { ProfileController } from "@spt-aki/controllers/ProfileController";
|
import { ProfileController } from "@spt-aki/controllers/ProfileController";
|
||||||
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
@ -6,6 +7,8 @@ import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullRespons
|
|||||||
import { IGetMiniProfileRequestData } from "@spt-aki/models/eft/launcher/IGetMiniProfileRequestData";
|
import { IGetMiniProfileRequestData } from "@spt-aki/models/eft/launcher/IGetMiniProfileRequestData";
|
||||||
import { GetProfileStatusResponseData } from "@spt-aki/models/eft/profile/GetProfileStatusResponseData";
|
import { GetProfileStatusResponseData } from "@spt-aki/models/eft/profile/GetProfileStatusResponseData";
|
||||||
import { ICreateProfileResponse } from "@spt-aki/models/eft/profile/ICreateProfileResponse";
|
import { ICreateProfileResponse } from "@spt-aki/models/eft/profile/ICreateProfileResponse";
|
||||||
|
import { IGetOtherProfileRequest } from "@spt-aki/models/eft/profile/IGetOtherProfileRequest";
|
||||||
|
import { IGetOtherProfileResponse } from "@spt-aki/models/eft/profile/IGetOtherProfileResponse";
|
||||||
import { IGetProfileSettingsRequest } from "@spt-aki/models/eft/profile/IGetProfileSettingsRequest";
|
import { IGetProfileSettingsRequest } from "@spt-aki/models/eft/profile/IGetProfileSettingsRequest";
|
||||||
import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData";
|
import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData";
|
import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
@ -20,7 +23,8 @@ export declare class ProfileCallbacks {
|
|||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected profileController: ProfileController;
|
protected profileController: ProfileController;
|
||||||
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController);
|
protected profileHelper: ProfileHelper;
|
||||||
|
constructor(httpResponse: HttpResponseUtil, timeUtil: TimeUtil, profileController: ProfileController, profileHelper: ProfileHelper);
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/create
|
* Handle client/game/profile/create
|
||||||
*/
|
*/
|
||||||
@ -62,6 +66,11 @@ export declare class ProfileCallbacks {
|
|||||||
* Called when creating a character when choosing a character face/voice
|
* Called when creating a character when choosing a character face/voice
|
||||||
*/
|
*/
|
||||||
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
|
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
|
||||||
|
/**
|
||||||
|
* Handle client/profile/view
|
||||||
|
* Called when viewing another players profile
|
||||||
|
*/
|
||||||
|
getOtherProfile(url: string, request: IGetOtherProfileRequest, sessionID: string): IGetBodyResponseData<IGetOtherProfileResponse>;
|
||||||
/**
|
/**
|
||||||
* Handle client/profile/settings
|
* Handle client/profile/settings
|
||||||
*/
|
*/
|
||||||
|
@ -47,7 +47,7 @@ export declare class RagfairCallbacks implements OnLoad, OnUpdate {
|
|||||||
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
|
||||||
/** Handle RagFairAddOffer event */
|
/** Handle RagFairAddOffer event */
|
||||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/** \Handle RagFairRemoveOffer event */
|
/** Handle RagFairRemoveOffer event */
|
||||||
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
removeOffer(pmcData: IPmcData, info: IRemoveOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/** Handle RagFairRenewOffer event */
|
/** Handle RagFairRenewOffer event */
|
||||||
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
extendOffer(pmcData: IPmcData, info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
@ -8,7 +8,8 @@ import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
|||||||
export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
export declare class TraderCallbacks implements OnLoad, OnUpdate {
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected traderController: TraderController;
|
protected traderController: TraderController;
|
||||||
constructor(httpResponse: HttpResponseUtil, traderController: TraderController);
|
constructor(httpResponse: HttpResponseUtil, // TODO: delay required
|
||||||
|
traderController: TraderController);
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
onUpdate(): Promise<boolean>;
|
onUpdate(): Promise<boolean>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
|
@ -5,14 +5,13 @@ export declare class ApplicationContext {
|
|||||||
private static holderMaxSize;
|
private static holderMaxSize;
|
||||||
/**
|
/**
|
||||||
* Called like:
|
* Called like:
|
||||||
*
|
* ```
|
||||||
* const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue<IRegisterPlayerRequestData>();
|
* const registerPlayerInfo = this.applicationContext.getLatestValue(ContextVariableType.REGISTER_PLAYER_REQUEST).getValue<IRegisterPlayerRequestData>();
|
||||||
*
|
*
|
||||||
* const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue<string>();
|
* const activePlayerSessionId = this.applicationContext.getLatestValue(ContextVariableType.SESSION_ID).getValue<string>();
|
||||||
*
|
*
|
||||||
* const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION).getValue<IGetRaidConfigurationRequestData>();
|
* const matchInfo = this.applicationContext.getLatestValue(ContextVariableType.RAID_CONFIGURATION).getValue<IGetRaidConfigurationRequestData>();
|
||||||
* @param type
|
* ```
|
||||||
* @returns
|
|
||||||
*/
|
*/
|
||||||
getLatestValue(type: ContextVariableType): ContextVariable;
|
getLatestValue(type: ContextVariableType): ContextVariable;
|
||||||
getValues(type: ContextVariableType): ContextVariable[];
|
getValues(type: ContextVariableType): ContextVariable[];
|
||||||
|
23
TypeScript/10ScopesAndTypes/types/controllers/AchievementController.d.ts
vendored
Normal file
23
TypeScript/10ScopesAndTypes/types/controllers/AchievementController.d.ts
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import { ICompletedAchievementsResponse } from "@spt-aki/models/eft/profile/ICompletedAchievementsResponse";
|
||||||
|
import { IGetAchievementsResponse } from "@spt-aki/models/eft/profile/IGetAchievementsResponse";
|
||||||
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
/**
|
||||||
|
* Logic for handling In Raid callbacks
|
||||||
|
*/
|
||||||
|
export declare class AchievementController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
constructor(logger: ILogger, databaseServer: DatabaseServer);
|
||||||
|
/**
|
||||||
|
* Get base achievements
|
||||||
|
* @param sessionID Session id
|
||||||
|
*/
|
||||||
|
getAchievements(sessionID: string): IGetAchievementsResponse;
|
||||||
|
/**
|
||||||
|
* Shows % of 'other' players who've completed each achievement
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @returns ICompletedAchievementsResponse
|
||||||
|
*/
|
||||||
|
getAchievementStatistics(sessionId: string): ICompletedAchievementsResponse;
|
||||||
|
}
|
@ -4,6 +4,7 @@ import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper";
|
|||||||
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData";
|
import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData";
|
||||||
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore";
|
import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore";
|
||||||
import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType";
|
import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||||
@ -15,7 +16,9 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
|||||||
import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheService";
|
import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService";
|
import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService";
|
||||||
|
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
export declare class BotController {
|
export declare class BotController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
@ -25,22 +28,24 @@ export declare class BotController {
|
|||||||
protected botGenerationCacheService: BotGenerationCacheService;
|
protected botGenerationCacheService: BotGenerationCacheService;
|
||||||
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
protected matchBotDetailsCacheService: MatchBotDetailsCacheService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, jsonUtil: JsonUtil);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil);
|
||||||
/**
|
/**
|
||||||
* Return the number of bot loadout varieties to be generated
|
* Return the number of bot load-out varieties to be generated
|
||||||
* @param type bot Type we want the loadout gen count for
|
* @param type bot Type we want the load-out gen count for
|
||||||
* @returns number of bots to generate
|
* @returns number of bots to generate
|
||||||
*/
|
*/
|
||||||
getBotPresetGenerationLimit(type: string): number;
|
getBotPresetGenerationLimit(type: string): number;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/bot/difficulty
|
* Handle singleplayer/settings/bot/difficulty
|
||||||
* Get the core.json difficulty settings from database\bots
|
* Get the core.json difficulty settings from database/bots
|
||||||
* @returns IBotCore
|
* @returns IBotCore
|
||||||
*/
|
*/
|
||||||
getBotCoreDifficulty(): IBotCore;
|
getBotCoreDifficulty(): IBotCore;
|
||||||
@ -48,10 +53,10 @@ export declare class BotController {
|
|||||||
* Get bot difficulty settings
|
* Get bot difficulty settings
|
||||||
* adjust PMC settings to ensure they engage the correct bot types
|
* adjust PMC settings to ensure they engage the correct bot types
|
||||||
* @param type what bot the server is requesting settings for
|
* @param type what bot the server is requesting settings for
|
||||||
* @param difficulty difficulty level server requested settings for
|
* @param diffLevel difficulty level server requested settings for
|
||||||
* @returns Difficulty object
|
* @returns Difficulty object
|
||||||
*/
|
*/
|
||||||
getBotDifficulty(type: string, difficulty: string): Difficulty;
|
getBotDifficulty(type: string, diffLevel: string): Difficulty;
|
||||||
/**
|
/**
|
||||||
* Generate bot profiles and store in cache
|
* Generate bot profiles and store in cache
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -60,7 +65,22 @@ export declare class BotController {
|
|||||||
*/
|
*/
|
||||||
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
|
||||||
/**
|
/**
|
||||||
* Get the difficulty passed in, if its not "asoline", get selected difficulty from config
|
* On first bot generation bots are generated and stored inside a cache, ready to be used later
|
||||||
|
* @param request Bot generation request object
|
||||||
|
* @param pmcProfile Player profile
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[];
|
||||||
|
/**
|
||||||
|
* Pull a single bot out of cache and return, if cache is empty add bots to it and then return
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param request Bot generation request object
|
||||||
|
* @returns Single IBotBase object
|
||||||
|
*/
|
||||||
|
protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[];
|
||||||
|
/**
|
||||||
|
* Get the difficulty passed in, if its not "asonline", get selected difficulty from config
|
||||||
* @param requestedDifficulty
|
* @param requestedDifficulty
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
|
36
TypeScript/10ScopesAndTypes/types/controllers/BuildController.d.ts
vendored
Normal file
36
TypeScript/10ScopesAndTypes/types/controllers/BuildController.d.ts
vendored
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
|
import { ISetMagazineRequest } from "@spt-aki/models/eft/builds/ISetMagazineRequest";
|
||||||
|
import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/IPresetBuildActionRequestData";
|
||||||
|
import { IRemoveBuildRequestData } from "@spt-aki/models/eft/presetBuild/IRemoveBuildRequestData";
|
||||||
|
import { IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
export declare class BuildController {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected saveServer: SaveServer;
|
||||||
|
constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer);
|
||||||
|
/** Handle client/handbook/builds/my/list */
|
||||||
|
getUserBuilds(sessionID: string): IUserBuilds;
|
||||||
|
/** Handle client/builds/weapon/save */
|
||||||
|
saveWeaponBuild(sessionId: string, body: IPresetBuildActionRequestData): void;
|
||||||
|
/** Handle client/builds/equipment/save event */
|
||||||
|
saveEquipmentBuild(sessionID: string, request: IPresetBuildActionRequestData): void;
|
||||||
|
/** Handle client/builds/delete*/
|
||||||
|
removeBuild(sessionID: string, request: IRemoveBuildRequestData): void;
|
||||||
|
protected removePlayerBuild(id: string, sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Handle client/builds/magazine/save
|
||||||
|
*/
|
||||||
|
createMagazineTemplate(sessionId: string, request: ISetMagazineRequest): void;
|
||||||
|
}
|
@ -110,7 +110,7 @@ export declare class DialogueController {
|
|||||||
* Get all uncollected items attached to mail in a particular dialog
|
* Get all uncollected items attached to mail in a particular dialog
|
||||||
* @param dialogueId Dialog to get mail attachments from
|
* @param dialogueId Dialog to get mail attachments from
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @returns
|
* @returns IGetAllAttachmentsResponse
|
||||||
*/
|
*/
|
||||||
getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse;
|
getAllAttachments(dialogueId: string, sessionId: string): IGetAllAttachmentsResponse;
|
||||||
/** client/mail/msg/send */
|
/** client/mail/msg/send */
|
||||||
|
@ -13,7 +13,9 @@ import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeReques
|
|||||||
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
||||||
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
||||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
|
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||||
|
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||||
import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
||||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||||
import { ILootConfig } from "@spt-aki/models/spt/config/ILootConfig";
|
import { ILootConfig } from "@spt-aki/models/spt/config/ILootConfig";
|
||||||
@ -59,21 +61,23 @@ export declare class GameController {
|
|||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
|
protected hideoutConfig: IHideoutConfig;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
protected lootConfig: ILootConfig;
|
protected lootConfig: ILootConfig;
|
||||||
|
protected botConfig: IBotConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
load(): void;
|
load(): void;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/start
|
* Handle client/game/start
|
||||||
*/
|
*/
|
||||||
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
gameStart(_url: string, _info: IEmptyRequestData, sessionID: string, startTimeStampMS: number): void;
|
||||||
|
protected adjustLocationBotValues(): void;
|
||||||
/**
|
/**
|
||||||
* Out of date/incorrectly made trader mods forget this data
|
* Out of date/incorrectly made trader mods forget this data
|
||||||
*/
|
*/
|
||||||
protected checkTraderRepairValuesExist(): void;
|
protected checkTraderRepairValuesExist(): void;
|
||||||
protected addCustomLooseLootPositions(): void;
|
protected addCustomLooseLootPositions(): void;
|
||||||
protected adjustLooseLootSpawnProbabilities(): void;
|
protected adjustLooseLootSpawnProbabilities(): void;
|
||||||
protected setHideoutAreasAndCraftsTo40Secs(): void;
|
|
||||||
/** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */
|
/** Apply custom limits on bot types as defined in configs/location.json/botTypeLimits */
|
||||||
protected adjustMapBotLimits(): void;
|
protected adjustMapBotLimits(): void;
|
||||||
/**
|
/**
|
||||||
@ -112,8 +116,7 @@ export declare class GameController {
|
|||||||
protected flagAllItemsInDbAsSellableOnFlea(): void;
|
protected flagAllItemsInDbAsSellableOnFlea(): void;
|
||||||
/**
|
/**
|
||||||
* When player logs in, iterate over all active effects and reduce timer
|
* When player logs in, iterate over all active effects and reduce timer
|
||||||
* TODO - add body part HP regen
|
* @param pmcProfile Profile to adjust values for
|
||||||
* @param pmcProfile
|
|
||||||
*/
|
*/
|
||||||
protected updateProfileHealthValues(pmcProfile: IPmcData): void;
|
protected updateProfileHealthValues(pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
@ -130,7 +133,8 @@ export declare class GameController {
|
|||||||
*/
|
*/
|
||||||
protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void;
|
protected sendPraporGiftsToNewProfiles(pmcProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these waves to one bot when they're waiting to spawn for too long
|
* Find and split waves with large numbers of bots into smaller waves - BSG appears to reduce the size of these
|
||||||
|
* waves to one bot when they're waiting to spawn for too long
|
||||||
*/
|
*/
|
||||||
protected splitBotWavesIntoSingleWaves(): void;
|
protected splitBotWavesIntoSingleWaves(): void;
|
||||||
/**
|
/**
|
||||||
@ -139,7 +143,7 @@ export declare class GameController {
|
|||||||
*/
|
*/
|
||||||
protected saveActiveModsToProfile(fullProfile: IAkiProfile): void;
|
protected saveActiveModsToProfile(fullProfile: IAkiProfile): void;
|
||||||
/**
|
/**
|
||||||
* Check for any missing assorts inside each traders assort.json data, checking against traders qeustassort.json
|
* Check for any missing assorts inside each traders assort.json data, checking against traders questassort.json
|
||||||
*/
|
*/
|
||||||
protected validateQuestAssortUnlocksExist(): void;
|
protected validateQuestAssortUnlocksExist(): void;
|
||||||
/**
|
/**
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import { ScavCaseRewardGenerator } from "@spt-aki/generators/ScavCaseRewardGenerator";
|
import { ScavCaseRewardGenerator } from "@spt-aki/generators/ScavCaseRewardGenerator";
|
||||||
import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper";
|
import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper";
|
||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
||||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { HideoutArea, Product } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { HideoutArea, ITaskConditionCounter, Product } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { HideoutUpgradeCompleteRequestData } from "@spt-aki/models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
import { HideoutUpgradeCompleteRequestData } from "@spt-aki/models/eft/hideout/HideoutUpgradeCompleteRequestData";
|
||||||
import { IHandleQTEEventRequestData } from "@spt-aki/models/eft/hideout/IHandleQTEEventRequestData";
|
import { IHandleQTEEventRequestData } from "@spt-aki/models/eft/hideout/IHandleQTEEventRequestData";
|
||||||
import { IHideoutArea, Stage } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
import { IHideoutArea, Stage } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
||||||
@ -45,6 +46,7 @@ export declare class HideoutController {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected playerService: PlayerService;
|
protected playerService: PlayerService;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
@ -58,27 +60,28 @@ export declare class HideoutController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected static nameBackendCountersCrafting: string;
|
/** Key used in TaskConditionCounters array */
|
||||||
|
protected static nameTaskConditionCountersCrafting: string;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
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, fenceService: FenceService);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, 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);
|
||||||
/**
|
/**
|
||||||
* Handle HideoutUpgrade event
|
* Handle HideoutUpgrade event
|
||||||
* Start a hideout area upgrade
|
* Start a hideout area upgrade
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request upgrade start request
|
* @param request upgrade start request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @param output Client response
|
||||||
*/
|
*/
|
||||||
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Handle HideoutUpgradeComplete event
|
* Handle HideoutUpgradeComplete event
|
||||||
* Complete a hideout area upgrade
|
* Complete a hideout area upgrade
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Completed upgrade request
|
* @param request Completed upgrade request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @param output Client response
|
||||||
*/
|
*/
|
||||||
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Upgrade wall status to visible in profile if medstation/water collector are both level 1
|
* Upgrade wall status to visible in profile if medstation/water collector are both level 1
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -202,26 +205,23 @@ export declare class HideoutController {
|
|||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Remove production from area request
|
* @param request Remove production from area request
|
||||||
* @param output Output object to update
|
* @param output Output object to update
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
*/
|
||||||
protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected handleRecipe(sessionID: string, recipe: IHideoutProduction, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): void;
|
||||||
|
/**
|
||||||
|
* Get the "CounterHoursCrafting" TaskConditionCounter from a profile
|
||||||
|
* @param pmcData Profile to get counter from
|
||||||
|
* @param recipe Recipe being crafted
|
||||||
|
* @returns ITaskConditionCounter
|
||||||
|
*/
|
||||||
|
protected getHoursCraftingTaskConditionCounter(pmcData: IPmcData, recipe: IHideoutProduction): ITaskConditionCounter;
|
||||||
/**
|
/**
|
||||||
* Handles generating case rewards and sending to player inventory
|
* Handles generating case rewards and sending to player inventory
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Get rewards from scavcase craft request
|
* @param request Get rewards from scavcase craft request
|
||||||
* @param output Output object to update
|
* @param output Output object to update
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
*/
|
||||||
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected handleScavCase(sessionID: string, pmcData: IPmcData, request: IHideoutTakeProductionRequestData, output: IItemEventRouterResponse): void;
|
||||||
/**
|
|
||||||
* Start area production for item by adding production to profiles' Hideout.Production array
|
|
||||||
* @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
|
* Get quick time event list for hideout
|
||||||
* // TODO - implement this
|
* // TODO - implement this
|
||||||
@ -236,7 +236,7 @@ export declare class HideoutController {
|
|||||||
* @param pmcData Profile to adjust
|
* @param pmcData Profile to adjust
|
||||||
* @param request QTE result object
|
* @param request QTE result object
|
||||||
*/
|
*/
|
||||||
handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData): IItemEventRouterResponse;
|
handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Record a high score from the shooting range into a player profiles overallcounters
|
* Record a high score from the shooting range into a player profiles overallcounters
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -244,7 +244,7 @@ export declare class HideoutController {
|
|||||||
* @param request shooting range score request
|
* @param request shooting range score request
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): IItemEventRouterResponse;
|
recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): void;
|
||||||
/**
|
/**
|
||||||
* Handle client/game/profile/items/moving - HideoutImproveArea
|
* Handle client/game/profile/items/moving - HideoutImproveArea
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
|
@ -7,19 +7,29 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
|||||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IRegisterPlayerRequestData } from "@spt-aki/models/eft/inRaid/IRegisterPlayerRequestData";
|
import { IRegisterPlayerRequestData } from "@spt-aki/models/eft/inRaid/IRegisterPlayerRequestData";
|
||||||
import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData";
|
||||||
import { PlayerRaidEndState } from "@spt-aki/models/enums/PlayerRaidEndState";
|
import { PlayerRaidEndState } from "@spt-aki/models/enums/PlayerRaidEndState";
|
||||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||||
|
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
|
||||||
|
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||||
|
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||||
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
|
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||||
|
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||||
|
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||||
import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService";
|
import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService";
|
||||||
import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService";
|
import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService";
|
||||||
|
import { TraderServicesService } from "@spt-aki/services/TraderServicesService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
/**
|
/**
|
||||||
* Logic for handling In Raid callbacks
|
* Logic for handling In Raid callbacks
|
||||||
@ -38,13 +48,21 @@ export declare class InraidController {
|
|||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected healthHelper: HealthHelper;
|
protected healthHelper: HealthHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
|
protected traderServicesService: TraderServicesService;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
protected inRaidHelper: InRaidHelper;
|
protected inRaidHelper: InRaidHelper;
|
||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
protected airdropConfig: IAirdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected btrConfig: IBTRConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer);
|
protected inRaidConfig: IInRaidConfig;
|
||||||
|
protected traderConfig: ITraderConfig;
|
||||||
|
protected locationConfig: ILocationConfig;
|
||||||
|
protected ragfairConfig: IRagfairConfig;
|
||||||
|
protected hideoutConfig: IHideoutConfig;
|
||||||
|
constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil);
|
||||||
/**
|
/**
|
||||||
* Save locationId to active profiles inraid object AND app context
|
* Save locationId to active profiles inraid object AND app context
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -66,8 +84,8 @@ export declare class InraidController {
|
|||||||
*/
|
*/
|
||||||
protected savePmcProgress(sessionID: string, postRaidRequest: ISaveProgressRequestData): void;
|
protected savePmcProgress(sessionID: string, postRaidRequest: ISaveProgressRequestData): void;
|
||||||
/**
|
/**
|
||||||
* Make changes to pmc profile after they've died in raid,
|
* Make changes to PMC profile after they've died in raid,
|
||||||
* Alter bodypart hp, handle insurance, delete inventory items, remove carried quest items
|
* Alter body part hp, handle insurance, delete inventory items, remove carried quest items
|
||||||
* @param postRaidSaveRequest Post-raid save request
|
* @param postRaidSaveRequest Post-raid save request
|
||||||
* @param pmcData Pmc profile
|
* @param pmcData Pmc profile
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -75,7 +93,7 @@ export declare class InraidController {
|
|||||||
*/
|
*/
|
||||||
protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, sessionID: string): IPmcData;
|
protected performPostRaidActionsWhenDead(postRaidSaveRequest: ISaveProgressRequestData, pmcData: IPmcData, sessionID: string): IPmcData;
|
||||||
/**
|
/**
|
||||||
* Adjust player characters bodypart hp post-raid
|
* Adjust player characters body part hp post-raid
|
||||||
* @param postRaidSaveRequest post raid data
|
* @param postRaidSaveRequest post raid data
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
*/
|
*/
|
||||||
@ -83,15 +101,29 @@ export declare class InraidController {
|
|||||||
/**
|
/**
|
||||||
* Reduce body part hp to % of max
|
* Reduce body part hp to % of max
|
||||||
* @param pmcData profile to edit
|
* @param pmcData profile to edit
|
||||||
* @param multipler multipler to apply to max health
|
* @param multiplier multiplier to apply to max health
|
||||||
*/
|
*/
|
||||||
protected reducePmcHealthToPercent(pmcData: IPmcData, multipler: number): void;
|
protected reducePmcHealthToPercent(pmcData: IPmcData, multiplier: number): void;
|
||||||
/**
|
/**
|
||||||
* Handle updating the profile post-pscav raid
|
* Handle updating the profile post-pscav raid
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param postRaidRequest Post-raid data of raid
|
* @param postRaidRequest Post-raid data of raid
|
||||||
*/
|
*/
|
||||||
protected savePlayerScavProgress(sessionID: string, postRaidRequest: ISaveProgressRequestData): void;
|
protected savePlayerScavProgress(sessionID: string, postRaidRequest: ISaveProgressRequestData): void;
|
||||||
|
/**
|
||||||
|
* merge two dictionaries together
|
||||||
|
* Prioritise pair that has true as a value
|
||||||
|
* @param primary main dictionary
|
||||||
|
* @param secondary Secondary dictionary
|
||||||
|
*/
|
||||||
|
protected mergePmcAndScavEncyclopedias(primary: IPmcData, secondary: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Post-scav-raid any charisma increase must be propigated into PMC profile
|
||||||
|
* @param postRaidServerScavProfile Scav profile after adjustments made from raid
|
||||||
|
* @param postRaidServerPmcProfile Pmc profile after raid
|
||||||
|
* @param preRaidScavCharismaProgress charisma progress value pre-raid
|
||||||
|
*/
|
||||||
|
protected updatePmcCharismaSkillPostScavRaid(postRaidServerScavProfile: IPmcData, postRaidServerPmcProfile: IPmcData, preRaidScavCharismaProgress: number): void;
|
||||||
/**
|
/**
|
||||||
* Does provided profile contain any condition counters
|
* Does provided profile contain any condition counters
|
||||||
* @param profile Profile to check for condition counters
|
* @param profile Profile to check for condition counters
|
||||||
@ -128,8 +160,9 @@ export declare class InraidController {
|
|||||||
* Update profile with scav karma values based on in-raid actions
|
* Update profile with scav karma values based on in-raid actions
|
||||||
* @param pmcData Pmc profile
|
* @param pmcData Pmc profile
|
||||||
* @param offraidData Post-raid save request
|
* @param offraidData Post-raid save request
|
||||||
|
* @param scavData Scav profile
|
||||||
*/
|
*/
|
||||||
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData): void;
|
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Get the inraid config from configs/inraid.json
|
* Get the inraid config from configs/inraid.json
|
||||||
* @returns InRaid Config
|
* @returns InRaid Config
|
||||||
@ -140,4 +173,20 @@ export declare class InraidController {
|
|||||||
* @returns Airdrop config
|
* @returns Airdrop config
|
||||||
*/
|
*/
|
||||||
getAirdropConfig(): IAirdropConfig;
|
getAirdropConfig(): IAirdropConfig;
|
||||||
|
/**
|
||||||
|
* Get BTR config from configs/btr.json
|
||||||
|
* @returns Airdrop config
|
||||||
|
*/
|
||||||
|
getBTRConfig(): IBTRConfig;
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/traderServices/getTraderServices
|
||||||
|
* @returns Trader services data
|
||||||
|
*/
|
||||||
|
getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[];
|
||||||
|
/**
|
||||||
|
* Handle singleplayer/traderServices/itemDelivery
|
||||||
|
*/
|
||||||
|
itemDelivery(sessionId: string, traderId: string, items: Item[]): void;
|
||||||
|
getTraitorScavHostileChance(url: string, sessionID: string): number;
|
||||||
|
getSandboxMaxPatrolValue(url: string, sessionID: string): number;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGet
|
|||||||
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
import { IGetInsuranceCostResponseData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostResponseData";
|
||||||
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
import { IInsureRequestData } from "@spt-aki/models/eft/insurance/IInsureRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { ISystemData, Insurance } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { Insurance } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
@ -18,11 +18,15 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
|||||||
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
import { InsuranceService } from "@spt-aki/services/InsuranceService";
|
||||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class InsuranceController {
|
export declare class InsuranceController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
protected mathUtil: MathUtil;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
@ -37,7 +41,7 @@ export declare class InsuranceController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
protected roubleTpl: string;
|
protected roubleTpl: string;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||||
*
|
*
|
||||||
@ -66,6 +70,12 @@ export declare class InsuranceController {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void;
|
protected processInsuredItems(insuranceDetails: Insurance[], sessionID: string): void;
|
||||||
|
/**
|
||||||
|
* Count all items in all insurance packages.
|
||||||
|
* @param insurance
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected countAllInsuranceItems(insurance: Insurance[]): number;
|
||||||
/**
|
/**
|
||||||
* Remove an insurance package from a profile using the package's system data information.
|
* Remove an insurance package from a profile using the package's system data information.
|
||||||
*
|
*
|
||||||
@ -73,31 +83,35 @@ export declare class InsuranceController {
|
|||||||
* @param index The array index of the insurance package to remove.
|
* @param index The array index of the insurance package to remove.
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected removeInsurancePackageFromProfile(sessionID: string, packageInfo: ISystemData): void;
|
protected removeInsurancePackageFromProfile(sessionID: string, insPackage: Insurance): void;
|
||||||
/**
|
/**
|
||||||
* Finds the items that should be deleted based on the given Insurance object.
|
* Finds the items that should be deleted based on the given Insurance object.
|
||||||
*
|
*
|
||||||
* @param insured The insurance object containing the items to evaluate for deletion.
|
* @param rootItemParentID - The ID that should be assigned to all "hideout"/root items.
|
||||||
|
* @param insured - The insurance object containing the items to evaluate for deletion.
|
||||||
* @returns A Set containing the IDs of items that should be deleted.
|
* @returns A Set containing the IDs of items that should be deleted.
|
||||||
*/
|
*/
|
||||||
protected findItemsToDelete(insured: Insurance): Set<string>;
|
protected findItemsToDelete(rootItemParentID: string, insured: Insurance): Set<string>;
|
||||||
/**
|
|
||||||
* Populate a Map object of items for quick lookup by their ID.
|
|
||||||
*
|
|
||||||
* @param insured The insurance object containing the items to populate the map with.
|
|
||||||
* @returns A Map where the keys are the item IDs and the values are the corresponding Item objects.
|
|
||||||
*/
|
|
||||||
protected populateItemsMap(insured: Insurance): Map<string, Item>;
|
|
||||||
/**
|
/**
|
||||||
* Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this
|
* Initialize a Map object that holds main-parents to all of their attachments. Note that "main-parent" in this
|
||||||
* context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun,
|
* context refers to the parent item that an attachment is attached to. For example, a suppressor attached to a gun,
|
||||||
* not the backpack that the gun is located in (the gun's parent).
|
* not the backpack that the gun is located in (the gun's parent).
|
||||||
*
|
*
|
||||||
|
* @param rootItemParentID - The ID that should be assigned to all "hideout"/root items.
|
||||||
* @param insured - The insurance object containing the items to evaluate.
|
* @param insured - The insurance object containing the items to evaluate.
|
||||||
* @param itemsMap - A Map object for quick item look-up by item ID.
|
* @param itemsMap - A Map object for quick item look-up by item ID.
|
||||||
* @returns A Map object containing parent item IDs to arrays of their attachment items.
|
* @returns A Map object containing parent item IDs to arrays of their attachment items.
|
||||||
*/
|
*/
|
||||||
protected populateParentAttachmentsMap(insured: Insurance, itemsMap: Map<string, Item>): Map<string, Item[]>;
|
protected populateParentAttachmentsMap(rootItemParentID: string, insured: Insurance, itemsMap: Map<string, Item>): Map<string, Item[]>;
|
||||||
|
/**
|
||||||
|
* Remove attachments that can not be moddable in-raid from the parentAttachmentsMap. If no moddable attachments
|
||||||
|
* remain, the parent is removed from the map as well.
|
||||||
|
*
|
||||||
|
* @param parentAttachmentsMap - A Map object containing parent item IDs to arrays of their attachment items.
|
||||||
|
* @param itemsMap - A Map object for quick item look-up by item ID.
|
||||||
|
* @returns A Map object containing parent item IDs to arrays of their attachment items which are not moddable in-raid.
|
||||||
|
*/
|
||||||
|
protected removeNonModdableAttachments(parentAttachmentsMap: Map<string, Item[]>, itemsMap: Map<string, Item>): Map<string, Item[]>;
|
||||||
/**
|
/**
|
||||||
* Process "regular" insurance items. Any insured item that is not an attached, attachment is considered a "regular"
|
* Process "regular" insurance items. Any insured item that is not an attached, attachment is considered a "regular"
|
||||||
* item. This method iterates over them, preforming item deletion rolls to see if they should be deleted. If so,
|
* item. This method iterates over them, preforming item deletion rolls to see if they should be deleted. If so,
|
||||||
@ -105,15 +119,13 @@ export declare class InsuranceController {
|
|||||||
*
|
*
|
||||||
* @param insured The insurance object containing the items to evaluate.
|
* @param insured The insurance object containing the items to evaluate.
|
||||||
* @param toDelete A Set to keep track of items marked for deletion.
|
* @param toDelete A Set to keep track of items marked for deletion.
|
||||||
|
* @param parentAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items.
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected processRegularItems(insured: Insurance, toDelete: Set<string>): void;
|
protected processRegularItems(insured: Insurance, toDelete: Set<string>, parentAttachmentsMap: Map<string, Item[]>): void;
|
||||||
/**
|
/**
|
||||||
* Process parent items and their attachments, updating the toDelete Set accordingly.
|
* Process parent items and their attachments, updating the toDelete Set accordingly.
|
||||||
*
|
*
|
||||||
* This method iterates over a map of parent items to their attachments and performs evaluations on each.
|
|
||||||
* It marks items for deletion based on certain conditions and updates the toDelete Set accordingly.
|
|
||||||
*
|
|
||||||
* @param mainParentToAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items.
|
* @param mainParentToAttachmentsMap A Map object containing parent item IDs to arrays of their attachment items.
|
||||||
* @param itemsMap A Map object for quick item look-up by item ID.
|
* @param itemsMap A Map object for quick item look-up by item ID.
|
||||||
* @param traderId The trader ID from the Insurance object.
|
* @param traderId The trader ID from the Insurance object.
|
||||||
@ -169,40 +181,23 @@ export declare class InsuranceController {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected removeItemsFromInsurance(insured: Insurance, toDelete: Set<string>): void;
|
protected removeItemsFromInsurance(insured: Insurance, toDelete: Set<string>): void;
|
||||||
/**
|
|
||||||
* Adopts orphaned items by resetting them as base-level items. Helpful in situations where a parent has been
|
|
||||||
* deleted from insurance, but any insured items within the parent should remain. This method will remove the
|
|
||||||
* reference from the children to the parent and set item properties to main-level values.
|
|
||||||
*
|
|
||||||
* @param insured Insurance object containing items.
|
|
||||||
*/
|
|
||||||
protected adoptOrphanedItems(insured: Insurance): void;
|
|
||||||
/**
|
|
||||||
* Fetches the parentId property of an item with a slotId "hideout". Not sure if this is actually dynamic, but this
|
|
||||||
* method should be a reliable way to fetch it, if it ever does change.
|
|
||||||
*
|
|
||||||
* @param items Array of items to search through.
|
|
||||||
* @returns The parentId of an item with slotId 'hideout'. Empty string if not found.
|
|
||||||
*/
|
|
||||||
protected fetchHideoutItemParent(items: Item[]): string;
|
|
||||||
/**
|
/**
|
||||||
* Handle sending the insurance message to the user that potentially contains the valid insurance items.
|
* Handle sending the insurance message to the user that potentially contains the valid insurance items.
|
||||||
*
|
*
|
||||||
* @param sessionID The session ID that should receive the insurance message.
|
* @param sessionID The session ID that should receive the insurance message.
|
||||||
* @param insurance The context of insurance to use.
|
* @param insurance The context of insurance to use.
|
||||||
* @param noItems Whether or not there are any items to return to the player.
|
|
||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected sendMail(sessionID: string, insurance: Insurance, noItems: boolean): void;
|
protected sendMail(sessionID: string, insurance: Insurance): void;
|
||||||
/**
|
/**
|
||||||
* Determines whether a insured item should be removed from the player's inventory based on a random roll and
|
* Determines whether a insured item should be removed from the player's inventory based on a random roll and
|
||||||
* trader-specific return chance.
|
* trader-specific return chance.
|
||||||
*
|
*
|
||||||
* @param traderId The ID of the trader who insured the item.
|
* @param traderId The ID of the trader who insured the item.
|
||||||
* @param insuredItem Optional. The item to roll for. Only used for logging.
|
* @param insuredItem Optional. The item to roll for. Only used for logging.
|
||||||
* @returns true if the insured item should be removed from inventory, false otherwise.
|
* @returns true if the insured item should be removed from inventory, false otherwise, or null on error.
|
||||||
*/
|
*/
|
||||||
protected rollForDelete(traderId: string, insuredItem?: Item): boolean;
|
protected rollForDelete(traderId: string, insuredItem?: Item): boolean | null;
|
||||||
/**
|
/**
|
||||||
* Handle Insure event
|
* Handle Insure event
|
||||||
* Add insurance to an item
|
* Add insurance to an item
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { LootGenerator } from "@spt-aki/generators/LootGenerator";
|
import { LootGenerator } from "@spt-aki/generators/LootGenerator";
|
||||||
|
import { HideoutHelper } from "@spt-aki/helpers/HideoutHelper";
|
||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
||||||
@ -24,7 +25,9 @@ import { IInventoryToggleRequestData } from "@spt-aki/models/eft/inventory/IInve
|
|||||||
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/inventory/IOpenRandomLootContainerRequestData";
|
||||||
import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData";
|
import { IRedeemProfileRequestData } from "@spt-aki/models/eft/inventory/IRedeemProfileRequestData";
|
||||||
|
import { ISetFavoriteItems } from "@spt-aki/models/eft/inventory/ISetFavoriteItems";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
@ -47,6 +50,7 @@ export declare class InventoryController {
|
|||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
|
protected hideoutHelper: HideoutHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
@ -55,7 +59,7 @@ export declare class InventoryController {
|
|||||||
protected lootGenerator: LootGenerator;
|
protected lootGenerator: LootGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected httpResponseUtil: HttpResponseUtil;
|
protected httpResponseUtil: HttpResponseUtil;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil);
|
||||||
/**
|
/**
|
||||||
* Move Item
|
* Move Item
|
||||||
* change location of item with parentId and slotId
|
* change location of item with parentId and slotId
|
||||||
@ -64,55 +68,52 @@ export declare class InventoryController {
|
|||||||
* @param pmcData Profile
|
* @param pmcData Profile
|
||||||
* @param moveRequest Move request data
|
* @param moveRequest Move request data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @param output Client response
|
||||||
*/
|
*/
|
||||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Get a event router response with inventory trader message
|
* Get a event router response with inventory trader message
|
||||||
* @param output Item event router response
|
* @param output Item event router response
|
||||||
* @returns Item event router response
|
* @returns Item event router response
|
||||||
*/
|
*/
|
||||||
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected appendTraderExploitErrorResponse(output: IItemEventRouterResponse): void;
|
||||||
/**
|
|
||||||
* Remove Item from Profile
|
|
||||||
* Deep tree item deletion, also removes items from insurance list
|
|
||||||
*/
|
|
||||||
removeItem(pmcData: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
|
||||||
/**
|
/**
|
||||||
* Handle Remove event
|
* Handle Remove event
|
||||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||||
* Removes item from PMC Profile
|
* Removes item from PMC Profile
|
||||||
*/
|
*/
|
||||||
discardItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
discardItem(pmcData: IPmcData, request: IInventoryRemoveRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Split Item
|
* Split Item
|
||||||
* spliting 1 stack into 2
|
* spliting 1 stack into 2
|
||||||
* @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile)
|
* @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile)
|
||||||
* @param request Split request
|
* @param request Split request
|
||||||
* @param sessionID Session/player id
|
* @param sessionID Session/player id
|
||||||
|
* @param output Client response
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
splitItem(pmcData: IPmcData, request: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
splitItem(pmcData: IPmcData, request: IInventorySplitRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Fully merge 2 inventory stacks together into one stack (merging where both stacks remain is called 'transfer')
|
* Fully merge 2 inventory stacks together into one stack (merging where both stacks remain is called 'transfer')
|
||||||
* Deletes item from `body.item` and adding number of stacks into `body.with`
|
* Deletes item from `body.item` and adding number of stacks into `body.with`
|
||||||
* @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile)
|
* @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile)
|
||||||
* @param body Merge request
|
* @param body Merge request
|
||||||
* @param sessionID Player id
|
* @param sessionID Player id
|
||||||
|
* @param output Client response
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* TODO: Adds no data to output to send to client, is this by design?
|
* TODO: Adds no data to output to send to client, is this by design?
|
||||||
* TODO: should make use of getOwnerInventoryItems(), stack being transferred may not always be on pmc
|
|
||||||
* Transfer items from one stack into another while keeping original stack
|
* Transfer items from one stack into another while keeping original stack
|
||||||
* Used to take items from scav inventory into stash or to insert ammo into mags (shotgun ones) and reloading weapon by clicking "Reload"
|
* Used to take items from scav inventory into stash or to insert ammo into mags (shotgun ones) and reloading weapon by clicking "Reload"
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param body Transfer request
|
* @param body Transfer request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
* @param output Client response
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Swap Item
|
* Swap Item
|
||||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||||
@ -122,7 +123,7 @@ export declare class InventoryController {
|
|||||||
/**
|
/**
|
||||||
* Handles folding of Weapons
|
* Handles folding of Weapons
|
||||||
*/
|
*/
|
||||||
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
foldItem(pmcData: IPmcData, request: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Toggles "Toggleable" items like night vision goggles and face shields.
|
* Toggles "Toggleable" items like night vision goggles and face shields.
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
@ -147,31 +148,32 @@ export declare class InventoryController {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): void;
|
||||||
/**
|
/**
|
||||||
* Unbind an inventory item from quick access menu at bottom of player screen
|
* Unbind an inventory item from quick access menu at bottom of player screen
|
||||||
* Handle unbind event
|
* Handle unbind event
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param bindRequest Request object
|
* @param bindRequest Request object
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @param output Client response
|
||||||
*/
|
*/
|
||||||
unbindItem(pmcData: IPmcData, request: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
unbindItem(pmcData: IPmcData, request: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Handles examining an item
|
* Handles examining an item
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
* @param body request object
|
* @param body request object
|
||||||
* @param sessionID session id
|
* @param sessionID session id
|
||||||
|
* @param output Client response
|
||||||
* @returns response
|
* @returns response
|
||||||
*/
|
*/
|
||||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], pmcProfile: IPmcData): void;
|
protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], fullProfile: IAkiProfile): void;
|
||||||
/**
|
/**
|
||||||
* Get the tplid of an item from the examine request object
|
* Get the tplid of an item from the examine request object
|
||||||
* @param body response request
|
* @param request Response request
|
||||||
* @returns tplid
|
* @returns tplId
|
||||||
*/
|
*/
|
||||||
protected getExaminedItemTpl(body: IInventoryExamineRequestData): string;
|
protected getExaminedItemTpl(request: IInventoryExamineRequestData): string;
|
||||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Handle ApplyInventoryChanges
|
* Handle ApplyInventoryChanges
|
||||||
@ -179,33 +181,33 @@ export declare class InventoryController {
|
|||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request sort request
|
* @param request sort request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
*/
|
||||||
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): void;
|
||||||
/**
|
/**
|
||||||
* Add note to a map
|
* Add note to a map
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Add marker request
|
* @param request Add marker request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
|
* @param output Client response
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Delete a map marker
|
* Delete a map marker
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Delete marker request
|
* @param request Delete marker request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @param output Client response
|
||||||
*/
|
*/
|
||||||
deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Edit an existing map marker
|
* Edit an existing map marker
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Edit marker request
|
* @param request Edit marker request
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @param output Client response
|
||||||
*/
|
*/
|
||||||
editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Strip out characters from note string that are not: letter/numbers/unicode/spaces
|
* Strip out characters from note string that are not: letter/numbers/unicode/spaces
|
||||||
* @param mapNoteText Marker text to sanitise
|
* @param mapNoteText Marker text to sanitise
|
||||||
@ -216,10 +218,11 @@ export declare class InventoryController {
|
|||||||
* Handle OpenRandomLootContainer event
|
* Handle OpenRandomLootContainer event
|
||||||
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
|
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
|
||||||
* @param pmcData Profile data
|
* @param pmcData Profile data
|
||||||
* @param body open loot container request data
|
* @param body Open loot container request data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @param output Client response
|
||||||
*/
|
*/
|
||||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse;
|
redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void;
|
||||||
|
setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void;
|
||||||
}
|
}
|
||||||
|
@ -14,9 +14,13 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
|||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class LauncherController {
|
export declare class LauncherController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
@ -25,7 +29,7 @@ export declare class LauncherController {
|
|||||||
protected preAkiModLoader: PreAkiModLoader;
|
protected preAkiModLoader: PreAkiModLoader;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, saveServer: SaveServer, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, preAkiModLoader: PreAkiModLoader, configServer: ConfigServer);
|
||||||
connect(): IConnectResponse;
|
connect(): IConnectResponse;
|
||||||
/**
|
/**
|
||||||
* Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness"
|
* Get descriptive text for each of the profile edtions a player can choose, keyed by profile.json profile type e.g. "Edge Of Darkness"
|
||||||
@ -36,6 +40,8 @@ export declare class LauncherController {
|
|||||||
login(info: ILoginRequestData): string;
|
login(info: ILoginRequestData): string;
|
||||||
register(info: IRegisterData): string;
|
register(info: IRegisterData): string;
|
||||||
protected createAccount(info: IRegisterData): string;
|
protected createAccount(info: IRegisterData): string;
|
||||||
|
protected generateProfileId(): string;
|
||||||
|
protected formatID(timeStamp: number, counter: number): string;
|
||||||
changeUsername(info: IChangeRequestData): string;
|
changeUsername(info: IChangeRequestData): string;
|
||||||
changePassword(info: IChangeRequestData): string;
|
changePassword(info: IChangeRequestData): string;
|
||||||
wipe(info: IRegisterData): string;
|
wipe(info: IRegisterData): string;
|
||||||
|
@ -13,6 +13,7 @@ import { LootRequest } from "@spt-aki/models/spt/services/LootRequest";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService";
|
import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
@ -28,6 +29,7 @@ export declare class LocationController {
|
|||||||
protected locationGenerator: LocationGenerator;
|
protected locationGenerator: LocationGenerator;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected raidTimeAdjustmentService: RaidTimeAdjustmentService;
|
protected raidTimeAdjustmentService: RaidTimeAdjustmentService;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
protected lootGenerator: LootGenerator;
|
protected lootGenerator: LootGenerator;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
@ -35,7 +37,7 @@ export declare class LocationController {
|
|||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected airdropConfig: IAirdropConfig;
|
protected airdropConfig: IAirdropConfig;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext);
|
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext);
|
||||||
/**
|
/**
|
||||||
* Handle client/location/getLocalloot
|
* Handle client/location/getLocalloot
|
||||||
* Get a location (map) with generated loot data
|
* Get a location (map) with generated loot data
|
||||||
@ -59,7 +61,7 @@ export declare class LocationController {
|
|||||||
generateAll(sessionId: string): ILocationsGenerateAllResponse;
|
generateAll(sessionId: string): ILocationsGenerateAllResponse;
|
||||||
/**
|
/**
|
||||||
* Handle client/location/getAirdropLoot
|
* Handle client/location/getAirdropLoot
|
||||||
* Get loot for an airdop container
|
* Get loot for an airdrop container
|
||||||
* Generates it randomly based on config/airdrop.json values
|
* Generates it randomly based on config/airdrop.json values
|
||||||
* @returns Array of LootItem objects
|
* @returns Array of LootItem objects
|
||||||
*/
|
*/
|
||||||
|
@ -3,11 +3,9 @@ import { LootGenerator } from "@spt-aki/generators/LootGenerator";
|
|||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData";
|
|
||||||
import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData";
|
import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData";
|
||||||
import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData";
|
import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData";
|
||||||
import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse";
|
import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse";
|
||||||
import { IGetProfileRequestData } from "@spt-aki/models/eft/match/IGetProfileRequestData";
|
|
||||||
import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData";
|
import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData";
|
||||||
import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData";
|
import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData";
|
||||||
import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult";
|
import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult";
|
||||||
@ -43,15 +41,11 @@ export declare class MatchController {
|
|||||||
protected lootGenerator: LootGenerator;
|
protected lootGenerator: LootGenerator;
|
||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected matchConfig: IMatchConfig;
|
protected matchConfig: IMatchConfig;
|
||||||
protected inraidConfig: IInRaidConfig;
|
protected inRaidConfig: IInRaidConfig;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext);
|
constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, botLootCacheService: BotLootCacheService, configServer: ConfigServer, profileSnapshotService: ProfileSnapshotService, botGenerationCacheService: BotGenerationCacheService, mailSendService: MailSendService, lootGenerator: LootGenerator, applicationContext: ApplicationContext);
|
||||||
getEnabled(): boolean;
|
getEnabled(): boolean;
|
||||||
/** Handle raid/profile/list */
|
|
||||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
|
||||||
/** Handle client/match/group/create */
|
|
||||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
|
||||||
/** Handle client/match/group/delete */
|
/** Handle client/match/group/delete */
|
||||||
deleteGroup(info: any): void;
|
deleteGroup(info: any): void;
|
||||||
/** Handle match/group/start_game */
|
/** Handle match/group/start_game */
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
|
||||||
import { IPresetBuildActionRequestData } from "@spt-aki/models/eft/presetBuild/IPresetBuildActionRequestData";
|
|
||||||
import { IRemoveBuildRequestData } from "@spt-aki/models/eft/presetBuild/IRemoveBuildRequestData";
|
|
||||||
import { IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
|
||||||
export declare class PresetBuildController {
|
|
||||||
protected logger: ILogger;
|
|
||||||
protected hashUtil: HashUtil;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected jsonUtil: JsonUtil;
|
|
||||||
protected databaseServer: DatabaseServer;
|
|
||||||
protected itemHelper: ItemHelper;
|
|
||||||
protected saveServer: SaveServer;
|
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer);
|
|
||||||
/** Handle client/handbook/builds/my/list */
|
|
||||||
getUserBuilds(sessionID: string): IUserBuilds;
|
|
||||||
/** Handle SaveWeaponBuild event */
|
|
||||||
saveWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionId: string): IItemEventRouterResponse;
|
|
||||||
/** Handle SaveEquipmentBuild event */
|
|
||||||
saveEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
protected saveBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string, buildType: string): IItemEventRouterResponse;
|
|
||||||
/** Handle RemoveWeaponBuild event*/
|
|
||||||
removeBuild(pmcData: IPmcData, body: IRemoveBuildRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/** Handle RemoveWeaponBuild event*/
|
|
||||||
removeWeaponBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
/** Handle RemoveEquipmentBuild event*/
|
|
||||||
removeEquipmentBuild(pmcData: IPmcData, body: IPresetBuildActionRequestData, sessionID: string): IItemEventRouterResponse;
|
|
||||||
protected removePlayerBuild(pmcData: IPmcData, id: string, sessionID: string): IItemEventRouterResponse;
|
|
||||||
}
|
|
@ -1,8 +1,10 @@
|
|||||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
export declare class PresetController {
|
export declare class PresetController {
|
||||||
|
protected logger: ILogger;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer);
|
constructor(logger: ILogger, presetHelper: PresetHelper, databaseServer: DatabaseServer);
|
||||||
initialize(): void;
|
initialize(): void;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,10 @@ import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
|||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IMiniProfile } from "@spt-aki/models/eft/launcher/IMiniProfile";
|
import { IMiniProfile } from "@spt-aki/models/eft/launcher/IMiniProfile";
|
||||||
|
import { GetProfileStatusResponseData } from "@spt-aki/models/eft/profile/GetProfileStatusResponseData";
|
||||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
|
import { IGetOtherProfileRequest } from "@spt-aki/models/eft/profile/IGetOtherProfileRequest";
|
||||||
|
import { IGetOtherProfileResponse } from "@spt-aki/models/eft/profile/IGetOtherProfileResponse";
|
||||||
import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData";
|
import { IProfileChangeNicknameRequestData } from "@spt-aki/models/eft/profile/IProfileChangeNicknameRequestData";
|
||||||
import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData";
|
import { IProfileChangeVoiceRequestData } from "@spt-aki/models/eft/profile/IProfileChangeVoiceRequestData";
|
||||||
import { IProfileCreateRequestData } from "@spt-aki/models/eft/profile/IProfileCreateRequestData";
|
import { IProfileCreateRequestData } from "@spt-aki/models/eft/profile/IProfileCreateRequestData";
|
||||||
@ -21,6 +24,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
|
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class ProfileController {
|
export declare class ProfileController {
|
||||||
@ -32,6 +36,7 @@ export declare class ProfileController {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected mailSendService: MailSendService;
|
protected mailSendService: MailSendService;
|
||||||
protected playerScavGenerator: PlayerScavGenerator;
|
protected playerScavGenerator: PlayerScavGenerator;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
@ -39,7 +44,7 @@ export declare class ProfileController {
|
|||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, mailSendService: MailSendService, playerScavGenerator: PlayerScavGenerator, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, questHelper: QuestHelper, profileHelper: ProfileHelper);
|
||||||
/**
|
/**
|
||||||
* Handle /launcher/profiles
|
* Handle /launcher/profiles
|
||||||
*/
|
*/
|
||||||
@ -59,6 +64,11 @@ export declare class ProfileController {
|
|||||||
* @returns Profiles _id value
|
* @returns Profiles _id value
|
||||||
*/
|
*/
|
||||||
createProfile(info: IProfileCreateRequestData, sessionID: string): string;
|
createProfile(info: IProfileCreateRequestData, sessionID: string): string;
|
||||||
|
/**
|
||||||
|
* make profiles pmcData.Inventory.equipment unique
|
||||||
|
* @param pmcData Profile to update
|
||||||
|
*/
|
||||||
|
protected updateInventoryEquipmentId(pmcData: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Delete a profile
|
* Delete a profile
|
||||||
* @param sessionID Id of profile to delete
|
* @param sessionID Id of profile to delete
|
||||||
@ -101,4 +111,9 @@ export declare class ProfileController {
|
|||||||
* Handle client/game/profile/search
|
* Handle client/game/profile/search
|
||||||
*/
|
*/
|
||||||
getFriends(info: ISearchFriendRequestData, sessionID: string): ISearchFriendResponse[];
|
getFriends(info: ISearchFriendRequestData, sessionID: string): ISearchFriendResponse[];
|
||||||
|
/**
|
||||||
|
* Handle client/profile/status
|
||||||
|
*/
|
||||||
|
getProfileStatus(sessionId: string): GetProfileStatusResponseData;
|
||||||
|
getOtherProfile(sessionId: string, request: IGetOtherProfileRequest): IGetOtherProfileResponse;
|
||||||
}
|
}
|
||||||
|
@ -7,11 +7,12 @@ import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
|||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
import { IQuest, IQuestCondition } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
import { IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
import { IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData";
|
||||||
import { ICompleteQuestRequestData } from "@spt-aki/models/eft/quests/ICompleteQuestRequestData";
|
import { ICompleteQuestRequestData } from "@spt-aki/models/eft/quests/ICompleteQuestRequestData";
|
||||||
|
import { IFailQuestRequestData } from "@spt-aki/models/eft/quests/IFailQuestRequestData";
|
||||||
import { IHandoverQuestRequestData } from "@spt-aki/models/eft/quests/IHandoverQuestRequestData";
|
import { IHandoverQuestRequestData } from "@spt-aki/models/eft/quests/IHandoverQuestRequestData";
|
||||||
import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -68,12 +69,6 @@ export declare class QuestController {
|
|||||||
* @returns true = show to player
|
* @returns true = show to player
|
||||||
*/
|
*/
|
||||||
protected showEventQuestToPlayer(questId: string): boolean;
|
protected showEventQuestToPlayer(questId: string): boolean;
|
||||||
/**
|
|
||||||
* Is the quest for the opposite side the player is on
|
|
||||||
* @param playerSide Player side (usec/bear)
|
|
||||||
* @param questId QuestId to check
|
|
||||||
*/
|
|
||||||
protected questIsForOtherSide(playerSide: string, questId: string): boolean;
|
|
||||||
/**
|
/**
|
||||||
* Handle QuestAccept event
|
* Handle QuestAccept event
|
||||||
* Handle the client accepting a quest and starting it
|
* Handle the client accepting a quest and starting it
|
||||||
@ -113,6 +108,12 @@ export declare class QuestController {
|
|||||||
* @returns ItemEvent client response
|
* @returns ItemEvent client response
|
||||||
*/
|
*/
|
||||||
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
completeQuest(pmcData: IPmcData, body: ICompleteQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Return a list of quests that would fail when supplied quest is completed
|
||||||
|
* @param completedQuestId quest completed id
|
||||||
|
* @returns array of IQuest objects
|
||||||
|
*/
|
||||||
|
protected getQuestsFailedByCompletingQuest(completedQuestId: string, pmcProfile: IPmcData): IQuest[];
|
||||||
/**
|
/**
|
||||||
* Remove a quest entirely from a profile
|
* Remove a quest entirely from a profile
|
||||||
* @param sessionId Player id
|
* @param sessionId Player id
|
||||||
@ -133,7 +134,7 @@ export declare class QuestController {
|
|||||||
* @param completedQuestId Completed quest id
|
* @param completedQuestId Completed quest id
|
||||||
* @param questRewards Rewards given to player
|
* @param questRewards Rewards given to player
|
||||||
*/
|
*/
|
||||||
protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Reward[]): void;
|
protected sendSuccessDialogMessageOnQuestComplete(sessionID: string, pmcData: IPmcData, completedQuestId: string, questRewards: Item[]): 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
|
* 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 pmcData Player profile to update
|
||||||
@ -141,12 +142,6 @@ export declare class QuestController {
|
|||||||
* @param completedQuestId Quest just completed
|
* @param completedQuestId Quest just completed
|
||||||
*/
|
*/
|
||||||
protected addTimeLockedQuestsToProfile(pmcData: IPmcData, quests: IQuest[], completedQuestId: string): void;
|
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
|
|
||||||
* @returns array of quests
|
|
||||||
*/
|
|
||||||
protected getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[];
|
|
||||||
/**
|
/**
|
||||||
* Fail the provided quests
|
* Fail the provided quests
|
||||||
* Update quest in profile, otherwise add fresh quest object with failed status
|
* Update quest in profile, otherwise add fresh quest object with failed status
|
||||||
@ -179,7 +174,7 @@ export declare class QuestController {
|
|||||||
* @param output Response to send to user
|
* @param output Response to send to user
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: AvailableForConditions, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
protected showQuestItemHandoverMatchError(handoverQuestRequest: IHandoverQuestRequestData, itemHandedOver: Item, handoverRequirements: IQuestCondition, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Increment a backend counter stored value by an amount,
|
* Increment a backend counter stored value by an amount,
|
||||||
* Create counter if it does not exist
|
* Create counter if it does not exist
|
||||||
@ -188,5 +183,13 @@ export declare class QuestController {
|
|||||||
* @param questId quest id counter is associated with
|
* @param questId quest id counter is associated with
|
||||||
* @param counterValue value to increment the backend counter with
|
* @param counterValue value to increment the backend counter with
|
||||||
*/
|
*/
|
||||||
protected updateProfileBackendCounterValue(pmcData: IPmcData, conditionId: string, questId: string, counterValue: number): void;
|
protected updateProfileTaskConditionCounterValue(pmcData: IPmcData, conditionId: string, questId: string, counterValue: number): void;
|
||||||
|
/**
|
||||||
|
* Handle /client/game/profile/items/moving - QuestFail
|
||||||
|
* @param pmcData Pmc profile
|
||||||
|
* @param request Fail qeust request
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ import { IGetMarketPriceRequestData } from "@spt-aki/models/eft/ragfair/IGetMark
|
|||||||
import { IGetOffersResult } from "@spt-aki/models/eft/ragfair/IGetOffersResult";
|
import { IGetOffersResult } from "@spt-aki/models/eft/ragfair/IGetOffersResult";
|
||||||
import { IGetRagfairOfferByIdRequest } from "@spt-aki/models/eft/ragfair/IGetRagfairOfferByIdRequest";
|
import { IGetRagfairOfferByIdRequest } from "@spt-aki/models/eft/ragfair/IGetRagfairOfferByIdRequest";
|
||||||
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { IRemoveOfferRequestData } from "@spt-aki/models/eft/ragfair/IRemoveOfferRequestData";
|
||||||
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
import { ISearchRequestData } from "@spt-aki/models/eft/ragfair/ISearchRequestData";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
@ -69,9 +70,17 @@ export declare class RagfairController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, 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);
|
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxService: RagfairTaxService, 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);
|
||||||
|
/**
|
||||||
|
* Handles client/ragfair/find
|
||||||
|
* Returns flea offers that match required search parameters
|
||||||
|
* @param sessionID Player id
|
||||||
|
* @param searchRequest Search request data
|
||||||
|
* @returns IGetOffersResult
|
||||||
|
*/
|
||||||
getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult;
|
getOffers(sessionID: string, searchRequest: ISearchRequestData): IGetOffersResult;
|
||||||
/**
|
/**
|
||||||
* Handle client/ragfair/offer/findbyid
|
* Handle client/ragfair/offer/findbyid
|
||||||
|
* Occurs when searching for `#x` on flea
|
||||||
* @param sessionId Player id
|
* @param sessionId Player id
|
||||||
* @param request Request data
|
* @param request Request data
|
||||||
* @returns IRagfairOffer
|
* @returns IRagfairOffer
|
||||||
@ -80,7 +89,7 @@ export declare class RagfairController {
|
|||||||
/**
|
/**
|
||||||
* Get offers for the client based on type of search being performed
|
* Get offers for the client based on type of search being performed
|
||||||
* @param searchRequest Client search request data
|
* @param searchRequest Client search request data
|
||||||
* @param itemsToAdd comes from ragfairHelper.filterCategories()
|
* @param itemsToAdd Comes from ragfairHelper.filterCategories()
|
||||||
* @param traderAssorts Trader assorts
|
* @param traderAssorts Trader assorts
|
||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
* @returns array of offers
|
* @returns array of offers
|
||||||
@ -89,18 +98,10 @@ export declare class RagfairController {
|
|||||||
/**
|
/**
|
||||||
* Get categories for the type of search being performed, linked/required/all
|
* Get categories for the type of search being performed, linked/required/all
|
||||||
* @param searchRequest Client search request data
|
* @param searchRequest Client search request data
|
||||||
* @param offers ragfair offers to get categories for
|
* @param offers Ragfair offers to get categories for
|
||||||
* @returns record with tpls + counts
|
* @returns record with templates + counts
|
||||||
*/
|
*/
|
||||||
protected getSpecificCategories(pmcProfile: IPmcData, searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
protected getSpecificCategories(pmcProfile: IPmcData, searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
||||||
/**
|
|
||||||
* Add Required offers to offers result
|
|
||||||
* @param searchRequest Client search request data
|
|
||||||
* @param assorts
|
|
||||||
* @param pmcProfile Player profile
|
|
||||||
* @param result Result object being sent back to client
|
|
||||||
*/
|
|
||||||
protected addRequiredOffersToResult(searchRequest: ISearchRequestData, assorts: Record<string, ITraderAssort>, pmcProfile: IPmcData, result: IGetOffersResult): void;
|
|
||||||
/**
|
/**
|
||||||
* Add index to all offers passed in (0-indexed)
|
* Add index to all offers passed in (0-indexed)
|
||||||
* @param offers Offers to add index value to
|
* @param offers Offers to add index value to
|
||||||
@ -108,16 +109,26 @@ export declare class RagfairController {
|
|||||||
protected addIndexValueToOffers(offers: IRagfairOffer[]): void;
|
protected addIndexValueToOffers(offers: IRagfairOffer[]): void;
|
||||||
/**
|
/**
|
||||||
* Update a trader flea offer with buy restrictions stored in the traders assort
|
* Update a trader flea offer with buy restrictions stored in the traders assort
|
||||||
* @param offer flea offer to update
|
* @param offer Flea offer to update
|
||||||
* @param profile full profile of player
|
* @param fullProfile Players full profile
|
||||||
*/
|
*/
|
||||||
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, profile: IAkiProfile): void;
|
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, fullProfile: IAkiProfile): void;
|
||||||
/**
|
/**
|
||||||
* Adjust ragfair offer stack count to match same value as traders assort stack count
|
* Adjust ragfair offer stack count to match same value as traders assort stack count
|
||||||
* @param offer Flea offer to adjust
|
* @param offer Flea offer to adjust stack size of
|
||||||
*/
|
*/
|
||||||
protected setTraderOfferStackSize(offer: IRagfairOffer): void;
|
protected setTraderOfferStackSize(offer: IRagfairOffer): void;
|
||||||
|
/**
|
||||||
|
* Is the flea search being performed a 'linked' search type
|
||||||
|
* @param info Search request
|
||||||
|
* @returns True if it is a 'linked' search type
|
||||||
|
*/
|
||||||
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
||||||
|
/**
|
||||||
|
* Is the flea search being performed a 'required' search type
|
||||||
|
* @param info Search request
|
||||||
|
* @returns True if it is a 'required' search type
|
||||||
|
*/
|
||||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
||||||
/**
|
/**
|
||||||
* Check all profiles and sell player offers / send player money for listing if it sold
|
* Check all profiles and sell player offers / send player money for listing if it sold
|
||||||
@ -163,25 +174,33 @@ export declare class RagfairController {
|
|||||||
*/
|
*/
|
||||||
protected calculateRequirementsPriceInRub(requirements: Requirement[]): number;
|
protected calculateRequirementsPriceInRub(requirements: Requirement[]): number;
|
||||||
/**
|
/**
|
||||||
* Using item ids from flea offer request, find corrispnding items from player inventory and return as array
|
* Using item ids from flea offer request, find corresponding items from player inventory and return as array
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param itemIdsFromFleaOfferRequest Ids from request
|
* @param itemIdsFromFleaOfferRequest Ids from request
|
||||||
* @param errorMessage if item is not found, add error message to this parameter
|
|
||||||
* @returns Array of items from player inventory
|
* @returns Array of items from player inventory
|
||||||
*/
|
*/
|
||||||
protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[], errorMessage: string): Item[];
|
protected getItemsToListOnFleaFromInventory(pmcData: IPmcData, itemIdsFromFleaOfferRequest: string[]): {
|
||||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
items: Item[] | null;
|
||||||
|
errorMessage: string | null;
|
||||||
|
};
|
||||||
|
createPlayerOffer(sessionId: string, requirements: Requirement[], items: Item[], sellInOnePiece: boolean): IRagfairOffer;
|
||||||
getAllFleaPrices(): Record<string, number>;
|
getAllFleaPrices(): Record<string, number>;
|
||||||
getStaticPrices(): Record<string, number>;
|
getStaticPrices(): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* User requested removal of the offer, actually reduces the time to 71 seconds,
|
* User requested removal of the offer, actually reduces the time to 71 seconds,
|
||||||
* allowing for the possibility of extending the auction before it's end time
|
* allowing for the possibility of extending the auction before it's end time
|
||||||
* @param offerId offer to 'remove'
|
* @param removeRequest Remove offer request
|
||||||
* @param sessionID Players id
|
* @param sessionId Players id
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeOffer(offerId: string, sessionID: string): IItemEventRouterResponse;
|
removeOffer(removeRequest: IRemoveOfferRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
extendOffer(info: IExtendOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
/**
|
||||||
|
* Extend a ragfair offers listing time
|
||||||
|
* @param extendRequest Extend offer request
|
||||||
|
* @param sessionId Players id
|
||||||
|
* @returns IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
extendOffer(extendRequest: IExtendOfferRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Create a basic trader request object with price and currency type
|
* Create a basic trader request object with price and currency type
|
||||||
* @param currency What currency: RUB, EURO, USD
|
* @param currency What currency: RUB, EURO, USD
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
||||||
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
@ -20,8 +21,9 @@ export declare class RepairController {
|
|||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected repairHelper: RepairHelper;
|
protected repairHelper: RepairHelper;
|
||||||
protected repairService: RepairService;
|
protected repairService: RepairService;
|
||||||
|
protected profileHelper: ProfileHelper;
|
||||||
protected repairConfig: IRepairConfig;
|
protected repairConfig: IRepairConfig;
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
|
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService, profileHelper: ProfileHelper);
|
||||||
/**
|
/**
|
||||||
* Handle TraderRepair event
|
* Handle TraderRepair event
|
||||||
* Repair with trader
|
* Repair with trader
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { RepeatableQuestGenerator } from "@spt-aki/generators/RepeatableQuestGenerator";
|
import { RepeatableQuestGenerator } from "@spt-aki/generators/RepeatableQuestGenerator";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
||||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
|
||||||
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
|
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IRepeatableQuestChangeRequest } from "@spt-aki/models/eft/quests/IRepeatableQuestChangeRequest";
|
import { IRepeatableQuestChangeRequest } from "@spt-aki/models/eft/quests/IRepeatableQuestChangeRequest";
|
||||||
|
import { ELocationName } from "@spt-aki/models/enums/ELocationName";
|
||||||
import { IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
import { IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -30,7 +30,6 @@ export declare class RepeatableQuestController {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected objectId: ObjectId;
|
protected objectId: ObjectId;
|
||||||
@ -39,7 +38,7 @@ export declare class RepeatableQuestController {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Handle client/repeatalbeQuests/activityPeriods
|
* Handle client/repeatalbeQuests/activityPeriods
|
||||||
* Returns an array of objects in the format of repeatable quests to the client.
|
* Returns an array of objects in the format of repeatable quests to the client.
|
||||||
@ -62,9 +61,9 @@ export declare class RepeatableQuestController {
|
|||||||
* The new quests generated are again persisted in profile.RepeatableQuests
|
* The new quests generated are again persisted in profile.RepeatableQuests
|
||||||
*
|
*
|
||||||
* @param {string} _info Request from client
|
* @param {string} _info Request from client
|
||||||
* @param {string} sessionID Player's session id
|
* @param {string} sessionID Player's session id
|
||||||
*
|
*
|
||||||
* @returns {array} array of "repeatableQuestObjects" as descibed above
|
* @returns {array} Array of "repeatableQuestObjects" as descibed above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
/**
|
/**
|
||||||
@ -95,6 +94,20 @@ export declare class RepeatableQuestController {
|
|||||||
*/
|
*/
|
||||||
protected generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): IQuestTypePool;
|
protected generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): IQuestTypePool;
|
||||||
protected createBaseQuestPool(repeatableConfig: IRepeatableQuestConfig): IQuestTypePool;
|
protected createBaseQuestPool(repeatableConfig: IRepeatableQuestConfig): IQuestTypePool;
|
||||||
|
/**
|
||||||
|
* Return the locations this PMC is allowed to get daily quests for based on their level
|
||||||
|
* @param locations The original list of locations
|
||||||
|
* @param pmcLevel The level of the player PMC
|
||||||
|
* @returns A filtered list of locations that allow the player PMC level to access it
|
||||||
|
*/
|
||||||
|
protected getAllowedLocations(locations: Record<ELocationName, string[]>, pmcLevel: number): Partial<Record<ELocationName, string[]>>;
|
||||||
|
/**
|
||||||
|
* Return true if the given pmcLevel is allowed on the given location
|
||||||
|
* @param location The location name to check
|
||||||
|
* @param pmcLevel The level of the pmc
|
||||||
|
* @returns True if the given pmc level is allowed to access the given location
|
||||||
|
*/
|
||||||
|
protected isPmcLevelAllowedOnLocation(location: string, pmcLevel: number): boolean;
|
||||||
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
debugLogRepeatableQuestIds(pmcData: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Handle RepeatableQuestChange event
|
* Handle RepeatableQuestChange event
|
||||||
|
@ -3,11 +3,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
|||||||
import { TradeHelper } from "@spt-aki/helpers/TradeHelper";
|
import { TradeHelper } from "@spt-aki/helpers/TradeHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader";
|
import { ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
||||||
import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData";
|
import { IProcessBaseTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBaseTradeRequestData";
|
||||||
import { IProcessRagfairTradeRequestData } from "@spt-aki/models/eft/trade/IProcessRagfairTradeRequestData";
|
import { IOfferRequest, IProcessRagfairTradeRequestData } from "@spt-aki/models/eft/trade/IProcessRagfairTradeRequestData";
|
||||||
import { ISellScavItemsToFenceRequestData } from "@spt-aki/models/eft/trade/ISellScavItemsToFenceRequestData";
|
import { ISellScavItemsToFenceRequestData } from "@spt-aki/models/eft/trade/ISellScavItemsToFenceRequestData";
|
||||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
@ -15,15 +16,24 @@ import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { RagfairServer } from "@spt-aki/servers/RagfairServer";
|
import { RagfairServer } from "@spt-aki/servers/RagfairServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
|
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class TradeController {
|
export declare class TradeController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected tradeHelper: TradeHelper;
|
protected tradeHelper: TradeHelper;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
@ -32,26 +42,51 @@ export declare class TradeController {
|
|||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
|
protected mailSendService: MailSendService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
|
protected roubleTpl: string;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||||
/** Handle TradingConfirm event */
|
/** Handle TradingConfirm event */
|
||||||
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
/** Handle RagFairBuyOffer event */
|
/** Handle RagFairBuyOffer event */
|
||||||
confirmRagfairTrading(pmcData: IPmcData, body: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
confirmRagfairTrading(pmcData: IPmcData, request: IProcessRagfairTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||||
|
/**
|
||||||
|
* Buy an item off the flea sold by a trader
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param fleaOffer Offer being purchased
|
||||||
|
* @param requestOffer request data from client
|
||||||
|
* @param output Output to send back to client
|
||||||
|
*/
|
||||||
|
protected buyTraderItemFromRagfair(sessionId: string, pmcData: IPmcData, fleaOffer: IRagfairOffer, requestOffer: IOfferRequest, output: IItemEventRouterResponse): void;
|
||||||
|
/**
|
||||||
|
* Buy an item off the flea sold by a PMC
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param fleaOffer Offer being purchased
|
||||||
|
* @param requestOffer Request data from client
|
||||||
|
* @param output Output to send back to client
|
||||||
|
*/
|
||||||
|
protected buyPmcItemFromRagfair(sessionId: string, pmcData: IPmcData, fleaOffer: IRagfairOffer, requestOffer: IOfferRequest, output: IItemEventRouterResponse): void;
|
||||||
|
/**
|
||||||
|
* Does Player have necessary trader loyalty to purchase flea offer
|
||||||
|
* @param sellerIsTrader is seller trader
|
||||||
|
* @param fleaOffer FLea offer being bought
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns True if player can buy offer
|
||||||
|
*/
|
||||||
|
protected playerLacksTraderLoyaltyLevelToBuyOffer(fleaOffer: IRagfairOffer, pmcData: IPmcData): boolean;
|
||||||
/** Handle SellAllFromSavage event */
|
/** Handle SellAllFromSavage event */
|
||||||
sellScavItemsToFence(pmcData: IPmcData, request: ISellScavItemsToFenceRequestData, sessionId: string): IItemEventRouterResponse;
|
sellScavItemsToFence(pmcData: IPmcData, request: ISellScavItemsToFenceRequestData, sessionId: string): IItemEventRouterResponse;
|
||||||
/**
|
/**
|
||||||
* Sell all sellable items to a trader from inventory
|
* Send the specified rouble total to player as mail
|
||||||
* WILL DELETE ITEMS FROM INVENTORY + CHILDREN OF ITEMS SOLD
|
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param profileWithItemsToSell Profile with items to be sold to trader
|
|
||||||
* @param profileThatGetsMoney Profile that gets the money after selling items
|
|
||||||
* @param trader Trader to sell items to
|
* @param trader Trader to sell items to
|
||||||
* @returns IItemEventRouterResponse
|
* @param output IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
protected sellInventoryToTrader(sessionId: string, profileWithItemsToSell: IPmcData, profileThatGetsMoney: IPmcData, trader: Traders): IItemEventRouterResponse;
|
protected mailMoneyToPlayer(sessionId: string, roublesToSend: number, trader: Traders): void;
|
||||||
/**
|
/**
|
||||||
* Looks up an items children and gets total handbook price for them
|
* Looks up an items children and gets total handbook price for them
|
||||||
* @param parentItemId parent item that has children we want to sum price of
|
* @param parentItemId parent item that has children we want to sum price of
|
||||||
@ -61,5 +96,4 @@ export declare class TradeController {
|
|||||||
* @returns Rouble price
|
* @returns Rouble price
|
||||||
*/
|
*/
|
||||||
protected getPriceOfItemAndChildren(parentItemId: string, items: Item[], handbookPrices: Record<string, number>, traderDetails: ITraderBase): number;
|
protected getPriceOfItemAndChildren(parentItemId: string, items: Item[], handbookPrices: Record<string, number>, traderDetails: ITraderBase): number;
|
||||||
protected confirmTradingInternal(pmcData: IPmcData, body: IProcessBaseTradeRequestData, sessionID: string, foundInRaid?: boolean, upd?: Upd): IItemEventRouterResponse;
|
|
||||||
}
|
}
|
||||||
|
@ -3,14 +3,18 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
|||||||
import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { ITraderAssort, ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader";
|
import { ITraderAssort, ITraderBase } from "@spt-aki/models/eft/common/tables/ITrader";
|
||||||
|
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { FenceService } from "@spt-aki/services/FenceService";
|
import { FenceService } from "@spt-aki/services/FenceService";
|
||||||
import { TraderAssortService } from "@spt-aki/services/TraderAssortService";
|
import { TraderAssortService } from "@spt-aki/services/TraderAssortService";
|
||||||
import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService";
|
import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class TraderController {
|
export declare class TraderController {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected timeUtil: TimeUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected traderAssortHelper: TraderAssortHelper;
|
protected traderAssortHelper: TraderAssortHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
@ -20,10 +24,12 @@ export declare class TraderController {
|
|||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
|
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil);
|
protected configServer: ConfigServer;
|
||||||
|
protected traderConfig: ITraderConfig;
|
||||||
|
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Runs when onLoad event is fired
|
* Runs when onLoad event is fired
|
||||||
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService
|
* Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService
|
||||||
* Store timestamp of next assort refresh in nextResupply property of traders .base object
|
* Store timestamp of next assort refresh in nextResupply property of traders .base object
|
||||||
*/
|
*/
|
||||||
load(): void;
|
load(): void;
|
||||||
|
@ -21,7 +21,7 @@ export declare class DynamicRouter extends Router {
|
|||||||
getHandledRoutes(): HandledRoute[];
|
getHandledRoutes(): HandledRoute[];
|
||||||
}
|
}
|
||||||
export declare class ItemEventRouterDefinition extends Router {
|
export declare class ItemEventRouterDefinition extends Router {
|
||||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
|
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
}
|
}
|
||||||
export declare class SaveLoadRouter extends Router {
|
export declare class SaveLoadRouter extends Router {
|
||||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||||
|
@ -2,12 +2,17 @@ import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
|||||||
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||||
import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper";
|
import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
import { ProbabilityHelper } from "@spt-aki/helpers/ProbabilityHelper";
|
import { ProbabilityHelper } from "@spt-aki/helpers/ProbabilityHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
|
import { IPreset } from "@spt-aki/models/eft/common/IGlobals";
|
||||||
import { Mods, ModsChances } from "@spt-aki/models/eft/common/tables/IBotType";
|
import { Mods, ModsChances } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem, Slot } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem, Slot } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { EquipmentFilterDetails, IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
import { ModSpawn } from "@spt-aki/models/enums/ModSpawn";
|
||||||
|
import { IChooseRandomCompatibleModResult } from "@spt-aki/models/spt/bots/IChooseRandomCompatibleModResult";
|
||||||
|
import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
@ -19,6 +24,8 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
|||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
|
import { IGenerateEquipmentProperties } from "./BotInventoryGenerator";
|
||||||
|
import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult";
|
||||||
export declare class BotEquipmentModGenerator {
|
export declare class BotEquipmentModGenerator {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
@ -34,39 +41,48 @@ export declare class BotEquipmentModGenerator {
|
|||||||
protected botHelper: BotHelper;
|
protected botHelper: BotHelper;
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
protected botEquipmentModPoolService: BotEquipmentModPoolService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
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);
|
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, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Check mods are compatible and add to array
|
* Check mods are compatible and add to array
|
||||||
* @param equipment Equipment item to add mods to
|
* @param equipment Equipment item to add mods to
|
||||||
* @param modPool Mod list to choose frm
|
* @param modPool Mod list to choose frm
|
||||||
* @param parentId parentid of item to add mod to
|
* @param parentId parentid of item to add mod to
|
||||||
* @param parentTemplate template objet of item to add mods 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
|
* @param forceSpawn should this mod be forced to spawn
|
||||||
* @returns Item + compatible mods as an array
|
* @returns Item + compatible mods as an array
|
||||||
*/
|
*/
|
||||||
generateModsForEquipment(equipment: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, botRole: string, forceSpawn?: boolean): Item[];
|
generateModsForEquipment(equipment: Item[], parentId: string, parentTemplate: ITemplateItem, settings: IGenerateEquipmentProperties, shouldForceSpawn?: boolean): Item[];
|
||||||
|
/**
|
||||||
|
* Filter a bots plate pool based on its current level
|
||||||
|
* @param settings Bot equipment generation settings
|
||||||
|
* @param modSlot Armor slot being filtered
|
||||||
|
* @param existingPlateTplPool Plates tpls to choose from
|
||||||
|
* @param armorItem
|
||||||
|
* @returns Array of plate tpls to choose from
|
||||||
|
*/
|
||||||
|
protected filterPlateModsForSlotByLevel(settings: IGenerateEquipmentProperties, modSlot: string, existingPlateTplPool: string[], armorItem: ITemplateItem): IFilterPlateModsForSlotByLevelResult;
|
||||||
/**
|
/**
|
||||||
* Add mods to a weapon using the provided mod pool
|
* Add mods to a weapon using the provided mod pool
|
||||||
* @param sessionId session id
|
* @param sessionId session id
|
||||||
* @param weapon Weapon to add mods to
|
* @param weapon Weapon to add mods to
|
||||||
* @param modPool Pool of compatible mods to attach to weapon
|
* @param modPool Pool of compatible mods to attach to weapon
|
||||||
* @param weaponParentId parentId of weapon
|
* @param weaponId parentId of weapon
|
||||||
* @param parentTemplate Weapon which mods will be generated on
|
* @param parentTemplate Weapon which mods will be generated on
|
||||||
* @param modSpawnChances Mod spawn chances
|
* @param modSpawnChances Mod spawn chances
|
||||||
* @param ammoTpl Ammo tpl to use when generating magazines/cartridges
|
* @param ammoTpl Ammo tpl to use when generating magazines/cartridges
|
||||||
* @param botRole Role of bot weapon is generated for
|
* @param botRole Role of bot weapon is generated for
|
||||||
* @param botLevel lvel of the bot weapon is being generated for
|
* @param botLevel Level of the bot weapon is being generated for
|
||||||
* @param modLimits limits placed on certian mod types per gun
|
* @param modLimits limits placed on certain mod types per gun
|
||||||
* @param botEquipmentRole role of bot when accessing bot.json equipment config settings
|
* @param botEquipmentRole role of bot when accessing bot.json equipment config settings
|
||||||
* @returns Weapon + mods array
|
* @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[];
|
generateModsForWeapon(sessionId: string, weapon: Item[], modPool: Mods, weaponId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, ammoTpl: string, botRole: string, botLevel: number, modLimits: BotModLimits, botEquipmentRole: string): Item[];
|
||||||
/**
|
/**
|
||||||
* Is this modslot a front or rear sight
|
* Is this modslot a front or rear sight
|
||||||
* @param modSlot Slot to check
|
* @param modSlot Slot to check
|
||||||
@ -93,16 +109,16 @@ export declare class BotEquipmentModGenerator {
|
|||||||
* @param parentTemplate item template
|
* @param parentTemplate item template
|
||||||
* @returns Slot item
|
* @returns Slot item
|
||||||
*/
|
*/
|
||||||
protected getModItemSlot(modSlot: string, parentTemplate: ITemplateItem): Slot;
|
protected getModItemSlotFromDb(modSlot: string, parentTemplate: ITemplateItem): Slot;
|
||||||
/**
|
/**
|
||||||
* Randomly choose if a mod should be spawned, 100% for required mods OR mod is ammo 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 itemSlot slot the item sits in
|
||||||
* @param modSlot slot the mod sits in
|
* @param modSlot slot the mod sits in
|
||||||
* @param modSpawnChances Chances for various mod spawns
|
* @param modSpawnChances Chances for various mod spawns
|
||||||
* @returns boolean true if it should spawn
|
* @param botEquipConfig Various config settings for generating this type of bot
|
||||||
|
* @returns ModSpawn.SPAWN when mod should be spawned, ModSpawn.DEFAULT_MOD when default mod should spawn, ModSpawn.SKIP when mod is skipped
|
||||||
*/
|
*/
|
||||||
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances): boolean;
|
protected shouldModBeSpawned(itemSlot: Slot, modSlot: string, modSpawnChances: ModsChances, botEquipConfig: EquipmentFilters): ModSpawn;
|
||||||
/**
|
/**
|
||||||
* @param modSlot Slot mod will fit into
|
* @param modSlot Slot mod will fit into
|
||||||
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
* @param isRandomisableSlot Will generate a randomised mod pool if true
|
||||||
@ -112,9 +128,32 @@ export declare class BotEquipmentModGenerator {
|
|||||||
* @param weapon array with only weapon tpl in it, ready for mods to be added
|
* @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 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
|
* @param parentTemplate Parent item the mod will go into
|
||||||
* @returns ITemplateItem
|
* @returns itemHelper.getItem() result
|
||||||
*/
|
*/
|
||||||
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem): [boolean, ITemplateItem];
|
protected chooseModToPutIntoSlot(modSlot: string, isRandomisableSlot: boolean, botWeaponSightWhitelist: Record<string, string[]>, botEquipBlacklist: EquipmentFilterDetails, itemModPool: Record<string, string[]>, weapon: Item[], ammoTpl: string, parentTemplate: ITemplateItem, modSpawnResult: ModSpawn): [boolean, ITemplateItem];
|
||||||
|
protected pickWeaponModTplForSlotFromPool(modPool: string[], parentSlot: Slot, modSpawnResult: ModSpawn, weapon: Item[], modSlotname: string): IChooseRandomCompatibleModResult;
|
||||||
|
/**
|
||||||
|
* Filter mod pool down based on various criteria:
|
||||||
|
* Is slot flagged as randomisable
|
||||||
|
* Is slot required
|
||||||
|
* Is slot flagged as default mod only
|
||||||
|
* @param itemModPool Existing pool of mods to choose
|
||||||
|
* @param modSpawnResult outcome of random roll to select if mod should be added
|
||||||
|
* @param parentTemplate Mods parent
|
||||||
|
* @param weaponTemplate Mods root parent (weapon/equipment)
|
||||||
|
* @param modSlot name of mod slot to choose for
|
||||||
|
* @param botEquipBlacklist
|
||||||
|
* @param isRandomisableSlot is flagged as a randomisable slot
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected getModPoolForSlot(itemModPool: Record<string, string[]>, modSpawnResult: ModSpawn, parentTemplate: ITemplateItem, weaponTemplate: ITemplateItem, modSlot: string, botEquipBlacklist: EquipmentFilterDetails, isRandomisableSlot: boolean): string[];
|
||||||
|
/**
|
||||||
|
* Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl)
|
||||||
|
* @param weaponTemplate
|
||||||
|
* @param parentItemTpl
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset;
|
||||||
/**
|
/**
|
||||||
* Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible
|
* Temp fix to prevent certain combinations of weapons with mods that are known to be incompatible
|
||||||
* @param weapon Weapon
|
* @param weapon Weapon
|
||||||
@ -128,7 +167,7 @@ export declare class BotEquipmentModGenerator {
|
|||||||
* @param modTpl _tpl
|
* @param modTpl _tpl
|
||||||
* @param parentId parentId
|
* @param parentId parentId
|
||||||
* @param modSlot slotId
|
* @param modSlot slotId
|
||||||
* @param modTemplate Used to add additional properites in the upd object
|
* @param modTemplate Used to add additional properties in the upd object
|
||||||
* @returns Item object
|
* @returns Item object
|
||||||
*/
|
*/
|
||||||
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item;
|
protected createModItem(modId: string, modTpl: string, parentId: string, modSlot: string, modTemplate: ITemplateItem, botRole: string): Item;
|
||||||
@ -141,21 +180,22 @@ export declare class BotEquipmentModGenerator {
|
|||||||
/**
|
/**
|
||||||
* Get a random mod from an items compatible mods Filter array
|
* Get a random mod from an items compatible mods Filter array
|
||||||
* @param modTpl ???? default value to return if nothing found
|
* @param modTpl ???? default value to return if nothing found
|
||||||
* @param parentSlot item mod will go into, used to get combatible items
|
* @param parentSlot item mod will go into, used to get compatible items
|
||||||
* @param modSlot Slot to get mod to fill
|
* @param modSlot Slot to get mod to fill
|
||||||
* @param items items to ensure picked mod is compatible with
|
* @param items items to ensure picked mod is compatible with
|
||||||
* @returns item tpl
|
* @returns item tpl
|
||||||
*/
|
*/
|
||||||
protected getModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
|
protected getRandomModTplFromItemDb(modTpl: string, parentSlot: Slot, modSlot: string, items: Item[]): string;
|
||||||
/**
|
/**
|
||||||
* Log errors if mod is not compatible with slot
|
* Log errors if mod is not compatible with slot
|
||||||
* @param modToAdd template of mod to check
|
* @param modToAdd template of mod to check
|
||||||
* @param itemSlot slot the item will be placed in
|
* @param slotAddedToTemplate slot the item will be placed in
|
||||||
* @param modSlot slot the mod will fill
|
* @param modSlot slot the mod will fill
|
||||||
* @param parentTemplate template of the mods parent item
|
* @param parentTemplate template of the mods being added
|
||||||
|
* @param botRole
|
||||||
* @returns true if valid
|
* @returns true if valid
|
||||||
*/
|
*/
|
||||||
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], itemSlot: Slot, modSlot: string, parentTemplate: ITemplateItem): boolean;
|
protected isModValidForSlot(modToAdd: [boolean, ITemplateItem], slotAddedToTemplate: Slot, modSlot: string, parentTemplate: ITemplateItem, botRole: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Find mod tpls of a provided type and add to modPool
|
* 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 desiredSlotName slot to look up and add we are adding tpls for (e.g mod_scope)
|
||||||
@ -191,9 +231,9 @@ export declare class BotEquipmentModGenerator {
|
|||||||
*/
|
*/
|
||||||
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
|
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
|
||||||
/**
|
/**
|
||||||
* Take a record of camoras and merge the compatable shells into one array
|
* Take a record of camoras and merge the compatible shells into one array
|
||||||
* @param camorasWithShells camoras we want to merge into one array
|
* @param camorasWithShells camoras we want to merge into one array
|
||||||
* @returns string array of shells fro luitple camora sources
|
* @returns string array of shells for multiple camora sources
|
||||||
*/
|
*/
|
||||||
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
|
||||||
/**
|
/**
|
||||||
|
@ -4,7 +4,7 @@ import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper";
|
|||||||
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { Health as PmcHealth, IBaseJsonSkills, IBaseSkill, IBotBase, Info, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
|
import { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||||
import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails";
|
import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails";
|
||||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
@ -48,12 +48,12 @@ export declare class BotGenerator {
|
|||||||
*/
|
*/
|
||||||
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
generatePlayerScav(sessionId: string, role: string, difficulty: string, botTemplate: IBotType): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Create x number of bots of the type/side/difficulty defined in botGenerationDetails
|
* Create 1 bots of the type/side/difficulty defined in botGenerationDetails
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @param botGenerationDetails details on how to generate bots
|
* @param botGenerationDetails details on how to generate bots
|
||||||
* @returns array of bots
|
* @returns constructed bot
|
||||||
*/
|
*/
|
||||||
prepareAndGenerateBots(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase[];
|
prepareAndGenerateBot(sessionId: string, botGenerationDetails: BotGenerationDetails): IBotBase;
|
||||||
/**
|
/**
|
||||||
* Get a clone of the database\bots\base.json file
|
* Get a clone of the database\bots\base.json file
|
||||||
* @returns IBotBase object
|
* @returns IBotBase object
|
||||||
@ -78,11 +78,11 @@ export declare class BotGenerator {
|
|||||||
/**
|
/**
|
||||||
* Create a bot nickname
|
* Create a bot nickname
|
||||||
* @param botJsonTemplate x.json from database
|
* @param botJsonTemplate x.json from database
|
||||||
* @param isPlayerScav Will bot be player scav
|
* @param botGenerationDetails
|
||||||
* @param botRole role of bot e.g. assault
|
* @param botRole role of bot e.g. assault
|
||||||
* @returns Nickname for bot
|
* @returns Nickname for bot
|
||||||
*/
|
*/
|
||||||
protected generateBotNickname(botJsonTemplate: IBotType, isPlayerScav: boolean, botRole: string, sessionId: string): string;
|
protected generateBotNickname(botJsonTemplate: IBotType, botGenerationDetails: BotGenerationDetails, botRole: string, sessionId: string): string;
|
||||||
/**
|
/**
|
||||||
* Log the number of PMCs generated to the debug console
|
* Log the number of PMCs generated to the debug console
|
||||||
* @param output Generated bot array, ready to send to client
|
* @param output Generated bot array, ready to send to client
|
||||||
@ -113,8 +113,8 @@ export declare class BotGenerator {
|
|||||||
* @param bot bot to update
|
* @param bot bot to update
|
||||||
* @returns updated IBotBase object
|
* @returns updated IBotBase object
|
||||||
*/
|
*/
|
||||||
protected generateId(bot: IBotBase): IBotBase;
|
protected generateId(bot: IBotBase): void;
|
||||||
protected generateInventoryID(profile: IBotBase): IBotBase;
|
protected generateInventoryID(profile: IBotBase): void;
|
||||||
/**
|
/**
|
||||||
* Randomise a bots game version and account category
|
* Randomise a bots game version and account category
|
||||||
* Chooses from all the game versions (standard, eod etc)
|
* Chooses from all the game versions (standard, eod etc)
|
||||||
@ -127,5 +127,5 @@ export declare class BotGenerator {
|
|||||||
* @param bot bot to add dogtag to
|
* @param bot bot to add dogtag to
|
||||||
* @returns Bot with dogtag added
|
* @returns Bot with dogtag added
|
||||||
*/
|
*/
|
||||||
protected generateDogtag(bot: IBotBase): IBotBase;
|
protected addDogtagToBot(bot: IBotBase): void;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
|||||||
import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Chances, Generation, IBotType, Inventory, Mods } from "@spt-aki/models/eft/common/tables/IBotType";
|
import { Chances, Generation, IBotType, Inventory, Mods } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||||
import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots";
|
import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots";
|
||||||
import { EquipmentFilterDetails, IBotConfig, RandomisationDetails } from "@spt-aki/models/spt/config/IBotConfig";
|
import { EquipmentFilterDetails, EquipmentFilters, IBotConfig, RandomisationDetails } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
@ -51,26 +51,31 @@ export declare class BotInventoryGenerator {
|
|||||||
/**
|
/**
|
||||||
* Add equipment to a bot
|
* Add equipment to a bot
|
||||||
* @param templateInventory bot/x.json data from db
|
* @param templateInventory bot/x.json data from db
|
||||||
* @param equipmentChances Chances items will be added to bot
|
* @param wornItemChances Chances items will be added to bot
|
||||||
* @param botRole Role bot has (assault/pmcBot)
|
* @param botRole Role bot has (assault/pmcBot)
|
||||||
* @param botInventory Inventory to add equipment to
|
* @param botInventory Inventory to add equipment to
|
||||||
* @param botLevel Level of bot
|
* @param botLevel Level of bot
|
||||||
*/
|
*/
|
||||||
protected generateAndAddEquipmentToBot(templateInventory: Inventory, equipmentChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number): void;
|
protected generateAndAddEquipmentToBot(templateInventory: Inventory, wornItemChances: Chances, botRole: string, botInventory: PmcInventory, botLevel: number): void;
|
||||||
|
/**
|
||||||
|
* Remove non-armored rigs from parameter data
|
||||||
|
* @param templateInventory
|
||||||
|
*/
|
||||||
|
protected filterRigsToThoseWithProtection(templateInventory: Inventory): void;
|
||||||
|
/**
|
||||||
|
* Remove armored rigs from parameter data
|
||||||
|
* @param templateInventory
|
||||||
|
*/
|
||||||
|
protected filterRigsToThoseWithoutProtection(templateInventory: Inventory): void;
|
||||||
/**
|
/**
|
||||||
* Add a piece of equipment with mods to inventory from the provided pools
|
* Add a piece of equipment with mods to inventory from the provided pools
|
||||||
* @param equipmentSlot Slot to select an item for
|
* @param settings Values to adjust how item is chosen and added to bot
|
||||||
* @param equipmentPool Possible items to choose from
|
* @returns true when item added
|
||||||
* @param modPool Possible mods to apply to item chosen
|
|
||||||
* @param spawnChances Chances items will be chosen to be added
|
|
||||||
* @param botRole Role of bot e.g. assault
|
|
||||||
* @param inventory Inventory to add item into
|
|
||||||
* @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;
|
protected generateEquipment(settings: IGenerateEquipmentProperties): boolean;
|
||||||
/**
|
/**
|
||||||
* Get all possible mods for item and filter down based on equipment blacklist from bot.json config
|
* 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 itemTpl Item mod pool is being retrieved and filtered
|
||||||
* @param equipmentBlacklist blacklist to filter mod pool with
|
* @param equipmentBlacklist blacklist to filter mod pool with
|
||||||
* @returns Filtered pool of mods
|
* @returns Filtered pool of mods
|
||||||
*/
|
*/
|
||||||
@ -112,3 +117,20 @@ export declare class BotInventoryGenerator {
|
|||||||
shouldSpawn: boolean;
|
shouldSpawn: boolean;
|
||||||
}, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void;
|
}, templateInventory: Inventory, botInventory: PmcInventory, equipmentChances: Chances, botRole: string, isPmc: boolean, itemGenerationWeights: Generation, botLevel: number): void;
|
||||||
}
|
}
|
||||||
|
export interface IGenerateEquipmentProperties {
|
||||||
|
/** Root Slot being generated */
|
||||||
|
rootEquipmentSlot: string;
|
||||||
|
/** Equipment pool for root slot being generated */
|
||||||
|
rootEquipmentPool: Record<string, number>;
|
||||||
|
modPool: Mods;
|
||||||
|
/** Dictionary of mod items and their chance to spawn for this bot type */
|
||||||
|
spawnChances: Chances;
|
||||||
|
/** Role being generated for */
|
||||||
|
botRole: string;
|
||||||
|
/** Level of bot being generated */
|
||||||
|
botLevel: number;
|
||||||
|
inventory: PmcInventory;
|
||||||
|
botEquipmentConfig: EquipmentFilters;
|
||||||
|
/** Settings from bot.json to adjust how item is generated */
|
||||||
|
randomisationDetails: RandomisationDetails;
|
||||||
|
}
|
||||||
|
@ -20,10 +20,17 @@ export declare class BotLevelGenerator {
|
|||||||
*/
|
*/
|
||||||
generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult;
|
generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult;
|
||||||
/**
|
/**
|
||||||
* Get the highest level a bot can be relative to the players level, but no futher than the max size from globals.exp_table
|
* Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table
|
||||||
* @param playerLevel Players current level
|
* @param playerLevel Players current level
|
||||||
* @param relativeDeltaMax max delta above player level to go
|
* @param relativeDeltaMax max delta above player level to go
|
||||||
* @returns highest level possible for bot
|
* @returns highest level possible for bot
|
||||||
*/
|
*/
|
||||||
protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number;
|
protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number;
|
||||||
|
/**
|
||||||
|
* Get the lowest level a bot can be relative to the players level, but no lower than 1
|
||||||
|
* @param playerLevel Players current level
|
||||||
|
* @param relativeDeltaMin Min delta below player level to go
|
||||||
|
* @returns lowest level possible for bot
|
||||||
|
*/
|
||||||
|
protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator";
|
import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator";
|
||||||
import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
||||||
import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper";
|
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||||
import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper";
|
import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper";
|
||||||
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
@ -9,6 +10,7 @@ import { IBotType, Inventory, ModsChances } from "@spt-aki/models/eft/common/tab
|
|||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots";
|
import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots";
|
||||||
|
import { IItemSpawnLimitSettings } from "@spt-aki/models/spt/bots/IItemSpawnLimitSettings";
|
||||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -17,24 +19,28 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
|||||||
import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService";
|
import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
export declare class BotLootGenerator {
|
export declare class BotLootGenerator {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected botWeaponGenerator: BotWeaponGenerator;
|
protected botWeaponGenerator: BotWeaponGenerator;
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
protected botHelper: BotHelper;
|
||||||
protected botLootCacheService: BotLootCacheService;
|
protected botLootCacheService: BotLootCacheService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
|
protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings;
|
||||||
/**
|
/**
|
||||||
* Add loot to bots containers
|
* Add loot to bots containers
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
@ -66,17 +72,26 @@ export declare class BotLootGenerator {
|
|||||||
*/
|
*/
|
||||||
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
||||||
/**
|
/**
|
||||||
* Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit is reached
|
* Take random items from a pool and add to an inventory until totalItemCount or totalValueLimit or space limit is reached
|
||||||
* @param pool Pool of items to pick from
|
* @param pool Pool of items to pick from with weight
|
||||||
* @param equipmentSlots What equipment slot will the loot items be added to
|
* @param equipmentSlots What equipment slot will the loot items be added to
|
||||||
* @param totalItemCount Max count of items to add
|
* @param totalItemCount Max count of items to add
|
||||||
* @param inventoryToAddItemsTo Bot inventory loot will be added to
|
* @param inventoryToAddItemsTo Bot inventory loot will be added to
|
||||||
* @param botRole Role of the bot loot is being generated for (assault/pmcbot)
|
* @param botRole Role of the bot loot is being generated for (assault/pmcbot)
|
||||||
* @param useLimits Should item limit counts be used as defined in config/bot.json
|
* @param itemSpawnLimits Item spawn limits the bot must adhere to
|
||||||
* @param totalValueLimitRub Total value of loot allowed in roubles
|
* @param totalValueLimitRub Total value of loot allowed in roubles
|
||||||
* @param isPmc Is bot being generated for a pmc
|
* @param isPmc Is bot being generated for a pmc
|
||||||
*/
|
*/
|
||||||
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, useLimits?: boolean, totalValueLimitRub?: number, isPmc?: boolean): void;
|
protected addLootFromPool(pool: Record<string, number>, equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, itemSpawnLimits?: IItemSpawnLimitSettings, totalValueLimitRub?: number, isPmc?: boolean): void;
|
||||||
|
protected createWalletLoot(walletId: string): Item[][];
|
||||||
|
/**
|
||||||
|
* Some items need child items to function, add them to the itemToAddChildrenTo array
|
||||||
|
* @param itemToAddTemplate Db template of item to check
|
||||||
|
* @param itemToAddChildrenTo Item to add children to
|
||||||
|
* @param isPmc Is the item being generated for a pmc (affects money/ammo stack sizes)
|
||||||
|
* @param botRole role bot has that owns item
|
||||||
|
*/
|
||||||
|
protected addRequiredChildItemsToParent(itemToAddTemplate: ITemplateItem, itemToAddChildrenTo: Item[], isPmc: boolean, botRole: string): void;
|
||||||
/**
|
/**
|
||||||
* Add generated weapons to inventory as loot
|
* Add generated weapons to inventory as loot
|
||||||
* @param botInventory inventory to add preset to
|
* @param botInventory inventory to add preset to
|
||||||
@ -87,44 +102,28 @@ export declare class BotLootGenerator {
|
|||||||
* @param isPmc are we generating for a pmc
|
* @param isPmc are we generating for a pmc
|
||||||
*/
|
*/
|
||||||
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
protected addLooseWeaponsToInventorySlot(sessionId: string, botInventory: PmcInventory, equipmentSlot: string, templateInventory: Inventory, modChances: ModsChances, botRole: string, isPmc: boolean, botLevel: number): void;
|
||||||
/**
|
|
||||||
* Get a random item from the pool parameter using the biasedRandomNumber system
|
|
||||||
* @param pool Pool of items to pick an item from
|
|
||||||
* @param isPmc Is the bot being created a pmc
|
|
||||||
* @returns ITemplateItem object
|
|
||||||
*/
|
|
||||||
protected getRandomItemFromPoolByRole(pool: ITemplateItem[], botRole: string): ITemplateItem;
|
|
||||||
/**
|
|
||||||
* Get the loot nvalue from botconfig
|
|
||||||
* @param botRole Role of bot e.g. assault/bosstagilla/sptBear
|
|
||||||
* @returns nvalue as number
|
|
||||||
*/
|
|
||||||
protected getBotLootNValueByRole(botRole: string): number;
|
|
||||||
/**
|
/**
|
||||||
* Hydrate item limit array to contain items that have a limit for a specific bot type
|
* Hydrate item limit array to contain items that have a limit for a specific bot type
|
||||||
* All values are set to 0
|
* All values are set to 0
|
||||||
* @param isPmc Is the bot a pmc
|
|
||||||
* @param botRole Role the bot has
|
* @param botRole Role the bot has
|
||||||
* @param limitCount
|
* @param limitCount
|
||||||
*/
|
*/
|
||||||
protected initItemLimitArray(isPmc: boolean, botRole: string, limitCount: Record<string, number>): void;
|
protected initItemLimitArray(botRole: string, limitCount: Record<string, number>): void;
|
||||||
/**
|
/**
|
||||||
* Check if an item has reached its bot-specific spawn limit
|
* Check if an item has reached its bot-specific spawn limit
|
||||||
* @param itemTemplate Item we check to see if its reached spawn limit
|
* @param itemTemplate Item we check to see if its reached spawn limit
|
||||||
* @param botRole Bot type
|
* @param botRole Bot type
|
||||||
* @param isPmc Is bot we're working with a pmc
|
* @param itemSpawnLimits
|
||||||
* @param limitCount Spawn limits for items on bot
|
|
||||||
* @param itemSpawnLimits The limits this bot is allowed to have
|
|
||||||
* @returns true if item has reached spawn limit
|
* @returns true if item has reached spawn limit
|
||||||
*/
|
*/
|
||||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, itemSpawnLimits: IItemSpawnLimitSettings): boolean;
|
||||||
/**
|
/**
|
||||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||||
* @param isPmc Is money on a PMC bot
|
* @param botRole Role bot has that has money stack
|
||||||
* @param itemTemplate item details from db
|
* @param itemTemplate item details from db
|
||||||
* @param moneyItem Money item to randomise
|
* @param moneyItem Money item to randomise
|
||||||
*/
|
*/
|
||||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
protected randomiseMoneyStackSize(botRole: string, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||||
/**
|
/**
|
||||||
* Randomise the size of an ammo stack
|
* Randomise the size of an ammo stack
|
||||||
* @param isPmc Is ammo on a PMC bot
|
* @param isPmc Is ammo on a PMC bot
|
||||||
@ -135,11 +134,10 @@ export declare class BotLootGenerator {
|
|||||||
/**
|
/**
|
||||||
* Get spawn limits for a specific bot type from bot.json config
|
* Get spawn limits for a specific bot type from bot.json config
|
||||||
* If no limit found for a non pmc bot, fall back to defaults
|
* If no limit found for a non pmc bot, fall back to defaults
|
||||||
* @param isPmc is the bot we want limits for a pmc
|
|
||||||
* @param botRole what role does the bot have
|
* @param botRole what role does the bot have
|
||||||
* @returns Dictionary of tplIds and limit
|
* @returns Dictionary of tplIds and limit
|
||||||
*/
|
*/
|
||||||
protected getItemSpawnLimitsForBotType(isPmc: boolean, botRole: string): Record<string, number>;
|
protected getItemSpawnLimitsForBotType(botRole: string): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Get the parentId or tplId of item inside spawnLimits object if it exists
|
* Get the parentId or tplId of item inside spawnLimits object if it exists
|
||||||
* @param itemTemplate item we want to look for in spawn limits
|
* @param itemTemplate item we want to look for in spawn limits
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper";
|
import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -7,20 +9,33 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
|
||||||
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
export declare class FenceBaseAssortGenerator {
|
export declare class FenceBaseAssortGenerator {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected handbookHelper: HandbookHelper;
|
protected handbookHelper: HandbookHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Create base fence assorts dynamically and store in db
|
* Create base fence assorts dynamically and store in memory
|
||||||
*/
|
*/
|
||||||
generateFenceBaseAssorts(): void;
|
generateFenceBaseAssorts(): void;
|
||||||
|
protected getItemPrice(itemTpl: string, items: Item[]): number;
|
||||||
|
protected getAmmoBoxPrice(items: Item[]): number;
|
||||||
|
/**
|
||||||
|
* Add soft inserts + armor plates to an armor
|
||||||
|
* @param armor Armor item array to add mods into
|
||||||
|
* @param itemDbDetails Armor items db template
|
||||||
|
*/
|
||||||
|
protected addChildrenToArmorModSlots(armor: Item[], itemDbDetails: ITemplateItem): void;
|
||||||
/**
|
/**
|
||||||
* Check if item is valid for being added to fence assorts
|
* Check if item is valid for being added to fence assorts
|
||||||
* @param item Item to check
|
* @param item Item to check
|
||||||
|
11
TypeScript/10ScopesAndTypes/types/generators/IFilterPlateModsForSlotByLevelResult.d.ts
vendored
Normal file
11
TypeScript/10ScopesAndTypes/types/generators/IFilterPlateModsForSlotByLevelResult.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
export interface IFilterPlateModsForSlotByLevelResult {
|
||||||
|
result: Result;
|
||||||
|
plateModTpls: string[];
|
||||||
|
}
|
||||||
|
export declare enum Result {
|
||||||
|
UNKNOWN_FAILURE = -1,
|
||||||
|
SUCCESS = 1,
|
||||||
|
NO_DEFAULT_FILTER = 2,
|
||||||
|
NOT_PLATE_HOLDING_SLOT = 3,
|
||||||
|
LACKS_PLATE_WEIGHTS = 4
|
||||||
|
}
|
@ -1,7 +1,6 @@
|
|||||||
import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper";
|
import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
|
||||||
import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation";
|
import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation";
|
||||||
import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase";
|
import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase";
|
||||||
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot";
|
import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot";
|
||||||
@ -34,7 +33,6 @@ export declare class LocationGenerator {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected objectId: ObjectId;
|
protected objectId: ObjectId;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
@ -43,7 +41,7 @@ export declare class LocationGenerator {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected locationConfig: ILocationConfig;
|
protected locationConfig: ILocationConfig;
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, ragfairServerHelper: RagfairServerHelper, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Create an array of container objects with randomised loot
|
* Create an array of container objects with randomised loot
|
||||||
* @param locationBase Map base to generate containers for
|
* @param locationBase Map base to generate containers for
|
||||||
@ -147,5 +145,5 @@ export declare class LocationGenerator {
|
|||||||
* @returns Item object
|
* @returns Item object
|
||||||
*/
|
*/
|
||||||
protected getItemInArray(items: Item[], chosenTpl: string): Item;
|
protected getItemInArray(items: Item[], chosenTpl: string): Item;
|
||||||
protected createStaticLootItem(tpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
|
protected createStaticLootItem(chosenTpl: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, parentId?: string): IContainerItem;
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@ import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
|||||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { IPreset } from "@spt-aki/models/eft/common/IGlobals";
|
import { IPreset } from "@spt-aki/models/eft/common/IGlobals";
|
||||||
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
|
||||||
import { ISealedAirdropContainerSettings, RewardDetails } from "@spt-aki/models/spt/config/IInventoryConfig";
|
import { ISealedAirdropContainerSettings, RewardDetails } from "@spt-aki/models/spt/config/IInventoryConfig";
|
||||||
import { LootItem } from "@spt-aki/models/spt/services/LootItem";
|
import { LootItem } from "@spt-aki/models/spt/services/LootItem";
|
||||||
import { LootRequest } from "@spt-aki/models/spt/services/LootRequest";
|
import { LootRequest } from "@spt-aki/models/spt/services/LootRequest";
|
||||||
@ -14,6 +14,7 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService";
|
import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
type ItemLimit = {
|
type ItemLimit = {
|
||||||
current: number;
|
current: number;
|
||||||
@ -24,6 +25,7 @@ export declare class LootGenerator {
|
|||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected presetHelper: PresetHelper;
|
protected presetHelper: PresetHelper;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
@ -31,13 +33,20 @@ export declare class LootGenerator {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected ragfairLinkedItemService: RagfairLinkedItemService;
|
protected ragfairLinkedItemService: RagfairLinkedItemService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService);
|
||||||
/**
|
/**
|
||||||
* Generate a list of items based on configuration options parameter
|
* Generate a list of items based on configuration options parameter
|
||||||
* @param options parameters to adjust how loot is generated
|
* @param options parameters to adjust how loot is generated
|
||||||
* @returns An array of loot items
|
* @returns An array of loot items
|
||||||
*/
|
*/
|
||||||
createRandomLoot(options: LootRequest): LootItem[];
|
createRandomLoot(options: LootRequest): LootItem[];
|
||||||
|
/**
|
||||||
|
* Filter armor items by their main plates protection level
|
||||||
|
* @param armor Armor preset
|
||||||
|
* @param options Loot request options
|
||||||
|
* @returns True item passes checks
|
||||||
|
*/
|
||||||
|
protected armorIsDesiredProtectionLevel(armor: IPreset, options: LootRequest): boolean;
|
||||||
/**
|
/**
|
||||||
* Construct item limit record to hold max and current item count for each item type
|
* Construct item limit record to hold max and current item count for each item type
|
||||||
* @param limits limits as defined in config
|
* @param limits limits as defined in config
|
||||||
@ -71,43 +80,36 @@ export declare class LootGenerator {
|
|||||||
* @param result array to add found preset to
|
* @param result array to add found preset to
|
||||||
* @returns true if preset was valid and added to pool
|
* @returns true if preset was valid and added to pool
|
||||||
*/
|
*/
|
||||||
protected findAndAddRandomPresetToLoot(globalDefaultPresets: [string, IPreset][], itemTypeCounts: Record<string, {
|
protected findAndAddRandomPresetToLoot(globalDefaultPresets: IPreset[], itemTypeCounts: Record<string, {
|
||||||
current: number;
|
current: number;
|
||||||
max: number;
|
max: number;
|
||||||
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
}>, itemBlacklist: string[], result: LootItem[]): boolean;
|
||||||
/**
|
/**
|
||||||
* Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds)
|
* Sealed weapon containers have a weapon + associated mods inside them + assortment of other things (food/meds)
|
||||||
* @param containerSettings sealed weapon container settings
|
* @param containerSettings sealed weapon container settings
|
||||||
* @returns Array of items to add to player inventory
|
* @returns Array of item with children arrays
|
||||||
*/
|
*/
|
||||||
getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): AddItem[];
|
getSealedWeaponCaseLoot(containerSettings: ISealedAirdropContainerSettings): Item[][];
|
||||||
/**
|
/**
|
||||||
* Get non-weapon mod rewards for a sealed container
|
* Get non-weapon mod rewards for a sealed container
|
||||||
* @param containerSettings Sealed weapon container settings
|
* @param containerSettings Sealed weapon container settings
|
||||||
* @param weaponDetailsDb Details for the weapon to reward player
|
* @param weaponDetailsDb Details for the weapon to reward player
|
||||||
* @returns AddItem array
|
* @returns Array of item with children arrays
|
||||||
*/
|
*/
|
||||||
protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): AddItem[];
|
protected getSealedContainerNonWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, weaponDetailsDb: ITemplateItem): Item[][];
|
||||||
/**
|
/**
|
||||||
* Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player
|
* Iterate over the container weaponModRewardLimits settings and create an array of weapon mods to reward player
|
||||||
* @param containerSettings Sealed weapon container settings
|
* @param containerSettings Sealed weapon container settings
|
||||||
* @param linkedItemsToWeapon All items that can be attached/inserted into weapon
|
* @param linkedItemsToWeapon All items that can be attached/inserted into weapon
|
||||||
* @param chosenWeaponPreset The weapon preset given to player as reward
|
* @param chosenWeaponPreset The weapon preset given to player as reward
|
||||||
* @returns AddItem array
|
* @returns Array of item with children arrays
|
||||||
*/
|
*/
|
||||||
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: IPreset): AddItem[];
|
protected getSealedContainerWeaponModRewards(containerSettings: ISealedAirdropContainerSettings, linkedItemsToWeapon: ITemplateItem[], chosenWeaponPreset: IPreset): Item[][];
|
||||||
/**
|
/**
|
||||||
* Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
|
* Handle event-related loot containers - currently just the halloween jack-o-lanterns that give food rewards
|
||||||
* @param rewardContainerDetails
|
* @param rewardContainerDetails
|
||||||
* @returns AddItem array
|
* @returns Array of item with children arrays
|
||||||
*/
|
*/
|
||||||
getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): AddItem[];
|
getRandomLootContainerLoot(rewardContainerDetails: RewardDetails): Item[][];
|
||||||
/**
|
|
||||||
* A bug in inventoryHelper.addItem() means you cannot add the same item to the array twice with a count of 1, it causes duplication
|
|
||||||
* Default adds 1, or increments count
|
|
||||||
* @param itemTplToAdd items tpl we want to add to array
|
|
||||||
* @param resultsArray Array to add item tpl to
|
|
||||||
*/
|
|
||||||
protected addOrIncrementItemToArray(itemTplToAdd: string, resultsArray: AddItem[]): void;
|
|
||||||
}
|
}
|
||||||
export {};
|
export {};
|
||||||
|
@ -4,6 +4,7 @@ import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
|||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
|
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
|
||||||
/**
|
/**
|
||||||
* Handle the generation of dynamic PMC loot in pockets and backpacks
|
* Handle the generation of dynamic PMC loot in pockets and backpacks
|
||||||
@ -14,22 +15,23 @@ export declare class PMCLootGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected pocketLootPool: string[];
|
protected pocketLootPool: Record<string, number>;
|
||||||
protected vestLootPool: string[];
|
protected vestLootPool: Record<string, number>;
|
||||||
protected backpackLootPool: string[];
|
protected backpackLootPool: Record<string, number>;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService);
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService);
|
||||||
/**
|
/**
|
||||||
* Create an array of loot items a PMC can have in their pockets
|
* Create an array of loot items a PMC can have in their pockets
|
||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
*/
|
*/
|
||||||
generatePMCPocketLootPool(): string[];
|
generatePMCPocketLootPool(botRole: string): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Create an array of loot items a PMC can have in their vests
|
* Create an array of loot items a PMC can have in their vests
|
||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
*/
|
*/
|
||||||
generatePMCVestLootPool(): string[];
|
generatePMCVestLootPool(botRole: string): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Check if item has a width/height that lets it fit into a 2x2 slot
|
* Check if item has a width/height that lets it fit into a 2x2 slot
|
||||||
* 1x1 / 1x2 / 2x1 / 2x2
|
* 1x1 / 1x2 / 2x1 / 2x2
|
||||||
@ -41,5 +43,12 @@ export declare class PMCLootGenerator {
|
|||||||
* Create an array of loot items a PMC can have in their backpack
|
* Create an array of loot items a PMC can have in their backpack
|
||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
*/
|
*/
|
||||||
generatePMCBackpackLootPool(): string[];
|
generatePMCBackpackLootPool(botRole: string): Record<string, number>;
|
||||||
|
/**
|
||||||
|
* Find the greated common divisor of all weights and use it on the passed in dictionary
|
||||||
|
* @param weightedDict
|
||||||
|
*/
|
||||||
|
protected reduceWeightValues(weightedDict: Record<string, number>): void;
|
||||||
|
protected commonDivisor(numbers: number[]): number;
|
||||||
|
protected gcd(a: number, b: number): number;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
import { BotGenerator } from "@spt-aki/generators/BotGenerator";
|
import { BotGenerator } from "@spt-aki/generators/BotGenerator";
|
||||||
import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
||||||
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||||
import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper";
|
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Skills, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { IBotBase, Skills, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
|
import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||||
import { IPlayerScavConfig, KarmaLevel } from "@spt-aki/models/spt/config/IPlayerScavConfig";
|
import { IPlayerScavConfig, KarmaLevel } from "@spt-aki/models/spt/config/IPlayerScavConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -24,7 +23,6 @@ export declare class PlayerScavGenerator {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
|
||||||
protected botGeneratorHelper: BotGeneratorHelper;
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
@ -36,13 +34,20 @@ export declare class PlayerScavGenerator {
|
|||||||
protected botGenerator: BotGenerator;
|
protected botGenerator: BotGenerator;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected playerScavConfig: IPlayerScavConfig;
|
protected playerScavConfig: IPlayerScavConfig;
|
||||||
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);
|
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, 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
|
* Update a player profile to include a new player scav profile
|
||||||
* @param sessionID session id to specify what profile is updated
|
* @param sessionID session id to specify what profile is updated
|
||||||
* @returns profile object
|
* @returns profile object
|
||||||
*/
|
*/
|
||||||
generate(sessionID: string): IPmcData;
|
generate(sessionID: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Add items picked from `playerscav.lootItemsToAddChancePercent`
|
||||||
|
* @param possibleItemsToAdd dict of tpl + % chance to be added
|
||||||
|
* @param scavData
|
||||||
|
* @param containersToAddTo Possible slotIds to add loot to
|
||||||
|
*/
|
||||||
|
protected addAdditionalLootToPlayerScavContainers(possibleItemsToAdd: Record<string, number>, scavData: IBotBase, containersToAddTo: string[]): void;
|
||||||
/**
|
/**
|
||||||
* Get the scav karama level for a profile
|
* Get the scav karama level for a profile
|
||||||
* Is also the fence trader rep level
|
* Is also the fence trader rep level
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
import { IPreset } from "@spt-aki/models/eft/common/IGlobals";
|
import { IPreset } from "@spt-aki/models/eft/common/IGlobals";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
@ -11,42 +12,41 @@ export declare class RagfairAssortGenerator {
|
|||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected generatedAssortItems: Item[];
|
protected generatedAssortItems: Item[][];
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
protected ragfairItemInvalidBaseTypes: string[];
|
||||||
|
constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get an array of unique items that can be sold on the flea
|
* Get an array of arrays that can be sold on the flea
|
||||||
* @returns array of unique items
|
* Each sub array contains item + children (if any)
|
||||||
|
* @returns array of arrays
|
||||||
*/
|
*/
|
||||||
getAssortItems(): Item[];
|
getAssortItems(): Item[][];
|
||||||
/**
|
/**
|
||||||
* Check internal generatedAssortItems array has objects
|
* Check internal generatedAssortItems array has objects
|
||||||
* @returns true if array has objects
|
* @returns true if array has objects
|
||||||
*/
|
*/
|
||||||
protected assortsAreGenerated(): boolean;
|
protected assortsAreGenerated(): boolean;
|
||||||
/**
|
/**
|
||||||
* Generate an array of items the flea can sell
|
* Generate an array of arrays (item + children) the flea can sell
|
||||||
* @returns array of unique items
|
* @returns array of arrays (item + children)
|
||||||
*/
|
*/
|
||||||
protected generateRagfairAssortItems(): Item[];
|
protected generateRagfairAssortItems(): Item[][];
|
||||||
/**
|
/**
|
||||||
* Get presets from globals.json
|
* Get presets from globals to add to flea
|
||||||
* @returns Preset object array
|
* ragfairConfig.dynamic.showDefaultPresetsOnly decides if its all presets or just defaults
|
||||||
|
* @returns IPreset array
|
||||||
*/
|
*/
|
||||||
protected getPresets(): IPreset[];
|
protected getPresetsToAdd(): IPreset[];
|
||||||
/**
|
|
||||||
* Get default presets from globals.json
|
|
||||||
* @returns Preset object array
|
|
||||||
*/
|
|
||||||
protected getDefaultPresets(): IPreset[];
|
|
||||||
/**
|
/**
|
||||||
* Create a base assort item and return it with populated values + 999999 stack count + unlimited count = true
|
* Create a base assort item and return it with populated values + 999999 stack count + unlimited count = true
|
||||||
* @param tplId tplid to add to item
|
* @param tplId tplid to add to item
|
||||||
* @param id id to add to item
|
* @param id id to add to item
|
||||||
* @returns hydrated Item object
|
* @returns Hydrated Item object
|
||||||
*/
|
*/
|
||||||
protected createRagfairAssortItem(tplId: string, id?: string): Item;
|
protected createRagfairAssortRootItem(tplId: string, id?: string): Item;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
|||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader";
|
import { IBarterScheme } from "@spt-aki/models/eft/common/tables/ITrader";
|
||||||
import { IRagfairOffer, OfferRequirement } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer, OfferRequirement } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
||||||
import { Dynamic, IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { Dynamic, IArmorPlateBlacklistSettings, IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
@ -119,22 +119,28 @@ export declare class RagfairOfferGenerator {
|
|||||||
* Create multiple offers for items by using a unique list of items we've generated previously
|
* Create multiple offers for items by using a unique list of items we've generated previously
|
||||||
* @param expiredOffers optional, expired offers to regenerate
|
* @param expiredOffers optional, expired offers to regenerate
|
||||||
*/
|
*/
|
||||||
generateDynamicOffers(expiredOffers?: Item[]): Promise<void>;
|
generateDynamicOffers(expiredOffers?: Item[][]): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* @param assortItemIndex Index of assort item
|
* @param assortItemWithChildren Item with its children to process into offers
|
||||||
* @param assortItemsToProcess Item array containing index
|
* @param isExpiredOffer is an expired offer
|
||||||
* @param expiredOffers Currently expired offers on flea
|
|
||||||
* @param config Ragfair dynamic config
|
* @param config Ragfair dynamic config
|
||||||
*/
|
*/
|
||||||
protected createOffersForItems(assortItemIndex: string, assortItemsToProcess: Item[], expiredOffers: Item[], config: Dynamic): Promise<void>;
|
protected createOffersFromAssort(assortItemWithChildren: Item[], isExpiredOffer: boolean, config: Dynamic): Promise<void>;
|
||||||
|
/**
|
||||||
|
* iterate over an items chidren and look for plates above desired level and remove them
|
||||||
|
* @param presetWithChildren preset to check for plates
|
||||||
|
* @param plateSettings Settings
|
||||||
|
* @returns True if plate removed
|
||||||
|
*/
|
||||||
|
protected removeBannedPlatesFromPreset(presetWithChildren: Item[], plateSettings: IArmorPlateBlacklistSettings): boolean;
|
||||||
/**
|
/**
|
||||||
* Create one flea offer for a specific item
|
* Create one flea offer for a specific item
|
||||||
* @param items Item to create offer for
|
* @param itemWithChildren Item to create offer for
|
||||||
* @param isPreset Is item a weapon preset
|
* @param isPreset Is item a weapon preset
|
||||||
* @param itemDetails raw db item details
|
* @param itemDetails raw db item details
|
||||||
* @returns Item array
|
* @returns Item array
|
||||||
*/
|
*/
|
||||||
protected createSingleOfferForItem(items: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<void>;
|
protected createSingleOfferForItem(itemWithChildren: Item[], isPreset: boolean, itemDetails: [boolean, ITemplateItem]): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Generate trader offers on flea using the traders assort data
|
* Generate trader offers on flea using the traders assort data
|
||||||
* @param traderID Trader to generate offers for
|
* @param traderID Trader to generate offers for
|
||||||
@ -144,11 +150,10 @@ export declare class RagfairOfferGenerator {
|
|||||||
* Get array of an item with its mods + condition properties (e.g durability)
|
* 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
|
* Apply randomisation adjustments to condition if item base is found in ragfair.json/dynamic/condition
|
||||||
* @param userID id of owner of item
|
* @param userID id of owner of item
|
||||||
* @param itemWithMods Item and mods, get condition of first item (only first array item is used)
|
* @param itemWithMods Item and mods, get condition of first item (only first array item is modified)
|
||||||
* @param itemDetails db details of first item
|
* @param itemDetails db details of first item
|
||||||
* @returns
|
|
||||||
*/
|
*/
|
||||||
protected randomiseItemUpdProperties(userID: string, itemWithMods: Item[], itemDetails: ITemplateItem): Item[];
|
protected randomiseOfferItemUpdProperties(userID: string, itemWithMods: Item[], itemDetails: ITemplateItem): void;
|
||||||
/**
|
/**
|
||||||
* Get the relevant condition id if item tpl matches in ragfair.json/condition
|
* Get the relevant condition id if item tpl matches in ragfair.json/condition
|
||||||
* @param tpl Item to look for matching condition object
|
* @param tpl Item to look for matching condition object
|
||||||
@ -158,24 +163,32 @@ export declare class RagfairOfferGenerator {
|
|||||||
/**
|
/**
|
||||||
* Alter an items condition based on its item base type
|
* Alter an items condition based on its item base type
|
||||||
* @param conditionSettingsId also the parentId of item being altered
|
* @param conditionSettingsId also the parentId of item being altered
|
||||||
* @param item Item to adjust condition details of
|
* @param itemWithMods Item to adjust condition details of
|
||||||
* @param itemDetails db item details of first item in array
|
* @param itemDetails db item details of first item in array
|
||||||
*/
|
*/
|
||||||
protected randomiseItemCondition(conditionSettingsId: string, item: Item, itemDetails: ITemplateItem): void;
|
protected randomiseItemCondition(conditionSettingsId: string, itemWithMods: Item[], itemDetails: ITemplateItem): void;
|
||||||
/**
|
/**
|
||||||
* Adjust an items durability/maxDurability value
|
* Adjust an items durability/maxDurability value
|
||||||
* @param item item (weapon/armor) to adjust
|
* @param item item (weapon/armor) to Adjust
|
||||||
* @param multiplier Value to multiple durability by
|
* @param itemDbDetails Weapon details from db
|
||||||
|
* @param maxMultiplier Value to multiply max durability by
|
||||||
|
* @param currentMultiplier Value to multiply current durability by
|
||||||
*/
|
*/
|
||||||
protected randomiseDurabilityValues(item: Item, multiplier: number): void;
|
protected randomiseWeaponDurability(item: Item, itemDbDetails: ITemplateItem, maxMultiplier: number, currentMultiplier: number): void;
|
||||||
|
/**
|
||||||
|
* Randomise the durabiltiy values for an armors plates and soft inserts
|
||||||
|
* @param armorWithMods Armor item with its child mods
|
||||||
|
* @param currentMultiplier Chosen multipler to use for current durability value
|
||||||
|
* @param maxMultiplier Chosen multipler to use for max durability value
|
||||||
|
*/
|
||||||
|
protected randomiseArmorDurabilityValues(armorWithMods: Item[], currentMultiplier: number, maxMultiplier: number): void;
|
||||||
/**
|
/**
|
||||||
* Add missing conditions to an item if needed
|
* Add missing conditions to an item if needed
|
||||||
* Durabiltiy for repairable items
|
* Durabiltiy for repairable items
|
||||||
* HpResource for medical items
|
* HpResource for medical items
|
||||||
* @param item item to add conditions to
|
* @param item item to add conditions to
|
||||||
* @returns Item with conditions added
|
|
||||||
*/
|
*/
|
||||||
protected addMissingConditions(item: Item): Item;
|
protected addMissingConditions(item: Item): void;
|
||||||
/**
|
/**
|
||||||
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
|
* Create a barter-based barter scheme, if not possible, fall back to making barter scheme currency based
|
||||||
* @param offerItems Items for sale in offer
|
* @param offerItems Items for sale in offer
|
||||||
@ -192,10 +205,10 @@ export declare class RagfairOfferGenerator {
|
|||||||
}[];
|
}[];
|
||||||
/**
|
/**
|
||||||
* Create a random currency-based barter scheme for an array of items
|
* Create a random currency-based barter scheme for an array of items
|
||||||
* @param offerItems Items on offer
|
* @param offerWithChildren Items on offer
|
||||||
* @param isPackOffer Is the barter scheme being created for a pack offer
|
* @param isPackOffer Is the barter scheme being created for a pack offer
|
||||||
* @param multipler What to multiply the resulting price by
|
* @param multipler What to multiply the resulting price by
|
||||||
* @returns Barter scheme for offer
|
* @returns Barter scheme for offer
|
||||||
*/
|
*/
|
||||||
protected createCurrencyBarterScheme(offerItems: Item[], isPackOffer: boolean, multipler?: number): IBarterScheme[];
|
protected createCurrencyBarterScheme(offerWithChildren: Item[], isPackOffer: boolean, multipler?: number): IBarterScheme[];
|
||||||
}
|
}
|
||||||
|
@ -1,53 +1,34 @@
|
|||||||
import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper";
|
import { RepeatableQuestRewardGenerator } from "@spt-aki/generators/RepeatableQuestRewardGenerator";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
|
||||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
|
||||||
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
|
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
|
||||||
import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
import { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
||||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { IQuestCondition, IQuestConditionCounterCondition } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
import { ICompletion, ICompletionAvailableFor, IElimination, IEliminationCondition, IExploration, IExplorationCondition, IPickup, IRepeatableQuest, IReward, IRewards } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
import { IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
|
||||||
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
||||||
import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
|
||||||
export declare class RepeatableQuestGenerator {
|
export declare class RepeatableQuestGenerator {
|
||||||
protected timeUtil: TimeUtil;
|
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected httpResponse: HttpResponseUtil;
|
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected presetHelper: PresetHelper;
|
|
||||||
protected profileHelper: ProfileHelper;
|
|
||||||
protected profileFixerService: ProfileFixerService;
|
|
||||||
protected handbookHelper: HandbookHelper;
|
|
||||||
protected ragfairServerHelper: RagfairServerHelper;
|
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected paymentService: PaymentService;
|
|
||||||
protected objectId: ObjectId;
|
protected objectId: ObjectId;
|
||||||
protected itemFilterService: ItemFilterService;
|
|
||||||
protected repeatableQuestHelper: RepeatableQuestHelper;
|
protected repeatableQuestHelper: RepeatableQuestHelper;
|
||||||
|
protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, repeatableQuestHelper: RepeatableQuestHelper, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
* 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
|
* It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest
|
||||||
@ -66,7 +47,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns Object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
|
* @returns Object of quest type format for "Elimination" (see assets/database/templates/repeatableQuests.json)
|
||||||
*/
|
*/
|
||||||
protected generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IElimination;
|
protected generateEliminationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
* Get a number of kills neded to complete elimination quest
|
* Get a number of kills neded to complete elimination quest
|
||||||
* @param targetKey Target type desired e.g. anyPmc/bossBully/Savage
|
* @param targetKey Target type desired e.g. anyPmc/bossBully/Savage
|
||||||
@ -82,7 +63,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {string} location the location on which to fulfill the elimination quest
|
* @param {string} location the location on which to fulfill the elimination quest
|
||||||
* @returns {IEliminationCondition} object of "Elimination"-location-subcondition
|
* @returns {IEliminationCondition} object of "Elimination"-location-subcondition
|
||||||
*/
|
*/
|
||||||
protected generateEliminationLocation(location: string[]): IEliminationCondition;
|
protected generateEliminationLocation(location: string[]): IQuestConditionCounterCondition;
|
||||||
/**
|
/**
|
||||||
* Create kill condition for an elimination quest
|
* Create kill condition for an elimination quest
|
||||||
* @param target Bot type target of elimination quest e.g. "AnyPmc", "Savage"
|
* @param target Bot type target of elimination quest e.g. "AnyPmc", "Savage"
|
||||||
@ -92,7 +73,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param allowedWeaponCategory What category of weapon must be used - undefined = any
|
* @param allowedWeaponCategory What category of weapon must be used - undefined = any
|
||||||
* @returns IEliminationCondition object
|
* @returns IEliminationCondition object
|
||||||
*/
|
*/
|
||||||
protected generateEliminationCondition(target: string, targetedBodyParts: string[], distance: number, allowedWeapon: string, allowedWeaponCategory: string): IEliminationCondition;
|
protected generateEliminationCondition(target: string, targetedBodyParts: string[], distance: number, allowedWeapon: string, allowedWeaponCategory: string): IQuestConditionCounterCondition;
|
||||||
/**
|
/**
|
||||||
* Generates a valid Completion quest
|
* Generates a valid Completion quest
|
||||||
*
|
*
|
||||||
@ -101,7 +82,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of quest type format for "Completion" (see assets/database/templates/repeatableQuests.json)
|
* @returns {object} object of quest type format for "Completion" (see assets/database/templates/repeatableQuests.json)
|
||||||
*/
|
*/
|
||||||
protected generateCompletionQuest(pmcLevel: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): ICompletion;
|
protected generateCompletionQuest(pmcLevel: number, traderId: string, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
* A repeatable quest, besides some more or less static components, exists of reward and condition (see assets/database/templates/repeatableQuests.json)
|
||||||
* This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many)
|
* This is a helper method for GenerateCompletionQuest to create a completion condition (of which a completion quest theoretically can have many)
|
||||||
@ -110,7 +91,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {integer} value amount of items of this specific type to request
|
* @param {integer} value amount of items of this specific type to request
|
||||||
* @returns {object} object of "Completion"-condition
|
* @returns {object} object of "Completion"-condition
|
||||||
*/
|
*/
|
||||||
protected generateCompletionAvailableForFinish(itemTpl: string, value: number): ICompletionAvailableFor;
|
protected generateCompletionAvailableForFinish(itemTpl: string, value: number): IQuestCondition;
|
||||||
/**
|
/**
|
||||||
* Generates a valid Exploration quest
|
* Generates a valid Exploration quest
|
||||||
*
|
*
|
||||||
@ -120,8 +101,15 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
||||||
* @returns {object} object of quest type format for "Exploration" (see assets/database/templates/repeatableQuests.json)
|
* @returns {object} object of quest type format for "Exploration" (see assets/database/templates/repeatableQuests.json)
|
||||||
*/
|
*/
|
||||||
protected generateExplorationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IExploration;
|
protected generateExplorationQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
||||||
protected generatePickupQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IPickup;
|
/**
|
||||||
|
* Filter a maps exits to just those for the desired side
|
||||||
|
* @param locationKey Map id (e.g. factory4_day)
|
||||||
|
* @param playerSide Scav/Pmc
|
||||||
|
* @returns Array of Exit objects
|
||||||
|
*/
|
||||||
|
protected getLocationExitsForSide(locationKey: string, playerSide: string): Exit[];
|
||||||
|
protected generatePickupQuest(pmcLevel: number, traderId: string, questTypePool: IQuestTypePool, repeatableConfig: IRepeatableQuestConfig): IRepeatableQuest;
|
||||||
/**
|
/**
|
||||||
* Convert a location into an quest code can read (e.g. factory4_day into 55f2d3fd4bdc2d5f408b4567)
|
* Convert a location into an quest code can read (e.g. factory4_day into 55f2d3fd4bdc2d5f408b4567)
|
||||||
* @param locationKey e.g factory4_day
|
* @param locationKey e.g factory4_day
|
||||||
@ -135,70 +123,7 @@ export declare class RepeatableQuestGenerator {
|
|||||||
* @param {string} exit The exit name to generate the condition for
|
* @param {string} exit The exit name to generate the condition for
|
||||||
* @returns {object} Exit condition
|
* @returns {object} Exit condition
|
||||||
*/
|
*/
|
||||||
protected generateExplorationExitCondition(exit: Exit): IExplorationCondition;
|
protected generateExplorationExitCondition(exit: Exit): IQuestConditionCounterCondition;
|
||||||
/**
|
|
||||||
* Generate the reward for a mission. A reward can consist of
|
|
||||||
* - Experience
|
|
||||||
* - Money
|
|
||||||
* - Items
|
|
||||||
* - Trader Reputation
|
|
||||||
*
|
|
||||||
* The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to
|
|
||||||
* experience / money / items / trader reputation can be defined in QuestConfig.js
|
|
||||||
*
|
|
||||||
* There's also a random variation of the reward the spread of which can be also defined in the config.
|
|
||||||
*
|
|
||||||
* Additonaly, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used
|
|
||||||
*
|
|
||||||
* @param {integer} pmcLevel player's level
|
|
||||||
* @param {number} difficulty a reward scaling factor goint from 0.2 to 1
|
|
||||||
* @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader)
|
|
||||||
* @param {object} repeatableConfig The configuration for the repeatably kind (daily, weekly) as configured in QuestConfig for the requestd quest
|
|
||||||
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
|
||||||
*/
|
|
||||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IRewards;
|
|
||||||
/**
|
|
||||||
* Should reward item have stack size increased (25% chance)
|
|
||||||
* @param item Item to possibly increase stack size of
|
|
||||||
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
|
||||||
* @returns True if it should
|
|
||||||
*/
|
|
||||||
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean;
|
|
||||||
/**
|
|
||||||
* Get a randomised number a reward items stack size should be based on its handbook price
|
|
||||||
* @param item Reward item to get stack size for
|
|
||||||
* @returns Stack size value
|
|
||||||
*/
|
|
||||||
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
|
||||||
/**
|
|
||||||
* Select a number of items that have a colelctive value of the passed in parameter
|
|
||||||
* @param repeatableConfig Config
|
|
||||||
* @param roublesBudget Total value of items to return
|
|
||||||
* @returns Array of reward items that fit budget
|
|
||||||
*/
|
|
||||||
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
|
||||||
/**
|
|
||||||
* Helper to create a reward item structured as required by the client
|
|
||||||
*
|
|
||||||
* @param {string} tpl ItemId of the rewarded item
|
|
||||||
* @param {integer} value Amount of items to give
|
|
||||||
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
|
||||||
* @returns {object} Object of "Reward"-item-type
|
|
||||||
*/
|
|
||||||
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IReward;
|
|
||||||
/**
|
|
||||||
* 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 List of rewardable items [[_tpl, itemTemplate],...]
|
|
||||||
*/
|
|
||||||
protected getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [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 {string} tpl template id of item to check
|
|
||||||
* @returns True if item is valid reward
|
|
||||||
*/
|
|
||||||
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
|
||||||
/**
|
/**
|
||||||
* Generates the base object of quest type format given as templates in assets/database/templates/repeatableQuests.json
|
* 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
|
* The templates include Elimination, Completion and Extraction quest types
|
||||||
|
106
TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts
vendored
Normal file
106
TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts
vendored
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper";
|
||||||
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
|
import { IQuestReward, IQuestRewards } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
|
import { IBaseQuestConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||||
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
|
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
|
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
||||||
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
|
export declare class RepeatableQuestRewardGenerator {
|
||||||
|
protected logger: ILogger;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
|
protected mathUtil: MathUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
|
protected handbookHelper: HandbookHelper;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
|
protected objectId: ObjectId;
|
||||||
|
protected itemFilterService: ItemFilterService;
|
||||||
|
protected seasonalEventService: SeasonalEventService;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected questConfig: IQuestConfig;
|
||||||
|
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer);
|
||||||
|
/**
|
||||||
|
* Generate the reward for a mission. A reward can consist of
|
||||||
|
* - Experience
|
||||||
|
* - Money
|
||||||
|
* - Items
|
||||||
|
* - Trader Reputation
|
||||||
|
*
|
||||||
|
* The reward is dependent on the player level as given by the wiki. The exact mapping of pmcLevel to
|
||||||
|
* experience / money / items / trader reputation can be defined in QuestConfig.js
|
||||||
|
*
|
||||||
|
* There's also a random variation of the reward the spread of which can be also defined in the config.
|
||||||
|
*
|
||||||
|
* Additionally, a scaling factor w.r.t. quest difficulty going from 0.2...1 can be used
|
||||||
|
*
|
||||||
|
* @param {integer} pmcLevel player's level
|
||||||
|
* @param {number} difficulty a reward scaling factor from 0.2 to 1
|
||||||
|
* @param {string} traderId the trader for reputation gain (and possible in the future filtering of reward item type based on trader)
|
||||||
|
* @param {object} repeatableConfig The configuration for the repeatable kind (daily, weekly) as configured in QuestConfig for the requested quest
|
||||||
|
* @returns {object} object of "Reward"-type that can be given for a repeatable mission
|
||||||
|
*/
|
||||||
|
generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards;
|
||||||
|
/**
|
||||||
|
* @param rewardItems List of reward items to filter
|
||||||
|
* @param roublesBudget The budget remaining for rewards
|
||||||
|
* @param minPrice The minimum priced item to include
|
||||||
|
* @returns True if any items remain in `rewardItems`, false otherwise
|
||||||
|
*/
|
||||||
|
protected filterRewardPoolWithinBudget(rewardItems: ITemplateItem[], roublesBudget: number, minPrice: number): boolean;
|
||||||
|
/**
|
||||||
|
* Get a randomised number a reward items stack size should be based on its handbook price
|
||||||
|
* @param item Reward item to get stack size for
|
||||||
|
* @returns Stack size value
|
||||||
|
*/
|
||||||
|
protected getRandomisedRewardItemStackSizeByPrice(item: ITemplateItem): number;
|
||||||
|
/**
|
||||||
|
* Should reward item have stack size increased (25% chance)
|
||||||
|
* @param item Item to possibly increase stack size of
|
||||||
|
* @param maxRoublePriceToStack Maximum rouble price an item can be to still be chosen for stacking
|
||||||
|
* @returns True if it should
|
||||||
|
*/
|
||||||
|
protected canIncreaseRewardItemStackSize(item: ITemplateItem, maxRoublePriceToStack: number): boolean;
|
||||||
|
protected calculateAmmoStackSizeThatFitsBudget(itemSelected: ITemplateItem, roublesBudget: number, rewardNumItems: number): number;
|
||||||
|
/**
|
||||||
|
* Select a number of items that have a colelctive value of the passed in parameter
|
||||||
|
* @param repeatableConfig Config
|
||||||
|
* @param roublesBudget Total value of items to return
|
||||||
|
* @returns Array of reward items that fit budget
|
||||||
|
*/
|
||||||
|
protected chooseRewardItemsWithinBudget(repeatableConfig: IRepeatableQuestConfig, roublesBudget: number, traderId: string): ITemplateItem[];
|
||||||
|
/**
|
||||||
|
* Helper to create a reward item structured as required by the client
|
||||||
|
*
|
||||||
|
* @param {string} tpl ItemId of the rewarded item
|
||||||
|
* @param {integer} value Amount of items to give
|
||||||
|
* @param {integer} index All rewards will be appended to a list, for unknown reasons the client wants the index
|
||||||
|
* @returns {object} Object of "Reward"-item-type
|
||||||
|
*/
|
||||||
|
protected generateRewardItem(tpl: string, value: number, index: number, preset?: Item[]): IQuestReward;
|
||||||
|
/**
|
||||||
|
* 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 List of rewardable items [[_tpl, itemTemplate],...]
|
||||||
|
*/
|
||||||
|
getRewardableItems(repeatableQuestConfig: IRepeatableQuestConfig, traderId: string): [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 {string} tpl template id of item to check
|
||||||
|
* @returns True if item is valid reward
|
||||||
|
*/
|
||||||
|
protected isValidRewardItem(tpl: string, repeatableQuestConfig: IRepeatableQuestConfig, itemBaseWhitelist: string[]): boolean;
|
||||||
|
protected addMoneyReward(traderId: string, rewards: IQuestRewards, rewardRoubles: number, rewardIndex: number): void;
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { Product } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IHideoutScavCase } from "@spt-aki/models/eft/hideout/IHideoutScavCase";
|
import { IHideoutScavCase } from "@spt-aki/models/eft/hideout/IHideoutScavCase";
|
||||||
import { IScavCaseConfig } from "@spt-aki/models/spt/config/IScavCaseConfig";
|
import { IScavCaseConfig } from "@spt-aki/models/spt/config/IScavCaseConfig";
|
||||||
@ -10,7 +10,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
|||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
|
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
/**
|
/**
|
||||||
* Handle the creation of randomised scav case rewards
|
* Handle the creation of randomised scav case rewards
|
||||||
@ -18,22 +20,25 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
|||||||
export declare class ScavCaseRewardGenerator {
|
export declare class ScavCaseRewardGenerator {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
|
protected seasonalEventService: SeasonalEventService;
|
||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected scavCaseConfig: IScavCaseConfig;
|
protected scavCaseConfig: IScavCaseConfig;
|
||||||
protected dbItemsCache: ITemplateItem[];
|
protected dbItemsCache: ITemplateItem[];
|
||||||
protected dbAmmoItemsCache: ITemplateItem[];
|
protected dbAmmoItemsCache: ITemplateItem[];
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Create an array of rewards that will be given to the player upon completing their scav case build
|
* Create an array of rewards that will be given to the player upon completing their scav case build
|
||||||
* @param recipeId recipe of the scav case craft
|
* @param recipeId recipe of the scav case craft
|
||||||
* @returns Product array
|
* @returns Product array
|
||||||
*/
|
*/
|
||||||
generate(recipeId: string): Product[];
|
generate(recipeId: string): Item[][];
|
||||||
/**
|
/**
|
||||||
* Get all db items that are not blacklisted in scavcase config or global blacklist
|
* Get all db items that are not blacklisted in scavcase config or global blacklist
|
||||||
* Store in class field
|
* Store in class field
|
||||||
@ -72,17 +77,7 @@ export declare class ScavCaseRewardGenerator {
|
|||||||
* @param rewardItems items to convert
|
* @param rewardItems items to convert
|
||||||
* @returns Product array
|
* @returns Product array
|
||||||
*/
|
*/
|
||||||
protected randomiseContainerItemRewards(rewardItems: ITemplateItem[], rarity: string): Product[];
|
protected randomiseContainerItemRewards(rewardItems: ITemplateItem[], rarity: string): Item[][];
|
||||||
/**
|
|
||||||
* Add a randomised stack count to ammo or money items
|
|
||||||
* @param item money or ammo item
|
|
||||||
* @param resultItem money or ammo item with a randomise stack size
|
|
||||||
*/
|
|
||||||
protected addStackCountToAmmoAndMoney(item: ITemplateItem, resultItem: {
|
|
||||||
_id: string;
|
|
||||||
_tpl: string;
|
|
||||||
upd: Upd;
|
|
||||||
}, rarity: string): void;
|
|
||||||
/**
|
/**
|
||||||
* @param dbItems all items from the items.json
|
* @param dbItems all items from the items.json
|
||||||
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
|
* @param itemFilters controls how the dbItems will be filtered and returned (handbook price)
|
||||||
|
@ -15,6 +15,7 @@ export declare class WeatherGenerator {
|
|||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected weatherConfig: IWeatherConfig;
|
protected weatherConfig: IWeatherConfig;
|
||||||
|
private serverStartTimestampMS;
|
||||||
constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer);
|
constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get current + raid datetime and format into correct BSG format and return
|
* Get current + raid datetime and format into correct BSG format and return
|
||||||
@ -28,13 +29,13 @@ export declare class WeatherGenerator {
|
|||||||
* @param currentDate current date
|
* @param currentDate current date
|
||||||
* @returns formatted time
|
* @returns formatted time
|
||||||
*/
|
*/
|
||||||
protected getBsgFormattedInRaidTime(currentDate: Date): string;
|
protected getBsgFormattedInRaidTime(): string;
|
||||||
/**
|
/**
|
||||||
* Get the current in-raid time
|
* Get the current in-raid time
|
||||||
* @param currentDate (new Date())
|
* @param currentDate (new Date())
|
||||||
* @returns Date object of current in-raid time
|
* @returns Date object of current in-raid time
|
||||||
*/
|
*/
|
||||||
getInRaidTime(currentDate: Date): Date;
|
getInRaidTime(): Date;
|
||||||
/**
|
/**
|
||||||
* Get current time formatted to fit BSGs requirement
|
* Get current time formatted to fit BSGs requirement
|
||||||
* @param date date to format into bsg style
|
* @param date date to format into bsg style
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen";
|
import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen";
|
||||||
import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen";
|
import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen";
|
||||||
|
import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
||||||
import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper";
|
import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
@ -11,13 +12,14 @@ export declare class ExternalInventoryMagGen implements IInventoryMagGen {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||||
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, localisationService: LocalisationService, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, randomUtil: RandomUtil);
|
constructor(logger: ILogger, itemHelper: ItemHelper, localisationService: LocalisationService, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
||||||
getPriority(): number;
|
getPriority(): number;
|
||||||
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
||||||
process(inventoryMagGen: InventoryMagGen): void;
|
process(inventoryMagGen: InventoryMagGen): void;
|
||||||
/**
|
/**
|
||||||
* Get a random compatible external magazine for a weapon, excluses internal magazines from possible pool
|
* Get a random compatible external magazine for a weapon, exclude internal magazines from possible pool
|
||||||
* @param weaponTpl Weapon to get mag for
|
* @param weaponTpl Weapon to get mag for
|
||||||
* @returns tpl of magazine
|
* @returns tpl of magazine
|
||||||
*/
|
*/
|
||||||
|
@ -14,7 +14,7 @@ export declare class AssortHelper {
|
|||||||
protected questHelper: QuestHelper;
|
protected questHelper: QuestHelper;
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper);
|
constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, localisationService: LocalisationService, questHelper: QuestHelper);
|
||||||
/**
|
/**
|
||||||
* Remove assorts from a trader that have not been unlocked yet (via player completing corrisponding quest)
|
* Remove assorts from a trader that have not been unlocked yet (via player completing corresponding quest)
|
||||||
* @param pmcProfile Player profile
|
* @param pmcProfile Player profile
|
||||||
* @param traderId Traders id the assort belongs to
|
* @param traderId Traders id the assort belongs to
|
||||||
* @param traderAssorts All assort items from same trader
|
* @param traderAssorts All assort items from same trader
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
import { ApplicationContext } from "@spt-aki/context/ApplicationContext";
|
import { ApplicationContext } from "@spt-aki/context/ApplicationContext";
|
||||||
|
import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper";
|
||||||
import { DurabilityLimitsHelper } from "@spt-aki/helpers/DurabilityLimitsHelper";
|
import { DurabilityLimitsHelper } from "@spt-aki/helpers/DurabilityLimitsHelper";
|
||||||
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { Grid, ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
|
import { ItemAddedResult } from "@spt-aki/models/enums/ItemAddedResult";
|
||||||
|
import { IChooseRandomCompatibleModResult } from "@spt-aki/models/spt/bots/IChooseRandomCompatibleModResult";
|
||||||
import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "@spt-aki/models/spt/config/IBotConfig";
|
import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
export declare class BotGeneratorHelper {
|
export declare class BotGeneratorHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -17,12 +21,14 @@ export declare class BotGeneratorHelper {
|
|||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected durabilityLimitsHelper: DurabilityLimitsHelper;
|
protected durabilityLimitsHelper: DurabilityLimitsHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
|
protected inventoryHelper: InventoryHelper;
|
||||||
|
protected containerHelper: ContainerHelper;
|
||||||
protected applicationContext: ApplicationContext;
|
protected applicationContext: ApplicationContext;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected botConfig: IBotConfig;
|
protected botConfig: IBotConfig;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Adds properties to an item
|
* Adds properties to an item
|
||||||
* e.g. Repairable / HasHinge / Foldable / MaxDurability
|
* e.g. Repairable / HasHinge / Foldable / MaxDurability
|
||||||
@ -30,7 +36,7 @@ export declare class BotGeneratorHelper {
|
|||||||
* @param botRole Used by weapons to randomize 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
|
* @returns Item Upd object with extra properties
|
||||||
*/
|
*/
|
||||||
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
|
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: string): {
|
||||||
upd?: Upd;
|
upd?: Upd;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
@ -62,32 +68,36 @@ export declare class BotGeneratorHelper {
|
|||||||
* @returns Repairable object
|
* @returns Repairable object
|
||||||
*/
|
*/
|
||||||
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
|
protected generateArmorRepairableProperties(itemTemplate: ITemplateItem, botRole: string): Repairable;
|
||||||
|
isWeaponModIncompatibleWithCurrentMods(itemsEquipped: Item[], tplToCheck: string, modSlot: string): IChooseRandomCompatibleModResult;
|
||||||
/**
|
/**
|
||||||
* Can item be added to another item without conflict
|
* Can item be added to another item without conflict
|
||||||
* @param items Items to check compatibilities with
|
* @param itemsEquipped Items to check compatibilities with
|
||||||
* @param tplToCheck Tpl of the item to check for incompatibilities
|
* @param tplToCheck Tpl of the item to check for incompatibilities
|
||||||
* @param equipmentSlot Slot the item will be placed into
|
* @param equipmentSlot Slot the item will be placed into
|
||||||
* @returns false if no incompatibilities, also has incompatibility reason
|
* @returns false if no incompatibilities, also has incompatibility reason
|
||||||
*/
|
*/
|
||||||
isItemIncompatibleWithCurrentItems(items: Item[], tplToCheck: string, equipmentSlot: string): {
|
isItemIncompatibleWithCurrentItems(itemsEquipped: Item[], tplToCheck: string, equipmentSlot: string): IChooseRandomCompatibleModResult;
|
||||||
incompatible: boolean;
|
|
||||||
reason: string;
|
|
||||||
};
|
|
||||||
/**
|
/**
|
||||||
* Convert a bots role to the equipment role used in config/bot.json
|
* Convert a bots role to the equipment role used in config/bot.json
|
||||||
* @param botRole Role to convert
|
* @param botRole Role to convert
|
||||||
* @returns Equipment role (e.g. pmc / assault / bossTagilla)
|
* @returns Equipment role (e.g. pmc / assault / bossTagilla)
|
||||||
*/
|
*/
|
||||||
getBotEquipmentRole(botRole: string): string;
|
getBotEquipmentRole(botRole: string): string;
|
||||||
}
|
/**
|
||||||
/** TODO - move into own class */
|
* Adds an item with all its children into specified equipmentSlots, wherever it fits.
|
||||||
export declare class ExhaustableArray<T> {
|
* @param equipmentSlots Slot to add item+children into
|
||||||
private itemPool;
|
* @param rootItemId Root item id to use as mod items parentid
|
||||||
private randomUtil;
|
* @param rootItemTplId Root itms tpl id
|
||||||
private jsonUtil;
|
* @param itemWithChildren Item to add
|
||||||
private pool;
|
* @param inventory Inventory to add item+children into
|
||||||
constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil);
|
* @returns ItemAddedResult result object
|
||||||
getRandomValue(): T;
|
*/
|
||||||
getFirstValue(): T;
|
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], rootItemId: string, rootItemTplId: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult;
|
||||||
hasValues(): boolean;
|
/**
|
||||||
|
* Is the provided item allowed inside a container
|
||||||
|
* @param slotGrid Items sub-grid we want to place item inside
|
||||||
|
* @param itemTpl Item tpl being placed
|
||||||
|
* @returns True if allowed
|
||||||
|
*/
|
||||||
|
protected itemAllowedInContainer(slotGrid: Grid, itemTpl: string): boolean;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper";
|
import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType";
|
import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { Grid, ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots";
|
import { EquipmentSlots } from "@spt-aki/models/enums/EquipmentSlots";
|
||||||
import { ItemAddedResult } from "@spt-aki/models/enums/ItemAddedResult";
|
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
@ -19,11 +17,10 @@ export declare class BotWeaponGeneratorHelper {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected inventoryHelper: InventoryHelper;
|
|
||||||
protected weightedRandomHelper: WeightedRandomHelper;
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
|
protected botGeneratorHelper: BotGeneratorHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected containerHelper: ContainerHelper;
|
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, localisationService: LocalisationService);
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, containerHelper: ContainerHelper);
|
|
||||||
/**
|
/**
|
||||||
* Get a randomized number of bullets for a specific magazine
|
* Get a randomized number of bullets for a specific magazine
|
||||||
* @param magCounts Weights of magazines
|
* @param magCounts Weights of magazines
|
||||||
@ -65,22 +62,4 @@ export declare class BotWeaponGeneratorHelper {
|
|||||||
* @returns tpl of magazine
|
* @returns tpl of magazine
|
||||||
*/
|
*/
|
||||||
getWeaponsDefaultMagazineTpl(weaponTemplate: ITemplateItem): string;
|
getWeaponsDefaultMagazineTpl(weaponTemplate: ITemplateItem): string;
|
||||||
/**
|
|
||||||
* 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 Slot to add item+children into
|
|
||||||
* @param parentId
|
|
||||||
* @param parentTpl
|
|
||||||
* @param itemWithChildren Item to add
|
|
||||||
* @param inventory Inventory to add item+children into
|
|
||||||
* @returns a `boolean` indicating item was added
|
|
||||||
*/
|
|
||||||
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], parentId: string, parentTpl: string, itemWithChildren: Item[], inventory: Inventory): ItemAddedResult;
|
|
||||||
/**
|
|
||||||
* Is the provided item allowed inside a container
|
|
||||||
* @param slotGrid Items sub-grid we want to place item inside
|
|
||||||
* @param itemTpl Item tpl being placed
|
|
||||||
* @returns True if allowed
|
|
||||||
*/
|
|
||||||
protected itemAllowedInContainer(slotGrid: Grid, itemTpl: string): boolean;
|
|
||||||
}
|
}
|
||||||
|
@ -28,13 +28,12 @@ export declare class ContainerHelper {
|
|||||||
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
protected locateSlot(container2D: number[][], containerX: number, containerY: number, x: number, y: number, itemW: number, itemH: number): boolean;
|
||||||
/**
|
/**
|
||||||
* Find a free slot for an item to be placed at
|
* Find a free slot for an item to be placed at
|
||||||
* @param container2D Container to palce item in
|
* @param container2D Container to place item in
|
||||||
* @param x Container x size
|
* @param x Container x size
|
||||||
* @param y Container y size
|
* @param y Container y size
|
||||||
* @param itemW Items width
|
* @param itemW Items width
|
||||||
* @param itemH Items height
|
* @param itemH Items height
|
||||||
* @param rotate is item rotated
|
* @param rotate is item rotated
|
||||||
* @returns Location to place item
|
|
||||||
*/
|
*/
|
||||||
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): number[][];
|
fillContainerMapWithItem(container2D: number[][], x: number, y: number, itemW: number, itemH: number, rotate: boolean): void;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
|||||||
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
||||||
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||||
|
import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { GiftService } from "@spt-aki/services/GiftService";
|
import { GiftService } from "@spt-aki/services/GiftService";
|
||||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||||
@ -14,6 +15,7 @@ export declare class SptDialogueChatBot implements IDialogueChatBot {
|
|||||||
protected giftService: GiftService;
|
protected giftService: GiftService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected coreConfig: ICoreConfig;
|
protected coreConfig: ICoreConfig;
|
||||||
|
protected weatherConfig: IWeatherConfig;
|
||||||
constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer);
|
constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer);
|
||||||
getChatBot(): IUserDialogInfo;
|
getChatBot(): IUserDialogInfo;
|
||||||
/**
|
/**
|
||||||
|
@ -2,8 +2,7 @@ import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
|||||||
import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper";
|
import { NotificationSendHelper } from "@spt-aki/helpers/NotificationSendHelper";
|
||||||
import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper";
|
import { NotifierHelper } from "@spt-aki/helpers/NotifierHelper";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { Dialogue, MessageContent, MessagePreview } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { Dialogue, MessagePreview } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { MessageType } from "@spt-aki/models/enums/MessageType";
|
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
@ -19,14 +18,6 @@ export declare class DialogueHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
constructor(logger: ILogger, hashUtil: HashUtil, saveServer: SaveServer, databaseServer: DatabaseServer, notifierHelper: NotifierHelper, notificationSendHelper: NotificationSendHelper, localisationService: LocalisationService, itemHelper: ItemHelper);
|
||||||
/**
|
|
||||||
* @deprecated Use MailSendService.sendMessage() or helpers
|
|
||||||
*/
|
|
||||||
createMessageContext(templateId: string, messageType: MessageType, maxStoreTime?: any): MessageContent;
|
|
||||||
/**
|
|
||||||
* @deprecated Use MailSendService.sendMessage() or helpers
|
|
||||||
*/
|
|
||||||
addDialogueMessage(dialogueID: string, messageContent: MessageContent, sessionID: string, rewards?: Item[], messageType?: MessageType): void;
|
|
||||||
/**
|
/**
|
||||||
* Get the preview contents of the last message in a dialogue.
|
* Get the preview contents of the last message in a dialogue.
|
||||||
* @param dialogue
|
* @param dialogue
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
import { Category } from "@spt-aki/models/eft/common/tables/IHandbookBase";
|
import { Category } from "@spt-aki/models/eft/common/tables/IHandbookBase";
|
||||||
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
|
import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
declare class LookupItem<T, I> {
|
declare class LookupItem<T, I> {
|
||||||
@ -14,9 +17,11 @@ export declare class LookupCollection {
|
|||||||
export declare class HandbookHelper {
|
export declare class HandbookHelper {
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected configServer: ConfigServer;
|
||||||
|
protected itemConfig: IItemConfig;
|
||||||
protected lookupCacheGenerated: boolean;
|
protected lookupCacheGenerated: boolean;
|
||||||
protected handbookPriceCache: LookupCollection;
|
protected handbookPriceCache: LookupCollection;
|
||||||
constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil);
|
constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Create an in-memory cache of all items with associated handbook price in handbookPriceCache class
|
* Create an in-memory cache of all items with associated handbook price in handbookPriceCache class
|
||||||
*/
|
*/
|
||||||
@ -28,6 +33,7 @@ export declare class HandbookHelper {
|
|||||||
* @returns price in roubles
|
* @returns price in roubles
|
||||||
*/
|
*/
|
||||||
getTemplatePrice(tpl: string): number;
|
getTemplatePrice(tpl: string): number;
|
||||||
|
getTemplatePriceForItems(items: Item[]): number;
|
||||||
/**
|
/**
|
||||||
* Get all items in template with the given parent category
|
* Get all items in template with the given parent category
|
||||||
* @param parentId
|
* @param parentId
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { HideoutArea, IHideoutImprovement, Production, Productive } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
import { StageBonus } from "@spt-aki/models/eft/hideout/IHideoutArea";
|
||||||
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
import { IHideoutContinuousProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutContinuousProductionStartRequestData";
|
||||||
import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction";
|
import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProduction";
|
||||||
import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||||
import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData";
|
import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||||
import { IAddItemRequestData } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
@ -19,6 +20,7 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
|||||||
import { PlayerService } from "@spt-aki/services/PlayerService";
|
import { PlayerService } from "@spt-aki/services/PlayerService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class HideoutHelper {
|
export declare class HideoutHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
@ -31,14 +33,17 @@ export declare class HideoutHelper {
|
|||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected playerService: PlayerService;
|
protected playerService: PlayerService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
static bitcoinFarm: string;
|
static bitcoinFarm: string;
|
||||||
|
static bitcoinProductionId: string;
|
||||||
static waterCollector: string;
|
static waterCollector: string;
|
||||||
static bitcoin: string;
|
static bitcoinTpl: string;
|
||||||
static expeditionaryFuelTank: string;
|
static expeditionaryFuelTank: string;
|
||||||
static maxSkillPoint: number;
|
static maxSkillPoint: number;
|
||||||
protected hideoutConfig: IHideoutConfig;
|
protected hideoutConfig: IHideoutConfig;
|
||||||
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, configServer: ConfigServer);
|
constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil);
|
||||||
/**
|
/**
|
||||||
* Add production to profiles' Hideout.Production array
|
* Add production to profiles' Hideout.Production array
|
||||||
* @param pmcData Profile to add production to
|
* @param pmcData Profile to add production to
|
||||||
@ -80,6 +85,16 @@ export declare class HideoutHelper {
|
|||||||
waterCollectorHasFilter: boolean;
|
waterCollectorHasFilter: boolean;
|
||||||
};
|
};
|
||||||
protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean;
|
protected doesWaterCollectorHaveFilter(waterCollector: HideoutArea): boolean;
|
||||||
|
/**
|
||||||
|
* Iterate over productions and update their progress timers
|
||||||
|
* @param pmcData Profile to check for productions and update
|
||||||
|
* @param hideoutProperties Hideout properties
|
||||||
|
*/
|
||||||
|
protected updateProductionTimers(pmcData: IPmcData, hideoutProperties: {
|
||||||
|
btcFarmCGs: number;
|
||||||
|
isGeneratorOn: boolean;
|
||||||
|
waterCollectorHasFilter: boolean;
|
||||||
|
}): void;
|
||||||
/**
|
/**
|
||||||
* Update progress timer for water collector
|
* Update progress timer for water collector
|
||||||
* @param pmcData profile to update
|
* @param pmcData profile to update
|
||||||
@ -91,16 +106,6 @@ export declare class HideoutHelper {
|
|||||||
isGeneratorOn: boolean;
|
isGeneratorOn: boolean;
|
||||||
waterCollectorHasFilter: boolean;
|
waterCollectorHasFilter: boolean;
|
||||||
}): void;
|
}): void;
|
||||||
/**
|
|
||||||
* Iterate over productions and update their progress timers
|
|
||||||
* @param pmcData Profile to check for productions and update
|
|
||||||
* @param hideoutProperties Hideout properties
|
|
||||||
*/
|
|
||||||
protected updateProductionTimers(pmcData: IPmcData, hideoutProperties: {
|
|
||||||
btcFarmCGs: number;
|
|
||||||
isGeneratorOn: boolean;
|
|
||||||
waterCollectorHasFilter: boolean;
|
|
||||||
}): void;
|
|
||||||
/**
|
/**
|
||||||
* Update a productions progress value based on the amount of time that has passed
|
* Update a productions progress value based on the amount of time that has passed
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -138,17 +143,34 @@ export declare class HideoutHelper {
|
|||||||
isGeneratorOn: boolean;
|
isGeneratorOn: boolean;
|
||||||
waterCollectorHasFilter: boolean;
|
waterCollectorHasFilter: boolean;
|
||||||
}): void;
|
}): void;
|
||||||
protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData): void;
|
/**
|
||||||
protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void;
|
* Decrease fuel from generator slots based on amount of time since last time this occured
|
||||||
|
* @param generatorArea Hideout area
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param isGeneratorOn Is the generator turned on since last update
|
||||||
|
*/
|
||||||
|
protected updateFuel(generatorArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void;
|
||||||
|
protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, hideoutProperties: {
|
||||||
|
btcFarmCGs: number;
|
||||||
|
isGeneratorOn: boolean;
|
||||||
|
waterCollectorHasFilter: boolean;
|
||||||
|
}): void;
|
||||||
|
/**
|
||||||
|
* Get craft time and make adjustments to account for dev profile + crafting skill level
|
||||||
|
* @param pmcData Player profile making craft
|
||||||
|
* @param recipeId Recipe being crafted
|
||||||
|
* @param applyHideoutManagementBonus should the hideout mgmt bonus be appled to the calculation
|
||||||
|
* @returns Items craft time with bonuses subtracted
|
||||||
|
*/
|
||||||
|
protected getAdjustedCraftTimeWithSkills(pmcData: IPmcData, recipeId: string, applyHideoutManagementBonus?: boolean): number;
|
||||||
/**
|
/**
|
||||||
* Adjust water filter objects resourceValue or delete when they reach 0 resource
|
* Adjust water filter objects resourceValue or delete when they reach 0 resource
|
||||||
* @param waterFilterArea water filter area to update
|
* @param waterFilterArea water filter area to update
|
||||||
* @param production production object
|
* @param production production object
|
||||||
* @param isGeneratorOn is generator enabled
|
* @param isGeneratorOn is generator enabled
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @returns Updated HideoutArea object
|
|
||||||
*/
|
*/
|
||||||
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): HideoutArea;
|
protected updateWaterFilters(waterFilterArea: HideoutArea, production: Production, isGeneratorOn: boolean, pmcData: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
* Get an adjusted water filter drain rate based on time elapsed since last run,
|
||||||
* handle edge case when craft time has gone on longer than total production time
|
* handle edge case when craft time has gone on longer than total production time
|
||||||
@ -156,9 +178,9 @@ export declare class HideoutHelper {
|
|||||||
* @param totalProductionTime Total time collecting water
|
* @param totalProductionTime Total time collecting water
|
||||||
* @param productionProgress how far water collector has progressed
|
* @param productionProgress how far water collector has progressed
|
||||||
* @param baseFilterDrainRate Base drain rate
|
* @param baseFilterDrainRate Base drain rate
|
||||||
* @returns
|
* @returns drain rate (adjusted)
|
||||||
*/
|
*/
|
||||||
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
protected getTimeAdjustedWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||||
/**
|
/**
|
||||||
* Get the water filter drain rate based on hideout bonues player has
|
* Get the water filter drain rate based on hideout bonues player has
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
@ -178,8 +200,8 @@ export declare class HideoutHelper {
|
|||||||
* @param resourceUnitsConsumed
|
* @param resourceUnitsConsumed
|
||||||
* @returns Upd
|
* @returns Upd
|
||||||
*/
|
*/
|
||||||
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd;
|
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number, isFoundInRaid: boolean): Upd;
|
||||||
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData): void;
|
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void;
|
||||||
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
|
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
|
||||||
/**
|
/**
|
||||||
* Add bitcoin object to btc production products array and set progress time
|
* Add bitcoin object to btc production products array and set progress time
|
||||||
@ -196,15 +218,15 @@ export declare class HideoutHelper {
|
|||||||
*/
|
*/
|
||||||
protected getTimeElapsedSinceLastServerTick(pmcData: IPmcData, isGeneratorOn: boolean, recipe?: IHideoutProduction): number;
|
protected getTimeElapsedSinceLastServerTick(pmcData: IPmcData, isGeneratorOn: boolean, recipe?: IHideoutProduction): number;
|
||||||
/**
|
/**
|
||||||
* Get a count of how many BTC can be gathered by the profile
|
* Get a count of how many possible BTC can be gathered by the profile
|
||||||
* @param pmcData Profile to look up
|
* @param pmcData Profile to look up
|
||||||
* @returns coin slot count
|
* @returns Coin slot count
|
||||||
*/
|
*/
|
||||||
protected getBTCSlots(pmcData: IPmcData): number;
|
protected getBTCSlots(pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
* Get a count of bitcoins player miner can hold
|
* Get a count of how many additional bitcoins player hideout can hold with elite skill
|
||||||
*/
|
*/
|
||||||
protected getBitcoinMinerContainerSlotSize(): number;
|
protected getEliteSkillAdditionalBitcoinSlotCount(): number;
|
||||||
/**
|
/**
|
||||||
* HideoutManagement skill gives a consumption bonus the higher the level
|
* HideoutManagement skill gives a consumption bonus the higher the level
|
||||||
* 0.5% per level per 1-51, (25.5% at max)
|
* 0.5% per level per 1-51, (25.5% at max)
|
||||||
@ -213,12 +235,21 @@ export declare class HideoutHelper {
|
|||||||
*/
|
*/
|
||||||
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
||||||
/**
|
/**
|
||||||
* Adjust craft time based on crafting skill level found in player profile
|
* Get a multipler based on players skill level and value per level
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param skill Player skill from profile
|
||||||
|
* @param valuePerLevel Value from globals.config.SkillsSettings - `PerLevel`
|
||||||
|
* @returns Multipler from 0 to 1
|
||||||
|
*/
|
||||||
|
protected getSkillBonusMultipliedBySkillLevel(pmcData: IPmcData, skill: SkillTypes, valuePerLevel: number): number;
|
||||||
|
/**
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param productionTime Time to complete hideout craft in seconds
|
* @param productionTime Time to complete hideout craft in seconds
|
||||||
* @returns Adjusted craft time in seconds
|
* @param skill Skill bonus to get reduction from
|
||||||
|
* @param amountPerLevel Skill bonus amount to apply
|
||||||
|
* @returns Seconds to reduce craft time by
|
||||||
*/
|
*/
|
||||||
protected getCraftingSkillProductionTimeReduction(pmcData: IPmcData, productionTime: number): number;
|
getSkillProductionTimeReduction(pmcData: IPmcData, productionTime: number, skill: SkillTypes, amountPerLevel: number): number;
|
||||||
isProduction(productive: Productive): productive is Production;
|
isProduction(productive: Productive): productive is Production;
|
||||||
/**
|
/**
|
||||||
* Gather crafted BTC from hideout area and add to inventory
|
* Gather crafted BTC from hideout area and add to inventory
|
||||||
@ -226,15 +257,9 @@ export declare class HideoutHelper {
|
|||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param request Take production request
|
* @param request Take production request
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @param output Output object to update
|
||||||
*/
|
*/
|
||||||
getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string): IItemEventRouterResponse;
|
getBTC(pmcData: IPmcData, request: IHideoutTakeProductionRequestData, sessionId: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
|
||||||
* Create a single bitcoin request object
|
|
||||||
* @param pmcData Player profile
|
|
||||||
* @returns IAddItemRequestData
|
|
||||||
*/
|
|
||||||
protected createBitcoinRequest(pmcData: IPmcData): IAddItemRequestData;
|
|
||||||
/**
|
/**
|
||||||
* Upgrade hideout wall from starting level to interactable level if necessary stations have been upgraded
|
* Upgrade hideout wall from starting level to interactable level if necessary stations have been upgraded
|
||||||
* @param pmcProfile Profile to upgrade wall in
|
* @param pmcProfile Profile to upgrade wall in
|
||||||
@ -251,4 +276,17 @@ export declare class HideoutHelper {
|
|||||||
* @param pmcProfile Profile to adjust
|
* @param pmcProfile Profile to adjust
|
||||||
*/
|
*/
|
||||||
setHideoutImprovementsToCompleted(pmcProfile: IPmcData): void;
|
setHideoutImprovementsToCompleted(pmcProfile: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Add/remove bonus combat skill based on number of dogtags in place of fame hideout area
|
||||||
|
* @param pmcData Player profile
|
||||||
|
*/
|
||||||
|
applyPlaceOfFameDogtagBonus(pmcData: IPmcData): void;
|
||||||
|
/**
|
||||||
|
* Calculate the raw dogtag combat skill bonus for place of fame based on number of dogtags
|
||||||
|
* Reverse engineered from client code
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param activeDogtags Active dogtags in place of fame dogtag slots
|
||||||
|
* @returns combat bonus
|
||||||
|
*/
|
||||||
|
protected getDogtagCombatSkillBonusPercent(pmcData: IPmcData, activeDogtags: Item[]): number;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
|||||||
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
||||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
||||||
import { IPmcData, IPostRaidPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData, IPostRaidPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { IQuestStatus, TraderInfo, Victim } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { IQuestStatus, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData";
|
import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData";
|
||||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||||
@ -15,6 +15,7 @@ import { SaveServer } from "@spt-aki/servers/SaveServer";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
import { ProfileHelper } from "./ProfileHelper";
|
import { ProfileHelper } from "./ProfileHelper";
|
||||||
export declare class InRaidHelper {
|
export declare class InRaidHelper {
|
||||||
@ -31,9 +32,10 @@ export declare class InRaidHelper {
|
|||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected profileFixerService: ProfileFixerService;
|
protected profileFixerService: ProfileFixerService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
|
protected randomUtil: RandomUtil;
|
||||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||||
protected inRaidConfig: IInRaidConfig;
|
protected inRaidConfig: IInRaidConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil);
|
||||||
/**
|
/**
|
||||||
* Lookup quest item loss from lostOnDeath config
|
* Lookup quest item loss from lostOnDeath config
|
||||||
* @returns True if items should be removed from inventory
|
* @returns True if items should be removed from inventory
|
||||||
@ -45,19 +47,6 @@ export declare class InRaidHelper {
|
|||||||
* @param items Items array to check
|
* @param items Items array to check
|
||||||
*/
|
*/
|
||||||
addUpdToMoneyFromRaid(items: Item[]): void;
|
addUpdToMoneyFromRaid(items: Item[]): void;
|
||||||
/**
|
|
||||||
* Add karma changes up and return the new value
|
|
||||||
* @param existingFenceStanding Current fence standing level
|
|
||||||
* @param victims Array of kills player performed
|
|
||||||
* @returns adjusted karma level after kills are taken into account
|
|
||||||
*/
|
|
||||||
calculateFenceStandingChangeFromKills(existingFenceStanding: number, victims: Victim[]): number;
|
|
||||||
/**
|
|
||||||
* Get the standing gain/loss for killing an npc
|
|
||||||
* @param victim Who was killed by player
|
|
||||||
* @returns a numerical standing gain or loss
|
|
||||||
*/
|
|
||||||
protected getFenceStandingChangeForKillAsScav(victim: Victim): number;
|
|
||||||
/**
|
/**
|
||||||
* Reset a profile to a baseline, used post-raid
|
* Reset a profile to a baseline, used post-raid
|
||||||
* Reset points earned during session property
|
* Reset points earned during session property
|
||||||
@ -74,7 +63,7 @@ export declare class InRaidHelper {
|
|||||||
*/
|
*/
|
||||||
protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void;
|
protected resetSkillPointsEarnedDuringRaid(profile: IPmcData): void;
|
||||||
/** Check counters are correct in profile */
|
/** Check counters are correct in profile */
|
||||||
protected validateBackendCounters(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void;
|
protected validateTaskConditionCounters(saveProgressRequest: ISaveProgressRequestData, profileData: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Update various serverPMC profile values; quests/limb hp/trader standing with values post-raic
|
* Update various serverPMC profile values; quests/limb hp/trader standing with values post-raic
|
||||||
* @param pmcData Server PMC profile
|
* @param pmcData Server PMC profile
|
||||||
@ -109,6 +98,12 @@ export declare class InRaidHelper {
|
|||||||
* @param tradersClientProfile Client
|
* @param tradersClientProfile Client
|
||||||
*/
|
*/
|
||||||
protected applyTraderStandingAdjustments(tradersServerProfile: Record<string, TraderInfo>, tradersClientProfile: Record<string, TraderInfo>): void;
|
protected applyTraderStandingAdjustments(tradersServerProfile: Record<string, TraderInfo>, tradersClientProfile: Record<string, TraderInfo>): void;
|
||||||
|
/**
|
||||||
|
* Transfer client achievements into profile
|
||||||
|
* @param profile Player pmc profile
|
||||||
|
* @param clientAchievements Achievements from client
|
||||||
|
*/
|
||||||
|
protected updateProfileAchievements(profile: IPmcData, clientAchievements: Record<string, number>): void;
|
||||||
/**
|
/**
|
||||||
* Set the SPT inraid location Profile property to 'none'
|
* Set the SPT inraid location Profile property to 'none'
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
@ -129,16 +124,15 @@ export declare class InRaidHelper {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param serverProfile Profile to update
|
* @param serverProfile Profile to update
|
||||||
* @param postRaidProfile Profile returned by client after a raid
|
* @param postRaidProfile Profile returned by client after a raid
|
||||||
* @returns Updated profile
|
|
||||||
*/
|
*/
|
||||||
setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData): IPmcData;
|
setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData): void;
|
||||||
/**
|
/**
|
||||||
* Clear pmc inventory of all items except those that are exempt
|
* Clear PMC inventory of all items except those that are exempt
|
||||||
* Used post-raid to remove items after death
|
* Used post-raid to remove items after death
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param sessionID Session id
|
* @param sessionId Session id
|
||||||
*/
|
*/
|
||||||
deleteInventory(pmcData: IPmcData, sessionID: string): void;
|
deleteInventory(pmcData: IPmcData, sessionId: string): void;
|
||||||
/**
|
/**
|
||||||
* Get an array of items from a profile that will be lost on death
|
* Get an array of items from a profile that will be lost on death
|
||||||
* @param pmcProfile Profile to get items from
|
* @param pmcProfile Profile to get items from
|
||||||
|
@ -2,17 +2,21 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper";
|
|||||||
import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper";
|
import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
||||||
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { AddItem, IAddItemRequestData } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
||||||
|
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
||||||
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
||||||
|
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
||||||
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
||||||
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
import { IInventorySplitRequestData } from "@spt-aki/models/eft/inventory/IInventorySplitRequestData";
|
import { IInventorySplitRequestData } from "@spt-aki/models/eft/inventory/IInventorySplitRequestData";
|
||||||
|
import { IInventoryTransferRequestData } from "@spt-aki/models/eft/inventory/IInventoryTransferRequestData";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IInventoryConfig, RewardDetails } from "@spt-aki/models/spt/config/IInventoryConfig";
|
import { IInventoryConfig, RewardDetails } from "@spt-aki/models/spt/config/IInventoryConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -23,7 +27,7 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
|||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
export interface OwnerInventoryItems {
|
export interface IOwnerInventoryItems {
|
||||||
/** Inventory items from source */
|
/** Inventory items from source */
|
||||||
from: Item[];
|
from: Item[];
|
||||||
/** Inventory items at destination */
|
/** Inventory items at destination */
|
||||||
@ -44,53 +48,84 @@ export declare class InventoryHelper {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected containerHelper: ContainerHelper;
|
protected containerHelper: ContainerHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected inventoryConfig: IInventoryConfig;
|
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);
|
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, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* 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)
|
* Add multiple items to player stash (assuming they all fit)
|
||||||
* @param pmcData Profile to add items to
|
* @param sessionId Session id
|
||||||
* @param request request data to add items
|
* @param request IAddItemsDirectRequest request
|
||||||
* @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
|
|
||||||
* @param useSortingTable Allow items to go into sorting table when stash has no space
|
|
||||||
* @returns IItemEventRouterResponse
|
|
||||||
*/
|
|
||||||
addItem(pmcData: IPmcData, request: IAddItemRequestData, output: IItemEventRouterResponse, sessionID: string, callback: () => void, foundInRaid?: boolean, addUpd?: any, useSortingTable?: boolean): IItemEventRouterResponse;
|
|
||||||
/**
|
|
||||||
* Take the given item, find a free slot in passed in inventory and place it there
|
|
||||||
* If no space in inventory, place in sorting table
|
|
||||||
* @param itemToAdd Item to add to inventory
|
|
||||||
* @param stashFS2D Two dimentional stash map
|
|
||||||
* @param sortingTableFS2D Two dimentional sorting table stash map
|
|
||||||
* @param itemLib
|
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param useSortingTable Should sorting table be used for overflow items when no inventory space for item
|
* @param output Client response object
|
||||||
* @param output Client output object
|
|
||||||
* @returns Client error output if placing item failed
|
|
||||||
*/
|
*/
|
||||||
protected placeItemInInventory(itemToAdd: IAddItemTempObject, stashFS2D: number[][], sortingTableFS2D: number[][], itemLib: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
addItemsToStash(sessionId: string, request: IAddItemsDirectRequest, pmcData: IPmcData, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Add ammo to ammo boxes
|
* Add whatever is passed in `request.itemWithModsToAdd` into player inventory (if it fits)
|
||||||
* @param itemToAdd Item to check is ammo box
|
* @param sessionId Session id
|
||||||
* @param parentId Ammo box parent id
|
* @param request addItemDirect request
|
||||||
* @param output IItemEventRouterResponse object
|
* @param pmcData Player profile
|
||||||
* @param sessionID Session id
|
* @param output Client response object
|
||||||
* @param pmcData Profile to add ammobox to
|
|
||||||
* @param output object to send to client
|
|
||||||
* @param foundInRaid should ammo be FiR
|
|
||||||
*/
|
*/
|
||||||
protected hydrateAmmoBoxWithAmmo(pmcData: IPmcData, itemToAdd: IAddItemTempObject, parentId: string, sessionID: string, output: IItemEventRouterResponse, foundInRaid: boolean): void;
|
addItemToStash(sessionId: string, request: IAddItemDirectRequest, pmcData: IPmcData, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
|
* Set FiR status for an item + its children
|
||||||
|
* @param itemWithChildren An item
|
||||||
|
* @param foundInRaid Item was found in raid
|
||||||
|
*/
|
||||||
|
protected setFindInRaidStatusForItem(itemWithChildren: Item[], foundInRaid: boolean): void;
|
||||||
|
/**
|
||||||
|
* Remove properties from a Upd object used by a trader/ragfair that are unnecessary to a player
|
||||||
|
* @param upd Object to update
|
||||||
|
*/
|
||||||
|
protected removeTraderRagfairRelatedUpdProperties(upd: Upd): void;
|
||||||
|
/**
|
||||||
|
* Can all probided items be added into player inventory
|
||||||
|
* @param sessionId Player id
|
||||||
|
* @param itemsWithChildren array of items with children to try and fit
|
||||||
|
* @returns True all items fit
|
||||||
|
*/
|
||||||
|
canPlaceItemsInInventory(sessionId: string, itemsWithChildren: Item[][]): boolean;
|
||||||
|
/**
|
||||||
|
* Do the provided items all fit into the grid
|
||||||
|
* @param containerFS2D Container grid to fit items into
|
||||||
|
* @param itemsWithChildren items to try and fit into grid
|
||||||
|
* @returns True all fit
|
||||||
|
*/
|
||||||
|
canPlaceItemsInContainer(containerFS2D: number[][], itemsWithChildren: Item[][]): boolean;
|
||||||
|
/**
|
||||||
|
* Does an item fit into a container grid
|
||||||
|
* @param containerFS2D Container grid
|
||||||
|
* @param itemWithChildren item to check fits
|
||||||
|
* @returns True it fits
|
||||||
|
*/
|
||||||
|
canPlaceItemInContainer(containerFS2D: number[][], itemWithChildren: Item[]): boolean;
|
||||||
|
/**
|
||||||
|
* Find a free location inside a container to fit the item
|
||||||
|
* @param containerFS2D Container grid to add item to
|
||||||
|
* @param itemWithChildren Item to add to grid
|
||||||
|
* @param containerId Id of the container we're fitting item into
|
||||||
|
* @param desiredSlotId slot id value to use, default is "hideout"
|
||||||
|
*/
|
||||||
|
placeItemInContainer(containerFS2D: number[][], itemWithChildren: Item[], containerId: string, desiredSlotId?: string): void;
|
||||||
|
/**
|
||||||
|
* Find a location to place an item into inventory and place it
|
||||||
|
* @param stashFS2D 2-dimensional representation of the container slots
|
||||||
|
* @param sortingTableFS2D 2-dimensional representation of the sorting table slots
|
||||||
|
* @param itemWithChildren Item to place
|
||||||
|
* @param playerInventory
|
||||||
|
* @param useSortingTable Should sorting table to be used if main stash has no space
|
||||||
|
* @param output output to send back to client
|
||||||
|
*/
|
||||||
|
protected placeItemInInventory(stashFS2D: number[][], sortingTableFS2D: number[][], itemWithChildren: Item[], playerInventory: Inventory, useSortingTable: boolean, output: IItemEventRouterResponse): void;
|
||||||
|
/**
|
||||||
|
* Split an items stack size based on its StackMaxSize value
|
||||||
* @param assortItems Items to add to inventory
|
* @param assortItems Items to add to inventory
|
||||||
* @param requestItem Details of purchased item to add to inventory
|
* @param requestItem Details of purchased item to add to inventory
|
||||||
* @param result Array split stacks are added to
|
* @param result Array split stacks are appended to
|
||||||
*/
|
*/
|
||||||
protected splitStackIntoSmallerStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||||
/**
|
/**
|
||||||
* Handle Remove event
|
* Handle Remove event
|
||||||
* Remove item from player inventory + insured items array
|
* Remove item from player inventory + insured items array
|
||||||
@ -98,16 +133,51 @@ export declare class InventoryHelper {
|
|||||||
* @param profile Profile to remove item from (pmc or scav)
|
* @param profile Profile to remove item from (pmc or scav)
|
||||||
* @param itemId Items id to remove
|
* @param itemId Items id to remove
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param output Existing IItemEventRouterResponse object to append data to, creates new one by default if not supplied
|
* @param output OPTIONAL - IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
removeItem(profile: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): void;
|
||||||
|
/**
|
||||||
|
* Delete desired item from a player profiles mail
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param removeRequest Remove request
|
||||||
|
* @param output OPTIONAL - IItemEventRouterResponse
|
||||||
|
*/
|
||||||
|
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output?: IItemEventRouterResponse): void;
|
||||||
|
/**
|
||||||
|
* Find item by id in player inventory and remove x of its count
|
||||||
|
* @param pmcData player profile
|
||||||
|
* @param itemId Item id to decrement StackObjectsCount of
|
||||||
|
* @param countToRemove Number of item to remove
|
||||||
|
* @param sessionID Session id
|
||||||
|
* @param output IItemEventRouterResponse
|
||||||
* @returns IItemEventRouterResponse
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
removeItem(profile: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
removeItemByCount(pmcData: IPmcData, itemId: string, countToRemove: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||||
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
/**
|
||||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
* Get the height and width of an item - can have children that alter size
|
||||||
getItemSize(itemTpl: string, itemID: string, inventoryItem: Item[]): number[];
|
* @param itemTpl Item to get size of
|
||||||
|
* @param itemID Items id to get size of
|
||||||
|
* @param inventoryItems
|
||||||
|
* @returns [width, height]
|
||||||
|
*/
|
||||||
|
getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): number[];
|
||||||
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
protected getSizeByInventoryItemHash(itemTpl: string, itemID: string, inventoryItemHash: InventoryHelper.InventoryItemHash): number[];
|
||||||
|
/**
|
||||||
|
* Get a blank two-dimentional representation of a container
|
||||||
|
* @param containerH Horizontal size of container
|
||||||
|
* @param containerY Vertical size of container
|
||||||
|
* @returns Two-dimensional representation of container
|
||||||
|
*/
|
||||||
|
protected getBlankContainerMap(containerH: number, containerY: number): number[][];
|
||||||
|
/**
|
||||||
|
* @param containerH Horizontal size of container
|
||||||
|
* @param containerV Vertical size of container
|
||||||
|
* @param itemList
|
||||||
|
* @param containerId Id of the container
|
||||||
|
* @returns Two-dimensional representation of container
|
||||||
|
*/
|
||||||
|
getContainerMap(containerH: number, containerV: number, itemList: Item[], containerId: string): number[][];
|
||||||
protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash;
|
protected getInventoryItemHash(inventoryItem: Item[]): InventoryHelper.InventoryItemHash;
|
||||||
getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][];
|
|
||||||
/**
|
/**
|
||||||
* Return the inventory that needs to be modified (scav/pmc etc)
|
* Return the inventory that needs to be modified (scav/pmc etc)
|
||||||
* Changes made to result apply to character inventory
|
* Changes made to result apply to character inventory
|
||||||
@ -116,19 +186,31 @@ export declare class InventoryHelper {
|
|||||||
* @param sessionId Session id / playerid
|
* @param sessionId Session id / playerid
|
||||||
* @returns OwnerInventoryItems with inventory of player/scav to adjust
|
* @returns OwnerInventoryItems with inventory of player/scav to adjust
|
||||||
*/
|
*/
|
||||||
getOwnerInventoryItems(request: IInventoryMoveRequestData | IInventorySplitRequestData | IInventoryMergeRequestData, sessionId: string): OwnerInventoryItems;
|
getOwnerInventoryItems(request: IInventoryMoveRequestData | IInventorySplitRequestData | IInventoryMergeRequestData | IInventoryTransferRequestData, sessionId: string): IOwnerInventoryItems;
|
||||||
/**
|
/**
|
||||||
* Made a 2d array table with 0 - free slot and 1 - used slot
|
* Get a two dimensional array to represent stash slots
|
||||||
* @param {Object} pmcData
|
* 0 value = free, 1 = taken
|
||||||
* @param {string} sessionID
|
* @param pmcData Player profile
|
||||||
* @returns Array
|
* @param sessionID session id
|
||||||
|
* @returns 2-dimensional array
|
||||||
*/
|
*/
|
||||||
protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][];
|
protected getStashSlotMap(pmcData: IPmcData, sessionID: string): number[][];
|
||||||
|
/**
|
||||||
|
* Get a blank two-dimensional array representation of a container
|
||||||
|
* @param containerTpl Container to get data for
|
||||||
|
* @returns blank two-dimensional array
|
||||||
|
*/
|
||||||
|
getContainerSlotMap(containerTpl: string): number[][];
|
||||||
|
/**
|
||||||
|
* Get a two-dimensional array representation of the players sorting table
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @returns two-dimensional array
|
||||||
|
*/
|
||||||
protected getSortingTableSlotMap(pmcData: IPmcData): number[][];
|
protected getSortingTableSlotMap(pmcData: IPmcData): number[][];
|
||||||
/**
|
/**
|
||||||
* Get Player Stash Proper Size
|
* Get Players Stash Size
|
||||||
* @param sessionID Playerid
|
* @param sessionID Players id
|
||||||
* @returns Array of 2 values, x and y stash size
|
* @returns Array of 2 values, horizontal and vertical stash size
|
||||||
*/
|
*/
|
||||||
protected getPlayerStashSize(sessionID: string): Record<number, number>;
|
protected getPlayerStashSize(sessionID: string): Record<number, number>;
|
||||||
/**
|
/**
|
||||||
@ -172,6 +254,15 @@ export declare class InventoryHelper {
|
|||||||
*/
|
*/
|
||||||
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
getRandomLootContainerRewardDetails(itemTpl: string): RewardDetails;
|
||||||
getInventoryConfig(): IInventoryConfig;
|
getInventoryConfig(): IInventoryConfig;
|
||||||
|
/**
|
||||||
|
* Recursively checks if the given item is
|
||||||
|
* inside the stash, that is it has the stash as
|
||||||
|
* ancestor with slotId=hideout
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param itemToCheck Item to look for
|
||||||
|
* @returns True if item exists inside stash
|
||||||
|
*/
|
||||||
|
isItemInStash(pmcData: IPmcData, itemToCheck: Item): boolean;
|
||||||
}
|
}
|
||||||
declare namespace InventoryHelper {
|
declare namespace InventoryHelper {
|
||||||
interface InventoryItemHash {
|
interface InventoryItemHash {
|
||||||
|
@ -32,8 +32,8 @@ export declare class ItemHelper {
|
|||||||
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService);
|
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService);
|
||||||
/**
|
/**
|
||||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
* 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
|
* @param {string} tpl the template id / tpl
|
||||||
* @returns boolean; true for items that may be in player possession 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;
|
isValidItem(tpl: string, invalidBaseTypes?: string[]): boolean;
|
||||||
/**
|
/**
|
||||||
@ -51,6 +51,44 @@ export declare class ItemHelper {
|
|||||||
* @returns true if any supplied base classes match
|
* @returns true if any supplied base classes match
|
||||||
*/
|
*/
|
||||||
isOfBaseclasses(tpl: string, baseClassTpls: string[]): boolean;
|
isOfBaseclasses(tpl: string, baseClassTpls: string[]): boolean;
|
||||||
|
/**
|
||||||
|
* Does the provided item have the chance to require soft armor inserts
|
||||||
|
* Only applies to helmets/vest/armors.
|
||||||
|
* Not all head gear needs them
|
||||||
|
* @param itemTpl item to check
|
||||||
|
* @returns Does item have the possibility ot need soft inserts
|
||||||
|
*/
|
||||||
|
armorItemCanHoldMods(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Does the provided item tpl need soft/removable inserts to function
|
||||||
|
* @param itemTpl Armor item
|
||||||
|
* @returns True if item needs some kind of insert
|
||||||
|
*/
|
||||||
|
armorItemHasRemovableOrSoftInsertSlots(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Does the pased in tpl have ability to hold removable plate items
|
||||||
|
* @param itemTpl item tpl to check for plate support
|
||||||
|
* @returns True when armor can hold plates
|
||||||
|
*/
|
||||||
|
armorItemHasRemovablePlateSlots(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Does the provided item tpl require soft inserts to become a valid armor item
|
||||||
|
* @param itemTpl Item tpl to check
|
||||||
|
* @returns True if it needs armor inserts
|
||||||
|
*/
|
||||||
|
itemRequiresSoftInserts(itemTpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get all soft insert slot ids
|
||||||
|
* @returns An array of soft insert ids (e.g. soft_armor_back, helmet_top)
|
||||||
|
*/
|
||||||
|
getSoftInsertSlotIds(): string[];
|
||||||
|
/**
|
||||||
|
* Returns the items total 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
|
||||||
|
* @param tpls item tpls to look up the price of
|
||||||
|
* @returns Total price in roubles
|
||||||
|
*/
|
||||||
|
getItemAndChildrenPrice(tpls: string[]): number;
|
||||||
/**
|
/**
|
||||||
* Returns the item price based on the handbook or as a fallback from the prices.json if the item is not
|
* 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
|
* found in the handbook. If the price can't be found at all return 0
|
||||||
@ -83,43 +121,6 @@ export declare class ItemHelper {
|
|||||||
* @returns Fixed item
|
* @returns Fixed item
|
||||||
*/
|
*/
|
||||||
fixItemStackCount(item: Item): Item;
|
fixItemStackCount(item: Item): Item;
|
||||||
/**
|
|
||||||
* AmmoBoxes contain StackSlots which need to be filled for the AmmoBox to have content.
|
|
||||||
* Here's what a filled AmmoBox looks like:
|
|
||||||
* {
|
|
||||||
* "_id": "b1bbe982daa00ac841d4ae4d",
|
|
||||||
* "_tpl": "57372c89245977685d4159b1",
|
|
||||||
* "parentId": "5fe49a0e2694b0755a504876",
|
|
||||||
* "slotId": "hideout",
|
|
||||||
* "location": {
|
|
||||||
* "x": 3,
|
|
||||||
* "y": 4,
|
|
||||||
* "r": 0
|
|
||||||
* },
|
|
||||||
* "upd": {
|
|
||||||
* "StackObjectsCount": 1
|
|
||||||
* }
|
|
||||||
* },
|
|
||||||
* {
|
|
||||||
* "_id": "b997b4117199033afd274a06",
|
|
||||||
* "_tpl": "56dff061d2720bb5668b4567",
|
|
||||||
* "parentId": "b1bbe982daa00ac841d4ae4d",
|
|
||||||
* "slotId": "cartridges",
|
|
||||||
* "location": 0,
|
|
||||||
* "upd": {
|
|
||||||
* "StackObjectsCount": 30
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* Given the AmmoBox Item (first object) this function generates the StackSlot (second object) and returns it.
|
|
||||||
* StackSlots are only used for AmmoBoxes which only have one element in StackSlots. However, it seems to be generic
|
|
||||||
* to possibly also have more than one StackSlot. As good as possible, without seeing items having more than one
|
|
||||||
* StackSlot, this function takes account of this and creates and returns an array of StackSlotItems
|
|
||||||
*
|
|
||||||
* @param {object} item The item template of the AmmoBox as given in items.json
|
|
||||||
* @param {string} parentId The id of the AmmoBox instance these StackSlotItems should be children of
|
|
||||||
* @returns {array} The array of StackSlotItems
|
|
||||||
*/
|
|
||||||
generateItemsFromStackSlot(item: ITemplateItem, parentId: string): Item[];
|
|
||||||
/**
|
/**
|
||||||
* Get cloned copy of all item data from items.json
|
* Get cloned copy of all item data from items.json
|
||||||
* @returns array of ITemplateItem objects
|
* @returns array of ITemplateItem objects
|
||||||
@ -131,7 +132,14 @@ export declare class ItemHelper {
|
|||||||
* @returns bool - is valid + template item object as array
|
* @returns bool - is valid + template item object as array
|
||||||
*/
|
*/
|
||||||
getItem(tpl: string): [boolean, ITemplateItem];
|
getItem(tpl: string): [boolean, ITemplateItem];
|
||||||
|
itemHasSlots(itemTpl: string): boolean;
|
||||||
isItemInDb(tpl: string): boolean;
|
isItemInDb(tpl: string): boolean;
|
||||||
|
/**
|
||||||
|
* Calcualte the average quality of an item and its children
|
||||||
|
* @param items An offers item to process
|
||||||
|
* @returns % quality modifer between 0 and 1
|
||||||
|
*/
|
||||||
|
getItemQualityModifierForOfferItems(items: Item[]): number;
|
||||||
/**
|
/**
|
||||||
* get normalized value (0-1) based on item condition
|
* get normalized value (0-1) based on item condition
|
||||||
* @param item
|
* @param item
|
||||||
@ -149,17 +157,18 @@ export declare class ItemHelper {
|
|||||||
/**
|
/**
|
||||||
* Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results
|
* Recursive function that looks at every item from parameter and gets their childrens Ids + includes parent item in results
|
||||||
* @param items Array of items (item + possible children)
|
* @param items Array of items (item + possible children)
|
||||||
* @param itemId Parent items id
|
* @param baseItemId Parent items id
|
||||||
* @returns an array of strings
|
* @returns an array of strings
|
||||||
*/
|
*/
|
||||||
findAndReturnChildrenByItems(items: Item[], itemId: string): string[];
|
findAndReturnChildrenByItems(items: Item[], baseItemId: string): string[];
|
||||||
/**
|
/**
|
||||||
* A variant of findAndReturnChildren where the output is list of item objects instead of their ids.
|
* A variant of findAndReturnChildren where the output is list of item objects instead of their ids.
|
||||||
* @param items
|
* @param items Array of items (item + possible children)
|
||||||
* @param baseItemId
|
* @param baseItemId Parent items id
|
||||||
|
* @param modsOnly Include only mod items, exclude items stored inside root item
|
||||||
* @returns An array of Item objects
|
* @returns An array of Item objects
|
||||||
*/
|
*/
|
||||||
findAndReturnChildrenAsItems(items: Item[], baseItemId: string): Item[];
|
findAndReturnChildrenAsItems(items: Item[], baseItemId: string, modsOnly?: boolean): Item[];
|
||||||
/**
|
/**
|
||||||
* Find children of the item in a given assort (weapons parts for example, need recursive loop function)
|
* Find children of the item in a given assort (weapons parts for example, need recursive loop function)
|
||||||
* @param itemIdToFind Template id of item to check for
|
* @param itemIdToFind Template id of item to check for
|
||||||
@ -192,28 +201,42 @@ export declare class ItemHelper {
|
|||||||
*/
|
*/
|
||||||
isItemTplStackable(tpl: string): boolean;
|
isItemTplStackable(tpl: string): boolean;
|
||||||
/**
|
/**
|
||||||
* split item stack if it exceeds its items StackMaxSize property
|
* Split item stack if it exceeds its items StackMaxSize property into child items of passed in parent
|
||||||
* @param itemToSplit Item to split into smaller stacks
|
* @param itemToSplit Item to split into smaller stacks
|
||||||
* @returns Array of split items
|
* @returns Array of root item + children
|
||||||
*/
|
*/
|
||||||
splitStack(itemToSplit: Item): Item[];
|
splitStack(itemToSplit: Item): Item[];
|
||||||
|
/**
|
||||||
|
* Turn items like money into separate stacks that adhere to max stack size
|
||||||
|
* @param itemToSplit Item to split into smaller stacks
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
splitStackIntoSeparateItems(itemToSplit: Item): Item[][];
|
||||||
/**
|
/**
|
||||||
* Find Barter items from array of items
|
* Find Barter items from array of items
|
||||||
* @param {string} by tpl or id
|
* @param {string} by tpl or id
|
||||||
* @param {Item[]} items Array of items to iterate over
|
* @param {Item[]} itemsToSearch Array of items to iterate over
|
||||||
* @param {string} barterItemId
|
* @param {string} desiredBarterItemIds
|
||||||
* @returns Array of Item objects
|
* @returns Array of Item objects
|
||||||
*/
|
*/
|
||||||
findBarterItems(by: "tpl" | "id", items: Item[], barterItemId: string): Item[];
|
findBarterItems(by: "tpl" | "id", itemsToSearch: Item[], desiredBarterItemIds: string | string[]): Item[];
|
||||||
/**
|
/**
|
||||||
* Regenerate all guids with new ids, exceptions are for items that cannot be altered (e.g. stash/sorting table)
|
* Regenerate all GUIDs with new IDs, for the exception of special item types (e.g. quest, sorting table, etc.) This
|
||||||
|
* function will not mutate the original items array, but will return a new array with new GUIDs.
|
||||||
|
*
|
||||||
|
* @param originalItems Items to adjust the IDs of
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param items Items to adjust ID values of
|
* @param insuredItems Insured items that should not have their IDs replaced
|
||||||
* @param insuredItems insured items to not replace ids for
|
* @param fastPanel Quick slot panel
|
||||||
* @param fastPanel
|
|
||||||
* @returns Item[]
|
* @returns Item[]
|
||||||
*/
|
*/
|
||||||
replaceIDs(pmcData: IPmcData, items: Item[], insuredItems?: InsuredItem[], fastPanel?: any): Item[];
|
replaceIDs(originalItems: Item[], pmcData?: IPmcData | null, insuredItems?: InsuredItem[] | null, fastPanel?: any): Item[];
|
||||||
|
/**
|
||||||
|
* Mark the passed in array of items as found in raid.
|
||||||
|
* Modifies passed in items
|
||||||
|
* @param items The list of items to mark as FiR
|
||||||
|
*/
|
||||||
|
setFoundInRaid(items: Item[]): void;
|
||||||
/**
|
/**
|
||||||
* 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
|
* 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 Items tpl to check parents of
|
* @param {string} tpl Items tpl to check parents of
|
||||||
@ -251,12 +274,6 @@ export declare class ItemHelper {
|
|||||||
* to traverse, where the keys are the item IDs and the values are the corresponding Item objects. This alleviates
|
* to traverse, where the keys are the item IDs and the values are the corresponding Item objects. This alleviates
|
||||||
* some of the performance concerns, as it allows for quick lookups of items by ID.
|
* some of the performance concerns, as it allows for quick lookups of items by ID.
|
||||||
*
|
*
|
||||||
* To generate the map:
|
|
||||||
* ```
|
|
||||||
* const itemsMap = new Map<string, Item>();
|
|
||||||
* items.forEach(item => itemsMap.set(item._id, item));
|
|
||||||
* ```
|
|
||||||
*
|
|
||||||
* @param itemId - The unique identifier of the item for which to find the main parent.
|
* @param itemId - The unique identifier of the item for which to find the main parent.
|
||||||
* @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup.
|
* @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup.
|
||||||
* @returns The Item object representing the top-most parent of the given item, or `null` if no such parent exists.
|
* @returns The Item object representing the top-most parent of the given item, or `null` if no such parent exists.
|
||||||
@ -269,6 +286,22 @@ export declare class ItemHelper {
|
|||||||
* @returns true if the item is attached attachment, otherwise false.
|
* @returns true if the item is attached attachment, otherwise false.
|
||||||
*/
|
*/
|
||||||
isAttachmentAttached(item: Item): boolean;
|
isAttachmentAttached(item: Item): boolean;
|
||||||
|
/**
|
||||||
|
* Retrieves the equipment parent item for a given item.
|
||||||
|
*
|
||||||
|
* This method traverses up the hierarchy of items starting from a given `itemId`, until it finds the equipment
|
||||||
|
* parent item. In other words, if you pass it an item id of a suppressor, it will traverse up the muzzle brake,
|
||||||
|
* barrel, upper receiver, gun, nested backpack, and finally return the backpack Item that is equipped.
|
||||||
|
*
|
||||||
|
* It's important to note that traversal is expensive, so this method requires that you pass it a Map of the items
|
||||||
|
* to traverse, where the keys are the item IDs and the values are the corresponding Item objects. This alleviates
|
||||||
|
* some of the performance concerns, as it allows for quick lookups of items by ID.
|
||||||
|
*
|
||||||
|
* @param itemId - The unique identifier of the item for which to find the equipment parent.
|
||||||
|
* @param itemsMap - A Map containing item IDs mapped to their corresponding Item objects for quick lookup.
|
||||||
|
* @returns The Item object representing the equipment parent of the given item, or `null` if no such parent exists.
|
||||||
|
*/
|
||||||
|
getEquipmentParent(itemId: string, itemsMap: Map<string, Item>): Item | null;
|
||||||
/**
|
/**
|
||||||
* Get the inventory size of an item
|
* Get the inventory size of an item
|
||||||
* @param items Item with children
|
* @param items Item with children
|
||||||
@ -281,13 +314,19 @@ export declare class ItemHelper {
|
|||||||
* @param item Db item template to look up Cartridge filter values from
|
* @param item Db item template to look up Cartridge filter values from
|
||||||
* @returns Caliber of cartridge
|
* @returns Caliber of cartridge
|
||||||
*/
|
*/
|
||||||
getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string;
|
getRandomCompatibleCaliberTemplateId(item: ITemplateItem): string | null;
|
||||||
/**
|
/**
|
||||||
* Add cartridges to the ammo box with correct max stack sizes
|
* Add cartridges to the ammo box with correct max stack sizes
|
||||||
* @param ammoBox Box to add cartridges to
|
* @param ammoBox Box to add cartridges to
|
||||||
* @param ammoBoxDetails Item template from items db
|
* @param ammoBoxDetails Item template from items db
|
||||||
*/
|
*/
|
||||||
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
addCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
|
/**
|
||||||
|
* Add a single stack of cartridges to the ammo box
|
||||||
|
* @param ammoBox Box to add cartridges to
|
||||||
|
* @param ammoBoxDetails Item template from items db
|
||||||
|
*/
|
||||||
|
addSingleStackCartridgesToAmmoBox(ammoBox: Item[], ammoBoxDetails: ITemplateItem): void;
|
||||||
/**
|
/**
|
||||||
* Check if item is stored inside of a container
|
* Check if item is stored inside of a container
|
||||||
* @param item Item to check is inside of container
|
* @param item Item to check is inside of container
|
||||||
@ -303,16 +342,17 @@ export declare class ItemHelper {
|
|||||||
* @param staticAmmoDist Cartridge distribution
|
* @param staticAmmoDist Cartridge distribution
|
||||||
* @param caliber Caliber of cartridge to add to magazine
|
* @param caliber Caliber of cartridge to add to magazine
|
||||||
* @param minSizePercent % the magazine must be filled to
|
* @param minSizePercent % the magazine must be filled to
|
||||||
|
* @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist)
|
||||||
*/
|
*/
|
||||||
fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, caliber?: string, minSizePercent?: number): void;
|
fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void;
|
||||||
/**
|
/**
|
||||||
* Add child items to a magazine of a specific cartridge
|
* Add child items to a magazine of a specific cartridge
|
||||||
* @param magazine Magazine to add child items to
|
* @param magazineWithChildCartridges Magazine to add child items to
|
||||||
* @param magTemplate Db template of magazine
|
* @param magTemplate Db template of magazine
|
||||||
* @param cartridgeTpl Cartridge to add to magazine
|
* @param cartridgeTpl Cartridge to add to magazine
|
||||||
* @param minSizePercent % the magazine must be filled to
|
* @param minSizePercent % the magazine must be filled to
|
||||||
*/
|
*/
|
||||||
fillMagazineWithCartridge(magazine: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void;
|
fillMagazineWithCartridge(magazineWithChildCartridges: Item[], magTemplate: ITemplateItem, cartridgeTpl: string, minSizePercent?: number): void;
|
||||||
/**
|
/**
|
||||||
* Choose a random bullet type from the list of possible a magazine has
|
* Choose a random bullet type from the list of possible a magazine has
|
||||||
* @param magTemplate Magazine template from Db
|
* @param magTemplate Magazine template from Db
|
||||||
@ -323,18 +363,20 @@ export declare class ItemHelper {
|
|||||||
* Chose a randomly weighted cartridge that fits
|
* Chose a randomly weighted cartridge that fits
|
||||||
* @param caliber Desired caliber
|
* @param caliber Desired caliber
|
||||||
* @param staticAmmoDist Cartridges and thier weights
|
* @param staticAmmoDist Cartridges and thier weights
|
||||||
|
* @param cartridgeWhitelist OPTIONAL whitelist for cartridges
|
||||||
* @returns Tpl of cartridge
|
* @returns Tpl of cartridge
|
||||||
*/
|
*/
|
||||||
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>): string;
|
protected drawAmmoTpl(caliber: string, staticAmmoDist: Record<string, IStaticAmmoDetails[]>, cartridgeWhitelist?: string[]): string;
|
||||||
/**
|
/**
|
||||||
* Create a basic cartrige object
|
* Create a basic cartrige object
|
||||||
* @param parentId container cartridges will be placed in
|
* @param parentId container cartridges will be placed in
|
||||||
* @param ammoTpl Cartridge to insert
|
* @param ammoTpl Cartridge to insert
|
||||||
* @param stackCount Count of cartridges inside parent
|
* @param stackCount Count of cartridges inside parent
|
||||||
* @param location Location inside parent (e.g. 0, 1)
|
* @param location Location inside parent (e.g. 0, 1)
|
||||||
|
* @param foundInRaid OPTIONAL - Are cartridges found in raid (SpawnedInSession)
|
||||||
* @returns Item
|
* @returns Item
|
||||||
*/
|
*/
|
||||||
createCartridges(parentId: string, ammoTpl: string, stackCount: number, location: number): Item;
|
createCartridges(parentId: string, ammoTpl: string, stackCount: number, location: number, foundInRaid?: boolean): Item;
|
||||||
/**
|
/**
|
||||||
* Get the size of a stack, return 1 if no stack object count property found
|
* Get the size of a stack, return 1 if no stack object count property found
|
||||||
* @param item Item to get stack size of
|
* @param item Item to get stack size of
|
||||||
@ -348,6 +390,71 @@ export declare class ItemHelper {
|
|||||||
*/
|
*/
|
||||||
getItemName(itemTpl: string): string;
|
getItemName(itemTpl: string): string;
|
||||||
getItemTplsOfBaseType(desiredBaseType: string): string[];
|
getItemTplsOfBaseType(desiredBaseType: string): string[];
|
||||||
|
/**
|
||||||
|
* Add child slot items to an item, chooses random child item if multiple choices exist
|
||||||
|
* @param itemToAdd array with single object (root item)
|
||||||
|
* @param itemToAddTemplate Db tempalte for root item
|
||||||
|
* @param modSpawnChanceDict Optional dictionary of mod name + % chance mod will be included in item (e.g. front_plate: 100)
|
||||||
|
* @param requiredOnly Only add required mods
|
||||||
|
* @returns Item with children
|
||||||
|
*/
|
||||||
|
addChildSlotItems(itemToAdd: Item[], itemToAddTemplate: ITemplateItem, modSpawnChanceDict?: Record<string, number>, requiredOnly?: boolean): Item[];
|
||||||
|
/**
|
||||||
|
* Get a compatible tpl from the array provided where it is not found in the provided incompatible mod tpls parameter
|
||||||
|
* @param possibleTpls Tpls to randomply choose from
|
||||||
|
* @param incompatibleModTpls Incompatible tpls to not allow
|
||||||
|
* @returns Chosen tpl or null
|
||||||
|
*/
|
||||||
|
getCompatibleTplFromArray(possibleTpls: string[], incompatibleModTpls: Set<string>): string;
|
||||||
|
/**
|
||||||
|
* Is the provided item._props.Slots._name property a plate slot
|
||||||
|
* @param slotName Name of slot (_name) of Items Slot array
|
||||||
|
* @returns True if its a slot that holds a removable palte
|
||||||
|
*/
|
||||||
|
isRemovablePlateSlot(slotName: string): boolean;
|
||||||
|
/**
|
||||||
|
* Get a list of slot names that hold removable plates
|
||||||
|
* @returns Array of slot ids (e.g. front_plate)
|
||||||
|
*/
|
||||||
|
getRemovablePlateSlotIds(): string[];
|
||||||
|
/**
|
||||||
|
* Generate new unique ids for child items while preserving hierarchy
|
||||||
|
* @param rootItem Base/primary item
|
||||||
|
* @param itemWithChildren Primary item + children of primary item
|
||||||
|
* @returns Item array with updated IDs
|
||||||
|
*/
|
||||||
|
reparentItemAndChildren(rootItem: Item, itemWithChildren: Item[]): Item[];
|
||||||
|
/**
|
||||||
|
* Update a root items _id property value to be unique
|
||||||
|
* @param itemWithChildren Item to update root items _id property
|
||||||
|
* @param newId Optional: new id to use
|
||||||
|
* @returns New root id
|
||||||
|
*/
|
||||||
|
remapRootItemId(itemWithChildren: Item[], newId?: string): string;
|
||||||
|
/**
|
||||||
|
* Adopts orphaned items by resetting them as root "hideout" items. Helpful in situations where a parent has been
|
||||||
|
* deleted from a group of items and there are children still referencing the missing parent. This method will
|
||||||
|
* remove the reference from the children to the parent and set item properties to root values.
|
||||||
|
*
|
||||||
|
* @param rootId The ID of the "root" of the container.
|
||||||
|
* @param items Array of Items that should be adjusted.
|
||||||
|
* @returns Array of Items that have been adopted.
|
||||||
|
*/
|
||||||
|
adoptOrphanedItems(rootId: string, items: Item[]): Item[];
|
||||||
|
/**
|
||||||
|
* Populate a Map object of items for quick lookup using their ID.
|
||||||
|
*
|
||||||
|
* @param items An array of Items that should be added to a Map.
|
||||||
|
* @returns A Map where the keys are the item IDs and the values are the corresponding Item objects.
|
||||||
|
*/
|
||||||
|
generateItemsMap(items: Item[]): Map<string, Item>;
|
||||||
|
/**
|
||||||
|
* Add a blank upd object to passed in item if it does not exist already
|
||||||
|
* @param item item to add upd to
|
||||||
|
* @param warningMessageWhenMissing text to write to log when upd object was not found
|
||||||
|
* @returns True when upd object was added
|
||||||
|
*/
|
||||||
|
addUpdObjectToItem(item: Item, warningMessageWhenMissing?: string): boolean;
|
||||||
}
|
}
|
||||||
declare namespace ItemHelper {
|
declare namespace ItemHelper {
|
||||||
interface ItemSize {
|
interface ItemSize {
|
||||||
|
@ -1,23 +1,47 @@
|
|||||||
import { IPreset } from "@spt-aki/models/eft/common/IGlobals";
|
import { IPreset } from "@spt-aki/models/eft/common/IGlobals";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
|
import { ItemHelper } from "./ItemHelper";
|
||||||
export declare class PresetHelper {
|
export declare class PresetHelper {
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected databaseServer: DatabaseServer;
|
protected databaseServer: DatabaseServer;
|
||||||
|
protected itemHelper: ItemHelper;
|
||||||
protected lookup: Record<string, string[]>;
|
protected lookup: Record<string, string[]>;
|
||||||
protected defaultPresets: Record<string, IPreset>;
|
protected defaultEquipmentPresets: Record<string, IPreset>;
|
||||||
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer);
|
protected defaultWeaponPresets: Record<string, IPreset>;
|
||||||
|
constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper);
|
||||||
hydratePresetStore(input: Record<string, string[]>): void;
|
hydratePresetStore(input: Record<string, string[]>): void;
|
||||||
|
/**
|
||||||
|
* Get default weapon and equipment presets
|
||||||
|
* @returns Dictionary
|
||||||
|
*/
|
||||||
getDefaultPresets(): Record<string, IPreset>;
|
getDefaultPresets(): Record<string, IPreset>;
|
||||||
|
/**
|
||||||
|
* Get default weapon presets
|
||||||
|
* @returns Dictionary
|
||||||
|
*/
|
||||||
|
getDefaultWeaponPresets(): Record<string, IPreset>;
|
||||||
|
/**
|
||||||
|
* Get default equipment presets
|
||||||
|
* @returns Dictionary
|
||||||
|
*/
|
||||||
|
getDefaultEquipmentPresets(): Record<string, IPreset>;
|
||||||
isPreset(id: string): boolean;
|
isPreset(id: string): boolean;
|
||||||
hasPreset(templateId: string): boolean;
|
hasPreset(templateId: string): boolean;
|
||||||
getPreset(id: string): IPreset;
|
getPreset(id: string): IPreset;
|
||||||
|
getAllPresets(): IPreset[];
|
||||||
getPresets(templateId: string): IPreset[];
|
getPresets(templateId: string): IPreset[];
|
||||||
/**
|
/**
|
||||||
* Get the default preset for passed in weapon id
|
* Get the default preset for passed in item id
|
||||||
* @param templateId Weapon id to get preset for
|
* @param templateId Item id to get preset for
|
||||||
* @returns Null if no default preset, otherwise IPreset
|
* @returns Null if no default preset, otherwise IPreset
|
||||||
*/
|
*/
|
||||||
getDefaultPreset(templateId: string): IPreset;
|
getDefaultPreset(templateId: string): IPreset;
|
||||||
getBaseItemTpl(presetId: string): string;
|
getBaseItemTpl(presetId: string): string;
|
||||||
|
/**
|
||||||
|
* Return the price of the preset for the given item tpl, or for the tpl itself if no preset exists
|
||||||
|
* @param tpl The item template to get the price of
|
||||||
|
* @returns The price of the given item preset, or base item if no preset exists
|
||||||
|
*/
|
||||||
|
getDefaultPresetOrItemPrice(tpl: string): number;
|
||||||
}
|
}
|
||||||
|
@ -4,17 +4,21 @@ import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/table
|
|||||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
||||||
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
|
import { IInventoryConfig } from "@spt-aki/models/spt/config/IInventoryConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
||||||
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
import { Watermark } from "@spt-aki/utils/Watermark";
|
import { Watermark } from "@spt-aki/utils/Watermark";
|
||||||
export declare class ProfileHelper {
|
export declare class ProfileHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected hashUtil: HashUtil;
|
||||||
protected watermark: Watermark;
|
protected watermark: Watermark;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
protected saveServer: SaveServer;
|
protected saveServer: SaveServer;
|
||||||
@ -22,18 +26,25 @@ export declare class ProfileHelper {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileSnapshotService: ProfileSnapshotService;
|
protected profileSnapshotService: ProfileSnapshotService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService);
|
protected configServer: ConfigServer;
|
||||||
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Remove/reset a completed quest condtion from players profile quest data
|
* Remove/reset a completed quest condtion from players profile quest data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param questConditionId Quest with condition to remove
|
* @param questConditionId Quest with condition to remove
|
||||||
*/
|
*/
|
||||||
removeCompletedQuestConditionFromProfile(pmcData: IPmcData, questConditionId: Record<string, string>): void;
|
removeQuestConditionFromProfile(pmcData: IPmcData, questConditionId: Record<string, string>): void;
|
||||||
/**
|
/**
|
||||||
* Get all profiles from server
|
* Get all profiles from server
|
||||||
* @returns Dictionary of profiles
|
* @returns Dictionary of profiles
|
||||||
*/
|
*/
|
||||||
getProfiles(): Record<string, IAkiProfile>;
|
getProfiles(): Record<string, IAkiProfile>;
|
||||||
|
/**
|
||||||
|
* Get the pmc and scav profiles as an array by profile id
|
||||||
|
* @param sessionID
|
||||||
|
* @returns Array of IPmcData objects
|
||||||
|
*/
|
||||||
getCompleteProfile(sessionID: string): IPmcData[];
|
getCompleteProfile(sessionID: string): IPmcData[];
|
||||||
/**
|
/**
|
||||||
* Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen
|
* Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen
|
||||||
@ -45,37 +56,70 @@ export declare class ProfileHelper {
|
|||||||
* @param output pmc and scav profiles array
|
* @param output pmc and scav profiles array
|
||||||
* @param pmcProfile post-raid pmc profile
|
* @param pmcProfile post-raid pmc profile
|
||||||
* @param scavProfile post-raid scav profile
|
* @param scavProfile post-raid scav profile
|
||||||
* @returns updated profile array
|
* @returns Updated profile array
|
||||||
*/
|
*/
|
||||||
protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[];
|
protected postRaidXpWorkaroundFix(sessionId: string, output: IPmcData[], pmcProfile: IPmcData, scavProfile: IPmcData): IPmcData[];
|
||||||
/**
|
/**
|
||||||
* Check if a nickname is used by another profile loaded by the server
|
* Check if a nickname is used by another profile loaded by the server
|
||||||
* @param nicknameRequest
|
* @param nicknameRequest nickname request object
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns True if already used
|
* @returns True if already used
|
||||||
*/
|
*/
|
||||||
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||||
protected profileHasInfoProperty(profile: IAkiProfile): boolean;
|
protected profileHasInfoProperty(profile: IAkiProfile): boolean;
|
||||||
protected nicknameMatches(profileName: string, nicknameRequest: string): boolean;
|
protected stringsMatch(stringA: string, stringB: string): boolean;
|
||||||
protected sessionIdMatchesProfileId(profileId: string, sessionId: string): boolean;
|
|
||||||
/**
|
/**
|
||||||
* Add experience to a PMC inside the players profile
|
* Add experience to a PMC inside the players profile
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param experienceToAdd Experience to add to PMC character
|
* @param experienceToAdd Experience to add to PMC character
|
||||||
*/
|
*/
|
||||||
addExperienceToPmc(sessionID: string, experienceToAdd: number): void;
|
addExperienceToPmc(sessionID: string, experienceToAdd: number): void;
|
||||||
|
/**
|
||||||
|
* Iterate all profiles and find matching pmc profile by provided id
|
||||||
|
* @param pmcId Profile id to find
|
||||||
|
* @returns IPmcData
|
||||||
|
*/
|
||||||
getProfileByPmcId(pmcId: string): IPmcData;
|
getProfileByPmcId(pmcId: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Get the experiecne for the given level
|
||||||
|
* @param level level to get xp for
|
||||||
|
* @returns Number of xp points for level
|
||||||
|
*/
|
||||||
getExperience(level: number): number;
|
getExperience(level: number): number;
|
||||||
|
/**
|
||||||
|
* Get the max level a player can be
|
||||||
|
* @returns Max level
|
||||||
|
*/
|
||||||
getMaxLevel(): number;
|
getMaxLevel(): number;
|
||||||
getDefaultAkiDataObject(): any;
|
getDefaultAkiDataObject(): any;
|
||||||
|
/**
|
||||||
|
* Get full representation of a players profile json
|
||||||
|
* @param sessionID Profile id to get
|
||||||
|
* @returns IAkiProfile object
|
||||||
|
*/
|
||||||
getFullProfile(sessionID: string): IAkiProfile;
|
getFullProfile(sessionID: string): IAkiProfile;
|
||||||
|
/**
|
||||||
|
* Get a PMC profile by its session id
|
||||||
|
* @param sessionID Profile id to return
|
||||||
|
* @returns IPmcData object
|
||||||
|
*/
|
||||||
getPmcProfile(sessionID: string): IPmcData;
|
getPmcProfile(sessionID: string): IPmcData;
|
||||||
|
/**
|
||||||
|
* Get a full profiles scav-specific sub-profile
|
||||||
|
* @param sessionID Profiles id
|
||||||
|
* @returns IPmcData object
|
||||||
|
*/
|
||||||
getScavProfile(sessionID: string): IPmcData;
|
getScavProfile(sessionID: string): IPmcData;
|
||||||
/**
|
/**
|
||||||
* Get baseline counter values for a fresh profile
|
* Get baseline counter values for a fresh profile
|
||||||
* @returns Stats
|
* @returns Default profile Stats object
|
||||||
*/
|
*/
|
||||||
getDefaultCounters(): Stats;
|
getDefaultCounters(): Stats;
|
||||||
|
/**
|
||||||
|
* is this profile flagged for data removal
|
||||||
|
* @param sessionID Profile id
|
||||||
|
* @returns True if profile is to be wiped of data/progress
|
||||||
|
*/
|
||||||
protected isWiped(sessionID: string): boolean;
|
protected isWiped(sessionID: string): boolean;
|
||||||
protected getServerVersion(): string;
|
protected getServerVersion(): string;
|
||||||
/**
|
/**
|
||||||
@ -120,5 +164,23 @@ export declare class ProfileHelper {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
addSkillPointsToPlayer(pmcProfile: IPmcData, skill: SkillTypes, pointsToAdd: number, useSkillProgressRateMultipler?: boolean): void;
|
addSkillPointsToPlayer(pmcProfile: IPmcData, skill: SkillTypes, pointsToAdd: number, useSkillProgressRateMultipler?: boolean): void;
|
||||||
|
/**
|
||||||
|
* Get a speciic common skill from supplied profile
|
||||||
|
* @param pmcData Player profile
|
||||||
|
* @param skill Skill to look up and return value from
|
||||||
|
* @returns Common skill object from desired profile
|
||||||
|
*/
|
||||||
getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common;
|
getSkillFromProfile(pmcData: IPmcData, skill: SkillTypes): Common;
|
||||||
|
/**
|
||||||
|
* Is the provided session id for a developer account
|
||||||
|
* @param sessionID Profile id ot check
|
||||||
|
* @returns True if account is developer
|
||||||
|
*/
|
||||||
|
isDeveloperAccount(sessionID: string): boolean;
|
||||||
|
/**
|
||||||
|
* Add stash row bonus to profile or increments rows given count if it already exists
|
||||||
|
* @param sessionId Profile id to give rows to
|
||||||
|
* @param rowsToAdd How many rows to give profile
|
||||||
|
*/
|
||||||
|
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { AvailableForConditions } from "@spt-aki/models/eft/common/tables/IQuest";
|
import { IQuestCondition } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
export declare class QuestConditionHelper {
|
export declare class QuestConditionHelper {
|
||||||
getQuestConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
getQuestConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[];
|
||||||
getLevelConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
getLevelConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[];
|
||||||
getLoyaltyConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
getLoyaltyConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[];
|
||||||
getStandingConditions(q: AvailableForConditions[], furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
getStandingConditions(q: IQuestCondition[], furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[];
|
||||||
protected filterConditions(q: AvailableForConditions[], questType: string, furtherFilter?: (a: AvailableForConditions) => AvailableForConditions[]): AvailableForConditions[];
|
protected filterConditions(q: IQuestCondition[], questType: string, furtherFilter?: (a: IQuestCondition) => IQuestCondition[]): IQuestCondition[];
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper";
|
import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
||||||
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper";
|
import { QuestConditionHelper } from "@spt-aki/helpers/QuestConditionHelper";
|
||||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||||
@ -8,7 +9,7 @@ import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
|||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Common, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
import { Common, IQuestStatus } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { AvailableForConditions, AvailableForProps, IQuest, Reward } from "@spt-aki/models/eft/common/tables/IQuest";
|
import { IQuest, IQuestCondition, IQuestReward } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData";
|
import { IAcceptQuestRequestData } from "@spt-aki/models/eft/quests/IAcceptQuestRequestData";
|
||||||
import { IFailQuestRequestData } from "@spt-aki/models/eft/quests/IFailQuestRequestData";
|
import { IFailQuestRequestData } from "@spt-aki/models/eft/quests/IFailQuestRequestData";
|
||||||
@ -40,10 +41,11 @@ export declare class QuestHelper {
|
|||||||
protected paymentHelper: PaymentHelper;
|
protected paymentHelper: PaymentHelper;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
|
protected presetHelper: PresetHelper;
|
||||||
protected mailSendService: MailSendService;
|
protected mailSendService: MailSendService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, mailSendService: MailSendService, configServer: ConfigServer);
|
constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Get status of a quest in player profile by its id
|
* Get status of a quest in player profile by its id
|
||||||
* @param pmcData Profile to search
|
* @param pmcData Profile to search
|
||||||
@ -57,7 +59,7 @@ export declare class QuestHelper {
|
|||||||
* @param condition Quest condition
|
* @param condition Quest condition
|
||||||
* @returns true if player level is greater than or equal to quest
|
* @returns true if player level is greater than or equal to quest
|
||||||
*/
|
*/
|
||||||
doesPlayerLevelFulfilCondition(playerLevel: number, condition: AvailableForConditions): boolean;
|
doesPlayerLevelFulfilCondition(playerLevel: number, condition: IQuestCondition): boolean;
|
||||||
/**
|
/**
|
||||||
* Get the quests found in both arrays (inner join)
|
* Get the quests found in both arrays (inner join)
|
||||||
* @param before Array of quests #1
|
* @param before Array of quests #1
|
||||||
@ -84,28 +86,34 @@ export declare class QuestHelper {
|
|||||||
* @param profile Player profile
|
* @param profile Player profile
|
||||||
* @returns true if loyalty is high enough to fulfill quest requirement
|
* @returns true if loyalty is high enough to fulfill quest requirement
|
||||||
*/
|
*/
|
||||||
traderLoyaltyLevelRequirementCheck(questProperties: AvailableForProps, profile: IPmcData): boolean;
|
traderLoyaltyLevelRequirementCheck(questProperties: IQuestCondition, profile: IPmcData): boolean;
|
||||||
/**
|
/**
|
||||||
* Check if trader has sufficient standing to fulfill quest requirement
|
* Check if trader has sufficient standing to fulfill quest requirement
|
||||||
* @param questProperties Quest props
|
* @param questProperties Quest props
|
||||||
* @param profile Player profile
|
* @param profile Player profile
|
||||||
* @returns true if standing is high enough to fulfill quest requirement
|
* @returns true if standing is high enough to fulfill quest requirement
|
||||||
*/
|
*/
|
||||||
traderStandingRequirementCheck(questProperties: AvailableForProps, profile: IPmcData): boolean;
|
traderStandingRequirementCheck(questProperties: IQuestCondition, profile: IPmcData): boolean;
|
||||||
protected compareAvailableForValues(current: number, required: number, compareMethod: string): boolean;
|
protected compareAvailableForValues(current: number, required: number, compareMethod: string): boolean;
|
||||||
/**
|
/**
|
||||||
* take reward item from quest and set FiR status + fix stack sizes + fix mod Ids
|
* Take reward item from quest and set FiR status + fix stack sizes + fix mod Ids
|
||||||
* @param reward Reward item to fix
|
* @param questReward Reward item to fix
|
||||||
* @returns Fixed rewards
|
* @returns Fixed rewards
|
||||||
*/
|
*/
|
||||||
protected processReward(reward: Reward): Reward[];
|
protected processReward(questReward: IQuestReward): Item[];
|
||||||
|
/**
|
||||||
|
* Add missing mod items to a quest armor reward
|
||||||
|
* @param originalRewardRootItem Original armor reward item from IQuestReward.items object
|
||||||
|
* @param questReward Armor reward from quest
|
||||||
|
*/
|
||||||
|
protected generateArmorRewardChildSlots(originalRewardRootItem: Item, questReward: IQuestReward): void;
|
||||||
/**
|
/**
|
||||||
* Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success)
|
* Gets a flat list of reward items for the given quest at a specific state (e.g. Fail/Success)
|
||||||
* @param quest quest to get rewards for
|
* @param quest quest to get rewards for
|
||||||
* @param status Quest status that holds the items (Started, Success, Fail)
|
* @param status Quest status that holds the items (Started, Success, Fail)
|
||||||
* @returns array of items with the correct maxStack
|
* @returns array of items with the correct maxStack
|
||||||
*/
|
*/
|
||||||
getQuestRewardItems(quest: IQuest, status: QuestStatus): Reward[];
|
getQuestRewardItems(quest: IQuest, status: QuestStatus): Item[];
|
||||||
/**
|
/**
|
||||||
* Look up quest in db by accepted quest id and construct a profile-ready object ready to store in profile
|
* 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 pmcData Player profile
|
||||||
@ -120,6 +128,12 @@ export declare class QuestHelper {
|
|||||||
* @returns Quests accessible to player incuding newly unlocked quests now quest (startedQuestId) was started
|
* @returns Quests accessible to player incuding newly unlocked quests now quest (startedQuestId) was started
|
||||||
*/
|
*/
|
||||||
getNewlyAccessibleQuestsWhenStartingQuest(startedQuestId: string, sessionID: string): IQuest[];
|
getNewlyAccessibleQuestsWhenStartingQuest(startedQuestId: string, sessionID: string): IQuest[];
|
||||||
|
/**
|
||||||
|
* Is the quest for the opposite side the player is on
|
||||||
|
* @param playerSide Player side (usec/bear)
|
||||||
|
* @param questId QuestId to check
|
||||||
|
*/
|
||||||
|
questIsForOtherSide(playerSide: string, questId: string): boolean;
|
||||||
/**
|
/**
|
||||||
* Get quests that can be shown to player after failing a quest
|
* Get quests that can be shown to player after failing a quest
|
||||||
* @param failedQuestId Id of the quest failed by player
|
* @param failedQuestId Id of the quest failed by player
|
||||||
@ -170,9 +184,8 @@ export declare class QuestHelper {
|
|||||||
* @param failRequest Fail quest request data
|
* @param failRequest Fail quest request data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param output Client output
|
* @param output Client output
|
||||||
* @returns Item event router response
|
|
||||||
*/
|
*/
|
||||||
failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string, output?: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Get List of All Quests from db
|
* Get List of All Quests from db
|
||||||
* NOT CLONED
|
* NOT CLONED
|
||||||
@ -222,7 +235,7 @@ export declare class QuestHelper {
|
|||||||
* @param questResponse Response to send back to client
|
* @param questResponse Response to send back to client
|
||||||
* @returns Array of reward objects
|
* @returns Array of reward objects
|
||||||
*/
|
*/
|
||||||
applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): Reward[];
|
applyQuestReward(profileData: IPmcData, questId: string, state: QuestStatus, sessionId: string, questResponse: IItemEventRouterResponse): Item[];
|
||||||
/**
|
/**
|
||||||
* WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile
|
* WIP - Find hideout craft id and add to unlockedProductionRecipe array in player profile
|
||||||
* also update client response recipeUnlocked array with craft id
|
* also update client response recipeUnlocked array with craft id
|
||||||
@ -232,7 +245,7 @@ export declare class QuestHelper {
|
|||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param response Response to send back to client
|
* @param response Response to send back to client
|
||||||
*/
|
*/
|
||||||
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: Reward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void;
|
protected findAndAddHideoutProductionIdToProfile(pmcData: IPmcData, craftUnlockReward: IQuestReward, questDetails: IQuest, sessionID: string, response: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Get players money reward bonus from profile
|
* Get players money reward bonus from profile
|
||||||
* @param pmcData player profile
|
* @param pmcData player profile
|
||||||
@ -253,4 +266,10 @@ export declare class QuestHelper {
|
|||||||
*/
|
*/
|
||||||
addAllQuestsToProfile(pmcProfile: IPmcData, statuses: QuestStatus[]): void;
|
addAllQuestsToProfile(pmcProfile: IPmcData, statuses: QuestStatus[]): void;
|
||||||
findAndRemoveQuestFromArrayIfExists(questId: string, quests: IQuestStatus[]): void;
|
findAndRemoveQuestFromArrayIfExists(questId: string, quests: IQuestStatus[]): void;
|
||||||
|
/**
|
||||||
|
* Return a list of quests that would fail when supplied quest is completed
|
||||||
|
* @param completedQuestId quest completed id
|
||||||
|
* @returns array of IQuest objects
|
||||||
|
*/
|
||||||
|
getQuestsFailedByCompletingQuest(completedQuestId: string): IQuest[];
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ import { LocaleService } from "@spt-aki/services/LocaleService";
|
|||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||||
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
|
||||||
|
import { RagfairRequiredItemsService } from "@spt-aki/services/RagfairRequiredItemsService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
export declare class RagfairOfferHelper {
|
export declare class RagfairOfferHelper {
|
||||||
@ -42,6 +43,7 @@ export declare class RagfairOfferHelper {
|
|||||||
protected ragfairSortHelper: RagfairSortHelper;
|
protected ragfairSortHelper: RagfairSortHelper;
|
||||||
protected ragfairHelper: RagfairHelper;
|
protected ragfairHelper: RagfairHelper;
|
||||||
protected ragfairOfferService: RagfairOfferService;
|
protected ragfairOfferService: RagfairOfferService;
|
||||||
|
protected ragfairRequiredItemsService: RagfairRequiredItemsService;
|
||||||
protected localeService: LocaleService;
|
protected localeService: LocaleService;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected mailSendService: MailSendService;
|
protected mailSendService: MailSendService;
|
||||||
@ -49,25 +51,32 @@ export declare class RagfairOfferHelper {
|
|||||||
protected static goodSoldTemplate: string;
|
protected static goodSoldTemplate: string;
|
||||||
protected ragfairConfig: IRagfairConfig;
|
protected ragfairConfig: IRagfairConfig;
|
||||||
protected questConfig: IQuestConfig;
|
protected questConfig: IQuestConfig;
|
||||||
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer);
|
constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, traderHelper: TraderHelper, saveServer: SaveServer, itemHelper: ItemHelper, paymentHelper: PaymentHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, ragfairServerHelper: RagfairServerHelper, ragfairSortHelper: RagfairSortHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, localeService: LocaleService, localisationService: LocalisationService, mailSendService: MailSendService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
|
* Passthrough to ragfairOfferService.getOffers(), get flea offers a player should see
|
||||||
* @param searchRequest Data from client
|
* @param searchRequest Data from client
|
||||||
* @param itemsToAdd ragfairHelper.filterCategories()
|
* @param itemsToAdd ragfairHelper.filterCategories()
|
||||||
* @param traderAssorts Trader assorts
|
* @param traderAssorts Trader assorts
|
||||||
* @param pmcProfile Player profile
|
* @param pmcData Player profile
|
||||||
* @returns Offers the player should see
|
* @returns Offers the player should see
|
||||||
*/
|
*/
|
||||||
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
getValidOffers(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
||||||
|
/**
|
||||||
|
* Get matching offers that require the desired item and filter out offers from non traders if player is below ragfair unlock level
|
||||||
|
* @param searchRequest Search request from client
|
||||||
|
* @param pmcDataPlayer profile
|
||||||
|
* @returns Matching IRagfairOffer objects
|
||||||
|
*/
|
||||||
|
getOffersThatRequireItem(searchRequest: ISearchRequestData, pmcData: IPmcData): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Get offers from flea/traders specifically when building weapon preset
|
* Get offers from flea/traders specifically when building weapon preset
|
||||||
* @param searchRequest Search request data
|
* @param searchRequest Search request data
|
||||||
* @param itemsToAdd string array of item tpls to search for
|
* @param itemsToAdd string array of item tpls to search for
|
||||||
* @param traderAssorts All trader assorts player can access/buy
|
* @param traderAssorts All trader assorts player can access/buy
|
||||||
* @param pmcProfile Player profile
|
* @param pmcData Player profile
|
||||||
* @returns IRagfairOffer array
|
* @returns IRagfairOffer array
|
||||||
*/
|
*/
|
||||||
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcProfile: IPmcData): IRagfairOffer[];
|
getOffersForBuild(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, pmcData: IPmcData): IRagfairOffer[];
|
||||||
/**
|
/**
|
||||||
* Check if offer is from trader standing the player does not have
|
* Check if offer is from trader standing the player does not have
|
||||||
* @param offer Offer to check
|
* @param offer Offer to check
|
||||||
@ -140,6 +149,21 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns Localised message text
|
* @returns Localised message text
|
||||||
*/
|
*/
|
||||||
protected getLocalisedOfferSoldMessage(itemTpl: string, boughtAmount: number): string;
|
protected getLocalisedOfferSoldMessage(itemTpl: string, boughtAmount: number): string;
|
||||||
|
/**
|
||||||
|
* Check an offer passes the various search criteria the player requested
|
||||||
|
* @param searchRequest
|
||||||
|
* @param offer
|
||||||
|
* @param pmcData
|
||||||
|
* @returns True
|
||||||
|
*/
|
||||||
|
protected passesSearchFilterCriteria(searchRequest: ISearchRequestData, offer: IRagfairOffer, pmcData: IPmcData): boolean;
|
||||||
|
/**
|
||||||
|
* Check that the passed in offer item is functional
|
||||||
|
* @param offerRootItem The root item of the offer
|
||||||
|
* @param offer The flea offer
|
||||||
|
* @returns True if the given item is functional
|
||||||
|
*/
|
||||||
|
isItemFunctional(offerRootItem: Item, offer: IRagfairOffer): boolean;
|
||||||
/**
|
/**
|
||||||
* Should a ragfair offer be visible to the player
|
* Should a ragfair offer be visible to the player
|
||||||
* @param searchRequest Search request
|
* @param searchRequest Search request
|
||||||
@ -150,6 +174,7 @@ export declare class RagfairOfferHelper {
|
|||||||
* @returns True = should be shown to player
|
* @returns True = should be shown to player
|
||||||
*/
|
*/
|
||||||
isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
isDisplayableOffer(searchRequest: ISearchRequestData, itemsToAdd: string[], traderAssorts: Record<string, ITraderAssort>, offer: IRagfairOffer, pmcProfile: IPmcData): boolean;
|
||||||
|
isDisplayableOfferThatNeedsItem(searchRequest: ISearchRequestData, offer: IRagfairOffer): boolean;
|
||||||
/**
|
/**
|
||||||
* Does the passed in item have a condition property
|
* Does the passed in item have a condition property
|
||||||
* @param item Item to check
|
* @param item Item to check
|
||||||
|
@ -53,6 +53,12 @@ export declare class RagfairServerHelper {
|
|||||||
* @returns True if its blacklsited
|
* @returns True if its blacklsited
|
||||||
*/
|
*/
|
||||||
protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean;
|
protected isItemOnCustomFleaBlacklist(itemTemplateId: string): boolean;
|
||||||
|
/**
|
||||||
|
* Is supplied parent id on the ragfair custom item category blacklist
|
||||||
|
* @param parentId Parent Id to check is blacklisted
|
||||||
|
* @returns true if blacklisted
|
||||||
|
*/
|
||||||
|
protected isItemCategoryOnCustomFleaBlacklist(itemParentId: string): boolean;
|
||||||
/**
|
/**
|
||||||
* is supplied id a trader
|
* is supplied id a trader
|
||||||
* @param traderId
|
* @param traderId
|
||||||
@ -96,11 +102,4 @@ export declare class RagfairServerHelper {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
getPresetItemsByTpl(item: Item): Item[];
|
getPresetItemsByTpl(item: Item): Item[];
|
||||||
/**
|
|
||||||
* Generate new unique ids for child items while preserving hierarchy
|
|
||||||
* @param rootItem Base/primary item of preset
|
|
||||||
* @param preset Primary item + children of primary item
|
|
||||||
* @returns Item array with new IDs
|
|
||||||
*/
|
|
||||||
reparentPresets(rootItem: Item, preset: Item[]): Item[];
|
|
||||||
}
|
}
|
||||||
|
@ -1,63 +1,68 @@
|
|||||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||||
import { IProcessBuyTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBuyTradeRequestData";
|
import { IProcessBuyTradeRequestData } from "@spt-aki/models/eft/trade/IProcessBuyTradeRequestData";
|
||||||
import { IProcessSellTradeRequestData } from "@spt-aki/models/eft/trade/IProcessSellTradeRequestData";
|
import { IProcessSellTradeRequestData } from "@spt-aki/models/eft/trade/IProcessSellTradeRequestData";
|
||||||
|
import { IInventoryConfig } from "@spt-aki/models/spt/config/IInventoryConfig";
|
||||||
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { RagfairServer } from "@spt-aki/servers/RagfairServer";
|
import { RagfairServer } from "@spt-aki/servers/RagfairServer";
|
||||||
import { FenceService } from "@spt-aki/services/FenceService";
|
import { FenceService } from "@spt-aki/services/FenceService";
|
||||||
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
|
import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
export declare class TradeHelper {
|
export declare class TradeHelper {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected fenceService: FenceService;
|
protected fenceService: FenceService;
|
||||||
|
protected localisationService: LocalisationService;
|
||||||
protected httpResponse: HttpResponseUtil;
|
protected httpResponse: HttpResponseUtil;
|
||||||
protected inventoryHelper: InventoryHelper;
|
protected inventoryHelper: InventoryHelper;
|
||||||
protected ragfairServer: RagfairServer;
|
protected ragfairServer: RagfairServer;
|
||||||
|
protected traderAssortHelper: TraderAssortHelper;
|
||||||
|
protected traderPurchasePersisterService: TraderPurchasePersisterService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected traderConfig: ITraderConfig;
|
protected traderConfig: ITraderConfig;
|
||||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, configServer: ConfigServer);
|
protected inventoryConfig: IInventoryConfig;
|
||||||
|
constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Buy item from flea or trader
|
* Buy item from flea or trader
|
||||||
* @param pmcData Player profile
|
* @param pmcData Player profile
|
||||||
* @param buyRequestData data from client
|
* @param buyRequestData data from client
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @param foundInRaid Should item be found in raid
|
* @param foundInRaid Should item be found in raid
|
||||||
* @param upd optional item details used when buying from flea
|
* @param output IItemEventRouterResponse
|
||||||
* @returns
|
* @returns IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
buyItem(pmcData: IPmcData, buyRequestData: IProcessBuyTradeRequestData, sessionID: string, foundInRaid: boolean, upd: Upd): IItemEventRouterResponse;
|
buyItem(pmcData: IPmcData, buyRequestData: IProcessBuyTradeRequestData, sessionID: string, foundInRaid: boolean, output: IItemEventRouterResponse): void;
|
||||||
/**
|
/**
|
||||||
* Sell item to trader
|
* Sell item to trader
|
||||||
* @param profileWithItemsToSell Profile to remove items from
|
* @param profileWithItemsToSell Profile to remove items from
|
||||||
* @param profileToReceiveMoney Profile to accept the money for selling item
|
* @param profileToReceiveMoney Profile to accept the money for selling item
|
||||||
* @param sellRequest Request data
|
* @param sellRequest Request data
|
||||||
* @param sessionID Session id
|
* @param sessionID Session id
|
||||||
* @returns IItemEventRouterResponse
|
* @param output IItemEventRouterResponse
|
||||||
*/
|
*/
|
||||||
sellItem(profileWithItemsToSell: IPmcData, profileToReceiveMoney: IPmcData, sellRequest: IProcessSellTradeRequestData, sessionID: string): IItemEventRouterResponse;
|
sellItem(profileWithItemsToSell: IPmcData, profileToReceiveMoney: IPmcData, sellRequest: IProcessSellTradeRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||||
/**
|
|
||||||
* Increment the assorts buy count by number of items purchased
|
|
||||||
* 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
|
|
||||||
*/
|
|
||||||
protected incrementAssortBuyCount(assortBeingPurchased: Item, itemsPurchasedCount: number): void;
|
|
||||||
/**
|
/**
|
||||||
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
* Traders allow a limited number of purchases per refresh cycle (default 60 mins)
|
||||||
|
* @param sessionId Session id
|
||||||
|
* @param traderId Trader assort is purchased from
|
||||||
* @param assortBeingPurchased the item from trader being bought
|
* @param assortBeingPurchased the item from trader being bought
|
||||||
* @param assortId Id of assort being purchased
|
* @param assortId Id of assort being purchased
|
||||||
* @param count How many are being bought
|
* @param count How many of the item are being bought
|
||||||
*/
|
*/
|
||||||
protected checkPurchaseIsWithinTraderItemLimit(assortBeingPurchased: Item, assortId: string, count: number): void;
|
protected checkPurchaseIsWithinTraderItemLimit(sessionId: string, traderId: string, assortBeingPurchased: Item, assortId: string, count: number): void;
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,11 @@ export declare class TraderAssortHelper {
|
|||||||
* @returns a traders' assorts
|
* @returns a traders' assorts
|
||||||
*/
|
*/
|
||||||
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
|
getAssort(sessionId: string, traderId: string, flea?: boolean): ITraderAssort;
|
||||||
|
/**
|
||||||
|
* Reset every traders root item `BuyRestrictionCurrent` property to 0
|
||||||
|
* @param assortItems Items to adjust
|
||||||
|
*/
|
||||||
|
protected resetBuyRestrictionCurrentValue(assortItems: Item[]): void;
|
||||||
/**
|
/**
|
||||||
* 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
|
* 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
|
||||||
*/
|
*/
|
||||||
|
@ -59,7 +59,7 @@ export declare class TraderHelper {
|
|||||||
/**
|
/**
|
||||||
* Reset a profiles trader data back to its initial state as seen by a level 1 player
|
* Reset a profiles trader data back to its initial state as seen by a level 1 player
|
||||||
* Does NOT take into account different profile levels
|
* Does NOT take into account different profile levels
|
||||||
* @param sessionID session id
|
* @param sessionID session id of player
|
||||||
* @param traderID trader id to reset
|
* @param traderID trader id to reset
|
||||||
*/
|
*/
|
||||||
resetTrader(sessionID: string, traderID: string): void;
|
resetTrader(sessionID: string, traderID: string): void;
|
||||||
@ -74,13 +74,13 @@ export declare class TraderHelper {
|
|||||||
* Alter a traders unlocked status
|
* Alter a traders unlocked status
|
||||||
* @param traderId Trader to alter
|
* @param traderId Trader to alter
|
||||||
* @param status New status to use
|
* @param status New status to use
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id of player
|
||||||
*/
|
*/
|
||||||
setTraderUnlockedState(traderId: string, status: boolean, sessionId: string): void;
|
setTraderUnlockedState(traderId: string, status: boolean, sessionId: string): void;
|
||||||
/**
|
/**
|
||||||
* Add standing to a trader and level them up if exp goes over level threshold
|
* Add standing to a trader and level them up if exp goes over level threshold
|
||||||
* @param sessionId Session id
|
* @param sessionId Session id of player
|
||||||
* @param traderId Traders id
|
* @param traderId Traders id to add standing to
|
||||||
* @param standingToAdd Standing value to add to trader
|
* @param standingToAdd Standing value to add to trader
|
||||||
*/
|
*/
|
||||||
addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void;
|
addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void;
|
||||||
@ -117,11 +117,11 @@ export declare class TraderHelper {
|
|||||||
*/
|
*/
|
||||||
addTraderPurchasesToPlayerProfile(sessionID: string, newPurchaseDetails: {
|
addTraderPurchasesToPlayerProfile(sessionID: string, newPurchaseDetails: {
|
||||||
items: {
|
items: {
|
||||||
item_id: string;
|
itemId: string;
|
||||||
count: number;
|
count: number;
|
||||||
}[];
|
}[];
|
||||||
tid: string;
|
traderId: string;
|
||||||
}): void;
|
}, itemPurchased: Item): void;
|
||||||
/**
|
/**
|
||||||
* Get the highest rouble price for an item from traders
|
* Get the highest rouble price for an item from traders
|
||||||
* UNUSED
|
* UNUSED
|
||||||
|
2
TypeScript/10ScopesAndTypes/types/ide/BleedingEdgeModsEntry.d.ts
vendored
Normal file
2
TypeScript/10ScopesAndTypes/types/ide/BleedingEdgeModsEntry.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
import "reflect-metadata";
|
||||||
|
import "source-map-support/register";
|
@ -1,33 +1,33 @@
|
|||||||
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
||||||
|
import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { VFS } from "@spt-aki/utils/VFS";
|
import { VFS } from "@spt-aki/utils/VFS";
|
||||||
declare class BundleInfo {
|
export declare class BundleInfo {
|
||||||
modPath: string;
|
modpath: string;
|
||||||
key: string;
|
filename: string;
|
||||||
path: string;
|
crc: number;
|
||||||
filepath: string;
|
dependencies: string[];
|
||||||
dependencyKeys: string[];
|
constructor(modpath: string, bundle: BundleManifestEntry, bundleHash: number);
|
||||||
constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string);
|
|
||||||
}
|
}
|
||||||
export declare class BundleLoader {
|
export declare class BundleLoader {
|
||||||
protected httpServerHelper: HttpServerHelper;
|
protected httpServerHelper: HttpServerHelper;
|
||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
|
protected bundleHashCacheService: BundleHashCacheService;
|
||||||
protected bundles: Record<string, BundleInfo>;
|
protected bundles: Record<string, BundleInfo>;
|
||||||
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil);
|
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService);
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/bundles
|
* Handle singleplayer/bundles
|
||||||
*/
|
*/
|
||||||
getBundles(local: boolean): BundleInfo[];
|
getBundles(): BundleInfo[];
|
||||||
getBundle(key: string, local: boolean): BundleInfo;
|
getBundle(key: string): BundleInfo;
|
||||||
addBundles(modpath: string): void;
|
addBundles(modpath: string): void;
|
||||||
addBundle(key: string, b: BundleInfo): void;
|
addBundle(key: string, b: BundleInfo): void;
|
||||||
}
|
}
|
||||||
export interface BundleManifest {
|
export interface BundleManifest {
|
||||||
manifest: Array<BundleManifestEntry>;
|
manifest: BundleManifestEntry[];
|
||||||
}
|
}
|
||||||
export interface BundleManifestEntry {
|
export interface BundleManifestEntry {
|
||||||
key: string;
|
key: string;
|
||||||
path: string;
|
dependencyKeys: string[];
|
||||||
}
|
}
|
||||||
export {};
|
|
||||||
|
@ -1,21 +1,17 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
import { BundleLoader } from "@spt-aki/loaders/BundleLoader";
|
|
||||||
import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck";
|
import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck";
|
||||||
import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader";
|
import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader";
|
||||||
import { IModLoader } from "@spt-aki/models/spt/mod/IModLoader";
|
import { IModLoader } from "@spt-aki/models/spt/mod/IModLoader";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
import { VFS } from "@spt-aki/utils/VFS";
|
|
||||||
export declare class PostAkiModLoader implements IModLoader {
|
export declare class PostAkiModLoader implements IModLoader {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected bundleLoader: BundleLoader;
|
|
||||||
protected vfs: VFS;
|
|
||||||
protected preAkiModLoader: PreAkiModLoader;
|
protected preAkiModLoader: PreAkiModLoader;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected modTypeCheck: ModTypeCheck;
|
protected modTypeCheck: ModTypeCheck;
|
||||||
constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck);
|
protected container: DependencyContainer;
|
||||||
|
constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck);
|
||||||
getModPath(mod: string): string;
|
getModPath(mod: string): string;
|
||||||
load(): Promise<void>;
|
load(): Promise<void>;
|
||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeModsAsync(): Promise<void>;
|
||||||
protected addBundles(): void;
|
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,21 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
|
import { BundleLoader } from "@spt-aki/loaders/BundleLoader";
|
||||||
import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck";
|
import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck";
|
||||||
import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader";
|
import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
export declare class PostDBModLoader implements OnLoad {
|
export declare class PostDBModLoader implements OnLoad {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
protected bundleLoader: BundleLoader;
|
||||||
protected preAkiModLoader: PreAkiModLoader;
|
protected preAkiModLoader: PreAkiModLoader;
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected modTypeCheck: ModTypeCheck;
|
protected modTypeCheck: ModTypeCheck;
|
||||||
constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck);
|
protected container: DependencyContainer;
|
||||||
|
constructor(logger: ILogger, bundleLoader: BundleLoader, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck);
|
||||||
onLoad(): Promise<void>;
|
onLoad(): Promise<void>;
|
||||||
getRoute(): string;
|
getRoute(): string;
|
||||||
getModPath(mod: string): string;
|
getModPath(mod: string): string;
|
||||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
protected executeModsAsync(): Promise<void>;
|
||||||
|
protected addBundles(): void;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { DependencyContainer } from "tsyringe";
|
import { DependencyContainer } from "tsyringe";
|
||||||
import { BundleLoader } from "@spt-aki/loaders/BundleLoader";
|
|
||||||
import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder";
|
import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder";
|
||||||
import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck";
|
import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck";
|
||||||
import { ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
@ -17,12 +16,11 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected vfs: VFS;
|
protected vfs: VFS;
|
||||||
protected jsonUtil: JsonUtil;
|
protected jsonUtil: JsonUtil;
|
||||||
protected modCompilerService: ModCompilerService;
|
protected modCompilerService: ModCompilerService;
|
||||||
protected bundleLoader: BundleLoader;
|
|
||||||
protected localisationService: LocalisationService;
|
protected localisationService: LocalisationService;
|
||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected modLoadOrder: ModLoadOrder;
|
protected modLoadOrder: ModLoadOrder;
|
||||||
protected modTypeCheck: ModTypeCheck;
|
protected modTypeCheck: ModTypeCheck;
|
||||||
protected static container: DependencyContainer;
|
protected container: DependencyContainer;
|
||||||
protected readonly basepath = "user/mods/";
|
protected readonly basepath = "user/mods/";
|
||||||
protected readonly modOrderPath = "user/mods/order.json";
|
protected readonly modOrderPath = "user/mods/order.json";
|
||||||
protected order: Record<string, number>;
|
protected order: Record<string, number>;
|
||||||
@ -30,7 +28,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected akiConfig: ICoreConfig;
|
protected akiConfig: ICoreConfig;
|
||||||
protected serverDependencies: Record<string, string>;
|
protected serverDependencies: Record<string, string>;
|
||||||
protected skippedMods: Set<string>;
|
protected skippedMods: Set<string>;
|
||||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
||||||
load(container: DependencyContainer): Promise<void>;
|
load(container: DependencyContainer): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Returns a list of mods with preserved load order
|
* Returns a list of mods with preserved load order
|
||||||
@ -68,10 +66,9 @@ export declare class PreAkiModLoader implements IModLoader {
|
|||||||
protected isModCombatibleWithAki(mod: IPackageJsonData): boolean;
|
protected isModCombatibleWithAki(mod: IPackageJsonData): boolean;
|
||||||
/**
|
/**
|
||||||
* Execute each mod found in this.imported
|
* Execute each mod found in this.imported
|
||||||
* @param container Dependence container to give to mod when it runs
|
|
||||||
* @returns void promise
|
* @returns void promise
|
||||||
*/
|
*/
|
||||||
protected executeModsAsync(container: DependencyContainer): Promise<void>;
|
protected executeModsAsync(): Promise<void>;
|
||||||
/**
|
/**
|
||||||
* Read loadorder.json (create if doesnt exist) and return sorted list of mods
|
* Read loadorder.json (create if doesnt exist) and return sorted list of mods
|
||||||
* @returns string array of sorted mod names
|
* @returns string array of sorted mod names
|
||||||
|
9
TypeScript/10ScopesAndTypes/types/models/eft/builds/ISetMagazineRequest.d.ts
vendored
Normal file
9
TypeScript/10ScopesAndTypes/types/models/eft/builds/ISetMagazineRequest.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { IMagazineTemplateAmmoItem } from "../profile/IAkiProfile";
|
||||||
|
export interface ISetMagazineRequest {
|
||||||
|
Id: string;
|
||||||
|
Name: string;
|
||||||
|
Caliber: string;
|
||||||
|
Items: IMagazineTemplateAmmoItem[];
|
||||||
|
TopCount: number;
|
||||||
|
BottomCount: number;
|
||||||
|
}
|
@ -5,6 +5,7 @@ export interface IGlobals {
|
|||||||
config: IConfig;
|
config: IConfig;
|
||||||
bot_presets: IBotPreset[];
|
bot_presets: IBotPreset[];
|
||||||
AudioSettings: IAudioSettings;
|
AudioSettings: IAudioSettings;
|
||||||
|
EnvironmentSettings: IEnvironmentSettings;
|
||||||
BotWeaponScatterings: IBotWeaponScattering[];
|
BotWeaponScatterings: IBotWeaponScattering[];
|
||||||
ItemPresets: Record<string, IPreset>;
|
ItemPresets: Record<string, IPreset>;
|
||||||
}
|
}
|
||||||
@ -39,6 +40,7 @@ export interface IConfig {
|
|||||||
BaseLoadTime: number;
|
BaseLoadTime: number;
|
||||||
BaseUnloadTime: number;
|
BaseUnloadTime: number;
|
||||||
BaseCheckTime: number;
|
BaseCheckTime: number;
|
||||||
|
BluntDamageReduceFromSoftArmorMod: number;
|
||||||
Customization: ICustomization;
|
Customization: ICustomization;
|
||||||
UncheckOnShot: boolean;
|
UncheckOnShot: boolean;
|
||||||
BotsEnabled: boolean;
|
BotsEnabled: boolean;
|
||||||
@ -70,6 +72,10 @@ export interface IConfig {
|
|||||||
SkillPointsBeforeFatigue: number;
|
SkillPointsBeforeFatigue: number;
|
||||||
SkillFatigueReset: number;
|
SkillFatigueReset: number;
|
||||||
DiscardLimitsEnabled: boolean;
|
DiscardLimitsEnabled: boolean;
|
||||||
|
EventSettings: IEventSettings;
|
||||||
|
FavoriteItemsSettings: IFavoriteItemsSettings;
|
||||||
|
VaultingSettings: IVaultingSettings;
|
||||||
|
BTRSettings: IBTRSettings;
|
||||||
EventType: string[];
|
EventType: string[];
|
||||||
WalkSpeed: Ixyz;
|
WalkSpeed: Ixyz;
|
||||||
SprintSpeed: Ixyz;
|
SprintSpeed: Ixyz;
|
||||||
@ -102,6 +108,27 @@ export interface IWeaponFastDrawSettings {
|
|||||||
WeaponPistolFastSwitchMaxSpeedMult: number;
|
WeaponPistolFastSwitchMaxSpeedMult: number;
|
||||||
WeaponPistolFastSwitchMinSpeedMult: number;
|
WeaponPistolFastSwitchMinSpeedMult: number;
|
||||||
}
|
}
|
||||||
|
export interface IEventSettings {
|
||||||
|
EventActive: boolean;
|
||||||
|
EventTime: number;
|
||||||
|
EventWeather: IEventWeather;
|
||||||
|
ExitTimeMultiplier: number;
|
||||||
|
StaminaMultiplier: number;
|
||||||
|
SummonFailedWeather: IEventWeather;
|
||||||
|
SummonSuccessWeather: IEventWeather;
|
||||||
|
WeatherChangeTime: number;
|
||||||
|
}
|
||||||
|
export interface IEventWeather {
|
||||||
|
Cloudness: number;
|
||||||
|
Hour: number;
|
||||||
|
Minute: number;
|
||||||
|
Rain: number;
|
||||||
|
RainRandomness: number;
|
||||||
|
ScaterringFogDensity: number;
|
||||||
|
TopWindDirection: Ixyz;
|
||||||
|
Wind: number;
|
||||||
|
WindDirection: number;
|
||||||
|
}
|
||||||
export interface IGraphicSettings {
|
export interface IGraphicSettings {
|
||||||
ExperimentalFogInCity: boolean;
|
ExperimentalFogInCity: boolean;
|
||||||
}
|
}
|
||||||
@ -656,6 +683,7 @@ export interface IBodyPartsSetting {
|
|||||||
Minimum: number;
|
Minimum: number;
|
||||||
Maximum: number;
|
Maximum: number;
|
||||||
Default: number;
|
Default: number;
|
||||||
|
EnvironmentDamageMultiplier: number;
|
||||||
OverDamageReceivedMultiplier: number;
|
OverDamageReceivedMultiplier: number;
|
||||||
}
|
}
|
||||||
export interface IHealthFactorsSettings {
|
export interface IHealthFactorsSettings {
|
||||||
@ -826,6 +854,83 @@ export interface IRestrictionsInRaid {
|
|||||||
TemplateId: string;
|
TemplateId: string;
|
||||||
Value: number;
|
Value: number;
|
||||||
}
|
}
|
||||||
|
export interface IFavoriteItemsSettings {
|
||||||
|
WeaponStandMaxItemsCount: number;
|
||||||
|
PlaceOfFameMaxItemsCount: number;
|
||||||
|
}
|
||||||
|
export interface IVaultingSettings {
|
||||||
|
IsActive: boolean;
|
||||||
|
VaultingInputTime: number;
|
||||||
|
GridSettings: IVaultingGridSettings;
|
||||||
|
MovesSettings: IVaultingMovesSettings;
|
||||||
|
}
|
||||||
|
export interface IVaultingGridSettings {
|
||||||
|
GridSizeX: number;
|
||||||
|
GridSizeY: number;
|
||||||
|
GridSizeZ: number;
|
||||||
|
SteppingLengthX: number;
|
||||||
|
SteppingLengthY: number;
|
||||||
|
SteppingLengthZ: number;
|
||||||
|
GridOffsetX: number;
|
||||||
|
GridOffsetY: number;
|
||||||
|
GridOffsetZ: number;
|
||||||
|
OffsetFactor: number;
|
||||||
|
}
|
||||||
|
export interface IVaultingMovesSettings {
|
||||||
|
VaultSettings: IVaultingSubMoveSettings;
|
||||||
|
ClimbSettings: IVaultingSubMoveSettings;
|
||||||
|
}
|
||||||
|
export interface IVaultingSubMoveSettings {
|
||||||
|
IsActive: boolean;
|
||||||
|
MaxWithoutHandHeight: number;
|
||||||
|
SpeedRange: Ixyz;
|
||||||
|
MoveRestrictions: IMoveRestrictions;
|
||||||
|
AutoMoveRestrictions: IMoveRestrictions;
|
||||||
|
}
|
||||||
|
export interface IMoveRestrictions {
|
||||||
|
IsActive: boolean;
|
||||||
|
MinDistantToInteract: number;
|
||||||
|
MinHeight: number;
|
||||||
|
MaxHeight: number;
|
||||||
|
MinLength: number;
|
||||||
|
MaxLength: number;
|
||||||
|
}
|
||||||
|
export interface IBTRSettings {
|
||||||
|
LocationsWithBTR: string[];
|
||||||
|
BasePriceTaxi: number;
|
||||||
|
AddPriceTaxi: number;
|
||||||
|
CleanUpPrice: number;
|
||||||
|
DeliveryPrice: number;
|
||||||
|
ModDeliveryCost: number;
|
||||||
|
BearPriceMod: number;
|
||||||
|
UsecPriceMod: number;
|
||||||
|
ScavPriceMod: number;
|
||||||
|
CoefficientDiscountCharisma: number;
|
||||||
|
DeliveryMinPrice: number;
|
||||||
|
TaxiMinPrice: number;
|
||||||
|
BotCoverMinPrice: number;
|
||||||
|
MapsConfigs: Record<string, IBtrMapConfig>;
|
||||||
|
DiameterWheel: number;
|
||||||
|
HeightWheel: number;
|
||||||
|
HeightWheelMaxPosLimit: number;
|
||||||
|
HeightWheelMinPosLimit: number;
|
||||||
|
SnapToSurfaceWheelsSpeed: number;
|
||||||
|
CheckSurfaceForWheelsTimer: number;
|
||||||
|
HeightWheelOffset: number;
|
||||||
|
}
|
||||||
|
export interface IBtrMapConfig {
|
||||||
|
mapID: string;
|
||||||
|
pathsConfigurations: IBtrMapConfig[];
|
||||||
|
}
|
||||||
|
export interface IBtrMapConfig {
|
||||||
|
id: string;
|
||||||
|
enterPoint: string;
|
||||||
|
exitPoint: string;
|
||||||
|
pathPoints: string[];
|
||||||
|
once: boolean;
|
||||||
|
circle: boolean;
|
||||||
|
circleCount: number;
|
||||||
|
}
|
||||||
export interface ISquadSettings {
|
export interface ISquadSettings {
|
||||||
CountOfRequestsToOnePlayer: number;
|
CountOfRequestsToOnePlayer: number;
|
||||||
SecondsForExpiredRequest: number;
|
SecondsForExpiredRequest: number;
|
||||||
@ -1240,6 +1345,11 @@ export interface IFenceLevel {
|
|||||||
BotHelpChance: number;
|
BotHelpChance: number;
|
||||||
BotSpreadoutChance: number;
|
BotSpreadoutChance: number;
|
||||||
BotStopChance: number;
|
BotStopChance: number;
|
||||||
|
PriceModTaxi: number;
|
||||||
|
PriceModDelivery: number;
|
||||||
|
PriceModCleanUp: number;
|
||||||
|
DeliveryGridSize: Ixyz;
|
||||||
|
CanInteractWithBtr: boolean;
|
||||||
}
|
}
|
||||||
export interface IInertia {
|
export interface IInertia {
|
||||||
InertiaLimits: Ixyz;
|
InertiaLimits: Ixyz;
|
||||||
@ -1335,6 +1445,14 @@ export interface IAudioGroupPreset {
|
|||||||
OcclusionIntensity: number;
|
OcclusionIntensity: number;
|
||||||
OverallVolume: number;
|
OverallVolume: number;
|
||||||
}
|
}
|
||||||
|
export interface IEnvironmentSettings {
|
||||||
|
SnowStepsVolumeMultiplier: number;
|
||||||
|
SurfaceMultipliers: ISurfaceMultiplier[];
|
||||||
|
}
|
||||||
|
export interface ISurfaceMultiplier {
|
||||||
|
SurfaceType: string;
|
||||||
|
VolumeMult: number;
|
||||||
|
}
|
||||||
export interface IBotWeaponScattering {
|
export interface IBotWeaponScattering {
|
||||||
Name: string;
|
Name: string;
|
||||||
PriorityScatter1meter: number;
|
PriorityScatter1meter: number;
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase";
|
import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase";
|
||||||
import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot";
|
import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot";
|
||||||
export interface ILocation {
|
export interface ILocation {
|
||||||
base: ILocationBase;
|
base: ILocationBase;
|
||||||
looseLoot: ILooseLoot;
|
looseLoot: ILooseLoot;
|
||||||
statics: IStaticContainer;
|
statics: IStaticContainer;
|
||||||
|
allExtracts: Exit[];
|
||||||
}
|
}
|
||||||
export interface IStaticContainer {
|
export interface IStaticContainer {
|
||||||
containersGroups: Record<string, IContainerMinMax>;
|
containersGroups: Record<string, IContainerMinMax>;
|
||||||
|
@ -132,6 +132,8 @@ export interface BossLocationSpawn {
|
|||||||
TriggerId: string;
|
TriggerId: string;
|
||||||
TriggerName: string;
|
TriggerName: string;
|
||||||
Delay?: number;
|
Delay?: number;
|
||||||
|
ForceSpawn?: boolean;
|
||||||
|
IgnoreMaxBots?: boolean;
|
||||||
Supports?: BossSupport[];
|
Supports?: BossSupport[];
|
||||||
sptId?: string;
|
sptId?: string;
|
||||||
}
|
}
|
||||||
@ -171,6 +173,7 @@ export interface SpawnPointParam {
|
|||||||
BotZoneName: string;
|
BotZoneName: string;
|
||||||
Categories: string[];
|
Categories: string[];
|
||||||
ColliderParams: ColliderParams;
|
ColliderParams: ColliderParams;
|
||||||
|
CorePointId: number;
|
||||||
DelayToCanSpawnSec: number;
|
DelayToCanSpawnSec: number;
|
||||||
Id: string;
|
Id: string;
|
||||||
Infiltration: string;
|
Infiltration: string;
|
||||||
@ -187,9 +190,11 @@ export interface Props {
|
|||||||
Radius: number;
|
Radius: number;
|
||||||
}
|
}
|
||||||
export interface Exit {
|
export interface Exit {
|
||||||
|
/** % Chance out of 100 exit will appear in raid */
|
||||||
Chance: number;
|
Chance: number;
|
||||||
Count: number;
|
Count: number;
|
||||||
EntryPoints: string;
|
EntryPoints: string;
|
||||||
|
EventAvailable: boolean;
|
||||||
ExfiltrationTime: number;
|
ExfiltrationTime: number;
|
||||||
ExfiltrationType: string;
|
ExfiltrationType: string;
|
||||||
RequiredSlot?: string;
|
RequiredSlot?: string;
|
||||||
@ -200,6 +205,7 @@ export interface Exit {
|
|||||||
PassageRequirement: string;
|
PassageRequirement: string;
|
||||||
PlayersCount: number;
|
PlayersCount: number;
|
||||||
RequirementTip: string;
|
RequirementTip: string;
|
||||||
|
Side?: string;
|
||||||
}
|
}
|
||||||
export interface MaxItemCountInLocation {
|
export interface MaxItemCountInLocation {
|
||||||
TemplateId: string;
|
TemplateId: string;
|
||||||
|
@ -2,6 +2,10 @@ import { IBotBase, IEftStats } from "@spt-aki/models/eft/common/tables/IBotBase"
|
|||||||
export interface IPmcData extends IBotBase {
|
export interface IPmcData extends IBotBase {
|
||||||
}
|
}
|
||||||
export interface IPostRaidPmcData extends IBotBase {
|
export interface IPostRaidPmcData extends IBotBase {
|
||||||
/** Only found in profile we get from client post raid */
|
Stats: IPostRaidStats;
|
||||||
EftStats: IEftStats;
|
}
|
||||||
|
export interface IPostRaidStats {
|
||||||
|
Eft: IEftStats;
|
||||||
|
/** Only found in profile we get from client post raid */
|
||||||
|
Arena: IEftStats;
|
||||||
}
|
}
|
||||||
|
18
TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IAchievement.d.ts
vendored
Normal file
18
TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IAchievement.d.ts
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { IQuestConditionTypes, IQuestRewards } from "./IQuest";
|
||||||
|
export interface IAchievement {
|
||||||
|
id: string;
|
||||||
|
imageUrl: string;
|
||||||
|
assetPath: string;
|
||||||
|
rewards: IQuestRewards;
|
||||||
|
conditions: IQuestConditionTypes;
|
||||||
|
instantComplete: boolean;
|
||||||
|
showNotificationsInGame: boolean;
|
||||||
|
showProgress: boolean;
|
||||||
|
prefab: string;
|
||||||
|
rarity: string;
|
||||||
|
hidden: boolean;
|
||||||
|
showConditions: boolean;
|
||||||
|
progressBarEnabled: boolean;
|
||||||
|
side: string;
|
||||||
|
index: number;
|
||||||
|
}
|
@ -1,6 +1,8 @@
|
|||||||
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
import { IPmcDataRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||||
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
import { IRagfairOffer } from "@spt-aki/models/eft/ragfair/IRagfairOffer";
|
||||||
|
import { BonusSkillType } from "@spt-aki/models/enums/BonusSkillType";
|
||||||
|
import { BonusType } from "@spt-aki/models/enums/BonusType";
|
||||||
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
||||||
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
import { MemberCategory } from "@spt-aki/models/enums/MemberCategory";
|
||||||
import { QuestStatus } from "@spt-aki/models/enums/QuestStatus";
|
import { QuestStatus } from "@spt-aki/models/enums/QuestStatus";
|
||||||
@ -17,14 +19,15 @@ export interface IBotBase {
|
|||||||
Skills: Skills;
|
Skills: Skills;
|
||||||
Stats: Stats;
|
Stats: Stats;
|
||||||
Encyclopedia: Record<string, boolean>;
|
Encyclopedia: Record<string, boolean>;
|
||||||
ConditionCounters: ConditionCounters;
|
TaskConditionCounters: Record<string, ITaskConditionCounter>;
|
||||||
BackendCounters: Record<string, BackendCounter>;
|
|
||||||
InsuredItems: InsuredItem[];
|
InsuredItems: InsuredItem[];
|
||||||
Hideout: Hideout;
|
Hideout: Hideout;
|
||||||
Quests: IQuestStatus[];
|
Quests: IQuestStatus[];
|
||||||
TradersInfo: Record<string, TraderInfo>;
|
TradersInfo: Record<string, TraderInfo>;
|
||||||
UnlockedInfo: IUnlockedInfo;
|
UnlockedInfo: IUnlockedInfo;
|
||||||
RagfairInfo: RagfairInfo;
|
RagfairInfo: RagfairInfo;
|
||||||
|
/** Achievement id and timestamp */
|
||||||
|
Achievements: Record<string, number>;
|
||||||
RepeatableQuests: IPmcDataRepeatableQuest[];
|
RepeatableQuests: IPmcDataRepeatableQuest[];
|
||||||
Bonuses: Bonus[];
|
Bonuses: Bonus[];
|
||||||
Notes: Notes;
|
Notes: Notes;
|
||||||
@ -35,6 +38,13 @@ export interface IBotBase {
|
|||||||
/** SPT specific property used during bot generation in raid */
|
/** SPT specific property used during bot generation in raid */
|
||||||
sptIsPmc?: boolean;
|
sptIsPmc?: boolean;
|
||||||
}
|
}
|
||||||
|
export interface ITaskConditionCounter {
|
||||||
|
id: string;
|
||||||
|
type: string;
|
||||||
|
value: number;
|
||||||
|
/** Quest id */
|
||||||
|
sourceId: string;
|
||||||
|
}
|
||||||
export interface IUnlockedInfo {
|
export interface IUnlockedInfo {
|
||||||
unlockedProductionRecipe: string[];
|
unlockedProductionRecipe: string[];
|
||||||
}
|
}
|
||||||
@ -44,6 +54,7 @@ export interface Info {
|
|||||||
LowerNickname: string;
|
LowerNickname: string;
|
||||||
Side: string;
|
Side: string;
|
||||||
SquadInviteRestriction: boolean;
|
SquadInviteRestriction: boolean;
|
||||||
|
HasCoopExtension: boolean;
|
||||||
Voice: string;
|
Voice: string;
|
||||||
Level: number;
|
Level: number;
|
||||||
Experience: number;
|
Experience: number;
|
||||||
@ -127,6 +138,7 @@ export interface Inventory {
|
|||||||
/** Key is hideout area enum numeric as string e.g. "24", value is area _id */
|
/** Key is hideout area enum numeric as string e.g. "24", value is area _id */
|
||||||
hideoutAreaStashes: Record<string, string>;
|
hideoutAreaStashes: Record<string, string>;
|
||||||
fastPanel: Record<string, string>;
|
fastPanel: Record<string, string>;
|
||||||
|
favoriteItems: string[];
|
||||||
}
|
}
|
||||||
export interface IBaseJsonSkills {
|
export interface IBaseJsonSkills {
|
||||||
Common: Record<string, Common>;
|
Common: Record<string, Common>;
|
||||||
@ -170,6 +182,7 @@ export interface IEftStats {
|
|||||||
LastPlayerState?: LastPlayerState;
|
LastPlayerState?: LastPlayerState;
|
||||||
TotalInGameTime: number;
|
TotalInGameTime: number;
|
||||||
SurvivorClass?: string;
|
SurvivorClass?: string;
|
||||||
|
sptLastRaidFenceRepChange?: number;
|
||||||
}
|
}
|
||||||
export interface IDroppedItem {
|
export interface IDroppedItem {
|
||||||
QuestId: string;
|
QuestId: string;
|
||||||
@ -202,14 +215,6 @@ export interface CounterKeyValue {
|
|||||||
Key: string[];
|
Key: string[];
|
||||||
Value: number;
|
Value: number;
|
||||||
}
|
}
|
||||||
export interface ConditionCounters {
|
|
||||||
Counters: Counter[];
|
|
||||||
}
|
|
||||||
export interface Counter {
|
|
||||||
id: string;
|
|
||||||
value: number;
|
|
||||||
qid: string;
|
|
||||||
}
|
|
||||||
export interface Aggressor {
|
export interface Aggressor {
|
||||||
AccountId: string;
|
AccountId: string;
|
||||||
ProfileId: string;
|
ProfileId: string;
|
||||||
@ -311,6 +316,8 @@ export interface Productive {
|
|||||||
sptIsComplete?: boolean;
|
sptIsComplete?: boolean;
|
||||||
/** Is the craft a Continuous, e.g bitcoins/water collector */
|
/** Is the craft a Continuous, e.g bitcoins/water collector */
|
||||||
sptIsContinuous?: boolean;
|
sptIsContinuous?: boolean;
|
||||||
|
/** Stores a list of tools used in this craft and whether they're FiR, to give back once the craft is done */
|
||||||
|
sptRequiredTools?: Item[];
|
||||||
}
|
}
|
||||||
export interface Production extends Productive {
|
export interface Production extends Productive {
|
||||||
RecipeId: string;
|
RecipeId: string;
|
||||||
@ -330,6 +337,7 @@ export interface HideoutArea {
|
|||||||
level: number;
|
level: number;
|
||||||
active: boolean;
|
active: boolean;
|
||||||
passiveBonusesEnabled: boolean;
|
passiveBonusesEnabled: boolean;
|
||||||
|
/** Must be integer */
|
||||||
completeTime: number;
|
completeTime: number;
|
||||||
constructing: boolean;
|
constructing: boolean;
|
||||||
slots: HideoutSlot[];
|
slots: HideoutSlot[];
|
||||||
@ -351,6 +359,8 @@ export interface LastCompleted {
|
|||||||
export interface Notes {
|
export interface Notes {
|
||||||
Notes: Note[];
|
Notes: Note[];
|
||||||
}
|
}
|
||||||
|
export interface CarExtractCounts {
|
||||||
|
}
|
||||||
export declare enum SurvivorClass {
|
export declare enum SurvivorClass {
|
||||||
UNKNOWN = 0,
|
UNKNOWN = 0,
|
||||||
NEUTRALIZER = 1,
|
NEUTRALIZER = 1,
|
||||||
@ -382,7 +392,7 @@ export interface RagfairInfo {
|
|||||||
}
|
}
|
||||||
export interface Bonus {
|
export interface Bonus {
|
||||||
id?: string;
|
id?: string;
|
||||||
type: string;
|
type: BonusType;
|
||||||
templateId?: string;
|
templateId?: string;
|
||||||
passive?: boolean;
|
passive?: boolean;
|
||||||
production?: boolean;
|
production?: boolean;
|
||||||
@ -390,7 +400,7 @@ export interface Bonus {
|
|||||||
value?: number;
|
value?: number;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
filter?: string[];
|
filter?: string[];
|
||||||
skillType?: string;
|
skillType?: BonusSkillType;
|
||||||
}
|
}
|
||||||
export interface Note {
|
export interface Note {
|
||||||
Time: number;
|
Time: number;
|
||||||
|
@ -15,13 +15,14 @@ export interface IBotType {
|
|||||||
export interface Appearance {
|
export interface Appearance {
|
||||||
body: Record<string, number>;
|
body: Record<string, number>;
|
||||||
feet: Record<string, number>;
|
feet: Record<string, number>;
|
||||||
hands: string[];
|
hands: Record<string, number>;
|
||||||
head: string[];
|
head: Record<string, number>;
|
||||||
voice: string[];
|
voice: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Chances {
|
export interface Chances {
|
||||||
equipment: EquipmentChances;
|
equipment: EquipmentChances;
|
||||||
mods: ModsChances;
|
weaponMods: ModsChances;
|
||||||
|
equipmentMods: ModsChances;
|
||||||
}
|
}
|
||||||
export interface EquipmentChances {
|
export interface EquipmentChances {
|
||||||
ArmBand: number;
|
ArmBand: number;
|
||||||
@ -119,7 +120,7 @@ export interface GenerationData {
|
|||||||
/** key: number of items, value: weighting */
|
/** key: number of items, value: weighting */
|
||||||
weights: Record<string, number>;
|
weights: Record<string, number>;
|
||||||
/** Array of item tpls */
|
/** Array of item tpls */
|
||||||
whitelist: string[];
|
whitelist: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Health {
|
export interface Health {
|
||||||
BodyParts: BodyPart[];
|
BodyParts: BodyPart[];
|
||||||
@ -159,10 +160,10 @@ export interface Equipment {
|
|||||||
TacticalVest: Record<string, number>;
|
TacticalVest: Record<string, number>;
|
||||||
}
|
}
|
||||||
export interface Items {
|
export interface Items {
|
||||||
Backpack: string[];
|
Backpack: Record<string, number>;
|
||||||
Pockets: string[];
|
Pockets: Record<string, number>;
|
||||||
SecuredContainer: string[];
|
SecuredContainer: Record<string, number>;
|
||||||
SpecialLoot: string[];
|
SpecialLoot: Record<string, number>;
|
||||||
TacticalVest: string[];
|
TacticalVest: Record<string, number>;
|
||||||
}
|
}
|
||||||
export type Mods = Record<string, Record<string, string[]>>;
|
export type Mods = Record<string, Record<string, string[]>>;
|
||||||
|
@ -33,6 +33,7 @@ export interface Upd {
|
|||||||
Foldable?: Foldable;
|
Foldable?: Foldable;
|
||||||
SideEffect?: SideEffect;
|
SideEffect?: SideEffect;
|
||||||
RepairKit?: RepairKit;
|
RepairKit?: RepairKit;
|
||||||
|
CultistAmulet?: ICultistAmulet;
|
||||||
}
|
}
|
||||||
export interface Buff {
|
export interface Buff {
|
||||||
rarity: string;
|
rarity: string;
|
||||||
@ -119,3 +120,6 @@ export interface SideEffect {
|
|||||||
export interface RepairKit {
|
export interface RepairKit {
|
||||||
Resource: number;
|
Resource: number;
|
||||||
}
|
}
|
||||||
|
export interface ICultistAmulet {
|
||||||
|
NumberOfUsages: number;
|
||||||
|
}
|
||||||
|
@ -11,10 +11,10 @@ export interface IProfileTemplates {
|
|||||||
}
|
}
|
||||||
export interface IProfileSides {
|
export interface IProfileSides {
|
||||||
descriptionLocaleKey: string;
|
descriptionLocaleKey: string;
|
||||||
usec: TemplateSide;
|
usec: ITemplateSide;
|
||||||
bear: TemplateSide;
|
bear: ITemplateSide;
|
||||||
}
|
}
|
||||||
export interface TemplateSide {
|
export interface ITemplateSide {
|
||||||
character: IPmcData;
|
character: IPmcData;
|
||||||
suits: string[];
|
suits: string[];
|
||||||
dialogues: Record<string, Dialogue>;
|
dialogues: Record<string, Dialogue>;
|
||||||
@ -22,7 +22,7 @@ export interface TemplateSide {
|
|||||||
trader: ProfileTraderTemplate;
|
trader: ProfileTraderTemplate;
|
||||||
}
|
}
|
||||||
export interface ProfileTraderTemplate {
|
export interface ProfileTraderTemplate {
|
||||||
initialLoyaltyLevel: number;
|
initialLoyaltyLevel: Record<string, number>;
|
||||||
setQuestsAvailableForStart?: boolean;
|
setQuestsAvailableForStart?: boolean;
|
||||||
setQuestsAvailableForFinish?: boolean;
|
setQuestsAvailableForFinish?: boolean;
|
||||||
initialStanding: number;
|
initialStanding: number;
|
||||||
|
@ -7,7 +7,7 @@ export interface IQuest {
|
|||||||
QuestName?: string;
|
QuestName?: string;
|
||||||
_id: string;
|
_id: string;
|
||||||
canShowNotificationsInGame: boolean;
|
canShowNotificationsInGame: boolean;
|
||||||
conditions: Conditions;
|
conditions: IQuestConditionTypes;
|
||||||
description: string;
|
description: string;
|
||||||
failMessageText: string;
|
failMessageText: string;
|
||||||
name: string;
|
name: string;
|
||||||
@ -24,8 +24,11 @@ export interface IQuest {
|
|||||||
secretQuest: boolean;
|
secretQuest: boolean;
|
||||||
startedMessageText: string;
|
startedMessageText: string;
|
||||||
successMessageText: string;
|
successMessageText: string;
|
||||||
|
acceptPlayerMessage: string;
|
||||||
|
declinePlayerMessage: string;
|
||||||
|
completePlayerMessage: string;
|
||||||
templateId: string;
|
templateId: string;
|
||||||
rewards: Rewards;
|
rewards: IQuestRewards;
|
||||||
/** Becomes 'AppearStatus' inside client */
|
/** Becomes 'AppearStatus' inside client */
|
||||||
status: string | number;
|
status: string | number;
|
||||||
KeyQuest: boolean;
|
KeyQuest: boolean;
|
||||||
@ -35,28 +38,24 @@ export interface IQuest {
|
|||||||
/** Status of quest to player */
|
/** Status of quest to player */
|
||||||
sptStatus?: QuestStatus;
|
sptStatus?: QuestStatus;
|
||||||
}
|
}
|
||||||
export interface Conditions {
|
export interface IQuestConditionTypes {
|
||||||
Started: AvailableForConditions[];
|
Started: IQuestCondition[];
|
||||||
AvailableForFinish: AvailableForConditions[];
|
AvailableForFinish: IQuestCondition[];
|
||||||
AvailableForStart: AvailableForConditions[];
|
AvailableForStart: IQuestCondition[];
|
||||||
Success: AvailableForConditions[];
|
Success: IQuestCondition[];
|
||||||
Fail: AvailableForConditions[];
|
Fail: IQuestCondition[];
|
||||||
}
|
}
|
||||||
export interface AvailableForConditions {
|
export interface IQuestCondition {
|
||||||
_parent: string;
|
|
||||||
_props: AvailableForProps;
|
|
||||||
dynamicLocale?: boolean;
|
|
||||||
}
|
|
||||||
export interface AvailableForProps {
|
|
||||||
id: string;
|
id: string;
|
||||||
index: number;
|
index?: number;
|
||||||
parentId: string;
|
|
||||||
isEncoded: boolean;
|
|
||||||
dynamicLocale: boolean;
|
|
||||||
value?: string | number;
|
|
||||||
compareMethod?: string;
|
compareMethod?: string;
|
||||||
|
dynamicLocale: boolean;
|
||||||
visibilityConditions?: VisibilityCondition[];
|
visibilityConditions?: VisibilityCondition[];
|
||||||
target?: string | string[];
|
globalQuestCounterId?: string;
|
||||||
|
parentId?: string;
|
||||||
|
target: string[] | string;
|
||||||
|
value?: string | number;
|
||||||
|
type?: boolean;
|
||||||
status?: QuestStatus[];
|
status?: QuestStatus[];
|
||||||
availableAfter?: number;
|
availableAfter?: number;
|
||||||
dispersion?: number;
|
dispersion?: number;
|
||||||
@ -66,55 +65,81 @@ export interface AvailableForProps {
|
|||||||
dogtagLevel?: number;
|
dogtagLevel?: number;
|
||||||
maxDurability?: number;
|
maxDurability?: number;
|
||||||
minDurability?: number;
|
minDurability?: number;
|
||||||
counter?: AvailableForCounter;
|
counter?: IQuestConditionCounter;
|
||||||
plantTime?: number;
|
plantTime?: number;
|
||||||
zoneId?: string;
|
zoneId?: string;
|
||||||
type?: boolean;
|
|
||||||
countInRaid?: boolean;
|
countInRaid?: boolean;
|
||||||
globalQuestCounterId?: any;
|
completeInSeconds?: number;
|
||||||
|
isEncoded?: boolean;
|
||||||
|
conditionType?: string;
|
||||||
}
|
}
|
||||||
export interface AvailableForCounter {
|
export interface IQuestConditionCounter {
|
||||||
id: string;
|
id: string;
|
||||||
conditions: CounterCondition[];
|
conditions: IQuestConditionCounterCondition[];
|
||||||
}
|
}
|
||||||
export interface CounterCondition {
|
export interface IQuestConditionCounterCondition {
|
||||||
_parent: string;
|
|
||||||
_props: CounterProps;
|
|
||||||
}
|
|
||||||
export interface CounterProps {
|
|
||||||
id: string;
|
id: string;
|
||||||
target: string[] | string;
|
dynamicLocale: boolean;
|
||||||
|
target?: string[] | string;
|
||||||
|
completeInSeconds?: number;
|
||||||
|
energy?: IValueCompare;
|
||||||
|
exitName?: string;
|
||||||
|
hydration?: IValueCompare;
|
||||||
|
time?: IValueCompare;
|
||||||
compareMethod?: string;
|
compareMethod?: string;
|
||||||
value?: string;
|
value?: number;
|
||||||
weapon?: string[];
|
weapon?: string[];
|
||||||
|
distance?: ICounterConditionDistance;
|
||||||
equipmentInclusive?: string[][];
|
equipmentInclusive?: string[][];
|
||||||
weaponModsInclusive?: string[][];
|
weaponModsInclusive?: string[][];
|
||||||
|
weaponModsExclusive?: string[][];
|
||||||
|
enemyEquipmentInclusive?: string[][];
|
||||||
|
enemyEquipmentExclusive?: string[][];
|
||||||
|
weaponCaliber?: string[];
|
||||||
|
savageRole?: string[];
|
||||||
status?: string[];
|
status?: string[];
|
||||||
bodyPart?: string[];
|
bodyPart?: string[];
|
||||||
daytime?: DaytimeCounter;
|
daytime?: IDaytimeCounter;
|
||||||
|
conditionType?: string;
|
||||||
|
enemyHealthEffects?: IEnemyHealthEffect[];
|
||||||
|
resetOnSessionEnd?: boolean;
|
||||||
}
|
}
|
||||||
export interface DaytimeCounter {
|
export interface IEnemyHealthEffect {
|
||||||
|
bodyParts: string[];
|
||||||
|
effects: string[];
|
||||||
|
}
|
||||||
|
export interface IValueCompare {
|
||||||
|
compareMethod: string;
|
||||||
|
value: number;
|
||||||
|
}
|
||||||
|
export interface ICounterConditionDistance {
|
||||||
|
value: number;
|
||||||
|
compareMethod: string;
|
||||||
|
}
|
||||||
|
export interface IDaytimeCounter {
|
||||||
from: number;
|
from: number;
|
||||||
to: number;
|
to: number;
|
||||||
}
|
}
|
||||||
export interface VisibilityCondition {
|
export interface VisibilityCondition {
|
||||||
id: string;
|
id: string;
|
||||||
value: number;
|
target: string;
|
||||||
dynamicLocale: boolean;
|
value?: number;
|
||||||
|
dynamicLocale?: boolean;
|
||||||
oneSessionOnly: boolean;
|
oneSessionOnly: boolean;
|
||||||
|
conditionType: string;
|
||||||
}
|
}
|
||||||
export interface Rewards {
|
export interface IQuestRewards {
|
||||||
AvailableForStart: Reward[];
|
AvailableForStart?: IQuestReward[];
|
||||||
AvailableForFinish: Reward[];
|
AvailableForFinish?: IQuestReward[];
|
||||||
Started: Reward[];
|
Started?: IQuestReward[];
|
||||||
Success: Reward[];
|
Success?: IQuestReward[];
|
||||||
Fail: Reward[];
|
Fail?: IQuestReward[];
|
||||||
FailRestartable: Reward[];
|
FailRestartable?: IQuestReward[];
|
||||||
Expired: Reward[];
|
Expired?: IQuestReward[];
|
||||||
}
|
}
|
||||||
export interface Reward extends Item {
|
export interface IQuestReward {
|
||||||
value?: string | number;
|
value?: string | number;
|
||||||
id: string;
|
id?: string;
|
||||||
type: QuestRewardType;
|
type: QuestRewardType;
|
||||||
index: number;
|
index: number;
|
||||||
target?: string;
|
target?: string;
|
||||||
|
@ -1,21 +1,19 @@
|
|||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { IQuest, IQuestConditionTypes, IQuestRewards } from "./IQuest";
|
||||||
export interface IReward {
|
export interface IRepeatableQuest extends IQuest {
|
||||||
index: number;
|
changeCost: IChangeCost[];
|
||||||
type: string;
|
changeStandingCost: number;
|
||||||
value: number;
|
sptRepatableGroupName: string;
|
||||||
target?: string;
|
|
||||||
items?: Item[];
|
|
||||||
}
|
}
|
||||||
export interface IRepeatableQuestDatabase {
|
export interface IRepeatableQuestDatabase {
|
||||||
templates: ITemplates;
|
templates: IRepeatableTemplates;
|
||||||
rewards: IRewardOptions;
|
rewards: IRewardOptions;
|
||||||
data: IOptions;
|
data: IOptions;
|
||||||
samples: ISampleQuests[];
|
samples: ISampleQuests[];
|
||||||
}
|
}
|
||||||
export interface ITemplates {
|
export interface IRepeatableTemplates {
|
||||||
Elimination: IRepeatableQuest;
|
Elimination: IQuest;
|
||||||
Completion: IRepeatableQuest;
|
Completion: IQuest;
|
||||||
Exploration: IRepeatableQuest;
|
Exploration: IQuest;
|
||||||
}
|
}
|
||||||
export interface IPmcDataRepeatableQuest {
|
export interface IPmcDataRepeatableQuest {
|
||||||
id?: string;
|
id?: string;
|
||||||
@ -23,9 +21,8 @@ export interface IPmcDataRepeatableQuest {
|
|||||||
activeQuests: IRepeatableQuest[];
|
activeQuests: IRepeatableQuest[];
|
||||||
inactiveQuests: IRepeatableQuest[];
|
inactiveQuests: IRepeatableQuest[];
|
||||||
endTime: number;
|
endTime: number;
|
||||||
changeRequirement: TChangeRequirementRecord;
|
changeRequirement: Record<string, IChangeRequirement>;
|
||||||
}
|
}
|
||||||
export type TChangeRequirementRecord = Record<string, IChangeRequirement>;
|
|
||||||
export interface IChangeRequirement {
|
export interface IChangeRequirement {
|
||||||
changeCost: IChangeCost[];
|
changeCost: IChangeCost[];
|
||||||
changeStandingCost: number;
|
changeStandingCost: number;
|
||||||
@ -34,183 +31,6 @@ export interface IChangeCost {
|
|||||||
templateId: string;
|
templateId: string;
|
||||||
count: number;
|
count: number;
|
||||||
}
|
}
|
||||||
export interface IRepeatableQuest {
|
|
||||||
_id: string;
|
|
||||||
traderId: string;
|
|
||||||
location: string;
|
|
||||||
image: string;
|
|
||||||
type: string;
|
|
||||||
isKey: boolean;
|
|
||||||
restartable: boolean;
|
|
||||||
instantComplete: boolean;
|
|
||||||
secretQuest: boolean;
|
|
||||||
canShowNotificationsInGame: boolean;
|
|
||||||
rewards: IRewards;
|
|
||||||
conditions: IConditions;
|
|
||||||
side: string;
|
|
||||||
questStatus: any;
|
|
||||||
name: string;
|
|
||||||
note: string;
|
|
||||||
description: string;
|
|
||||||
successMessageText: string;
|
|
||||||
failMessageText: string;
|
|
||||||
startedMessageText: string;
|
|
||||||
changeQuestMessageText: string;
|
|
||||||
acceptPlayerMessage: string;
|
|
||||||
declinePlayerMessage: string;
|
|
||||||
completePlayerMessage: string;
|
|
||||||
templateId: string;
|
|
||||||
changeCost: IChangeCost[];
|
|
||||||
changeStandingCost: number;
|
|
||||||
sptRepatableGroupName?: string;
|
|
||||||
}
|
|
||||||
export interface IRewards {
|
|
||||||
Started: IReward[];
|
|
||||||
Success: IReward[];
|
|
||||||
Fail: IReward[];
|
|
||||||
}
|
|
||||||
export interface IConditions {
|
|
||||||
AvailableForStart: any[];
|
|
||||||
AvailableForFinish: IAvailableFor[];
|
|
||||||
Fail: any[];
|
|
||||||
}
|
|
||||||
export interface IAvailableFor {
|
|
||||||
_props: IAvailableForProps;
|
|
||||||
_parent: string;
|
|
||||||
dynamicLocale: boolean;
|
|
||||||
}
|
|
||||||
export interface IAvailableForProps {
|
|
||||||
id: string;
|
|
||||||
parentId: string;
|
|
||||||
dynamicLocale: boolean;
|
|
||||||
index: number;
|
|
||||||
visibilityConditions: IVisibilityCondition[];
|
|
||||||
value: number;
|
|
||||||
}
|
|
||||||
export interface IVisibilityCondition {
|
|
||||||
id: string;
|
|
||||||
oneSessionOnly: boolean;
|
|
||||||
value: number;
|
|
||||||
index: number;
|
|
||||||
dynamicLocale: boolean;
|
|
||||||
}
|
|
||||||
export interface IAvailableForPropsCounter extends IAvailableForProps {
|
|
||||||
type: string;
|
|
||||||
oneSessionOnly: boolean;
|
|
||||||
doNotResetIfCounterCompleted: boolean;
|
|
||||||
counter?: ICounter;
|
|
||||||
}
|
|
||||||
export interface ICounter {
|
|
||||||
id: string;
|
|
||||||
conditions: ICondition[];
|
|
||||||
}
|
|
||||||
export interface ICondition {
|
|
||||||
_props: IConditionProps;
|
|
||||||
_parent: string;
|
|
||||||
}
|
|
||||||
export interface IConditionProps {
|
|
||||||
id: string;
|
|
||||||
dynamicLocale: boolean;
|
|
||||||
}
|
|
||||||
export interface IElimination extends IRepeatableQuest {
|
|
||||||
conditions: IEliminationConditions;
|
|
||||||
}
|
|
||||||
export interface IEliminationConditions extends IConditions {
|
|
||||||
AvailableForFinish: IEliminationAvailableFor[];
|
|
||||||
}
|
|
||||||
export interface IEliminationAvailableFor extends IAvailableFor {
|
|
||||||
_props: IEliminationAvailableForProps;
|
|
||||||
}
|
|
||||||
export interface IEliminationAvailableForProps extends IAvailableForPropsCounter {
|
|
||||||
counter: IEliminationCounter;
|
|
||||||
}
|
|
||||||
export interface IEliminationCounter extends ICounter {
|
|
||||||
conditions: IEliminationCondition[];
|
|
||||||
}
|
|
||||||
export interface IEliminationCondition extends ICondition {
|
|
||||||
_props: ILocationConditionProps | IKillConditionProps;
|
|
||||||
}
|
|
||||||
export interface IExploration extends IRepeatableQuest {
|
|
||||||
conditions: IExplorationConditions;
|
|
||||||
}
|
|
||||||
export interface IExplorationConditions extends IConditions {
|
|
||||||
AvailableForFinish: IExplorationAvailableFor[];
|
|
||||||
}
|
|
||||||
export interface IExplorationAvailableFor extends IAvailableFor {
|
|
||||||
_props: IExplorationAvailableForProps;
|
|
||||||
}
|
|
||||||
export interface IExplorationAvailableForProps extends IAvailableForPropsCounter {
|
|
||||||
counter: IExplorationCounter;
|
|
||||||
}
|
|
||||||
export interface IExplorationCounter extends ICounter {
|
|
||||||
conditions: IExplorationCondition[];
|
|
||||||
}
|
|
||||||
export interface IExplorationCondition extends ICondition {
|
|
||||||
_props: ILocationConditionProps | IExitStatusConditionProps | IExitNameConditionProps;
|
|
||||||
}
|
|
||||||
export interface IPickup extends IRepeatableQuest {
|
|
||||||
conditions: IPickupConditions;
|
|
||||||
}
|
|
||||||
export interface IPickupConditions extends IConditions {
|
|
||||||
AvailableForFinish: IPickupAvailableFor[];
|
|
||||||
}
|
|
||||||
export interface IPickupAvailableFor extends IAvailableFor {
|
|
||||||
_props: IPickupAvailableForProps;
|
|
||||||
}
|
|
||||||
export interface IPickupAvailableForProps extends IAvailableForPropsCounter {
|
|
||||||
target: string[];
|
|
||||||
counter?: IPickupCounter;
|
|
||||||
}
|
|
||||||
export interface IPickupCounter extends ICounter {
|
|
||||||
conditions: IPickupCondition[];
|
|
||||||
}
|
|
||||||
export interface IPickupCondition extends ICondition {
|
|
||||||
_props: IEquipmentConditionProps | ILocationConditionProps | IExitStatusConditionProps;
|
|
||||||
}
|
|
||||||
export interface ICompletion extends IRepeatableQuest {
|
|
||||||
conditions: ICompletionConditions;
|
|
||||||
}
|
|
||||||
export interface ICompletionConditions extends IConditions {
|
|
||||||
AvailableForFinish: ICompletionAvailableFor[];
|
|
||||||
}
|
|
||||||
export interface ICompletionAvailableFor extends IAvailableFor {
|
|
||||||
_props: ICompletionAvailableForProps;
|
|
||||||
}
|
|
||||||
export interface ICompletionAvailableForProps extends IAvailableForProps {
|
|
||||||
target: string[];
|
|
||||||
minDurability: number;
|
|
||||||
maxDurability: number;
|
|
||||||
dogtagLevel: number;
|
|
||||||
onlyFoundInRaid: boolean;
|
|
||||||
}
|
|
||||||
export interface ILocationConditionProps extends IConditionProps {
|
|
||||||
target: string[];
|
|
||||||
weapon?: string[];
|
|
||||||
weaponCategories?: string[];
|
|
||||||
}
|
|
||||||
export interface IEquipmentConditionProps extends IConditionProps {
|
|
||||||
equipmentInclusive: [string[]];
|
|
||||||
IncludeNotEquippedItems: boolean;
|
|
||||||
}
|
|
||||||
export interface IKillConditionProps extends IConditionProps {
|
|
||||||
target: string;
|
|
||||||
value: number;
|
|
||||||
savageRole?: string[];
|
|
||||||
bodyPart?: string[];
|
|
||||||
distance?: IDistanceCheck;
|
|
||||||
weapon?: string[];
|
|
||||||
weaponCategories?: string[];
|
|
||||||
}
|
|
||||||
export interface IDistanceCheck {
|
|
||||||
compareMethod: string;
|
|
||||||
value: number;
|
|
||||||
}
|
|
||||||
export interface IExitStatusConditionProps extends IConditionProps {
|
|
||||||
status: string[];
|
|
||||||
}
|
|
||||||
export interface IExitNameConditionProps extends IConditionProps {
|
|
||||||
exitName: string;
|
|
||||||
}
|
|
||||||
export interface IRewardOptions {
|
export interface IRewardOptions {
|
||||||
itemsBlacklist: string[];
|
itemsBlacklist: string[];
|
||||||
}
|
}
|
||||||
@ -240,8 +60,8 @@ export interface ISampleQuests {
|
|||||||
instantComplete: boolean;
|
instantComplete: boolean;
|
||||||
secretQuest: boolean;
|
secretQuest: boolean;
|
||||||
canShowNotificationsInGame: boolean;
|
canShowNotificationsInGame: boolean;
|
||||||
rewards: IRewards;
|
rewards: IQuestRewards;
|
||||||
conditions: IConditions;
|
conditions: IQuestConditionTypes;
|
||||||
name: string;
|
name: string;
|
||||||
note: string;
|
note: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
@ -82,6 +82,7 @@ export interface Props {
|
|||||||
EffectiveDistance?: number;
|
EffectiveDistance?: number;
|
||||||
Ergonomics?: number;
|
Ergonomics?: number;
|
||||||
Velocity?: number;
|
Velocity?: number;
|
||||||
|
WithAnimatorAiming?: boolean;
|
||||||
RaidModdable?: boolean;
|
RaidModdable?: boolean;
|
||||||
ToolModdable?: boolean;
|
ToolModdable?: boolean;
|
||||||
UniqueAnimationModID?: number;
|
UniqueAnimationModID?: number;
|
||||||
@ -155,6 +156,8 @@ export interface Props {
|
|||||||
BlocksArmorVest?: boolean;
|
BlocksArmorVest?: boolean;
|
||||||
speedPenaltyPercent?: number;
|
speedPenaltyPercent?: number;
|
||||||
GridLayoutName?: string;
|
GridLayoutName?: string;
|
||||||
|
ContainerSpawnChanceModifier?: number;
|
||||||
|
SpawnExcludedFilter?: string[];
|
||||||
SpawnFilter?: any[];
|
SpawnFilter?: any[];
|
||||||
containType?: any[];
|
containType?: any[];
|
||||||
sizeWidth?: number;
|
sizeWidth?: number;
|
||||||
@ -170,6 +173,9 @@ export interface Props {
|
|||||||
MaxDurability?: number;
|
MaxDurability?: number;
|
||||||
armorZone?: string[];
|
armorZone?: string[];
|
||||||
armorClass?: string | number;
|
armorClass?: string | number;
|
||||||
|
armorColliders?: string[];
|
||||||
|
armorPlateColliders?: string[];
|
||||||
|
bluntDamageReduceFromSoftArmor?: boolean;
|
||||||
mousePenalty?: number;
|
mousePenalty?: number;
|
||||||
weaponErgonomicPenalty?: number;
|
weaponErgonomicPenalty?: number;
|
||||||
BluntThroughput?: number;
|
BluntThroughput?: number;
|
||||||
@ -179,14 +185,17 @@ export interface Props {
|
|||||||
weapUseType?: string;
|
weapUseType?: string;
|
||||||
ammoCaliber?: string;
|
ammoCaliber?: string;
|
||||||
OperatingResource?: number;
|
OperatingResource?: number;
|
||||||
|
PostRecoilHorizontalRangeHandRotation?: Ixyz;
|
||||||
|
PostRecoilVerticalRangeHandRotation?: Ixyz;
|
||||||
|
ProgressRecoilAngleOnStable?: Ixyz;
|
||||||
RepairComplexity?: number;
|
RepairComplexity?: number;
|
||||||
durabSpawnMin?: number;
|
durabSpawnMin?: number;
|
||||||
durabSpawnMax?: number;
|
durabSpawnMax?: number;
|
||||||
isFastReload?: boolean;
|
isFastReload?: boolean;
|
||||||
RecoilForceUp?: number;
|
RecoilForceUp?: number;
|
||||||
RecoilForceBack?: number;
|
RecoilForceBack?: number;
|
||||||
Convergence?: number;
|
|
||||||
RecoilAngle?: number;
|
RecoilAngle?: number;
|
||||||
|
RecoilCamera?: number;
|
||||||
weapFireType?: string[];
|
weapFireType?: string[];
|
||||||
RecolDispersion?: number;
|
RecolDispersion?: number;
|
||||||
SingleFireRate?: number;
|
SingleFireRate?: number;
|
||||||
@ -194,6 +203,7 @@ export interface Props {
|
|||||||
bFirerate?: number;
|
bFirerate?: number;
|
||||||
bEffDist?: number;
|
bEffDist?: number;
|
||||||
bHearDist?: number;
|
bHearDist?: number;
|
||||||
|
blockLeftStance?: boolean;
|
||||||
isChamberLoad?: boolean;
|
isChamberLoad?: boolean;
|
||||||
chamberAmmoCount?: number;
|
chamberAmmoCount?: number;
|
||||||
isBoltCatch?: boolean;
|
isBoltCatch?: boolean;
|
||||||
@ -202,8 +212,9 @@ export interface Props {
|
|||||||
AdjustCollimatorsToTrajectory?: boolean;
|
AdjustCollimatorsToTrajectory?: boolean;
|
||||||
shotgunDispersion?: number;
|
shotgunDispersion?: number;
|
||||||
Chambers?: Slot[];
|
Chambers?: Slot[];
|
||||||
CameraRecoil?: number;
|
|
||||||
CameraSnap?: number;
|
CameraSnap?: number;
|
||||||
|
CameraToWeaponAngleSpeedRange?: Ixyz;
|
||||||
|
CameraToWeaponAngleStep?: number;
|
||||||
ReloadMode?: string;
|
ReloadMode?: string;
|
||||||
AimPlane?: number;
|
AimPlane?: number;
|
||||||
TacticalReloadStiffnes?: Ixyz;
|
TacticalReloadStiffnes?: Ixyz;
|
||||||
@ -211,6 +222,7 @@ export interface Props {
|
|||||||
RecoilCenter?: Ixyz;
|
RecoilCenter?: Ixyz;
|
||||||
RotationCenter?: Ixyz;
|
RotationCenter?: Ixyz;
|
||||||
RotationCenterNoStock?: Ixyz;
|
RotationCenterNoStock?: Ixyz;
|
||||||
|
ShotsGroupSettings?: IShotsGroupSettings[];
|
||||||
FoldedSlot?: string;
|
FoldedSlot?: string;
|
||||||
CompactHandling?: boolean;
|
CompactHandling?: boolean;
|
||||||
MinRepairDegradation?: number;
|
MinRepairDegradation?: number;
|
||||||
@ -242,6 +254,11 @@ export interface Props {
|
|||||||
AllowOverheat?: boolean;
|
AllowOverheat?: boolean;
|
||||||
DoubleActionAccuracyPenalty?: number;
|
DoubleActionAccuracyPenalty?: number;
|
||||||
RecoilPosZMult?: number;
|
RecoilPosZMult?: number;
|
||||||
|
RecoilReturnPathDampingHandRotation?: number;
|
||||||
|
RecoilReturnPathOffsetHandRotation?: number;
|
||||||
|
RecoilReturnSpeedHandRotation?: number;
|
||||||
|
RecoilStableAngleIncreaseStep?: number;
|
||||||
|
RecoilStableIndexShot?: number;
|
||||||
MinRepairKitDegradation?: number;
|
MinRepairKitDegradation?: number;
|
||||||
MaxRepairKitDegradation?: number;
|
MaxRepairKitDegradation?: number;
|
||||||
BlocksEarpiece?: boolean;
|
BlocksEarpiece?: boolean;
|
||||||
@ -386,6 +403,15 @@ export interface Props {
|
|||||||
LinkedWeapon?: string;
|
LinkedWeapon?: string;
|
||||||
UseAmmoWithoutShell?: boolean;
|
UseAmmoWithoutShell?: boolean;
|
||||||
RandomLootSettings?: IRandomLootSettings;
|
RandomLootSettings?: IRandomLootSettings;
|
||||||
|
RecoilCategoryMultiplierHandRotation?: number;
|
||||||
|
RecoilDampingHandRotation?: number;
|
||||||
|
LeanWeaponAgainstBody?: boolean;
|
||||||
|
RemoveShellAfterFire?: boolean;
|
||||||
|
RepairStrategyTypes?: string[];
|
||||||
|
IsEncoded?: boolean;
|
||||||
|
LayoutName?: string;
|
||||||
|
Lower75Prefab?: Prefab;
|
||||||
|
MaxUsages?: number;
|
||||||
}
|
}
|
||||||
export interface IHealthEffect {
|
export interface IHealthEffect {
|
||||||
type: string;
|
type: string;
|
||||||
@ -430,6 +456,10 @@ export interface SlotProps {
|
|||||||
}
|
}
|
||||||
export interface SlotFilter {
|
export interface SlotFilter {
|
||||||
Shift?: number;
|
Shift?: number;
|
||||||
|
locked?: boolean;
|
||||||
|
Plate?: string;
|
||||||
|
armorColliders?: string[];
|
||||||
|
armorPlateColliders?: string[];
|
||||||
Filter: string[];
|
Filter: string[];
|
||||||
AnimationIndex?: number;
|
AnimationIndex?: number;
|
||||||
}
|
}
|
||||||
@ -490,3 +520,10 @@ export interface IColor {
|
|||||||
b: number;
|
b: number;
|
||||||
a: number;
|
a: number;
|
||||||
}
|
}
|
||||||
|
export interface IShotsGroupSettings {
|
||||||
|
EndShotIndex: number;
|
||||||
|
ShotRecoilPositionStrength: Ixyz;
|
||||||
|
ShotRecoilRadianRange: Ixyz;
|
||||||
|
ShotRecoilRotationStrength: Ixyz;
|
||||||
|
StartShotIndex: number;
|
||||||
|
}
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
|
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
|
||||||
export interface ITrader {
|
export interface ITrader {
|
||||||
assort: ITraderAssort;
|
assort?: ITraderAssort;
|
||||||
base: ITraderBase;
|
base: ITraderBase;
|
||||||
dialogue?: Record<string, string[]>;
|
dialogue?: Record<string, string[]>;
|
||||||
questassort: Record<string, Record<string, string>>;
|
questassort?: Record<string, Record<string, string>>;
|
||||||
suits?: ISuit[];
|
suits?: ISuit[];
|
||||||
|
services?: ITraderServiceModel[];
|
||||||
}
|
}
|
||||||
export interface ITraderBase {
|
export interface ITraderBase {
|
||||||
refreshTraderRagfairOffers: boolean;
|
refreshTraderRagfairOffers: boolean;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import { BonusSkillType } from "@spt-aki/models/enums/BonusSkillType";
|
||||||
|
import { BonusType } from "@spt-aki/models/enums/BonusType";
|
||||||
export interface IHideoutArea {
|
export interface IHideoutArea {
|
||||||
_id: string;
|
_id: string;
|
||||||
type: number;
|
type: number;
|
||||||
@ -66,8 +68,8 @@ export interface StageBonus {
|
|||||||
passive: boolean;
|
passive: boolean;
|
||||||
production: boolean;
|
production: boolean;
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
skillType?: string;
|
skillType?: BonusSkillType;
|
||||||
type: string;
|
type: BonusType;
|
||||||
filter?: string[];
|
filter?: string[];
|
||||||
icon?: string;
|
icon?: string;
|
||||||
/** CHANGES PER DUMP */
|
/** CHANGES PER DUMP */
|
||||||
|
@ -3,6 +3,7 @@ export interface IHideoutProduction {
|
|||||||
areaType: number;
|
areaType: number;
|
||||||
requirements: Requirement[];
|
requirements: Requirement[];
|
||||||
productionTime: number;
|
productionTime: number;
|
||||||
|
/** Tpl of item being crafted */
|
||||||
endProduct: string;
|
endProduct: string;
|
||||||
isEncoded: boolean;
|
isEncoded: boolean;
|
||||||
locked: boolean;
|
locked: boolean;
|
||||||
|
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