Compare commits
No commits in common. "4d4a62529222994157dd86705065578e13d28d3d" and "91e02dc3aa46102f4bcd258bf4a2c11de51c54e7" have entirely different histories.
4d4a625292
...
91e02dc3aa
@ -24,13 +24,13 @@
|
||||
// When an item doesn't have a flea price because it was blacklisted by default, multiply the handbook price by this number to get the new flea price. Default 3.
|
||||
"handbookPriceMultiplier": 3,
|
||||
|
||||
// Overrides ragfairConfig.runIntervalValues.outOfRaid if config.enableFasterSales is true. Default 3s.
|
||||
// Overrides ragfairConfig.runIntervalSeconds if config.enableFasterSales is true. Default 3s.
|
||||
"runIntervalSecondsOverride": 3,
|
||||
|
||||
// When config.enableScarceOffers is true, use these values to limit the number of offers on the flea.
|
||||
"offerItemCountOverride": {
|
||||
"max": 4,
|
||||
"min": 2
|
||||
"max": 3,
|
||||
"min": 1
|
||||
},
|
||||
|
||||
// When config.enableScarceOffers is true, use these values to limit the quantity of a stackable item (like ammo) per offer on the flea.
|
||||
@ -41,7 +41,7 @@
|
||||
|
||||
// When config.enableScarceOffers is true, use these values to limit the quantity of a non-stackable item (most items) per offer on the flea.
|
||||
"nonStackableCountOverride": {
|
||||
"max": 2,
|
||||
"max": 3,
|
||||
"min": 1
|
||||
},
|
||||
|
||||
|
@ -6,10 +6,10 @@
|
||||
"enableFasterSales": true,
|
||||
|
||||
// Reduces the number of offers and quantities per offer to make the flea experience more hardcore. Highly recommend to enable but default is false.
|
||||
"enableScarceOffers": false,
|
||||
"enableScarceOffers": true,
|
||||
|
||||
// Adds an extra offer for your current flea market rating bracket. So a new account at level 15 can create 3 offers instead of 2. Default is false. Extra amount is configurable in advancedConfigs.
|
||||
"addExtraOfferSlot": false,
|
||||
"addExtraOfferSlot": true,
|
||||
|
||||
// Balances the flea price of all ammo types, not just the blacklisted ammo types. Can be useful if you find some ammo prices are unbalanced, this generally makes them very balanced for what they do. Default false.
|
||||
"useBalancedPricingForAllAmmo": false,
|
||||
|
@ -124,7 +124,7 @@ class TheBlacklistMod implements IPostDBLoadModAsync {
|
||||
}
|
||||
|
||||
if (this.config.enableFasterSales && !isNaN(this.advancedConfig.runIntervalSecondsOverride)) {
|
||||
ragfairConfig.runIntervalValues.outOfRaid = this.advancedConfig.runIntervalSecondsOverride;
|
||||
ragfairConfig.runIntervalSeconds = this.advancedConfig.runIntervalSecondsOverride;
|
||||
}
|
||||
|
||||
if (this.config.enableScarceOffers) {
|
||||
|
7
types/callbacks/BundleCallbacks.d.ts
vendored
7
types/callbacks/BundleCallbacks.d.ts
vendored
@ -1,13 +1,18 @@
|
||||
import { BundleLoader } from "@spt-aki/loaders/BundleLoader";
|
||||
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 { HttpFileUtil } from "@spt-aki/utils/HttpFileUtil";
|
||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||
export declare class BundleCallbacks {
|
||||
protected logger: ILogger;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected httpFileUtil: HttpFileUtil;
|
||||
protected bundleLoader: BundleLoader;
|
||||
protected configServer: ConfigServer;
|
||||
protected httpConfig: IHttpConfig;
|
||||
constructor(httpResponse: HttpResponseUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
|
||||
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||
/**
|
||||
* Handle singleplayer/bundles
|
||||
*/
|
||||
|
16
types/callbacks/ClientLogCallbacks.d.ts
vendored
16
types/callbacks/ClientLogCallbacks.d.ts
vendored
@ -1,28 +1,14 @@
|
||||
import { ClientLogController } from "@spt-aki/controllers/ClientLogController";
|
||||
import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder";
|
||||
import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
||||
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";
|
||||
/** Handle client logging related events */
|
||||
export declare class ClientLogCallbacks {
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected clientLogController: ClientLogController;
|
||||
protected configServer: ConfigServer;
|
||||
protected localisationService: LocalisationService;
|
||||
protected modLoadOrder: ModLoadOrder;
|
||||
constructor(httpResponse: HttpResponseUtil, clientLogController: ClientLogController, configServer: ConfigServer, localisationService: LocalisationService, modLoadOrder: ModLoadOrder);
|
||||
constructor(httpResponse: HttpResponseUtil, clientLogController: ClientLogController);
|
||||
/**
|
||||
* Handle /singleplayer/log
|
||||
*/
|
||||
clientLog(url: string, info: IClientLogRequest, sessionID: string): INullResponseData;
|
||||
/**
|
||||
* Handle /singleplayer/release
|
||||
*/
|
||||
releaseNotes(): string;
|
||||
/**
|
||||
* Handle /singleplayer/enableBSGlogging
|
||||
*/
|
||||
bsgLogging(): string;
|
||||
}
|
||||
|
8
types/callbacks/HideoutCallbacks.d.ts
vendored
8
types/callbacks/HideoutCallbacks.d.ts
vendored
@ -26,11 +26,11 @@ export declare class HideoutCallbacks implements OnUpdate {
|
||||
/**
|
||||
* Handle HideoutUpgrade event
|
||||
*/
|
||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
upgrade(pmcData: IPmcData, body: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutUpgradeComplete event
|
||||
*/
|
||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
upgradeComplete(pmcData: IPmcData, body: IHideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutPutItemsInAreaSlots
|
||||
*/
|
||||
@ -62,11 +62,11 @@ export declare class HideoutCallbacks implements OnUpdate {
|
||||
/**
|
||||
* Handle HideoutQuickTimeEvent
|
||||
*/
|
||||
handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
handleQTEEvent(pmcData: IPmcData, request: IHandleQTEEventRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
||||
*/
|
||||
recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
recordShootingRangePoints(pmcData: IPmcData, request: IRecordShootingRangePoints, sessionId: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle client/game/profile/items/moving - RecordShootingRangePoints
|
||||
*/
|
||||
|
2
types/callbacks/InraidCallbacks.d.ts
vendored
2
types/callbacks/InraidCallbacks.d.ts
vendored
@ -62,6 +62,4 @@ export declare class InraidCallbacks {
|
||||
* 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;
|
||||
}
|
||||
|
32
types/callbacks/InventoryCallbacks.d.ts
vendored
32
types/callbacks/InventoryCallbacks.d.ts
vendored
@ -27,35 +27,35 @@ export declare class InventoryCallbacks {
|
||||
protected questController: QuestController;
|
||||
constructor(inventoryController: InventoryController, questController: QuestController);
|
||||
/** Handle client/game/profile/items/moving Move event */
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
moveItem(pmcData: IPmcData, body: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Remove event */
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
removeItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Split event */
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
transferItem(pmcData: IPmcData, request: IInventoryTransferRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
splitItem(pmcData: IPmcData, body: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle Swap */
|
||||
swapItem(pmcData: IPmcData, body: IInventorySwapRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
toggleItem(pmcData: IPmcData, body: IInventoryToggleRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
unbindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
unbindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle ReadEncyclopedia */
|
||||
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle ApplyInventoryChanges */
|
||||
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
sortInventory(pmcData: IPmcData, body: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
createMapMarker(pmcData: IPmcData, body: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
deleteMapMarker(pmcData: IPmcData, body: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
editMapMarker(pmcData: IPmcData, body: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/** Handle OpenRandomLootContainer */
|
||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
redeemProfileReward(pmcData: IPmcData, body: IRedeemProfileRequestData, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
setFavoriteItem(pmcData: IPmcData, body: ISetFavoriteItems, sessionId: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
redeemProfileReward(pmcData: IPmcData, body: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
setFavoriteItem(pmcData: IPmcData, body: ISetFavoriteItems, sessionId: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* TODO - MOVE INTO QUEST CODE
|
||||
* Handle game/profile/items/moving - QuestFail
|
||||
*/
|
||||
failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
6
types/callbacks/ItemEventCallbacks.d.ts
vendored
6
types/callbacks/ItemEventCallbacks.d.ts
vendored
@ -9,11 +9,5 @@ export declare class ItemEventCallbacks {
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter);
|
||||
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;
|
||||
}
|
||||
|
14
types/callbacks/MatchCallbacks.d.ts
vendored
14
types/callbacks/MatchCallbacks.d.ts
vendored
@ -1,14 +1,16 @@
|
||||
import { MatchController } from "@spt-aki/controllers/MatchController";
|
||||
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 { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData";
|
||||
import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest";
|
||||
import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse";
|
||||
import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest";
|
||||
import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest";
|
||||
import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData";
|
||||
import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData";
|
||||
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 { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult";
|
||||
@ -37,27 +39,29 @@ export declare class MatchCallbacks {
|
||||
sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData<string>;
|
||||
/** Handle client/match/group/invite/accept */
|
||||
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 */
|
||||
cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData<boolean>;
|
||||
/** Handle client/match/group/transfer */
|
||||
transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData<boolean>;
|
||||
/** Handle client/match/group/invite/cancel-all */
|
||||
cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
cancelAllGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
/** @deprecated - not called on raid start/end or game start/exit */
|
||||
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>;
|
||||
/** Handle match/group/start_game */
|
||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult>;
|
||||
/** Handle client/getMetricsConfig */
|
||||
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
|
||||
/**
|
||||
* Called periodically while in a group
|
||||
* @deprecated - not called on raid start/end or game start/exit
|
||||
* Handle client/match/group/status
|
||||
* @returns
|
||||
*/
|
||||
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 */
|
||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||
leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<boolean>;
|
||||
|
2
types/controllers/GameController.d.ts
vendored
2
types/controllers/GameController.d.ts
vendored
@ -15,7 +15,6 @@ import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
||||
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 { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||
import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||
import { ILootConfig } from "@spt-aki/models/spt/config/ILootConfig";
|
||||
@ -61,7 +60,6 @@ export declare class GameController {
|
||||
protected coreConfig: ICoreConfig;
|
||||
protected locationConfig: ILocationConfig;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
protected pmcConfig: IPmcConfig;
|
||||
protected lootConfig: ILootConfig;
|
||||
protected botConfig: IBotConfig;
|
||||
|
20
types/controllers/HideoutController.d.ts
vendored
20
types/controllers/HideoutController.d.ts
vendored
@ -70,18 +70,18 @@ export declare class HideoutController {
|
||||
* @param pmcData Player profile
|
||||
* @param request upgrade start request
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
startUpgrade(pmcData: IPmcData, request: IHideoutUpgradeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle HideoutUpgradeComplete event
|
||||
* Complete a hideout area upgrade
|
||||
* @param pmcData Player profile
|
||||
* @param request Completed upgrade request
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
upgradeComplete(pmcData: IPmcData, request: HideoutUpgradeCompleteRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Upgrade wall status to visible in profile if medstation/water collector are both level 1
|
||||
* @param pmcData Player profile
|
||||
@ -222,6 +222,14 @@ export declare class HideoutController {
|
||||
* @param output Output object to update
|
||||
*/
|
||||
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
|
||||
* // TODO - implement this
|
||||
@ -236,7 +244,7 @@ export declare class HideoutController {
|
||||
* @param pmcData Profile to adjust
|
||||
* @param request QTE result object
|
||||
*/
|
||||
handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData, output: IItemEventRouterResponse): void;
|
||||
handleQTEEventOutcome(sessionId: string, pmcData: IPmcData, request: IHandleQTEEventRequestData): IItemEventRouterResponse;
|
||||
/**
|
||||
* Record a high score from the shooting range into a player profiles overallcounters
|
||||
* @param sessionId Session id
|
||||
@ -244,7 +252,7 @@ export declare class HideoutController {
|
||||
* @param request shooting range score request
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): void;
|
||||
recordShootingRangePoints(sessionId: string, pmcData: IPmcData, request: IRecordShootingRangePoints): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handle client/game/profile/items/moving - HideoutImproveArea
|
||||
* @param sessionId Session id
|
||||
|
25
types/controllers/InraidController.d.ts
vendored
25
types/controllers/InraidController.d.ts
vendored
@ -13,10 +13,7 @@ import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgre
|
||||
import { PlayerRaidEndState } from "@spt-aki/models/enums/PlayerRaidEndState";
|
||||
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 { 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";
|
||||
@ -59,9 +56,6 @@ export declare class InraidController {
|
||||
protected btrConfig: IBTRConfig;
|
||||
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
|
||||
@ -110,20 +104,6 @@ export declare class InraidController {
|
||||
* @param postRaidRequest Post-raid data of raid
|
||||
*/
|
||||
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
|
||||
* @param profile Profile to check for condition counters
|
||||
@ -160,9 +140,8 @@ export declare class InraidController {
|
||||
* Update profile with scav karma values based on in-raid actions
|
||||
* @param pmcData Pmc profile
|
||||
* @param offraidData Post-raid save request
|
||||
* @param scavData Scav profile
|
||||
*/
|
||||
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData, scavData: IPmcData): void;
|
||||
protected handlePostRaidPlayerScavKarmaChanges(pmcData: IPmcData, offraidData: ISaveProgressRequestData): void;
|
||||
/**
|
||||
* Get the inraid config from configs/inraid.json
|
||||
* @returns InRaid Config
|
||||
@ -187,6 +166,4 @@ export declare class InraidController {
|
||||
* Handle singleplayer/traderServices/itemDelivery
|
||||
*/
|
||||
itemDelivery(sessionId: string, traderId: string, items: Item[]): void;
|
||||
getTraitorScavHostileChance(url: string, sessionID: string): number;
|
||||
getSandboxMaxPatrolValue(url: string, sessionID: string): number;
|
||||
}
|
||||
|
61
types/controllers/InventoryController.d.ts
vendored
61
types/controllers/InventoryController.d.ts
vendored
@ -27,7 +27,6 @@ import { IOpenRandomLootContainerRequestData } from "@spt-aki/models/eft/invento
|
||||
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 { IAkiProfile } 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";
|
||||
@ -68,52 +67,55 @@ export declare class InventoryController {
|
||||
* @param pmcData Profile
|
||||
* @param moveRequest Move request data
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
moveItem(pmcData: IPmcData, moveRequest: IInventoryMoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get a event router response with inventory trader message
|
||||
* @param output Item event router response
|
||||
* @returns Item event router response
|
||||
*/
|
||||
protected appendTraderExploitErrorResponse(output: IItemEventRouterResponse): void;
|
||||
protected getTraderExploitErrorResponse(output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* 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
|
||||
* Implements functionality "Discard" from Main menu (Stash etc.)
|
||||
* Removes item from PMC Profile
|
||||
*/
|
||||
discardItem(pmcData: IPmcData, request: IInventoryRemoveRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
discardItem(pmcData: IPmcData, body: IInventoryRemoveRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Split Item
|
||||
* spliting 1 stack into 2
|
||||
* @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile)
|
||||
* @param request Split request
|
||||
* @param sessionID Session/player id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
splitItem(pmcData: IPmcData, request: IInventorySplitRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
splitItem(pmcData: IPmcData, request: IInventorySplitRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* 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`
|
||||
* @param pmcData Player profile (unused, getOwnerInventoryItems() gets profile)
|
||||
* @param body Merge request
|
||||
* @param sessionID Player id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
mergeItem(pmcData: IPmcData, body: IInventoryMergeRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* 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
|
||||
* 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 body Transfer request
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
transferItem(pmcData: IPmcData, body: IInventoryTransferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Swap Item
|
||||
* its used for "reload" if you have weapon in hands and magazine is somewhere else in rig or backpack in equipment
|
||||
@ -123,7 +125,7 @@ export declare class InventoryController {
|
||||
/**
|
||||
* Handles folding of Weapons
|
||||
*/
|
||||
foldItem(pmcData: IPmcData, request: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
foldItem(pmcData: IPmcData, body: IInventoryFoldRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Toggles "Toggleable" items like night vision goggles and face shields.
|
||||
* @param pmcData player profile
|
||||
@ -148,26 +150,25 @@ export declare class InventoryController {
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): void;
|
||||
bindItem(pmcData: IPmcData, bindRequest: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Unbind an inventory item from quick access menu at bottom of player screen
|
||||
* Handle unbind event
|
||||
* @param pmcData Player profile
|
||||
* @param bindRequest Request object
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
unbindItem(pmcData: IPmcData, request: IInventoryBindRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
unbindItem(pmcData: IPmcData, request: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Handles examining an item
|
||||
* @param pmcData player profile
|
||||
* @param body request object
|
||||
* @param sessionID session id
|
||||
* @param output Client response
|
||||
* @returns response
|
||||
*/
|
||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], fullProfile: IAkiProfile): void;
|
||||
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
protected flagItemsAsInspectedAndRewardXp(itemTpls: string[], pmcProfile: IPmcData): void;
|
||||
/**
|
||||
* Get the tplid of an item from the examine request object
|
||||
* @param request Response request
|
||||
@ -181,33 +182,33 @@ export declare class InventoryController {
|
||||
* @param pmcData Player profile
|
||||
* @param request sort request
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): void;
|
||||
sortInventory(pmcData: IPmcData, request: IInventorySortRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Add note to a map
|
||||
* @param pmcData Player profile
|
||||
* @param request Add marker request
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
createMapMarker(pmcData: IPmcData, request: IInventoryCreateMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Delete a map marker
|
||||
* @param pmcData Player profile
|
||||
* @param request Delete marker request
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
deleteMapMarker(pmcData: IPmcData, request: IInventoryDeleteMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Edit an existing map marker
|
||||
* @param pmcData Player profile
|
||||
* @param request Edit marker request
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
editMapMarker(pmcData: IPmcData, request: IInventoryEditMarkerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
/**
|
||||
* Strip out characters from note string that are not: letter/numbers/unicode/spaces
|
||||
* @param mapNoteText Marker text to sanitise
|
||||
@ -218,11 +219,11 @@ export declare class InventoryController {
|
||||
* Handle OpenRandomLootContainer event
|
||||
* Handle event fired when a container is unpacked (currently only the halloween pumpkin)
|
||||
* @param pmcData Profile data
|
||||
* @param body Open loot container request data
|
||||
* @param body open loot container request data
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): void;
|
||||
setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): void;
|
||||
openRandomLootContainer(pmcData: IPmcData, body: IOpenRandomLootContainerRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
redeemProfileReward(pmcData: IPmcData, request: IRedeemProfileRequestData, sessionId: string): IItemEventRouterResponse;
|
||||
setFavoriteItem(pmcData: IPmcData, request: ISetFavoriteItems, sessionId: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
4
types/controllers/LocationController.d.ts
vendored
4
types/controllers/LocationController.d.ts
vendored
@ -13,7 +13,6 @@ import { LootRequest } from "@spt-aki/models/spt/services/LootRequest";
|
||||
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 { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
@ -29,7 +28,6 @@ export declare class LocationController {
|
||||
protected locationGenerator: LocationGenerator;
|
||||
protected localisationService: LocalisationService;
|
||||
protected raidTimeAdjustmentService: RaidTimeAdjustmentService;
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected lootGenerator: LootGenerator;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected timeUtil: TimeUtil;
|
||||
@ -37,7 +35,7 @@ export declare class LocationController {
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected airdropConfig: IAirdropConfig;
|
||||
protected locationConfig: ILocationConfig;
|
||||
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);
|
||||
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);
|
||||
/**
|
||||
* Handle client/location/getLocalloot
|
||||
* Get a location (map) with generated loot data
|
||||
|
6
types/controllers/MatchController.d.ts
vendored
6
types/controllers/MatchController.d.ts
vendored
@ -3,9 +3,11 @@ import { LootGenerator } from "@spt-aki/generators/LootGenerator";
|
||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||
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 { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData";
|
||||
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 { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData";
|
||||
import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult";
|
||||
@ -46,6 +48,10 @@ export declare class MatchController {
|
||||
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);
|
||||
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 */
|
||||
deleteGroup(info: any): void;
|
||||
/** Handle match/group/start_game */
|
||||
|
4
types/controllers/PresetController.d.ts
vendored
4
types/controllers/PresetController.d.ts
vendored
@ -1,10 +1,8 @@
|
||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
export declare class PresetController {
|
||||
protected logger: ILogger;
|
||||
protected presetHelper: PresetHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
constructor(logger: ILogger, presetHelper: PresetHelper, databaseServer: DatabaseServer);
|
||||
constructor(presetHelper: PresetHelper, databaseServer: DatabaseServer);
|
||||
initialize(): void;
|
||||
}
|
||||
|
14
types/controllers/QuestController.d.ts
vendored
14
types/controllers/QuestController.d.ts
vendored
@ -69,6 +69,12 @@ export declare class QuestController {
|
||||
* @returns true = show to player
|
||||
*/
|
||||
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 the client accepting a quest and starting it
|
||||
@ -108,12 +114,6 @@ export declare class QuestController {
|
||||
* @returns ItemEvent client response
|
||||
*/
|
||||
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
|
||||
* @param sessionId Player id
|
||||
@ -191,5 +191,5 @@ export declare class QuestController {
|
||||
* @param sessionID Session id
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
failQuest(pmcData: IPmcData, request: IFailQuestRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
34
types/controllers/RagfairController.d.ts
vendored
34
types/controllers/RagfairController.d.ts
vendored
@ -70,17 +70,9 @@ export declare class RagfairController {
|
||||
protected configServer: ConfigServer;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, eventOutputHolder: EventOutputHolder, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, 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;
|
||||
/**
|
||||
* Handle client/ragfair/offer/findbyid
|
||||
* Occurs when searching for `#x` on flea
|
||||
* Handle client/ragfair/offer/findbyid
|
||||
* @param sessionId Player id
|
||||
* @param request Request data
|
||||
* @returns IRagfairOffer
|
||||
@ -89,7 +81,7 @@ export declare class RagfairController {
|
||||
/**
|
||||
* Get offers for the client based on type of search being performed
|
||||
* @param searchRequest Client search request data
|
||||
* @param itemsToAdd Comes from ragfairHelper.filterCategories()
|
||||
* @param itemsToAdd comes from ragfairHelper.filterCategories()
|
||||
* @param traderAssorts Trader assorts
|
||||
* @param pmcProfile Player profile
|
||||
* @returns array of offers
|
||||
@ -98,7 +90,7 @@ export declare class RagfairController {
|
||||
/**
|
||||
* Get categories for the type of search being performed, linked/required/all
|
||||
* @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 templates + counts
|
||||
*/
|
||||
protected getSpecificCategories(pmcProfile: IPmcData, searchRequest: ISearchRequestData, offers: IRagfairOffer[]): Record<string, number>;
|
||||
@ -109,26 +101,16 @@ export declare class RagfairController {
|
||||
protected addIndexValueToOffers(offers: IRagfairOffer[]): void;
|
||||
/**
|
||||
* Update a trader flea offer with buy restrictions stored in the traders assort
|
||||
* @param offer Flea offer to update
|
||||
* @param fullProfile Players full profile
|
||||
* @param offer flea offer to update
|
||||
* @param profile full profile of player
|
||||
*/
|
||||
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, fullProfile: IAkiProfile): void;
|
||||
protected setTraderOfferPurchaseLimits(offer: IRagfairOffer, profile: IAkiProfile): void;
|
||||
/**
|
||||
* Adjust ragfair offer stack count to match same value as traders assort stack count
|
||||
* @param offer Flea offer to adjust stack size of
|
||||
* @param offer Flea offer to adjust
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Check all profiles and sell player offers / send player money for listing if it sold
|
||||
@ -183,7 +165,7 @@ export declare class RagfairController {
|
||||
items: Item[] | null;
|
||||
errorMessage: string | null;
|
||||
};
|
||||
createPlayerOffer(sessionId: string, requirements: Requirement[], items: Item[], sellInOnePiece: boolean): IRagfairOffer;
|
||||
createPlayerOffer(profile: IAkiProfile, requirements: Requirement[], items: Item[], sellInOnePiece: boolean, amountToSend: number): IRagfairOffer;
|
||||
getAllFleaPrices(): Record<string, number>;
|
||||
getStaticPrices(): Record<string, number>;
|
||||
/**
|
||||
|
4
types/controllers/RepairController.d.ts
vendored
4
types/controllers/RepairController.d.ts
vendored
@ -1,4 +1,3 @@
|
||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
||||
import { RepairHelper } from "@spt-aki/helpers/RepairHelper";
|
||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||
@ -21,9 +20,8 @@ export declare class RepairController {
|
||||
protected paymentService: PaymentService;
|
||||
protected repairHelper: RepairHelper;
|
||||
protected repairService: RepairService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected repairConfig: IRepairConfig;
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService, profileHelper: ProfileHelper);
|
||||
constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, questHelper: QuestHelper, traderHelper: TraderHelper, paymentService: PaymentService, repairHelper: RepairHelper, repairService: RepairService);
|
||||
/**
|
||||
* Handle TraderRepair event
|
||||
* Repair with trader
|
||||
|
19
types/controllers/RepeatableQuestController.d.ts
vendored
19
types/controllers/RepeatableQuestController.d.ts
vendored
@ -1,13 +1,13 @@
|
||||
import { RepeatableQuestGenerator } from "@spt-aki/generators/RepeatableQuestGenerator";
|
||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
||||
import { RagfairServerHelper } from "@spt-aki/helpers/RagfairServerHelper";
|
||||
import { RepeatableQuestHelper } from "@spt-aki/helpers/RepeatableQuestHelper";
|
||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||
import { IPmcDataRepeatableQuest, IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||
import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse";
|
||||
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 { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
@ -30,6 +30,7 @@ export declare class RepeatableQuestController {
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected profileFixerService: ProfileFixerService;
|
||||
protected ragfairServerHelper: RagfairServerHelper;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
protected paymentService: PaymentService;
|
||||
protected objectId: ObjectId;
|
||||
@ -38,7 +39,7 @@ export declare class RepeatableQuestController {
|
||||
protected questHelper: QuestHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
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);
|
||||
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);
|
||||
/**
|
||||
* Handle client/repeatalbeQuests/activityPeriods
|
||||
* Returns an array of objects in the format of repeatable quests to the client.
|
||||
@ -94,20 +95,6 @@ export declare class RepeatableQuestController {
|
||||
*/
|
||||
protected generateQuestPool(repeatableConfig: IRepeatableQuestConfig, pmcLevel: number): 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;
|
||||
/**
|
||||
* Handle RepeatableQuestChange event
|
||||
|
10
types/controllers/TraderController.d.ts
vendored
10
types/controllers/TraderController.d.ts
vendored
@ -3,18 +3,14 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { TraderAssortHelper } from "@spt-aki/helpers/TraderAssortHelper";
|
||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||
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 { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { FenceService } from "@spt-aki/services/FenceService";
|
||||
import { TraderAssortService } from "@spt-aki/services/TraderAssortService";
|
||||
import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||
export declare class TraderController {
|
||||
protected logger: ILogger;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected traderAssortHelper: TraderAssortHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
@ -24,12 +20,10 @@ export declare class TraderController {
|
||||
protected fenceService: FenceService;
|
||||
protected fenceBaseAssortGenerator: FenceBaseAssortGenerator;
|
||||
protected 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);
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil);
|
||||
/**
|
||||
* Runs when onLoad event is fired
|
||||
* Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService
|
||||
* Iterate over traders, ensure an unmolested copy of their assorts is stored in traderAssortService
|
||||
* Store timestamp of next assort refresh in nextResupply property of traders .base object
|
||||
*/
|
||||
load(): void;
|
||||
|
2
types/di/Router.d.ts
vendored
2
types/di/Router.d.ts
vendored
@ -21,7 +21,7 @@ export declare class DynamicRouter extends Router {
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
}
|
||||
export declare class ItemEventRouterDefinition extends Router {
|
||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
export declare class SaveLoadRouter extends Router {
|
||||
handleLoad(profile: IAkiProfile): IAkiProfile;
|
||||
|
2
types/generators/BotGenerator.d.ts
vendored
2
types/generators/BotGenerator.d.ts
vendored
@ -4,7 +4,7 @@ import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper";
|
||||
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { IBaseJsonSkills, IBaseSkill, IBotBase, Info, Health as PmcHealth, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Health as PmcHealth, IBaseJsonSkills, IBaseSkill, IBotBase, Info, Skills as botSkills } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Appearance, Health, IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||
import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
|
51
types/generators/BotLootGenerator.d.ts
vendored
51
types/generators/BotLootGenerator.d.ts
vendored
@ -1,8 +1,7 @@
|
||||
import { BotWeaponGenerator } from "@spt-aki/generators/BotWeaponGenerator";
|
||||
import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
||||
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||
import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper";
|
||||
import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper";
|
||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { Inventory as PmcInventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
@ -10,7 +9,6 @@ import { IBotType, Inventory, ModsChances } from "@spt-aki/models/eft/common/tab
|
||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
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 { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
@ -19,28 +17,24 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
export declare class BotLootGenerator {
|
||||
protected logger: ILogger;
|
||||
protected hashUtil: HashUtil;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected handbookHelper: HandbookHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected botWeaponGenerator: BotWeaponGenerator;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected botHelper: BotHelper;
|
||||
protected botLootCacheService: BotLootCacheService;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
protected pmcConfig: IPmcConfig;
|
||||
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;
|
||||
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);
|
||||
/**
|
||||
* Add loot to bots containers
|
||||
* @param sessionId Session id
|
||||
@ -73,25 +67,23 @@ export declare class BotLootGenerator {
|
||||
protected getRandomisedCount(min: number, max: number, nValue: number): number;
|
||||
/**
|
||||
* 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 with weight
|
||||
* @param pool Pool of items to pick from
|
||||
* @param equipmentSlots What equipment slot will the loot items be added to
|
||||
* @param totalItemCount Max count of items to add
|
||||
* @param inventoryToAddItemsTo Bot inventory loot will be added to
|
||||
* @param botRole Role of the bot loot is being generated for (assault/pmcbot)
|
||||
* @param itemSpawnLimits Item spawn limits the bot must adhere to
|
||||
* @param useLimits Should item limit counts be used as defined in config/bot.json
|
||||
* @param totalValueLimitRub Total value of loot allowed in roubles
|
||||
* @param isPmc Is bot being generated for a pmc
|
||||
*/
|
||||
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[][];
|
||||
protected addLootFromPool(pool: ITemplateItem[], equipmentSlots: string[], totalItemCount: number, inventoryToAddItemsTo: PmcInventory, botRole: string, useLimits?: boolean, totalValueLimitRub?: number, isPmc?: boolean): void;
|
||||
/**
|
||||
* 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;
|
||||
protected addRequiredChildItemsToParent(itemToAddTemplate: ITemplateItem, itemToAddChildrenTo: Item[], isPmc: boolean): void;
|
||||
/**
|
||||
* Add generated weapons to inventory as loot
|
||||
* @param botInventory inventory to add preset to
|
||||
@ -102,28 +94,44 @@ export declare class BotLootGenerator {
|
||||
* @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;
|
||||
/**
|
||||
* 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 getRandomItemFromPoolByBotRole(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
|
||||
* All values are set to 0
|
||||
* @param isPmc Is the bot a pmc
|
||||
* @param botRole Role the bot has
|
||||
* @param limitCount
|
||||
*/
|
||||
protected initItemLimitArray(botRole: string, limitCount: Record<string, number>): void;
|
||||
protected initItemLimitArray(isPmc: boolean, botRole: string, limitCount: Record<string, number>): void;
|
||||
/**
|
||||
* Check if an item has reached its bot-specific spawn limit
|
||||
* @param itemTemplate Item we check to see if its reached spawn limit
|
||||
* @param botRole Bot type
|
||||
* @param itemSpawnLimits
|
||||
* @param isPmc Is bot we're working with a pmc
|
||||
* @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
|
||||
*/
|
||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, itemSpawnLimits: IItemSpawnLimitSettings): boolean;
|
||||
protected itemHasReachedSpawnLimit(itemTemplate: ITemplateItem, botRole: string, isPmc: boolean, limitCount: Record<string, number>, itemSpawnLimits: Record<string, number>): boolean;
|
||||
/**
|
||||
* Randomise the stack size of a money object, uses different values for pmc or scavs
|
||||
* @param botRole Role bot has that has money stack
|
||||
* @param isPmc Is money on a PMC bot
|
||||
* @param itemTemplate item details from db
|
||||
* @param moneyItem Money item to randomise
|
||||
*/
|
||||
protected randomiseMoneyStackSize(botRole: string, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||
protected randomiseMoneyStackSize(isPmc: boolean, itemTemplate: ITemplateItem, moneyItem: Item): void;
|
||||
/**
|
||||
* Randomise the size of an ammo stack
|
||||
* @param isPmc Is ammo on a PMC bot
|
||||
@ -134,10 +142,11 @@ export declare class BotLootGenerator {
|
||||
/**
|
||||
* 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
|
||||
* @param isPmc is the bot we want limits for a pmc
|
||||
* @param botRole what role does the bot have
|
||||
* @returns Dictionary of tplIds and limit
|
||||
*/
|
||||
protected getItemSpawnLimitsForBotType(botRole: string): Record<string, number>;
|
||||
protected getItemSpawnLimitsForBotType(isPmc: boolean, botRole: string): Record<string, number>;
|
||||
/**
|
||||
* Get the parentId or tplId of item inside spawnLimits object if it exists
|
||||
* @param itemTemplate item we want to look for in spawn limits
|
||||
|
@ -28,8 +28,6 @@ export declare class FenceBaseAssortGenerator {
|
||||
* Create base fence assorts dynamically and store in memory
|
||||
*/
|
||||
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
|
||||
|
23
types/generators/PMCLootGenerator.d.ts
vendored
23
types/generators/PMCLootGenerator.d.ts
vendored
@ -4,7 +4,6 @@ import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
|
||||
/**
|
||||
* Handle the generation of dynamic PMC loot in pockets and backpacks
|
||||
@ -15,23 +14,22 @@ export declare class PMCLootGenerator {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected configServer: ConfigServer;
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected seasonalEventService: SeasonalEventService;
|
||||
protected pocketLootPool: Record<string, number>;
|
||||
protected vestLootPool: Record<string, number>;
|
||||
protected backpackLootPool: Record<string, number>;
|
||||
protected pocketLootPool: string[];
|
||||
protected vestLootPool: string[];
|
||||
protected backpackLootPool: string[];
|
||||
protected pmcConfig: IPmcConfig;
|
||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService);
|
||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService);
|
||||
/**
|
||||
* Create an array of loot items a PMC can have in their pockets
|
||||
* @returns string array of tpls
|
||||
*/
|
||||
generatePMCPocketLootPool(botRole: string): Record<string, number>;
|
||||
generatePMCPocketLootPool(): string[];
|
||||
/**
|
||||
* Create an array of loot items a PMC can have in their vests
|
||||
* @returns string array of tpls
|
||||
*/
|
||||
generatePMCVestLootPool(botRole: string): Record<string, number>;
|
||||
generatePMCVestLootPool(): string[];
|
||||
/**
|
||||
* Check if item has a width/height that lets it fit into a 2x2 slot
|
||||
* 1x1 / 1x2 / 2x1 / 2x2
|
||||
@ -43,12 +41,5 @@ export declare class PMCLootGenerator {
|
||||
* Create an array of loot items a PMC can have in their backpack
|
||||
* @returns string array of tpls
|
||||
*/
|
||||
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;
|
||||
generatePMCBackpackLootPool(): string[];
|
||||
}
|
||||
|
13
types/generators/PlayerScavGenerator.d.ts
vendored
13
types/generators/PlayerScavGenerator.d.ts
vendored
@ -1,10 +1,11 @@
|
||||
import { BotGenerator } from "@spt-aki/generators/BotGenerator";
|
||||
import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
||||
import { BotHelper } from "@spt-aki/helpers/BotHelper";
|
||||
import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper";
|
||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||
import { IBotBase, Skills, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Skills, Stats } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||
import { IPlayerScavConfig, KarmaLevel } from "@spt-aki/models/spt/config/IPlayerScavConfig";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
@ -23,6 +24,7 @@ export declare class PlayerScavGenerator {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected hashUtil: HashUtil;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected saveServer: SaveServer;
|
||||
protected profileHelper: ProfileHelper;
|
||||
@ -34,20 +36,13 @@ export declare class PlayerScavGenerator {
|
||||
protected botGenerator: BotGenerator;
|
||||
protected configServer: ConfigServer;
|
||||
protected playerScavConfig: IPlayerScavConfig;
|
||||
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);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer);
|
||||
/**
|
||||
* Update a player profile to include a new player scav profile
|
||||
* @param sessionID session id to specify what profile is updated
|
||||
* @returns profile object
|
||||
*/
|
||||
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
|
||||
* Is also the fence trader rep level
|
||||
|
97
types/generators/RepeatableQuestGenerator.d.ts
vendored
97
types/generators/RepeatableQuestGenerator.d.ts
vendored
@ -1,34 +1,54 @@
|
||||
import { RepeatableQuestRewardGenerator } from "@spt-aki/generators/RepeatableQuestRewardGenerator";
|
||||
import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper";
|
||||
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 { Exit } from "@spt-aki/models/eft/common/ILocationBase";
|
||||
import { TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { IQuestCondition, IQuestConditionCounterCondition } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||
import { IQuestCondition, IQuestConditionCounterCondition, IQuestReward, IQuestRewards } from "@spt-aki/models/eft/common/tables/IQuest";
|
||||
import { IRepeatableQuest } from "@spt-aki/models/eft/common/tables/IRepeatableQuests";
|
||||
import { IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
import { IBaseQuestConfig, IBossInfo, IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig";
|
||||
import { IQuestTypePool } from "@spt-aki/models/spt/repeatable/IQuestTypePool";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||
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 { 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 { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||
import { ObjectId } from "@spt-aki/utils/ObjectId";
|
||||
import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||
export declare class RepeatableQuestGenerator {
|
||||
protected timeUtil: TimeUtil;
|
||||
protected logger: ILogger;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected mathUtil: MathUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
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 paymentService: PaymentService;
|
||||
protected objectId: ObjectId;
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected repeatableQuestHelper: RepeatableQuestHelper;
|
||||
protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator;
|
||||
protected configServer: ConfigServer;
|
||||
protected questConfig: IQuestConfig;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer);
|
||||
constructor(timeUtil: TimeUtil, logger: ILogger, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, handbookHelper: HandbookHelper, ragfairServerHelper: RagfairServerHelper, eventOutputHolder: EventOutputHolder, localisationService: LocalisationService, paymentService: PaymentService, objectId: ObjectId, itemFilterService: ItemFilterService, repeatableQuestHelper: RepeatableQuestHelper, configServer: ConfigServer);
|
||||
/**
|
||||
* 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
|
||||
@ -105,7 +125,7 @@ export declare class RepeatableQuestGenerator {
|
||||
/**
|
||||
* Filter a maps exits to just those for the desired side
|
||||
* @param locationKey Map id (e.g. factory4_day)
|
||||
* @param playerSide Scav/Pmc
|
||||
* @param playerSide Scav/Bear
|
||||
* @returns Array of Exit objects
|
||||
*/
|
||||
protected getLocationExitsForSide(locationKey: string, playerSide: string): Exit[];
|
||||
@ -124,6 +144,71 @@ export declare class RepeatableQuestGenerator {
|
||||
* @returns {object} Exit condition
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
protected generateReward(pmcLevel: number, difficulty: number, traderId: string, repeatableConfig: IRepeatableQuestConfig, questConfig: IBaseQuestConfig): IQuestRewards;
|
||||
protected addMoneyReward(traderId: string, rewards: IQuestRewards, rewardRoubles: number, rewardIndex: number): void;
|
||||
protected calculateAmmoStackSizeThatFitsBudget(itemSelected: ITemplateItem, roublesBudget: number, rewardNumItems: number): 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;
|
||||
/**
|
||||
* 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[]): 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],...]
|
||||
*/
|
||||
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
|
||||
* The templates include Elimination, Completion and Extraction quest types
|
||||
|
106
types/generators/RepeatableQuestRewardGenerator.d.ts
vendored
106
types/generators/RepeatableQuestRewardGenerator.d.ts
vendored
@ -1,106 +0,0 @@
|
||||
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): ITemplateItem[];
|
||||
/**
|
||||
* 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;
|
||||
}
|
@ -10,7 +10,6 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { ItemFilterService } from "@spt-aki/services/ItemFilterService";
|
||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||
import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
@ -26,13 +25,12 @@ export declare class ScavCaseRewardGenerator {
|
||||
protected presetHelper: PresetHelper;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected seasonalEventService: SeasonalEventService;
|
||||
protected itemFilterService: ItemFilterService;
|
||||
protected configServer: ConfigServer;
|
||||
protected scavCaseConfig: IScavCaseConfig;
|
||||
protected dbItemsCache: ITemplateItem[];
|
||||
protected dbAmmoItemsCache: ITemplateItem[];
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, itemFilterService: ItemFilterService, configServer: ConfigServer);
|
||||
/**
|
||||
* Create an array of rewards that will be given to the player upon completing their scav case build
|
||||
* @param recipeId recipe of the scav case craft
|
||||
|
4
types/generators/WeatherGenerator.d.ts
vendored
4
types/generators/WeatherGenerator.d.ts
vendored
@ -29,13 +29,13 @@ export declare class WeatherGenerator {
|
||||
* @param currentDate current date
|
||||
* @returns formatted time
|
||||
*/
|
||||
protected getBsgFormattedInRaidTime(): string;
|
||||
protected getBsgFormattedInRaidTime(currentDate: Date): string;
|
||||
/**
|
||||
* Get the current in-raid time
|
||||
* @param currentDate (new Date())
|
||||
* @returns Date object of current in-raid time
|
||||
*/
|
||||
getInRaidTime(): Date;
|
||||
getInRaidTime(currentDate: Date): Date;
|
||||
/**
|
||||
* Get current time formatted to fit BSGs requirement
|
||||
* @param date date to format into bsg style
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { IInventoryMagGen } from "@spt-aki/generators/weapongen/IInventoryMagGen";
|
||||
import { InventoryMagGen } from "@spt-aki/generators/weapongen/InventoryMagGen";
|
||||
import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
||||
import { BotWeaponGeneratorHelper } from "@spt-aki/helpers/BotWeaponGeneratorHelper";
|
||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
@ -12,9 +11,8 @@ export declare class ExternalInventoryMagGen implements IInventoryMagGen {
|
||||
protected itemHelper: ItemHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
protected botWeaponGeneratorHelper: BotWeaponGeneratorHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected randomUtil: RandomUtil;
|
||||
constructor(logger: ILogger, itemHelper: ItemHelper, localisationService: LocalisationService, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil);
|
||||
constructor(logger: ILogger, itemHelper: ItemHelper, localisationService: LocalisationService, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, randomUtil: RandomUtil);
|
||||
getPriority(): number;
|
||||
canHandleInventoryMagGen(inventoryMagGen: InventoryMagGen): boolean;
|
||||
process(inventoryMagGen: InventoryMagGen): void;
|
||||
|
39
types/helpers/BotGeneratorHelper.d.ts
vendored
39
types/helpers/BotGeneratorHelper.d.ts
vendored
@ -1,12 +1,8 @@
|
||||
import { ApplicationContext } from "@spt-aki/context/ApplicationContext";
|
||||
import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper";
|
||||
import { DurabilityLimitsHelper } from "@spt-aki/helpers/DurabilityLimitsHelper";
|
||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||
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 { Grid, ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
import { ItemAddedResult } from "@spt-aki/models/enums/ItemAddedResult";
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
import { IChooseRandomCompatibleModResult } from "@spt-aki/models/spt/bots/IChooseRandomCompatibleModResult";
|
||||
import { EquipmentFilters, IBotConfig, IRandomisedResourceValues } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||
@ -14,6 +10,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
export declare class BotGeneratorHelper {
|
||||
protected logger: ILogger;
|
||||
@ -21,14 +18,12 @@ export declare class BotGeneratorHelper {
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected durabilityLimitsHelper: DurabilityLimitsHelper;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected containerHelper: ContainerHelper;
|
||||
protected applicationContext: ApplicationContext;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected botConfig: IBotConfig;
|
||||
protected pmcConfig: IPmcConfig;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, applicationContext: ApplicationContext, localisationService: LocalisationService, configServer: ConfigServer);
|
||||
/**
|
||||
* Adds properties to an item
|
||||
* e.g. Repairable / HasHinge / Foldable / MaxDurability
|
||||
@ -83,21 +78,15 @@ export declare class BotGeneratorHelper {
|
||||
* @returns Equipment role (e.g. pmc / assault / bossTagilla)
|
||||
*/
|
||||
getBotEquipmentRole(botRole: string): string;
|
||||
/**
|
||||
* Adds an item with all its children into specified equipmentSlots, wherever it fits.
|
||||
* @param equipmentSlots Slot to add item+children into
|
||||
* @param rootItemId Root item id to use as mod items parentid
|
||||
* @param rootItemTplId Root itms tpl id
|
||||
* @param itemWithChildren Item to add
|
||||
* @param inventory Inventory to add item+children into
|
||||
* @returns ItemAddedResult result object
|
||||
*/
|
||||
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], rootItemId: string, rootItemTplId: 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;
|
||||
}
|
||||
/** TODO - move into own class */
|
||||
export declare class ExhaustableArray<T> {
|
||||
private itemPool;
|
||||
private randomUtil;
|
||||
private jsonUtil;
|
||||
private pool;
|
||||
constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil);
|
||||
getRandomValue(): T;
|
||||
getFirstValue(): T;
|
||||
hasValues(): boolean;
|
||||
}
|
||||
|
29
types/helpers/BotWeaponGeneratorHelper.d.ts
vendored
29
types/helpers/BotWeaponGeneratorHelper.d.ts
vendored
@ -1,11 +1,13 @@
|
||||
import { BotGeneratorHelper } from "@spt-aki/helpers/BotGeneratorHelper";
|
||||
import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper";
|
||||
import { InventoryHelper } from "@spt-aki/helpers/InventoryHelper";
|
||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||
import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { GenerationData } from "@spt-aki/models/eft/common/tables/IBotType";
|
||||
import { Item } 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 { 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 { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
@ -17,10 +19,11 @@ export declare class BotWeaponGeneratorHelper {
|
||||
protected itemHelper: ItemHelper;
|
||||
protected randomUtil: RandomUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected weightedRandomHelper: WeightedRandomHelper;
|
||||
protected botGeneratorHelper: BotGeneratorHelper;
|
||||
protected localisationService: LocalisationService;
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, itemHelper: ItemHelper, randomUtil: RandomUtil, hashUtil: HashUtil, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, localisationService: LocalisationService);
|
||||
protected containerHelper: ContainerHelper;
|
||||
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
|
||||
* @param magCounts Weights of magazines
|
||||
@ -62,4 +65,22 @@ export declare class BotWeaponGeneratorHelper {
|
||||
* @returns tpl of magazine
|
||||
*/
|
||||
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 rootItemId Root item id to use as mod items parentid
|
||||
* @param rootItemTplId Root itms tpl id
|
||||
* @param itemWithChildren Item to add
|
||||
* @param inventory Inventory to add item+children into
|
||||
* @returns ItemAddedResult result object
|
||||
*/
|
||||
addItemWithChildrenToEquipmentSlot(equipmentSlots: string[], rootItemId: string, rootItemTplId: 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;
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
||||
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
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 { GiftService } from "@spt-aki/services/GiftService";
|
||||
import { MailSendService } from "@spt-aki/services/MailSendService";
|
||||
@ -15,7 +14,6 @@ export declare class SptDialogueChatBot implements IDialogueChatBot {
|
||||
protected giftService: GiftService;
|
||||
protected configServer: ConfigServer;
|
||||
protected coreConfig: ICoreConfig;
|
||||
protected weatherConfig: IWeatherConfig;
|
||||
constructor(profileHelper: ProfileHelper, randomUtil: RandomUtil, mailSendService: MailSendService, giftService: GiftService, configServer: ConfigServer);
|
||||
getChatBot(): IUserDialogInfo;
|
||||
/**
|
||||
|
60
types/helpers/HideoutHelper.d.ts
vendored
60
types/helpers/HideoutHelper.d.ts
vendored
@ -10,7 +10,6 @@ import { IHideoutProduction } from "@spt-aki/models/eft/hideout/IHideoutProducti
|
||||
import { IHideoutSingleProductionStartRequestData } from "@spt-aki/models/eft/hideout/IHideoutSingleProductionStartRequestData";
|
||||
import { IHideoutTakeProductionRequestData } from "@spt-aki/models/eft/hideout/IHideoutTakeProductionRequestData";
|
||||
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 { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||
@ -20,7 +19,6 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
import { PlayerService } from "@spt-aki/services/PlayerService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||
export declare class HideoutHelper {
|
||||
protected logger: ILogger;
|
||||
@ -35,7 +33,6 @@ export declare class HideoutHelper {
|
||||
protected localisationService: LocalisationService;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected configServer: ConfigServer;
|
||||
protected jsonUtil: JsonUtil;
|
||||
static bitcoinFarm: string;
|
||||
static bitcoinProductionId: string;
|
||||
static waterCollector: string;
|
||||
@ -43,7 +40,7 @@ export declare class HideoutHelper {
|
||||
static expeditionaryFuelTank: string;
|
||||
static maxSkillPoint: number;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
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);
|
||||
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);
|
||||
/**
|
||||
* Add production to profiles' Hideout.Production array
|
||||
* @param pmcData Profile to add production to
|
||||
@ -85,16 +82,6 @@ export declare class HideoutHelper {
|
||||
waterCollectorHasFilter: 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
|
||||
* @param pmcData profile to update
|
||||
@ -106,6 +93,16 @@ export declare class HideoutHelper {
|
||||
isGeneratorOn: boolean;
|
||||
waterCollectorHasFilter: boolean;
|
||||
}): 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
|
||||
* @param pmcData Player profile
|
||||
@ -150,19 +147,7 @@ export declare class HideoutHelper {
|
||||
* @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;
|
||||
protected updateWaterCollector(sessionId: string, pmcData: IPmcData, area: HideoutArea, isGeneratorOn: boolean): void;
|
||||
/**
|
||||
* Adjust water filter objects resourceValue or delete when they reach 0 resource
|
||||
* @param waterFilterArea water filter area to update
|
||||
@ -178,9 +163,9 @@ export declare class HideoutHelper {
|
||||
* @param totalProductionTime Total time collecting water
|
||||
* @param productionProgress how far water collector has progressed
|
||||
* @param baseFilterDrainRate Base drain rate
|
||||
* @returns drain rate (adjusted)
|
||||
* @returns
|
||||
*/
|
||||
protected getTimeAdjustedWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||
protected adjustWaterFilterDrainRate(secondsSinceServerTick: number, totalProductionTime: number, productionProgress: number, baseFilterDrainRate: number): number;
|
||||
/**
|
||||
* Get the water filter drain rate based on hideout bonues player has
|
||||
* @param pmcData Player profile
|
||||
@ -200,7 +185,7 @@ export declare class HideoutHelper {
|
||||
* @param resourceUnitsConsumed
|
||||
* @returns Upd
|
||||
*/
|
||||
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number, isFoundInRaid: boolean): Upd;
|
||||
protected getAreaUpdObject(stackCount: number, resourceValue: number, resourceUnitsConsumed: number): Upd;
|
||||
protected updateAirFilters(airFilterArea: HideoutArea, pmcData: IPmcData, isGeneratorOn: boolean): void;
|
||||
protected updateBitcoinFarm(pmcData: IPmcData, btcFarmCGs: number, isGeneratorOn: boolean): Production;
|
||||
/**
|
||||
@ -235,21 +220,12 @@ export declare class HideoutHelper {
|
||||
*/
|
||||
protected getHideoutManagementConsumptionBonus(pmcData: IPmcData): number;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Adjust craft time based on crafting skill level found in player profile
|
||||
* @param pmcData Player profile
|
||||
* @param productionTime Time to complete hideout craft in seconds
|
||||
* @param skill Skill bonus to get reduction from
|
||||
* @param amountPerLevel Skill bonus amount to apply
|
||||
* @returns Seconds to reduce craft time by
|
||||
* @returns Adjusted craft time in seconds
|
||||
*/
|
||||
getSkillProductionTimeReduction(pmcData: IPmcData, productionTime: number, skill: SkillTypes, amountPerLevel: number): number;
|
||||
protected getCraftingSkillProductionTimeReduction(pmcData: IPmcData, productionTime: number): number;
|
||||
isProduction(productive: Productive): productive is Production;
|
||||
/**
|
||||
* Gather crafted BTC from hideout area and add to inventory
|
||||
|
18
types/helpers/InRaidHelper.d.ts
vendored
18
types/helpers/InRaidHelper.d.ts
vendored
@ -3,7 +3,7 @@ import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||
import { PaymentHelper } from "@spt-aki/helpers/PaymentHelper";
|
||||
import { QuestHelper } from "@spt-aki/helpers/QuestHelper";
|
||||
import { IPmcData, IPostRaidPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||
import { IQuestStatus, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { IQuestStatus, TraderInfo, Victim } from "@spt-aki/models/eft/common/tables/IBotBase";
|
||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||
import { ISaveProgressRequestData } from "@spt-aki/models/eft/inRaid/ISaveProgressRequestData";
|
||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||
@ -47,6 +47,19 @@ export declare class InRaidHelper {
|
||||
* @param items Items array to check
|
||||
*/
|
||||
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 points earned during session property
|
||||
@ -124,8 +137,9 @@ export declare class InRaidHelper {
|
||||
* @param sessionID Session id
|
||||
* @param serverProfile Profile to update
|
||||
* @param postRaidProfile Profile returned by client after a raid
|
||||
* @returns Updated profile
|
||||
*/
|
||||
setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData): void;
|
||||
setInventory(sessionID: string, serverProfile: IPmcData, postRaidProfile: IPmcData): IPmcData;
|
||||
/**
|
||||
* Clear PMC inventory of all items except those that are exempt
|
||||
* Used post-raid to remove items after death
|
||||
|
110
types/helpers/InventoryHelper.d.ts
vendored
110
types/helpers/InventoryHelper.d.ts
vendored
@ -16,7 +16,6 @@ import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInven
|
||||
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
||||
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
||||
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 { IInventoryConfig, RewardDetails } from "@spt-aki/models/spt/config/IInventoryConfig";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
@ -74,41 +73,14 @@ export declare class InventoryHelper {
|
||||
* @param itemWithChildren An item
|
||||
* @param foundInRaid Item was found in raid
|
||||
*/
|
||||
protected setFindInRaidStatusForItem(itemWithChildren: Item[], foundInRaid: boolean): void;
|
||||
private setFindInRaidStatusForItem;
|
||||
/**
|
||||
* Remove properties from a Upd object used by a trader/ragfair that are unnecessary to a player
|
||||
* Remove properties from a Upd object used by a trader/ragfair
|
||||
* @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;
|
||||
canPlaceItemInInventory(stashFS2D: number[][], itemWithChildren: Item[]): boolean;
|
||||
/**
|
||||
* Find a location to place an item into inventory and place it
|
||||
* @param stashFS2D 2-dimensional representation of the container slots
|
||||
@ -120,10 +92,9 @@ export declare class InventoryHelper {
|
||||
*/
|
||||
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 requestItem Details of purchased item to add to inventory
|
||||
* @param result Array split stacks are appended to
|
||||
* @param result Array split stacks are added to
|
||||
*/
|
||||
protected splitStackIntoSmallerChildStacks(assortItems: Item[], requestItem: AddItem, result: IAddItemTempObject[]): void;
|
||||
/**
|
||||
@ -133,51 +104,16 @@ export declare class InventoryHelper {
|
||||
* @param profile Profile to remove item from (pmc or scav)
|
||||
* @param itemId Items id to remove
|
||||
* @param sessionID Session id
|
||||
* @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
|
||||
* @param output Existing IItemEventRouterResponse object to append data to, creates new one by default if not supplied
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
removeItemByCount(pmcData: IPmcData, itemId: string, countToRemove: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get the height and width of an item - can have children that alter size
|
||||
* @param itemTpl Item to get size of
|
||||
* @param itemID Items id to get size of
|
||||
* @param inventoryItems
|
||||
* @returns [width, height]
|
||||
*/
|
||||
removeItem(profile: IPmcData, itemId: string, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
removeItemAndChildrenFromMailRewards(sessionId: string, removeRequest: IInventoryRemoveRequestData, output: IItemEventRouterResponse): void;
|
||||
removeItemByCount(pmcData: IPmcData, itemId: string, count: number, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
getItemSize(itemTpl: string, itemID: string, inventoryItems: Item[]): 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;
|
||||
getContainerMap(containerW: number, containerH: number, itemList: Item[], containerId: string): number[][];
|
||||
/**
|
||||
* Return the inventory that needs to be modified (scav/pmc etc)
|
||||
* Changes made to result apply to character inventory
|
||||
@ -186,31 +122,19 @@ export declare class InventoryHelper {
|
||||
* @param sessionId Session id / playerid
|
||||
* @returns OwnerInventoryItems with inventory of player/scav to adjust
|
||||
*/
|
||||
getOwnerInventoryItems(request: IInventoryMoveRequestData | IInventorySplitRequestData | IInventoryMergeRequestData | IInventoryTransferRequestData, sessionId: string): IOwnerInventoryItems;
|
||||
getOwnerInventoryItems(request: IInventoryMoveRequestData | IInventorySplitRequestData | IInventoryMergeRequestData, sessionId: string): IOwnerInventoryItems;
|
||||
/**
|
||||
* Get a two dimensional array to represent stash slots
|
||||
* 0 value = free, 1 = taken
|
||||
* @param pmcData Player profile
|
||||
* @param sessionID session id
|
||||
* @returns 2-dimensional array
|
||||
* Made a 2d array table with 0 - free slot and 1 - used slot
|
||||
* @param {Object} pmcData
|
||||
* @param {string} sessionID
|
||||
* @returns Array
|
||||
*/
|
||||
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[][];
|
||||
/**
|
||||
* Get Players Stash Size
|
||||
* @param sessionID Players id
|
||||
* @returns Array of 2 values, horizontal and vertical stash size
|
||||
* Get Player Stash Proper Size
|
||||
* @param sessionID Playerid
|
||||
* @returns Array of 2 values, x and y stash size
|
||||
*/
|
||||
protected getPlayerStashSize(sessionID: string): Record<number, number>;
|
||||
/**
|
||||
|
29
types/helpers/ItemHelper.d.ts
vendored
29
types/helpers/ItemHelper.d.ts
vendored
@ -59,28 +59,12 @@ export declare class ItemHelper {
|
||||
* @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
|
||||
@ -231,12 +215,6 @@ export declare class ItemHelper {
|
||||
* @returns 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
|
||||
* @param {string} tpl Items tpl to check parents of
|
||||
@ -448,13 +426,6 @@ export declare class ItemHelper {
|
||||
* @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 {
|
||||
interface ItemSize {
|
||||
|
6
types/helpers/PresetHelper.d.ts
vendored
6
types/helpers/PresetHelper.d.ts
vendored
@ -38,10 +38,4 @@ export declare class PresetHelper {
|
||||
*/
|
||||
getDefaultPreset(templateId: string): IPreset;
|
||||
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;
|
||||
}
|
||||
|
73
types/helpers/ProfileHelper.d.ts
vendored
73
types/helpers/ProfileHelper.d.ts
vendored
@ -4,21 +4,17 @@ import { Common, CounterKeyValue, Stats } from "@spt-aki/models/eft/common/table
|
||||
import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
import { IValidateNicknameRequestData } from "@spt-aki/models/eft/profile/IValidateNicknameRequestData";
|
||||
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 { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService";
|
||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||
import { Watermark } from "@spt-aki/utils/Watermark";
|
||||
export declare class ProfileHelper {
|
||||
protected logger: ILogger;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected hashUtil: HashUtil;
|
||||
protected watermark: Watermark;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected saveServer: SaveServer;
|
||||
@ -26,9 +22,7 @@ export declare class ProfileHelper {
|
||||
protected itemHelper: ItemHelper;
|
||||
protected profileSnapshotService: ProfileSnapshotService;
|
||||
protected 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);
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService);
|
||||
/**
|
||||
* Remove/reset a completed quest condtion from players profile quest data
|
||||
* @param sessionID Session id
|
||||
@ -40,11 +34,6 @@ export declare class ProfileHelper {
|
||||
* @returns Dictionary of profiles
|
||||
*/
|
||||
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[];
|
||||
/**
|
||||
* Fix xp doubling on post-raid xp reward screen by sending a 'dummy' profile to the post-raid screen
|
||||
@ -56,70 +45,37 @@ export declare class ProfileHelper {
|
||||
* @param output pmc and scav profiles array
|
||||
* @param pmcProfile post-raid pmc 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[];
|
||||
/**
|
||||
* Check if a nickname is used by another profile loaded by the server
|
||||
* @param nicknameRequest nickname request object
|
||||
* @param nicknameRequest
|
||||
* @param sessionID Session id
|
||||
* @returns True if already used
|
||||
*/
|
||||
isNicknameTaken(nicknameRequest: IValidateNicknameRequestData, sessionID: string): boolean;
|
||||
protected profileHasInfoProperty(profile: IAkiProfile): boolean;
|
||||
protected stringsMatch(stringA: string, stringB: string): boolean;
|
||||
protected nicknameMatches(profileName: string, nicknameRequest: string): boolean;
|
||||
protected sessionIdMatchesProfileId(profileId: string, sessionId: string): boolean;
|
||||
/**
|
||||
* Add experience to a PMC inside the players profile
|
||||
* @param sessionID Session id
|
||||
* @param experienceToAdd Experience to add to PMC character
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Get the max level a player can be
|
||||
* @returns Max level
|
||||
*/
|
||||
getMaxLevel(): number;
|
||||
getDefaultAkiDataObject(): any;
|
||||
/**
|
||||
* Get full representation of a players profile json
|
||||
* @param sessionID Profile id to get
|
||||
* @returns IAkiProfile object
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* Get a full profiles scav-specific sub-profile
|
||||
* @param sessionID Profiles id
|
||||
* @returns IPmcData object
|
||||
*/
|
||||
getScavProfile(sessionID: string): IPmcData;
|
||||
/**
|
||||
* Get baseline counter values for a fresh profile
|
||||
* @returns Default profile Stats object
|
||||
* @returns 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 getServerVersion(): string;
|
||||
/**
|
||||
@ -164,23 +120,6 @@ export declare class ProfileHelper {
|
||||
* @returns
|
||||
*/
|
||||
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;
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
9
types/helpers/QuestHelper.d.ts
vendored
9
types/helpers/QuestHelper.d.ts
vendored
@ -128,12 +128,6 @@ export declare class QuestHelper {
|
||||
* @returns Quests accessible to player incuding newly unlocked quests now quest (startedQuestId) was started
|
||||
*/
|
||||
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
|
||||
* @param failedQuestId Id of the quest failed by player
|
||||
@ -184,8 +178,9 @@ export declare class QuestHelper {
|
||||
* @param failRequest Fail quest request data
|
||||
* @param sessionID Session id
|
||||
* @param output Client output
|
||||
* @returns Item event router response
|
||||
*/
|
||||
failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string, output?: IItemEventRouterResponse): void;
|
||||
failQuest(pmcData: IPmcData, failRequest: IFailQuestRequestData, sessionID: string, output?: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get List of All Quests from db
|
||||
* NOT CLONED
|
||||
|
7
types/helpers/RagfairOfferHelper.d.ts
vendored
7
types/helpers/RagfairOfferHelper.d.ts
vendored
@ -157,13 +157,6 @@ export declare class RagfairOfferHelper {
|
||||
* @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
|
||||
* @param searchRequest Search request
|
||||
|
6
types/helpers/RagfairServerHelper.d.ts
vendored
6
types/helpers/RagfairServerHelper.d.ts
vendored
@ -53,12 +53,6 @@ export declare class RagfairServerHelper {
|
||||
* @returns True if its blacklsited
|
||||
*/
|
||||
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
|
||||
* @param traderId
|
||||
|
7
types/helpers/TradeHelper.d.ts
vendored
7
types/helpers/TradeHelper.d.ts
vendored
@ -56,6 +56,13 @@ export declare class TradeHelper {
|
||||
* @param output 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)
|
||||
* @param sessionId Session id
|
||||
|
10
types/helpers/TraderHelper.d.ts
vendored
10
types/helpers/TraderHelper.d.ts
vendored
@ -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
|
||||
* Does NOT take into account different profile levels
|
||||
* @param sessionID session id of player
|
||||
* @param sessionID session id
|
||||
* @param traderID trader id to reset
|
||||
*/
|
||||
resetTrader(sessionID: string, traderID: string): void;
|
||||
@ -74,13 +74,13 @@ export declare class TraderHelper {
|
||||
* Alter a traders unlocked status
|
||||
* @param traderId Trader to alter
|
||||
* @param status New status to use
|
||||
* @param sessionId Session id of player
|
||||
* @param sessionId Session id
|
||||
*/
|
||||
setTraderUnlockedState(traderId: string, status: boolean, sessionId: string): void;
|
||||
/**
|
||||
* Add standing to a trader and level them up if exp goes over level threshold
|
||||
* @param sessionId Session id of player
|
||||
* @param traderId Traders id to add standing to
|
||||
* @param sessionId Session id
|
||||
* @param traderId Traders id
|
||||
* @param standingToAdd Standing value to add to trader
|
||||
*/
|
||||
addStandingToTrader(sessionId: string, traderId: string, standingToAdd: number): void;
|
||||
@ -121,7 +121,7 @@ export declare class TraderHelper {
|
||||
count: number;
|
||||
}[];
|
||||
traderId: string;
|
||||
}, itemPurchased: Item): void;
|
||||
}): void;
|
||||
/**
|
||||
* Get the highest rouble price for an item from traders
|
||||
* UNUSED
|
||||
|
2
types/ide/BleedingEdgeModsEntry.d.ts
vendored
2
types/ide/BleedingEdgeModsEntry.d.ts
vendored
@ -1,2 +0,0 @@
|
||||
import "reflect-metadata";
|
||||
import "source-map-support/register";
|
26
types/loaders/BundleLoader.d.ts
vendored
26
types/loaders/BundleLoader.d.ts
vendored
@ -1,33 +1,33 @@
|
||||
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
||||
import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { VFS } from "@spt-aki/utils/VFS";
|
||||
export declare class BundleInfo {
|
||||
modpath: string;
|
||||
filename: string;
|
||||
crc: number;
|
||||
dependencies: string[];
|
||||
constructor(modpath: string, bundle: BundleManifestEntry, bundleHash: number);
|
||||
declare class BundleInfo {
|
||||
modPath: string;
|
||||
key: string;
|
||||
path: string;
|
||||
filepath: string;
|
||||
dependencyKeys: string[];
|
||||
constructor(modpath: string, bundle: any, bundlePath: string, bundleFilepath: string);
|
||||
}
|
||||
export declare class BundleLoader {
|
||||
protected httpServerHelper: HttpServerHelper;
|
||||
protected vfs: VFS;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected bundleHashCacheService: BundleHashCacheService;
|
||||
protected bundles: Record<string, BundleInfo>;
|
||||
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService);
|
||||
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil);
|
||||
/**
|
||||
* Handle singleplayer/bundles
|
||||
*/
|
||||
getBundles(): BundleInfo[];
|
||||
getBundle(key: string): BundleInfo;
|
||||
getBundles(local: boolean): BundleInfo[];
|
||||
getBundle(key: string, local: boolean): BundleInfo;
|
||||
addBundles(modpath: string): void;
|
||||
addBundle(key: string, b: BundleInfo): void;
|
||||
}
|
||||
export interface BundleManifest {
|
||||
manifest: BundleManifestEntry[];
|
||||
manifest: Array<BundleManifestEntry>;
|
||||
}
|
||||
export interface BundleManifestEntry {
|
||||
key: string;
|
||||
dependencyKeys: string[];
|
||||
path: string;
|
||||
}
|
||||
export {};
|
||||
|
10
types/loaders/PostAkiModLoader.d.ts
vendored
10
types/loaders/PostAkiModLoader.d.ts
vendored
@ -1,17 +1,21 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { BundleLoader } from "@spt-aki/loaders/BundleLoader";
|
||||
import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck";
|
||||
import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader";
|
||||
import { IModLoader } from "@spt-aki/models/spt/mod/IModLoader";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
import { VFS } from "@spt-aki/utils/VFS";
|
||||
export declare class PostAkiModLoader implements IModLoader {
|
||||
protected logger: ILogger;
|
||||
protected bundleLoader: BundleLoader;
|
||||
protected vfs: VFS;
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
protected localisationService: LocalisationService;
|
||||
protected modTypeCheck: ModTypeCheck;
|
||||
protected container: DependencyContainer;
|
||||
constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck);
|
||||
constructor(logger: ILogger, bundleLoader: BundleLoader, vfs: VFS, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck);
|
||||
getModPath(mod: string): string;
|
||||
load(): Promise<void>;
|
||||
protected executeModsAsync(): Promise<void>;
|
||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||
protected addBundles(): void;
|
||||
}
|
||||
|
8
types/loaders/PostDBModLoader.d.ts
vendored
8
types/loaders/PostDBModLoader.d.ts
vendored
@ -1,21 +1,17 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||
import { BundleLoader } from "@spt-aki/loaders/BundleLoader";
|
||||
import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck";
|
||||
import { PreAkiModLoader } from "@spt-aki/loaders/PreAkiModLoader";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
export declare class PostDBModLoader implements OnLoad {
|
||||
protected logger: ILogger;
|
||||
protected bundleLoader: BundleLoader;
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
protected localisationService: LocalisationService;
|
||||
protected modTypeCheck: ModTypeCheck;
|
||||
protected container: DependencyContainer;
|
||||
constructor(logger: ILogger, bundleLoader: BundleLoader, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck);
|
||||
constructor(logger: ILogger, preAkiModLoader: PreAkiModLoader, localisationService: LocalisationService, modTypeCheck: ModTypeCheck);
|
||||
onLoad(): Promise<void>;
|
||||
getRoute(): string;
|
||||
getModPath(mod: string): string;
|
||||
protected executeModsAsync(): Promise<void>;
|
||||
protected addBundles(): void;
|
||||
protected executeMods(container: DependencyContainer): Promise<void>;
|
||||
}
|
||||
|
9
types/loaders/PreAkiModLoader.d.ts
vendored
9
types/loaders/PreAkiModLoader.d.ts
vendored
@ -1,4 +1,5 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { BundleLoader } from "@spt-aki/loaders/BundleLoader";
|
||||
import { ModLoadOrder } from "@spt-aki/loaders/ModLoadOrder";
|
||||
import { ModTypeCheck } from "@spt-aki/loaders/ModTypeCheck";
|
||||
import { ModDetails } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||
@ -16,11 +17,12 @@ export declare class PreAkiModLoader implements IModLoader {
|
||||
protected vfs: VFS;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected modCompilerService: ModCompilerService;
|
||||
protected bundleLoader: BundleLoader;
|
||||
protected localisationService: LocalisationService;
|
||||
protected configServer: ConfigServer;
|
||||
protected modLoadOrder: ModLoadOrder;
|
||||
protected modTypeCheck: ModTypeCheck;
|
||||
protected container: DependencyContainer;
|
||||
protected static container: DependencyContainer;
|
||||
protected readonly basepath = "user/mods/";
|
||||
protected readonly modOrderPath = "user/mods/order.json";
|
||||
protected order: Record<string, number>;
|
||||
@ -28,7 +30,7 @@ export declare class PreAkiModLoader implements IModLoader {
|
||||
protected akiConfig: ICoreConfig;
|
||||
protected serverDependencies: Record<string, string>;
|
||||
protected skippedMods: Set<string>;
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
||||
constructor(logger: ILogger, vfs: VFS, jsonUtil: JsonUtil, modCompilerService: ModCompilerService, bundleLoader: BundleLoader, localisationService: LocalisationService, configServer: ConfigServer, modLoadOrder: ModLoadOrder, modTypeCheck: ModTypeCheck);
|
||||
load(container: DependencyContainer): Promise<void>;
|
||||
/**
|
||||
* Returns a list of mods with preserved load order
|
||||
@ -66,9 +68,10 @@ export declare class PreAkiModLoader implements IModLoader {
|
||||
protected isModCombatibleWithAki(mod: IPackageJsonData): boolean;
|
||||
/**
|
||||
* Execute each mod found in this.imported
|
||||
* @param container Dependence container to give to mod when it runs
|
||||
* @returns void promise
|
||||
*/
|
||||
protected executeModsAsync(): Promise<void>;
|
||||
protected executeModsAsync(container: DependencyContainer): Promise<void>;
|
||||
/**
|
||||
* Read loadorder.json (create if doesnt exist) and return sorted list of mods
|
||||
* @returns string array of sorted mod names
|
||||
|
2
types/models/eft/common/IGlobals.d.ts
vendored
2
types/models/eft/common/IGlobals.d.ts
vendored
@ -40,7 +40,6 @@ export interface IConfig {
|
||||
BaseLoadTime: number;
|
||||
BaseUnloadTime: number;
|
||||
BaseCheckTime: number;
|
||||
BluntDamageReduceFromSoftArmorMod: number;
|
||||
Customization: ICustomization;
|
||||
UncheckOnShot: boolean;
|
||||
BotsEnabled: boolean;
|
||||
@ -683,7 +682,6 @@ export interface IBodyPartsSetting {
|
||||
Minimum: number;
|
||||
Maximum: number;
|
||||
Default: number;
|
||||
EnvironmentDamageMultiplier: number;
|
||||
OverDamageReceivedMultiplier: number;
|
||||
}
|
||||
export interface IHealthFactorsSettings {
|
||||
|
3
types/models/eft/common/ILocation.d.ts
vendored
3
types/models/eft/common/ILocation.d.ts
vendored
@ -1,10 +1,9 @@
|
||||
import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase";
|
||||
import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase";
|
||||
import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot";
|
||||
export interface ILocation {
|
||||
base: ILocationBase;
|
||||
looseLoot: ILooseLoot;
|
||||
statics: IStaticContainer;
|
||||
allExtracts: Exit[];
|
||||
}
|
||||
export interface IStaticContainer {
|
||||
containersGroups: Record<string, IContainerMinMax>;
|
||||
|
1
types/models/eft/common/ILocationBase.d.ts
vendored
1
types/models/eft/common/ILocationBase.d.ts
vendored
@ -205,7 +205,6 @@ export interface Exit {
|
||||
PassageRequirement: string;
|
||||
PlayersCount: number;
|
||||
RequirementTip: string;
|
||||
Side?: string;
|
||||
}
|
||||
export interface MaxItemCountInLocation {
|
||||
TemplateId: string;
|
||||
|
4
types/models/eft/common/tables/IBotBase.d.ts
vendored
4
types/models/eft/common/tables/IBotBase.d.ts
vendored
@ -54,7 +54,6 @@ export interface Info {
|
||||
LowerNickname: string;
|
||||
Side: string;
|
||||
SquadInviteRestriction: boolean;
|
||||
HasCoopExtension: boolean;
|
||||
Voice: string;
|
||||
Level: number;
|
||||
Experience: number;
|
||||
@ -182,7 +181,6 @@ export interface IEftStats {
|
||||
LastPlayerState?: LastPlayerState;
|
||||
TotalInGameTime: number;
|
||||
SurvivorClass?: string;
|
||||
sptLastRaidFenceRepChange?: number;
|
||||
}
|
||||
export interface IDroppedItem {
|
||||
QuestId: string;
|
||||
@ -316,8 +314,6 @@ export interface Productive {
|
||||
sptIsComplete?: boolean;
|
||||
/** Is the craft a Continuous, e.g bitcoins/water collector */
|
||||
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 {
|
||||
RecipeId: string;
|
||||
|
12
types/models/eft/common/tables/IBotType.d.ts
vendored
12
types/models/eft/common/tables/IBotType.d.ts
vendored
@ -120,7 +120,7 @@ export interface GenerationData {
|
||||
/** key: number of items, value: weighting */
|
||||
weights: Record<string, number>;
|
||||
/** Array of item tpls */
|
||||
whitelist: Record<string, number>;
|
||||
whitelist: string[];
|
||||
}
|
||||
export interface Health {
|
||||
BodyParts: BodyPart[];
|
||||
@ -160,10 +160,10 @@ export interface Equipment {
|
||||
TacticalVest: Record<string, number>;
|
||||
}
|
||||
export interface Items {
|
||||
Backpack: Record<string, number>;
|
||||
Pockets: Record<string, number>;
|
||||
SecuredContainer: Record<string, number>;
|
||||
SpecialLoot: Record<string, number>;
|
||||
TacticalVest: Record<string, number>;
|
||||
Backpack: string[];
|
||||
Pockets: string[];
|
||||
SecuredContainer: string[];
|
||||
SpecialLoot: string[];
|
||||
TacticalVest: string[];
|
||||
}
|
||||
export type Mods = Record<string, Record<string, string[]>>;
|
||||
|
4
types/models/eft/common/tables/IItem.d.ts
vendored
4
types/models/eft/common/tables/IItem.d.ts
vendored
@ -33,7 +33,6 @@ export interface Upd {
|
||||
Foldable?: Foldable;
|
||||
SideEffect?: SideEffect;
|
||||
RepairKit?: RepairKit;
|
||||
CultistAmulet?: ICultistAmulet;
|
||||
}
|
||||
export interface Buff {
|
||||
rarity: string;
|
||||
@ -120,6 +119,3 @@ export interface SideEffect {
|
||||
export interface RepairKit {
|
||||
Resource: number;
|
||||
}
|
||||
export interface ICultistAmulet {
|
||||
NumberOfUsages: number;
|
||||
}
|
||||
|
@ -175,7 +175,6 @@ export interface Props {
|
||||
armorClass?: string | number;
|
||||
armorColliders?: string[];
|
||||
armorPlateColliders?: string[];
|
||||
bluntDamageReduceFromSoftArmor?: boolean;
|
||||
mousePenalty?: number;
|
||||
weaponErgonomicPenalty?: number;
|
||||
BluntThroughput?: number;
|
||||
|
@ -2,7 +2,6 @@ export interface IHideoutSingleProductionStartRequestData {
|
||||
Action: "HideoutSingleProductionStart";
|
||||
recipeId: string;
|
||||
items: Item[];
|
||||
tools: Item[];
|
||||
timestamp: number;
|
||||
}
|
||||
export interface Item {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { IItemEventRouterBase } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase";
|
||||
/** An object sent back to the game client that contains alterations the client must make to ensure server/client are in sync */
|
||||
export interface IItemEventRouterResponse extends IItemEventRouterBase {
|
||||
}
|
||||
|
@ -1,2 +0,0 @@
|
||||
export interface IDeclineGroupInviteRequest {
|
||||
}
|
@ -9,8 +9,6 @@ export interface IGetRaidConfigurationRequestData {
|
||||
timeAndWeatherSettings: TimeAndWeatherSettings;
|
||||
botSettings: BotSettings;
|
||||
wavesSettings: WavesSettings;
|
||||
CanShowGroupPreview: boolean;
|
||||
MaxGroupCount: number;
|
||||
}
|
||||
export interface TimeAndWeatherSettings {
|
||||
isRandomTime: boolean;
|
||||
|
4
types/models/enums/BackendErrorCodes.d.ts
vendored
4
types/models/enums/BackendErrorCodes.d.ts
vendored
@ -62,7 +62,6 @@ export declare enum BackendErrorCodes {
|
||||
BANNEDERRORCODE = 1513,
|
||||
INSUFFICIENTNUMBERINSTOCK = 1516,
|
||||
TOOMANYITEMSTOSELL = 1517,
|
||||
INCORRECTCLIENTPRICE = 1519,
|
||||
EXAMINATIONFAILED = 22001,
|
||||
ITEMALREADYEXAMINED = 22002,
|
||||
UNKNOWNNGINXERROR = 9000,
|
||||
@ -82,6 +81,5 @@ export declare enum BackendErrorCodes {
|
||||
PLAYERISNOTSEARCHINGFORGROUP = 502018,
|
||||
PLAYERALREADYLOOKINGFORGAME = 503001,
|
||||
PLAYERINRAID = 503002,
|
||||
LIMITFORPRESETSREACHED = 504001,
|
||||
PLAYERPROFILENOTFOUND = 505001
|
||||
LIMITFORPRESETSREACHED = 504001
|
||||
}
|
||||
|
10
types/models/enums/BaseClasses.d.ts
vendored
10
types/models/enums/BaseClasses.d.ts
vendored
@ -95,7 +95,7 @@ export declare enum BaseClasses {
|
||||
PORTABLE_RANGE_FINDER = "61605ddea09d851a0a0c1bbc",
|
||||
ITEM = "54009119af1c881c07000029",
|
||||
CYLINDER_MAGAZINE = "610720f290b75a49ff2e5e25",
|
||||
AUXILIARY_MOD = "5a74651486f7744e73386dd1",
|
||||
AUXILARY_MOD = "5a74651486f7744e73386dd1",
|
||||
BIPOD = "55818afb4bdc2dde698b456d",
|
||||
HEADPHONES = "5645bcb74bdc2ded0b8b4578",
|
||||
RANDOM_LOOT_CONTAINER = "62f109593b54472778797866",
|
||||
@ -103,11 +103,5 @@ export declare enum BaseClasses {
|
||||
BUILT_IN_INSERTS = "65649eb40bf0ed77b8044453",
|
||||
ARMOR_PLATE = "644120aa86ffbe10ee032b6f",
|
||||
CULTIST_AMULET = "64b69b0c8f3be32ed22682f8",
|
||||
RADIO_TRANSMITTER = "62e9103049c018f425059f38",
|
||||
HANDGUARD = "55818a104bdc2db9688b4569",
|
||||
PISTOL_GRIP = "55818a684bdc2ddd698b456d",
|
||||
RECEIVER = "55818a304bdc2db5418b457d",
|
||||
BARREL = "555ef6e44bdc2de9068b457e",
|
||||
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
||||
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 "
|
||||
RADIO_TRANSMITTER = "62e9103049c018f425059f38"
|
||||
}
|
||||
|
3
types/models/enums/BonusType.d.ts
vendored
3
types/models/enums/BonusType.d.ts
vendored
@ -28,6 +28,5 @@ export declare enum BonusType {
|
||||
STASH_SIZE = "StashSize",
|
||||
MAXIMUM_ENERGY_RESERVE = "MaximumEnergyReserve",
|
||||
TEXT_BONUS = "TextBonus",
|
||||
SKILL_GROUP_LEVELING_BOOST = "SkillGroupLevelingBoost",
|
||||
STASH_ROWS = "StashRows"
|
||||
SKILL_GROUP_LEVELING_BOOST = "SkillGroupLevelingBoost"
|
||||
}
|
||||
|
10
types/models/enums/WildSpawnTypeNumber.d.ts
vendored
10
types/models/enums/WildSpawnTypeNumber.d.ts
vendored
@ -39,12 +39,6 @@ export declare enum WildSpawnTypeNumber {
|
||||
PEACEFULLZRYACHIYEVENT = 38,
|
||||
SECTACTPRIESTEVENT = 39,
|
||||
RAVANGEZRYACHIYEVENT = 40,
|
||||
FOLLOWERBOARCLOSE1 = 41,
|
||||
FOLLOWERBOARCLOSE2 = 42,
|
||||
BOSSKOLONTAY = 43,
|
||||
FOLLOWERKOLONTAYASSAULT = 44,
|
||||
FOLLOWERKOLONTAYSECURITY = 45,
|
||||
SHOOTERBTR = 46,
|
||||
SPTUSEC = 47,
|
||||
SPTBEAR = 48
|
||||
SPTUSEC = 41,
|
||||
SPTBEAR = 42
|
||||
}
|
||||
|
21
types/models/spt/bots/IBotLootCache.d.ts
vendored
21
types/models/spt/bots/IBotLootCache.d.ts
vendored
@ -1,14 +1,15 @@
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
export interface IBotLootCache {
|
||||
backpackLoot: Record<string, number>;
|
||||
pocketLoot: Record<string, number>;
|
||||
vestLoot: Record<string, number>;
|
||||
secureLoot: Record<string, number>;
|
||||
combinedPoolLoot: Record<string, number>;
|
||||
specialItems: Record<string, number>;
|
||||
healingItems: Record<string, number>;
|
||||
drugItems: Record<string, number>;
|
||||
stimItems: Record<string, number>;
|
||||
grenadeItems: Record<string, number>;
|
||||
backpackLoot: ITemplateItem[];
|
||||
pocketLoot: ITemplateItem[];
|
||||
vestLoot: ITemplateItem[];
|
||||
secureLoot: ITemplateItem[];
|
||||
combinedPoolLoot: ITemplateItem[];
|
||||
specialItems: ITemplateItem[];
|
||||
healingItems: ITemplateItem[];
|
||||
drugItems: ITemplateItem[];
|
||||
stimItems: ITemplateItem[];
|
||||
grenadeItems: ITemplateItem[];
|
||||
}
|
||||
export declare enum LootCacheType {
|
||||
SPECIAL = "Special",
|
||||
|
@ -1,4 +0,0 @@
|
||||
export interface IItemSpawnLimitSettings {
|
||||
currentLimits: Record<string, number>;
|
||||
globalLimits: Record<string, number>;
|
||||
}
|
4
types/models/spt/config/IBaseConfig.d.ts
vendored
4
types/models/spt/config/IBaseConfig.d.ts
vendored
@ -1,7 +1,3 @@
|
||||
export interface IBaseConfig {
|
||||
kind: string;
|
||||
}
|
||||
export interface IRunIntervalValues {
|
||||
inRaid: number;
|
||||
outOfRaid: number;
|
||||
}
|
||||
|
17
types/models/spt/config/IBotConfig.d.ts
vendored
17
types/models/spt/config/IBotConfig.d.ts
vendored
@ -14,6 +14,8 @@ export interface IBotConfig extends IBaseConfig {
|
||||
durability: IBotDurability;
|
||||
/** Controls the percentage values of randomization item resources */
|
||||
lootItemResourceRandomization: Record<string, IRandomisedResourceDetails>;
|
||||
/** Control the weighting of how expensive an average loot item is on a PMC or Scav */
|
||||
lootNValue: LootNvalue;
|
||||
/** Control what bots are added to a bots revenge list key: bottype, value: bottypes to revenge on seeing their death */
|
||||
revenge: Record<string, string[]>;
|
||||
/** Control how many items are allowed to spawn on a bot
|
||||
@ -35,10 +37,6 @@ export interface IBotConfig extends IBaseConfig {
|
||||
secureContainerAmmoStackCount: number;
|
||||
/** Bot roles in this array will be given a dog tag on generation */
|
||||
botRolesWithDogTags: string[];
|
||||
/** Settings to control the items that get added into wallets on bots */
|
||||
walletLoot: IWalletLootSettings;
|
||||
/** Currency weights, Keyed by botrole / currency */
|
||||
currencyStackSize: Record<string, Record<string, Record<string, number>>>;
|
||||
}
|
||||
/** Number of bots to generate and store in cache on raid start per bot type */
|
||||
export interface PresetBatch {
|
||||
@ -79,14 +77,9 @@ export interface PresetBatch {
|
||||
sptUsec: number;
|
||||
sptBear: number;
|
||||
}
|
||||
export interface IWalletLootSettings {
|
||||
/** Chance wallets have loot in them */
|
||||
chancePercent: number;
|
||||
itemCount: MinMax;
|
||||
stackSizeWeight: Record<string, number>;
|
||||
currencyWeight: Record<string, number>;
|
||||
/** What wallets will have money in them */
|
||||
walletTplPool: string[];
|
||||
export interface LootNvalue {
|
||||
scav: number;
|
||||
pmc: number;
|
||||
}
|
||||
export interface EquipmentFilters {
|
||||
/** Limits for mod types per weapon .e.g. scopes */
|
||||
|
33
types/models/spt/config/ICoreConfig.d.ts
vendored
33
types/models/spt/config/ICoreConfig.d.ts
vendored
@ -7,8 +7,6 @@ export interface ICoreConfig extends IBaseConfig {
|
||||
serverName: string;
|
||||
profileSaveIntervalSeconds: number;
|
||||
sptFriendNickname: string;
|
||||
bsgLogging: IBsgLogging;
|
||||
release: IRelease;
|
||||
fixes: IGameFixes;
|
||||
features: IServerFeatures;
|
||||
/** Commit hash build server was created from */
|
||||
@ -16,37 +14,6 @@ export interface ICoreConfig extends IBaseConfig {
|
||||
/** Timestamp of server build */
|
||||
buildTime?: string;
|
||||
}
|
||||
export interface IBsgLogging {
|
||||
/**
|
||||
* verbosity of what to log, yes I know this is backwards, but its how nlog deals with ordinals.
|
||||
* complain to them about it! In all cases, better exceptions will be logged.
|
||||
* WARNING: trace-info logging will quickly create log files in the megabytes.
|
||||
* 0 - trace
|
||||
* 1 - debug
|
||||
* 2 - info
|
||||
* 3 - warn
|
||||
* 4 - error
|
||||
* 5 - fatal
|
||||
* 6 - off
|
||||
*/
|
||||
verbosity: number;
|
||||
sendToServer: boolean;
|
||||
}
|
||||
export interface IRelease {
|
||||
betaDisclaimerText?: string;
|
||||
betaDisclaimerAcceptText: string;
|
||||
serverModsLoadedText: string;
|
||||
serverModsLoadedDebugText: string;
|
||||
clientModsLoadedText: string;
|
||||
clientModsLoadedDebugText: string;
|
||||
illegalPluginsLoadedText: string;
|
||||
illegalPluginsExceptionText: string;
|
||||
releaseSummaryText?: string;
|
||||
isBeta?: boolean;
|
||||
isModdable?: boolean;
|
||||
isModded: boolean;
|
||||
betaDisclaimerTimeoutDelay: number;
|
||||
}
|
||||
export interface IGameFixes {
|
||||
/** Shotguns use a different value than normal guns causing huge pellet dispersion */
|
||||
fixShotgunDispersion: boolean;
|
||||
|
5
types/models/spt/config/IHideoutConfig.d.ts
vendored
5
types/models/spt/config/IHideoutConfig.d.ts
vendored
@ -1,10 +1,7 @@
|
||||
import { IBaseConfig, IRunIntervalValues } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
export interface IHideoutConfig extends IBaseConfig {
|
||||
kind: "aki-hideout";
|
||||
/** How many seconds should pass before hideout crafts / fuel usage is checked and procesed */
|
||||
runIntervalSeconds: number;
|
||||
/** Default values used to hydrate `runIntervalSeconds` with */
|
||||
runIntervalValues: IRunIntervalValues;
|
||||
hoursForSkillCrafting: number;
|
||||
expCraftAmount: number;
|
||||
}
|
||||
|
2
types/models/spt/config/IInRaidConfig.d.ts
vendored
2
types/models/spt/config/IInRaidConfig.d.ts
vendored
@ -20,8 +20,6 @@ export interface IInRaidConfig extends IBaseConfig {
|
||||
pmcKillProbabilityForScavGain: number;
|
||||
/** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */
|
||||
keepFiRSecureContainerOnDeath: boolean;
|
||||
/** Percentage chance a player scav hot is hostile to the player when scavving */
|
||||
playerScavHostileChancePercent: number;
|
||||
}
|
||||
export interface RaidMenuSettings {
|
||||
aiAmount: string;
|
||||
|
@ -8,8 +8,6 @@ export interface IInventoryConfig extends IBaseConfig {
|
||||
sealedAirdropContainer: ISealedAirdropContainerSettings;
|
||||
/** Contains item tpls that the server should consider money and treat the same as roubles/euros/dollars */
|
||||
customMoneyTpls: string[];
|
||||
/** Multipliers for skill gain when inside menus, NOT in-game */
|
||||
skillGainMultiplers: Record<string, number>;
|
||||
}
|
||||
export interface RewardDetails {
|
||||
rewardCount: number;
|
||||
|
2
types/models/spt/config/IItemConfig.d.ts
vendored
2
types/models/spt/config/IItemConfig.d.ts
vendored
@ -3,8 +3,6 @@ export interface IItemConfig extends IBaseConfig {
|
||||
kind: "aki-item";
|
||||
/** Items that should be globally blacklisted */
|
||||
blacklist: string[];
|
||||
/** items that should not be given as rewards */
|
||||
rewardItemBlacklist: string[];
|
||||
/** Items that can only be found on bosses */
|
||||
bossItems: string[];
|
||||
handbookPriceOverride: Record<string, number>;
|
||||
|
2
types/models/spt/config/ILocationConfig.d.ts
vendored
2
types/models/spt/config/ILocationConfig.d.ts
vendored
@ -42,8 +42,6 @@ export interface ILocationConfig extends IBaseConfig {
|
||||
scavRaidTimeSettings: IScavRaidTimeSettings;
|
||||
/** Settings to adjust mods for lootable equipment in raid */
|
||||
equipmentLootSettings: IEquipmentLootSettings;
|
||||
/** Sets the max Patrol Value of the Boxzone on the map Ground Zero*/
|
||||
sandboxMaxPatrolvalue: number;
|
||||
}
|
||||
export interface IEquipmentLootSettings {
|
||||
modSpawnChancePercent: Record<string, number>;
|
||||
|
@ -16,7 +16,6 @@ export interface Equipment {
|
||||
ArmorVest: boolean;
|
||||
Eyewear: boolean;
|
||||
TacticalVest: boolean;
|
||||
PocketItems: boolean;
|
||||
Backpack: boolean;
|
||||
Holster: boolean;
|
||||
FirstPrimaryWeapon: boolean;
|
||||
|
@ -9,7 +9,7 @@ export interface KarmaLevel {
|
||||
modifiers: Modifiers;
|
||||
itemLimits: ItemLimits;
|
||||
equipmentBlacklist: Record<string, string[]>;
|
||||
lootItemsToAddChancePercent: Record<string, number>;
|
||||
labsAccessCardChancePercent: number;
|
||||
}
|
||||
export interface Modifiers {
|
||||
equipment: Record<string, number>;
|
||||
|
5
types/models/spt/config/IPmcConfig.d.ts
vendored
5
types/models/spt/config/IPmcConfig.d.ts
vendored
@ -13,6 +13,7 @@ export interface IPmcConfig extends IBaseConfig {
|
||||
pocketLoot: SlotLootSettings;
|
||||
/** Global whitelist/blacklist of backpack loot for PMCs */
|
||||
backpackLoot: SlotLootSettings;
|
||||
dynamicLoot: DynamicLoot;
|
||||
/** Use difficulty defined in config/bot.json/difficulty instead of chosen difficulty dropdown value */
|
||||
useDifficultyOverride: boolean;
|
||||
/** Difficulty override e.g. "AsOnline/Hard" */
|
||||
@ -54,4 +55,8 @@ export interface PmcTypes {
|
||||
export interface SlotLootSettings {
|
||||
whitelist: string[];
|
||||
blacklist: string[];
|
||||
moneyStackLimits: Record<string, number>;
|
||||
}
|
||||
export interface DynamicLoot {
|
||||
moneyStackLimits: Record<string, number>;
|
||||
}
|
||||
|
27
types/models/spt/config/IRagfairConfig.d.ts
vendored
27
types/models/spt/config/IRagfairConfig.d.ts
vendored
@ -1,11 +1,9 @@
|
||||
import { MinMax } from "@spt-aki/models/common/MinMax";
|
||||
import { IBaseConfig, IRunIntervalValues } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
export interface IRagfairConfig extends IBaseConfig {
|
||||
kind: "aki-ragfair";
|
||||
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */
|
||||
runIntervalSeconds: number;
|
||||
/** Default values used to hydrate `runIntervalSeconds` with */
|
||||
runIntervalValues: IRunIntervalValues;
|
||||
/** Player listing settings */
|
||||
sell: Sell;
|
||||
/** Trader ids + should their assorts be listed on flea*/
|
||||
@ -18,7 +16,9 @@ export interface Sell {
|
||||
/** Settings to control chances of offer being sold */
|
||||
chance: Chance;
|
||||
/** Settings to control how long it takes for a player offer to sell */
|
||||
time: MinMax;
|
||||
time: Time;
|
||||
/** Player offer reputation gain/loss settings */
|
||||
reputation: Reputation;
|
||||
/**Seconds from clicking remove to remove offer from market */
|
||||
expireSeconds: number;
|
||||
}
|
||||
@ -32,6 +32,13 @@ export interface Chance {
|
||||
/** Min possible sell chance % for a player listed offer */
|
||||
minSellChancePercent: number;
|
||||
}
|
||||
export interface Time extends MinMax {
|
||||
base: number;
|
||||
}
|
||||
export interface Reputation {
|
||||
gain: number;
|
||||
loss: number;
|
||||
}
|
||||
export interface Dynamic {
|
||||
purchasesAreFoundInRaid: boolean;
|
||||
/** Use the highest trader price for an offer if its greater than the price in templates/prices.json */
|
||||
@ -58,8 +65,6 @@ export interface Dynamic {
|
||||
nonStackableCount: MinMax;
|
||||
/** Range of rating offers for items being listed */
|
||||
rating: MinMax;
|
||||
/** Armor specific flea settings */
|
||||
armor: IArmorSettings;
|
||||
/** A multipler to apply to individual tpls price just prior to item quality adjustment */
|
||||
itemPriceMultiplier: Record<string, number>;
|
||||
/** Percentages to sell offers in each currency */
|
||||
@ -131,10 +136,6 @@ export interface Blacklist {
|
||||
traderItems: boolean;
|
||||
/** Maximum level an armor plate can be found in a flea-listed armor item */
|
||||
armorPlate: IArmorPlateBlacklistSettings;
|
||||
/** Should specific categories be blacklisted from the flea, true = use blacklist */
|
||||
enableCustomItemCategoryList: boolean;
|
||||
/** Custom category blacklist for parent Ids */
|
||||
customItemCategoryList: string[];
|
||||
}
|
||||
export interface IArmorPlateBlacklistSettings {
|
||||
/** Max level of plates an armor can have without being removed */
|
||||
@ -150,9 +151,3 @@ export interface IUnreasonableModPrices {
|
||||
/** The new multiplier for items found using above property, e.g. a value of 4 means set items price to 4x handbook price */
|
||||
newPriceHandbookMultiplier: number;
|
||||
}
|
||||
export interface IArmorSettings {
|
||||
/** % chance / 100 that armor plates will be removed from an offer before listing */
|
||||
removeRemovablePlateChance: number;
|
||||
/** What slots are to be removed when removeRemovablePlateChance is true */
|
||||
plateSlotIdToRemovePool: string[];
|
||||
}
|
||||
|
17
types/models/spt/config/ITraderConfig.d.ts
vendored
17
types/models/spt/config/ITraderConfig.d.ts
vendored
@ -5,16 +5,15 @@ export interface ITraderConfig extends IBaseConfig {
|
||||
kind: "aki-trader";
|
||||
updateTime: UpdateTime[];
|
||||
purchasesAreFoundInRaid: boolean;
|
||||
/** Should trader reset times be set based on server start time (false = bsg time - on the hour) */
|
||||
tradersResetFromServerStart: boolean;
|
||||
updateTimeDefault: number;
|
||||
traderPriceMultipler: number;
|
||||
/** Keep track of purchased trader-limited items beyond server restarts to prevent server-restart item scumming */
|
||||
persistPurchaseDataInProfile: boolean;
|
||||
fence: FenceConfig;
|
||||
}
|
||||
export interface UpdateTime {
|
||||
traderId: string;
|
||||
/** Seconds between trader resets */
|
||||
seconds: MinMax;
|
||||
seconds: number;
|
||||
}
|
||||
export interface FenceConfig {
|
||||
discountOptions: DiscountOptions;
|
||||
@ -25,14 +24,12 @@ export interface FenceConfig {
|
||||
equipmentPresetMinMax: MinMax;
|
||||
itemPriceMult: number;
|
||||
presetPriceMult: number;
|
||||
armorMaxDurabilityPercentMinMax: IItemDurabilityCurrentMax;
|
||||
weaponDurabilityPercentMinMax: IItemDurabilityCurrentMax;
|
||||
armorMaxDurabilityPercentMinMax: MinMax;
|
||||
presetMaxDurabilityPercentMinMax: MinMax;
|
||||
chancePlateExistsInArmorPercent: number;
|
||||
/** Key: item tpl */
|
||||
itemStackSizeOverrideMinMax: Record<string, MinMax>;
|
||||
itemTypeLimits: Record<string, number>;
|
||||
/** Prevent duplicate offers of items of specific categories by parentId*/
|
||||
preventDuplicateOffersOfCategory: string[];
|
||||
regenerateAssortsOnRefresh: boolean;
|
||||
/** Max rouble price before item is not listed on flea */
|
||||
itemCategoryRoublePriceLimit: Record<string, number>;
|
||||
@ -44,10 +41,6 @@ export interface FenceConfig {
|
||||
coopExtractGift: CoopExtractReward;
|
||||
btrDeliveryExpireHours: number;
|
||||
}
|
||||
export interface IItemDurabilityCurrentMax {
|
||||
current: MinMax;
|
||||
max: MinMax;
|
||||
}
|
||||
export interface CoopExtractReward extends LootRequest {
|
||||
sendGift: boolean;
|
||||
messageLocaleIds: string[];
|
||||
|
@ -3,3 +3,8 @@ import { Chances, Generation, Inventory } from "@spt-aki/models/eft/common/table
|
||||
export interface IBotGenerator {
|
||||
generateInventory(templateInventory: Inventory, equipmentChances: Chances, generation: Generation, botRole: string, isPmc: boolean): PmcInventory;
|
||||
}
|
||||
export interface IExhaustableArray<T> {
|
||||
getRandomValue(): T;
|
||||
getFirstValue(): T;
|
||||
hasValues(): boolean;
|
||||
}
|
||||
|
2
types/models/spt/logging/LogTextColor.d.ts
vendored
2
types/models/spt/logging/LogTextColor.d.ts
vendored
@ -7,5 +7,5 @@ export declare enum LogTextColor {
|
||||
MAGENTA = "magenta",
|
||||
CYAN = "cyan",
|
||||
WHITE = "white",
|
||||
GRAY = "gray"
|
||||
GRAY = ""
|
||||
}
|
||||
|
17
types/models/spt/server/ExhaustableArray.d.ts
vendored
17
types/models/spt/server/ExhaustableArray.d.ts
vendored
@ -1,17 +0,0 @@
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||
export declare class ExhaustableArray<T> implements IExhaustableArray<T> {
|
||||
private itemPool;
|
||||
private randomUtil;
|
||||
private jsonUtil;
|
||||
private pool;
|
||||
constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil);
|
||||
getRandomValue(): T;
|
||||
getFirstValue(): T;
|
||||
hasValues(): boolean;
|
||||
}
|
||||
export interface IExhaustableArray<T> {
|
||||
getRandomValue(): T;
|
||||
getFirstValue(): T;
|
||||
hasValues(): boolean;
|
||||
}
|
41
types/models/spt/server/ILocations.d.ts
vendored
41
types/models/spt/server/ILocations.d.ts
vendored
@ -1,23 +1,28 @@
|
||||
import { ILocation } from "@spt-aki/models/eft/common/ILocation";
|
||||
import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase";
|
||||
import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot";
|
||||
import { ILocationsBase } from "@spt-aki/models/eft/common/tables/ILocationsBase";
|
||||
export interface ILocations {
|
||||
bigmap?: ILocation;
|
||||
develop?: ILocation;
|
||||
factory4_day?: ILocation;
|
||||
factory4_night?: ILocation;
|
||||
hideout?: ILocation;
|
||||
interchange?: ILocation;
|
||||
laboratory?: ILocation;
|
||||
lighthouse?: ILocation;
|
||||
privatearea?: ILocation;
|
||||
rezervbase?: ILocation;
|
||||
shoreline?: ILocation;
|
||||
suburbs?: ILocation;
|
||||
tarkovstreets?: ILocation;
|
||||
terminal?: ILocation;
|
||||
town?: ILocation;
|
||||
woods?: ILocation;
|
||||
sandbox?: ILocation;
|
||||
bigmap?: ILocationData;
|
||||
develop?: ILocationData;
|
||||
factory4_day?: ILocationData;
|
||||
factory4_night?: ILocationData;
|
||||
hideout?: ILocationData;
|
||||
interchange?: ILocationData;
|
||||
laboratory?: ILocationData;
|
||||
lighthouse?: ILocationData;
|
||||
privatearea?: ILocationData;
|
||||
rezervbase?: ILocationData;
|
||||
shoreline?: ILocationData;
|
||||
suburbs?: ILocationData;
|
||||
tarkovstreets?: ILocationData;
|
||||
terminal?: ILocationData;
|
||||
town?: ILocationData;
|
||||
woods?: ILocationData;
|
||||
sandbox?: ILocationData;
|
||||
/** Holds a mapping of the linkages between locations on the UI */
|
||||
base?: ILocationsBase;
|
||||
}
|
||||
export interface ILocationData {
|
||||
base: ILocationBase;
|
||||
looseLoot?: ILooseLoot;
|
||||
}
|
||||
|
@ -1,18 +1,6 @@
|
||||
import { TraderServiceType } from "@spt-aki/models/enums/TraderServiceType";
|
||||
export interface ITraderServiceModel {
|
||||
serviceType: TraderServiceType;
|
||||
itemsToPay?: {
|
||||
[key: string]: number;
|
||||
};
|
||||
itemsToReceive?: string[];
|
||||
subServices?: {
|
||||
[key: string]: number;
|
||||
};
|
||||
requirements?: ITraderServiceRequirementsModel;
|
||||
}
|
||||
export interface ITraderServiceRequirementsModel {
|
||||
completedQuests?: string[];
|
||||
standings?: {
|
||||
[key: string]: number;
|
||||
};
|
||||
itemsToPay?: Record<string, number>[];
|
||||
subServices?: Record<string, number>[];
|
||||
}
|
||||
|
4
types/routers/ItemEventRouter.d.ts
vendored
4
types/routers/ItemEventRouter.d.ts
vendored
@ -5,15 +5,13 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder";
|
||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||
export declare class ItemEventRouter {
|
||||
protected logger: ILogger;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected itemEventRouters: ItemEventRouterDefinition[];
|
||||
protected localisationService: LocalisationService;
|
||||
protected eventOutputHolder: EventOutputHolder;
|
||||
constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder);
|
||||
constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder);
|
||||
/**
|
||||
* @param info Event request
|
||||
* @param sessionID Session id
|
||||
|
@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition {
|
||||
protected hideoutCallbacks: HideoutCallbacks;
|
||||
constructor(hideoutCallbacks: HideoutCallbacks);
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition
|
||||
protected hideoutCallbacks: HideoutCallbacks;
|
||||
constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks);
|
||||
getHandledRoutes(): HandledRoute[];
|
||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse;
|
||||
}
|
||||
|
4
types/servers/HttpServer.d.ts
vendored
4
types/servers/HttpServer.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import http, { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { ApplicationContext } from "@spt-aki/context/ApplicationContext";
|
||||
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
||||
import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
||||
@ -25,5 +25,5 @@ export declare class HttpServer {
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
protected getCookies(req: IncomingMessage): Record<string, string>;
|
||||
protected getCookies(req: http.IncomingMessage): Record<string, string>;
|
||||
}
|
||||
|
3
types/servers/SaveServer.d.ts
vendored
3
types/servers/SaveServer.d.ts
vendored
@ -75,9 +75,8 @@ export declare class SaveServer {
|
||||
* Save changes from in-memory profile to user/profiles json
|
||||
* Execute onBeforeSaveCallbacks callbacks prior to being saved to json
|
||||
* @param sessionID profile id (user/profiles/id.json)
|
||||
* @returns time taken to save in MS
|
||||
*/
|
||||
saveProfile(sessionID: string): number;
|
||||
saveProfile(sessionID: string): void;
|
||||
/**
|
||||
* Remove a physical profile json from user/profiles
|
||||
* @param sessionID Profile id to remove
|
||||
|
13
types/services/BotGenerationCacheService.d.ts
vendored
13
types/services/BotGenerationCacheService.d.ts
vendored
@ -11,7 +11,6 @@ export declare class BotGenerationCacheService {
|
||||
protected localisationService: LocalisationService;
|
||||
protected botHelper: BotHelper;
|
||||
protected storedBots: Map<string, IBotBase[]>;
|
||||
protected activeBotsInRaid: IBotBase[];
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper);
|
||||
/**
|
||||
* Store array of bots in cache, shuffle results before storage
|
||||
@ -25,18 +24,6 @@ export declare class BotGenerationCacheService {
|
||||
* @returns IBotBase object
|
||||
*/
|
||||
getBot(key: string): IBotBase;
|
||||
/**
|
||||
* Cache a bot that has been sent to the client in memory for later use post-raid to determine if player killed a traitor scav
|
||||
* @param botToStore Bot object to store
|
||||
*/
|
||||
storeUsedBot(botToStore: IBotBase): void;
|
||||
/**
|
||||
* Get a bot by its profileId that has been generated and sent to client for current raid
|
||||
* Cache is wiped post-raid in client/match/offline/end endOfflineRaid()
|
||||
* @param profileId Id of bot to get
|
||||
* @returns IBotBase
|
||||
*/
|
||||
getUsedBot(profileId: string): IBotBase;
|
||||
/**
|
||||
* Remove all cached bot profiles from memory
|
||||
*/
|
||||
|
12
types/services/BotLootCacheService.d.ts
vendored
12
types/services/BotLootCacheService.d.ts
vendored
@ -30,7 +30,7 @@ export declare class BotLootCacheService {
|
||||
* @param botJsonTemplate Base json db file for the bot having its loot generated
|
||||
* @returns ITemplateItem array
|
||||
*/
|
||||
getLootFromCache(botRole: string, isPmc: boolean, lootType: LootCacheType, botJsonTemplate: IBotType): Record<string, number>;
|
||||
getLootFromCache(botRole: string, isPmc: boolean, lootType: LootCacheType, botJsonTemplate: IBotType): ITemplateItem[];
|
||||
/**
|
||||
* Generate loot for a bot and store inside a private class property
|
||||
* @param botRole bots role (assault / pmcBot etc)
|
||||
@ -38,13 +38,17 @@ export declare class BotLootCacheService {
|
||||
* @param botJsonTemplate db template for bot having its loot generated
|
||||
*/
|
||||
protected addLootToCache(botRole: string, isPmc: boolean, botJsonTemplate: IBotType): void;
|
||||
/**
|
||||
* Sort a pool of item objects by its flea price
|
||||
* @param poolToSort pool of items to sort
|
||||
*/
|
||||
protected sortPoolByRagfairPrice(poolToSort: ITemplateItem[]): void;
|
||||
/**
|
||||
* Add unique items into combined pool
|
||||
* @param poolToAddTo Pool of items to add to
|
||||
* @param combinedItemPool Pool of items to add to
|
||||
* @param itemsToAdd items to add to combined pool if unique
|
||||
*/
|
||||
protected addUniqueItemsToPool(poolToAddTo: ITemplateItem[], itemsToAdd: ITemplateItem[]): void;
|
||||
protected addItemsToPool(poolToAddTo: Record<string, number>, poolOfItemsToAdd: Record<string, number>): void;
|
||||
protected addUniqueItemsToPool(combinedItemPool: ITemplateItem[], itemsToAdd: ITemplateItem[]): void;
|
||||
/**
|
||||
* Ammo/grenades have this property
|
||||
* @param props
|
||||
|
47
types/services/FenceService.d.ts
vendored
47
types/services/FenceService.d.ts
vendored
@ -1,12 +1,13 @@
|
||||
import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper";
|
||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||
import { MinMax } from "@spt-aki/models/common/MinMax";
|
||||
import { IFenceLevel } from "@spt-aki/models/eft/common/IGlobals";
|
||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||
import { Item, Repairable } from "@spt-aki/models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||
import { IBarterScheme, ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader";
|
||||
import { IItemDurabilityCurrentMax, ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||
import { ITraderAssort } from "@spt-aki/models/eft/common/tables/ITrader";
|
||||
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||
import { IFenceAssortGenerationValues, IGenerationAssortValues } from "@spt-aki/models/spt/fence/IFenceAssortGenerationValues";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
@ -63,7 +64,7 @@ export declare class FenceService {
|
||||
* @param itemMultipler multipler to use on items
|
||||
* @param presetMultiplier preset multipler to use on presets
|
||||
*/
|
||||
protected adjustAssortItemPricesByConfigMultiplier(assort: ITraderAssort, itemMultipler: number, presetMultiplier: number): void;
|
||||
protected adjustAssortItemPrices(assort: ITraderAssort, itemMultipler: number, presetMultiplier: number): void;
|
||||
/**
|
||||
* Merge two trader assort files together
|
||||
* @param firstAssort assort 1#
|
||||
@ -152,44 +153,14 @@ export declare class FenceService {
|
||||
* Add item assorts to existing assort data
|
||||
* @param assortCount Number to add
|
||||
* @param assorts Assorts data to add to
|
||||
* @param baseFenceAssortClone Base data to draw from
|
||||
* @param itemTypeLimits
|
||||
* @param baseFenceAssort Base data to draw from
|
||||
* @param itemTypeCounts
|
||||
* @param loyaltyLevel Loyalty level to set new item to
|
||||
*/
|
||||
protected addItemAssorts(assortCount: number, assorts: ITraderAssort, baseFenceAssortClone: ITraderAssort, itemTypeLimits: Record<string, {
|
||||
protected addItemAssorts(assortCount: number, assorts: ITraderAssort, baseFenceAssort: ITraderAssort, itemTypeCounts: Record<string, {
|
||||
current: number;
|
||||
max: number;
|
||||
}>, loyaltyLevel: number): void;
|
||||
/**
|
||||
* Find an assort item that matches the first parameter, also matches based on upd properties
|
||||
* e.g. salewa hp resource units left
|
||||
* @param rootItemBeingAdded item to look for a match against
|
||||
* @param itemDbDetails Db details of matching item
|
||||
* @param fenceItemAssorts Items to search through
|
||||
* @returns Matching assort item
|
||||
*/
|
||||
protected getMatchingItem(rootItemBeingAdded: Item, itemDbDetails: ITemplateItem, fenceItemAssorts: Item[]): Item;
|
||||
/**
|
||||
* Should this item be forced into only 1 stack on fence
|
||||
* @param existingItem Existing item from fence assort
|
||||
* @param itemDbDetails Item we want to add db details
|
||||
* @returns True item should be force stacked
|
||||
*/
|
||||
protected itemShouldBeForceStacked(existingItem: Item, itemDbDetails: ITemplateItem): boolean;
|
||||
/**
|
||||
* Adjust price of item based on what is left to buy (resource/uses left)
|
||||
* @param barterSchemes All barter scheme for item having price adjusted
|
||||
* @param itemRoot Root item having price adjusted
|
||||
* @param itemTemplate Db template of item
|
||||
*/
|
||||
protected adjustItemPriceByQuality(barterSchemes: Record<string, IBarterScheme[][]>, itemRoot: Item, itemTemplate: ITemplateItem): void;
|
||||
protected getMatchingItemLimit(itemTypeLimits: Record<string, {
|
||||
current: number;
|
||||
max: number;
|
||||
}>, itemTpl: string): {
|
||||
current: number;
|
||||
max: number;
|
||||
};
|
||||
/**
|
||||
* Find presets in base fence assort and add desired number to 'assorts' parameter
|
||||
* @param desiredWeaponPresetsCount
|
||||
@ -231,10 +202,10 @@ export declare class FenceService {
|
||||
/**
|
||||
* Generate a randomised current and max durabiltiy value for an armor item
|
||||
* @param itemDetails Item to create values for
|
||||
* @param equipmentDurabilityLimits Max durabiltiy percent min/max values
|
||||
* @param maxDurabilityMinMaxPercent Max durabiltiy percent min/max values
|
||||
* @returns Durability + MaxDurability values
|
||||
*/
|
||||
protected getRandomisedArmorDurabilityValues(itemDetails: ITemplateItem, equipmentDurabilityLimits: IItemDurabilityCurrentMax): Repairable;
|
||||
protected getRandomisedArmorDurabilityValues(itemDetails: ITemplateItem, maxDurabilityMinMaxPercent: MinMax): Repairable;
|
||||
/**
|
||||
* Construct item limit record to hold max and current item count
|
||||
* @param limits limits as defined in config
|
||||
|
6
types/services/InsuranceService.d.ts
vendored
6
types/services/InsuranceService.d.ts
vendored
@ -70,6 +70,12 @@ export declare class InsuranceService {
|
||||
* @param mapId Id of the map player died/exited that caused the insurance to be issued on
|
||||
*/
|
||||
sendInsuredItems(pmcData: IPmcData, sessionID: string, mapId: string): void;
|
||||
/**
|
||||
* Send a message to player informing them gear was completely lost
|
||||
* @param sessionId Session id
|
||||
* @param locationName name of map insurance was lost on
|
||||
*/
|
||||
sendLostInsuranceMessage(sessionId: string, locationName?: string): void;
|
||||
/**
|
||||
* Check all root insured items and remove location property + set slotId to 'hideout'
|
||||
* @param sessionId Session id
|
||||
|
11
types/services/ItemFilterService.d.ts
vendored
11
types/services/ItemFilterService.d.ts
vendored
@ -15,17 +15,6 @@ export declare class ItemFilterService {
|
||||
* @returns true if blacklisted
|
||||
*/
|
||||
isItemBlacklisted(tpl: string): boolean;
|
||||
/**
|
||||
* Check if item is blacklisted from being a reward for player
|
||||
* @param tpl item tpl to check is on blacklist
|
||||
* @returns True when blacklisted
|
||||
*/
|
||||
isItemRewardBlacklisted(tpl: string): boolean;
|
||||
/**
|
||||
* Get an array of items that should never be given as a reward to player
|
||||
* @returns string array of item tpls
|
||||
*/
|
||||
getItemRewardBlacklist(): string[];
|
||||
/**
|
||||
* Return every template id blacklisted in config/item.json
|
||||
* @returns string array of blacklisted tempalte ids
|
||||
|
2
types/services/MatchLocationService.d.ts
vendored
2
types/services/MatchLocationService.d.ts
vendored
@ -1,3 +1,4 @@
|
||||
import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData";
|
||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||
export declare class MatchLocationService {
|
||||
@ -5,5 +6,6 @@ export declare class MatchLocationService {
|
||||
protected saveServer: SaveServer;
|
||||
protected locations: {};
|
||||
constructor(timeUtil: TimeUtil, saveServer: SaveServer);
|
||||
createGroup(sessionID: string, info: ICreateGroupRequestData): any;
|
||||
deleteGroup(info: any): void;
|
||||
}
|
||||
|
6
types/services/ModCompilerService.d.ts
vendored
6
types/services/ModCompilerService.d.ts
vendored
@ -1,13 +1,13 @@
|
||||
import ts from "typescript";
|
||||
import type { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { ModHashCacheService } from "@spt-aki/services/cache/ModHashCacheService";
|
||||
import { HashCacheService } from "@spt-aki/services/HashCacheService";
|
||||
import { VFS } from "@spt-aki/utils/VFS";
|
||||
export declare class ModCompilerService {
|
||||
protected logger: ILogger;
|
||||
protected modHashCacheService: ModHashCacheService;
|
||||
protected hashCacheService: HashCacheService;
|
||||
protected vfs: VFS;
|
||||
protected serverDependencies: string[];
|
||||
constructor(logger: ILogger, modHashCacheService: ModHashCacheService, vfs: VFS);
|
||||
constructor(logger: ILogger, hashCacheService: HashCacheService, vfs: VFS);
|
||||
/**
|
||||
* Convert a mods TS into JS
|
||||
* @param modName Name of mod
|
||||
|
10
types/services/PaymentService.d.ts
vendored
10
types/services/PaymentService.d.ts
vendored
@ -27,12 +27,12 @@ export declare class PaymentService {
|
||||
constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, traderHelper: TraderHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, localisationService: LocalisationService, paymentHelper: PaymentHelper);
|
||||
/**
|
||||
* Take money and insert items into return to server request
|
||||
* @param pmcData Pmc profile
|
||||
* @param request Buy item request
|
||||
* @param sessionID Session id
|
||||
* @param output Client response
|
||||
* @param {IPmcData} pmcData Player profile
|
||||
* @param {IProcessBuyTradeRequestData} request
|
||||
* @param {string} sessionID
|
||||
* @returns IItemEventRouterResponse
|
||||
*/
|
||||
payMoney(pmcData: IPmcData, request: IProcessBuyTradeRequestData, sessionID: string, output: IItemEventRouterResponse): void;
|
||||
payMoney(pmcData: IPmcData, request: IProcessBuyTradeRequestData, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse;
|
||||
/**
|
||||
* Get the item price of a specific traders assort
|
||||
* @param traderAssortId Id of assort to look up
|
||||
|
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