Update types for 3.8.2 #26
@ -1,4 +1,4 @@
|
|||||||
# Mod examples for v3.8.1
|
# Mod examples for v3.8.3
|
||||||
|
|
||||||
A collection of example mods that perform typical actions in SPT
|
A collection of example mods that perform typical actions in SPT
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { DialogueController } from "@spt-aki/controllers/DialogueController";
|
import { DialogueController } from "@spt-aki/controllers/DialogueController";
|
||||||
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData";
|
import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData";
|
||||||
import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer";
|
import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer";
|
||||||
import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest";
|
import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest";
|
||||||
@ -92,13 +93,9 @@ export declare class DialogueCallbacks implements OnUpdate {
|
|||||||
/** Handle client/friend/delete */
|
/** Handle client/friend/delete */
|
||||||
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
||||||
/** Handle client/friend/ignore/set */
|
/** Handle client/friend/ignore/set */
|
||||||
ignoreFriend(url: string, request: {
|
ignoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
uid: string;
|
|
||||||
}, sessionID: string): INullResponseData;
|
|
||||||
/** Handle client/friend/ignore/remove */
|
/** Handle client/friend/ignore/remove */
|
||||||
unIgnoreFriend(url: string, request: {
|
unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
uid: string;
|
|
||||||
}, sessionID: string): INullResponseData;
|
|
||||||
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { GameController } from "@spt-aki/controllers/GameController";
|
import { GameController } from "@spt-aki/controllers/GameController";
|
||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
|
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
|
||||||
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
|
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
|
||||||
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
|
||||||
@ -10,7 +11,6 @@ import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutRes
|
|||||||
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
|
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
|
||||||
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
|
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
|
||||||
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
||||||
import { IReportNicknameRequestData } from "@spt-aki/models/eft/game/IReportNicknameRequestData";
|
|
||||||
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
||||||
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
|
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
@ -69,7 +69,7 @@ export declare class GameCallbacks implements OnLoad {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
reportNickname(url: string, info: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/getRaidTime
|
* Handle singleplayer/settings/getRaidTime
|
||||||
* @returns string
|
* @returns string
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { NotifierController } from "@spt-aki/controllers/NotifierController";
|
import { NotifierController } from "@spt-aki/controllers/NotifierController";
|
||||||
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
|
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
@ -29,6 +29,6 @@ export declare class NotifierCallbacks {
|
|||||||
* Handle client/game/profile/select
|
* Handle client/game/profile/select
|
||||||
* @returns ISelectProfileResponse
|
* @returns ISelectProfileResponse
|
||||||
*/
|
*/
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper";
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData";
|
import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
@ -20,6 +21,7 @@ import { MailSendService } from "@spt-aki/services/MailSendService";
|
|||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -27,6 +29,7 @@ export declare class InsuranceController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
@ -35,6 +38,7 @@ export declare class InsuranceController {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -43,7 +47,7 @@ export declare class InsuranceController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
protected roubleTpl: string;
|
protected roubleTpl: string;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||||
*
|
*
|
||||||
@ -146,35 +150,15 @@ export declare class InsuranceController {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||||
|
protected logAttachmentsBeingRemoved(attachmentIdsToRemove: string[], attachments: Item[], attachmentPrices: Record<string, number>): void;
|
||||||
|
protected weightAttachmentsByPrice(attachments: Item[]): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Sorts the attachment items by their dynamic price in descending order.
|
* Get count of items to remove from weapon (take into account trader + price of attachment)
|
||||||
*
|
* @param weightedAttachmentByPrice Dict of item Tpls and thier rouble price
|
||||||
* @param attachments The array of attachments items.
|
* @param traderId Trader attachment insured against
|
||||||
* @returns An array of items enriched with their max price and common locale-name.
|
* @returns Attachment count to remove
|
||||||
*/
|
*/
|
||||||
protected sortAttachmentsByPrice(attachments: Item[]): EnrichedItem[];
|
protected getAttachmentCountToRemove(weightedAttachmentByPrice: Record<string, number>, traderId: string): number;
|
||||||
/**
|
|
||||||
* Logs the details of each attachment item.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
*/
|
|
||||||
protected logAttachmentsDetails(attachments: EnrichedItem[]): void;
|
|
||||||
/**
|
|
||||||
* Counts the number of successful rolls for the attachment items.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
* @param traderId The ID of the trader that has insured these attachments.
|
|
||||||
* @returns The number of successful rolls.
|
|
||||||
*/
|
|
||||||
protected countSuccessfulRolls(attachments: Item[], traderId: string): number;
|
|
||||||
/**
|
|
||||||
* Marks the most valuable attachments for deletion based on the number of successful rolls made.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
* @param successfulRolls The number of successful rolls.
|
|
||||||
* @param toDelete The array that accumulates the IDs of the items to be deleted.
|
|
||||||
*/
|
|
||||||
protected attachmentDeletionByValue(attachments: EnrichedItem[], successfulRolls: number, toDelete: Set<string>): void;
|
|
||||||
/**
|
/**
|
||||||
* Remove items from the insured items that should not be returned to the player.
|
* Remove items from the insured items that should not be returned to the player.
|
||||||
*
|
*
|
||||||
@ -192,7 +176,7 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
protected sendMail(sessionID: string, insurance: Insurance): void;
|
protected sendMail(sessionID: string, insurance: Insurance): void;
|
||||||
/**
|
/**
|
||||||
* Determines whether a insured item should be removed from the player's inventory based on a random roll and
|
* Determines whether an insured item should be removed from the player's inventory based on a random roll and
|
||||||
* trader-specific return chance.
|
* trader-specific return chance.
|
||||||
*
|
*
|
||||||
* @param traderId The ID of the trader who insured the item.
|
* @param traderId The ID of the trader who insured the item.
|
||||||
@ -220,8 +204,3 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
}
|
}
|
||||||
interface EnrichedItem extends Item {
|
|
||||||
name: string;
|
|
||||||
dynamicPrice: number;
|
|
||||||
}
|
|
||||||
export {};
|
|
||||||
|
@ -63,7 +63,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {string} _info Request from client
|
* @param {string} _info Request from client
|
||||||
* @param {string} sessionID Player's session id
|
* @param {string} sessionID Player's session id
|
||||||
*
|
*
|
||||||
* @returns {array} Array of "repeatableQuestObjects" as descibed above
|
* @returns {array} Array of "repeatableQuestObjects" as described above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -17,11 +18,13 @@ export declare class PMCLootGenerator {
|
|||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected pocketLootPool: Record<string, number>;
|
protected pocketLootPool: Record<string, number>;
|
||||||
protected vestLootPool: Record<string, number>;
|
protected vestLootPool: Record<string, number>;
|
||||||
protected backpackLootPool: Record<string, number>;
|
protected backpackLootPool: Record<string, number>;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService);
|
protected roubleTpl: string;
|
||||||
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper);
|
||||||
/**
|
/**
|
||||||
* Create an array of loot items a PMC can have in their pockets
|
* Create an array of loot items a PMC can have in their pockets
|
||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
@ -44,11 +47,4 @@ export declare class PMCLootGenerator {
|
|||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
*/
|
*/
|
||||||
generatePMCBackpackLootPool(botRole: string): Record<string, number>;
|
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;
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/Giv
|
|||||||
import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
||||||
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -30,10 +31,16 @@ export declare class GiveSptCommand implements ISptCommand {
|
|||||||
* spt give 5 <== this is the reply when the algo isn't sure about an item
|
* spt give 5 <== this is the reply when the algo isn't sure about an item
|
||||||
*/
|
*/
|
||||||
private static commandRegex;
|
private static commandRegex;
|
||||||
private static maxAllowedDistance;
|
private static acceptableConfidence;
|
||||||
protected savedCommand: Map<string, SavedCommand>;
|
protected savedCommand: Map<string, SavedCommand>;
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService);
|
||||||
getCommand(): string;
|
getCommand(): string;
|
||||||
getCommandHelp(): string;
|
getCommandHelp(): string;
|
||||||
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;
|
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;
|
||||||
|
/**
|
||||||
|
* A "simple" function that checks if an item is supposed to be given to a player or not
|
||||||
|
* @param templateItem the template item to check
|
||||||
|
* @returns true if its obtainable, false if its not
|
||||||
|
*/
|
||||||
|
protected isItemAllowed(templateItem: ITemplateItem): boolean;
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
|||||||
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
||||||
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
||||||
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
|
||||||
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
||||||
|
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
||||||
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
|
@ -34,4 +34,11 @@ export declare class WeightedRandomHelper {
|
|||||||
item: any;
|
item: any;
|
||||||
index: number;
|
index: number;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Find the greated common divisor of all weights and use it on the passed in dictionary
|
||||||
|
* @param weightedDict values to reduce
|
||||||
|
*/
|
||||||
|
reduceWeightValues(weightedDict: Record<string, number>): void;
|
||||||
|
protected commonDivisor(numbers: number[]): number;
|
||||||
|
protected gcd(a: number, b: number): number;
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,7 @@ export interface IBtrMapConfig {
|
|||||||
mapID: string;
|
mapID: string;
|
||||||
pathsConfigurations: IBtrMapConfig[];
|
pathsConfigurations: IBtrMapConfig[];
|
||||||
}
|
}
|
||||||
export interface IBtrMapConfig {
|
export interface IBtrPathConfig {
|
||||||
id: string;
|
id: string;
|
||||||
enterPoint: string;
|
enterPoint: string;
|
||||||
exitPoint: string;
|
exitPoint: string;
|
||||||
|
3
TypeScript/10ScopesAndTypes/types/models/eft/common/request/IUIDRequestData.d.ts
vendored
Normal file
3
TypeScript/10ScopesAndTypes/types/models/eft/common/request/IUIDRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface IUIDRequestData {
|
||||||
|
uid: string;
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
export interface IProfileTemplates {
|
export interface IProfileTemplates {
|
||||||
Standard: IProfileSides;
|
"Standard": IProfileSides;
|
||||||
"Left Behind": IProfileSides;
|
"Left Behind": IProfileSides;
|
||||||
"Prepare To Escape": IProfileSides;
|
"Prepare To Escape": IProfileSides;
|
||||||
"Edge Of Darkness": IProfileSides;
|
"Edge Of Darkness": IProfileSides;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface IReportNicknameRequestData {
|
|
||||||
uid: string;
|
|
||||||
}
|
|
@ -1,14 +1,14 @@
|
|||||||
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
||||||
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
||||||
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
|
||||||
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
|
||||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
|
||||||
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
||||||
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
||||||
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
||||||
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
||||||
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
||||||
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
||||||
|
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
export interface IQteData {
|
export interface IQteData {
|
||||||
id: string;
|
id: string;
|
||||||
type: QteActivityType;
|
type: QteActivityType;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface ISelectProfileRequestData {
|
|
||||||
uid: string;
|
|
||||||
}
|
|
@ -109,5 +109,6 @@ export declare enum BaseClasses {
|
|||||||
RECEIVER = "55818a304bdc2db5418b457d",
|
RECEIVER = "55818a304bdc2db5418b457d",
|
||||||
BARREL = "555ef6e44bdc2de9068b457e",
|
BARREL = "555ef6e44bdc2de9068b457e",
|
||||||
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
||||||
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 "
|
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 ",
|
||||||
|
HIDEOUT_AREA_CONTAINER = "63da6da4784a55176c018dba"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
export interface INotifierCallbacks {
|
export interface INotifierCallbacks {
|
||||||
/**
|
/**
|
||||||
* If we don't have anything to send, it's ok to not send anything back
|
* If we don't have anything to send, it's ok to not send anything back
|
||||||
@ -12,6 +12,6 @@ export interface INotifierCallbacks {
|
|||||||
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
||||||
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;
|
selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,6 @@ export interface IInsuranceConfig extends IBaseConfig {
|
|||||||
returnTimeOverrideSeconds: number;
|
returnTimeOverrideSeconds: number;
|
||||||
/** How often server should process insurance in seconds */
|
/** How often server should process insurance in seconds */
|
||||||
runIntervalSeconds: number;
|
runIntervalSeconds: number;
|
||||||
|
minAttachmentRoublePriceToBeTaken: number;
|
||||||
|
chanceNoAttachmentsTakenPercent: number;
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { WebSocketServer } from "@spt-aki/servers/WebSocketServer";
|
|
||||||
import { IHttpListener } from "@spt-aki/servers/http/IHttpListener";
|
import { IHttpListener } from "@spt-aki/servers/http/IHttpListener";
|
||||||
|
import { WebSocketServer } from "@spt-aki/servers/WebSocketServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
export declare class HttpServer {
|
export declare class HttpServer {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
@ -100,9 +100,9 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
getDynamicOfferPriceForOffer(offerItems: Item[], desiredCurrency: string, isPackOffer: boolean): number;
|
getDynamicOfferPriceForOffer(offerItems: Item[], desiredCurrency: string, isPackOffer: boolean): number;
|
||||||
/**
|
/**
|
||||||
* @param itemTemplateId
|
* @param itemTemplateId items tpl value
|
||||||
* @param desiredCurrency
|
* @param desiredCurrency Currency to return result in
|
||||||
* @param item
|
* @param item Item object (used for weapon presets)
|
||||||
* @param offerItems
|
* @param offerItems
|
||||||
* @param isPackOffer
|
* @param isPackOffer
|
||||||
* @returns
|
* @returns
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { DialogueController } from "@spt-aki/controllers/DialogueController";
|
import { DialogueController } from "@spt-aki/controllers/DialogueController";
|
||||||
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData";
|
import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData";
|
||||||
import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer";
|
import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer";
|
||||||
import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest";
|
import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest";
|
||||||
@ -92,13 +93,9 @@ export declare class DialogueCallbacks implements OnUpdate {
|
|||||||
/** Handle client/friend/delete */
|
/** Handle client/friend/delete */
|
||||||
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
||||||
/** Handle client/friend/ignore/set */
|
/** Handle client/friend/ignore/set */
|
||||||
ignoreFriend(url: string, request: {
|
ignoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
uid: string;
|
|
||||||
}, sessionID: string): INullResponseData;
|
|
||||||
/** Handle client/friend/ignore/remove */
|
/** Handle client/friend/ignore/remove */
|
||||||
unIgnoreFriend(url: string, request: {
|
unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
uid: string;
|
|
||||||
}, sessionID: string): INullResponseData;
|
|
||||||
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { GameController } from "@spt-aki/controllers/GameController";
|
import { GameController } from "@spt-aki/controllers/GameController";
|
||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
|
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
|
||||||
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
|
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
|
||||||
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
|
||||||
@ -10,7 +11,6 @@ import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutRes
|
|||||||
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
|
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
|
||||||
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
|
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
|
||||||
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
||||||
import { IReportNicknameRequestData } from "@spt-aki/models/eft/game/IReportNicknameRequestData";
|
|
||||||
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
||||||
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
|
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
@ -69,7 +69,7 @@ export declare class GameCallbacks implements OnLoad {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
reportNickname(url: string, info: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/getRaidTime
|
* Handle singleplayer/settings/getRaidTime
|
||||||
* @returns string
|
* @returns string
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { NotifierController } from "@spt-aki/controllers/NotifierController";
|
import { NotifierController } from "@spt-aki/controllers/NotifierController";
|
||||||
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
|
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
@ -29,6 +29,6 @@ export declare class NotifierCallbacks {
|
|||||||
* Handle client/game/profile/select
|
* Handle client/game/profile/select
|
||||||
* @returns ISelectProfileResponse
|
* @returns ISelectProfileResponse
|
||||||
*/
|
*/
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper";
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData";
|
import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
@ -20,6 +21,7 @@ import { MailSendService } from "@spt-aki/services/MailSendService";
|
|||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -27,6 +29,7 @@ export declare class InsuranceController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
@ -35,6 +38,7 @@ export declare class InsuranceController {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -43,7 +47,7 @@ export declare class InsuranceController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
protected roubleTpl: string;
|
protected roubleTpl: string;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||||
*
|
*
|
||||||
@ -146,35 +150,15 @@ export declare class InsuranceController {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||||
|
protected logAttachmentsBeingRemoved(attachmentIdsToRemove: string[], attachments: Item[], attachmentPrices: Record<string, number>): void;
|
||||||
|
protected weightAttachmentsByPrice(attachments: Item[]): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Sorts the attachment items by their dynamic price in descending order.
|
* Get count of items to remove from weapon (take into account trader + price of attachment)
|
||||||
*
|
* @param weightedAttachmentByPrice Dict of item Tpls and thier rouble price
|
||||||
* @param attachments The array of attachments items.
|
* @param traderId Trader attachment insured against
|
||||||
* @returns An array of items enriched with their max price and common locale-name.
|
* @returns Attachment count to remove
|
||||||
*/
|
*/
|
||||||
protected sortAttachmentsByPrice(attachments: Item[]): EnrichedItem[];
|
protected getAttachmentCountToRemove(weightedAttachmentByPrice: Record<string, number>, traderId: string): number;
|
||||||
/**
|
|
||||||
* Logs the details of each attachment item.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
*/
|
|
||||||
protected logAttachmentsDetails(attachments: EnrichedItem[]): void;
|
|
||||||
/**
|
|
||||||
* Counts the number of successful rolls for the attachment items.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
* @param traderId The ID of the trader that has insured these attachments.
|
|
||||||
* @returns The number of successful rolls.
|
|
||||||
*/
|
|
||||||
protected countSuccessfulRolls(attachments: Item[], traderId: string): number;
|
|
||||||
/**
|
|
||||||
* Marks the most valuable attachments for deletion based on the number of successful rolls made.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
* @param successfulRolls The number of successful rolls.
|
|
||||||
* @param toDelete The array that accumulates the IDs of the items to be deleted.
|
|
||||||
*/
|
|
||||||
protected attachmentDeletionByValue(attachments: EnrichedItem[], successfulRolls: number, toDelete: Set<string>): void;
|
|
||||||
/**
|
/**
|
||||||
* Remove items from the insured items that should not be returned to the player.
|
* Remove items from the insured items that should not be returned to the player.
|
||||||
*
|
*
|
||||||
@ -192,7 +176,7 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
protected sendMail(sessionID: string, insurance: Insurance): void;
|
protected sendMail(sessionID: string, insurance: Insurance): void;
|
||||||
/**
|
/**
|
||||||
* Determines whether a insured item should be removed from the player's inventory based on a random roll and
|
* Determines whether an insured item should be removed from the player's inventory based on a random roll and
|
||||||
* trader-specific return chance.
|
* trader-specific return chance.
|
||||||
*
|
*
|
||||||
* @param traderId The ID of the trader who insured the item.
|
* @param traderId The ID of the trader who insured the item.
|
||||||
@ -220,8 +204,3 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
}
|
}
|
||||||
interface EnrichedItem extends Item {
|
|
||||||
name: string;
|
|
||||||
dynamicPrice: number;
|
|
||||||
}
|
|
||||||
export {};
|
|
||||||
|
@ -63,7 +63,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {string} _info Request from client
|
* @param {string} _info Request from client
|
||||||
* @param {string} sessionID Player's session id
|
* @param {string} sessionID Player's session id
|
||||||
*
|
*
|
||||||
* @returns {array} Array of "repeatableQuestObjects" as descibed above
|
* @returns {array} Array of "repeatableQuestObjects" as described above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -17,11 +18,13 @@ export declare class PMCLootGenerator {
|
|||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected pocketLootPool: Record<string, number>;
|
protected pocketLootPool: Record<string, number>;
|
||||||
protected vestLootPool: Record<string, number>;
|
protected vestLootPool: Record<string, number>;
|
||||||
protected backpackLootPool: Record<string, number>;
|
protected backpackLootPool: Record<string, number>;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService);
|
protected roubleTpl: string;
|
||||||
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper);
|
||||||
/**
|
/**
|
||||||
* Create an array of loot items a PMC can have in their pockets
|
* Create an array of loot items a PMC can have in their pockets
|
||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
@ -44,11 +47,4 @@ export declare class PMCLootGenerator {
|
|||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
*/
|
*/
|
||||||
generatePMCBackpackLootPool(botRole: string): Record<string, number>;
|
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;
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/Giv
|
|||||||
import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
||||||
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -30,10 +31,16 @@ export declare class GiveSptCommand implements ISptCommand {
|
|||||||
* spt give 5 <== this is the reply when the algo isn't sure about an item
|
* spt give 5 <== this is the reply when the algo isn't sure about an item
|
||||||
*/
|
*/
|
||||||
private static commandRegex;
|
private static commandRegex;
|
||||||
private static maxAllowedDistance;
|
private static acceptableConfidence;
|
||||||
protected savedCommand: Map<string, SavedCommand>;
|
protected savedCommand: Map<string, SavedCommand>;
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService);
|
||||||
getCommand(): string;
|
getCommand(): string;
|
||||||
getCommandHelp(): string;
|
getCommandHelp(): string;
|
||||||
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;
|
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;
|
||||||
|
/**
|
||||||
|
* A "simple" function that checks if an item is supposed to be given to a player or not
|
||||||
|
* @param templateItem the template item to check
|
||||||
|
* @returns true if its obtainable, false if its not
|
||||||
|
*/
|
||||||
|
protected isItemAllowed(templateItem: ITemplateItem): boolean;
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
|||||||
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
||||||
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
||||||
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
|
||||||
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
||||||
|
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
||||||
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
|
@ -34,4 +34,11 @@ export declare class WeightedRandomHelper {
|
|||||||
item: any;
|
item: any;
|
||||||
index: number;
|
index: number;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Find the greated common divisor of all weights and use it on the passed in dictionary
|
||||||
|
* @param weightedDict values to reduce
|
||||||
|
*/
|
||||||
|
reduceWeightValues(weightedDict: Record<string, number>): void;
|
||||||
|
protected commonDivisor(numbers: number[]): number;
|
||||||
|
protected gcd(a: number, b: number): number;
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,7 @@ export interface IBtrMapConfig {
|
|||||||
mapID: string;
|
mapID: string;
|
||||||
pathsConfigurations: IBtrMapConfig[];
|
pathsConfigurations: IBtrMapConfig[];
|
||||||
}
|
}
|
||||||
export interface IBtrMapConfig {
|
export interface IBtrPathConfig {
|
||||||
id: string;
|
id: string;
|
||||||
enterPoint: string;
|
enterPoint: string;
|
||||||
exitPoint: string;
|
exitPoint: string;
|
||||||
|
3
TypeScript/11BundleLoadingSample/types/models/eft/common/request/IUIDRequestData.d.ts
vendored
Normal file
3
TypeScript/11BundleLoadingSample/types/models/eft/common/request/IUIDRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface IUIDRequestData {
|
||||||
|
uid: string;
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
export interface IProfileTemplates {
|
export interface IProfileTemplates {
|
||||||
Standard: IProfileSides;
|
"Standard": IProfileSides;
|
||||||
"Left Behind": IProfileSides;
|
"Left Behind": IProfileSides;
|
||||||
"Prepare To Escape": IProfileSides;
|
"Prepare To Escape": IProfileSides;
|
||||||
"Edge Of Darkness": IProfileSides;
|
"Edge Of Darkness": IProfileSides;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface IReportNicknameRequestData {
|
|
||||||
uid: string;
|
|
||||||
}
|
|
@ -1,14 +1,14 @@
|
|||||||
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
||||||
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
||||||
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
|
||||||
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
|
||||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
|
||||||
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
||||||
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
||||||
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
||||||
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
||||||
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
||||||
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
||||||
|
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
export interface IQteData {
|
export interface IQteData {
|
||||||
id: string;
|
id: string;
|
||||||
type: QteActivityType;
|
type: QteActivityType;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface ISelectProfileRequestData {
|
|
||||||
uid: string;
|
|
||||||
}
|
|
@ -109,5 +109,6 @@ export declare enum BaseClasses {
|
|||||||
RECEIVER = "55818a304bdc2db5418b457d",
|
RECEIVER = "55818a304bdc2db5418b457d",
|
||||||
BARREL = "555ef6e44bdc2de9068b457e",
|
BARREL = "555ef6e44bdc2de9068b457e",
|
||||||
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
||||||
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 "
|
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 ",
|
||||||
|
HIDEOUT_AREA_CONTAINER = "63da6da4784a55176c018dba"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
export interface INotifierCallbacks {
|
export interface INotifierCallbacks {
|
||||||
/**
|
/**
|
||||||
* If we don't have anything to send, it's ok to not send anything back
|
* If we don't have anything to send, it's ok to not send anything back
|
||||||
@ -12,6 +12,6 @@ export interface INotifierCallbacks {
|
|||||||
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
||||||
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;
|
selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,6 @@ export interface IInsuranceConfig extends IBaseConfig {
|
|||||||
returnTimeOverrideSeconds: number;
|
returnTimeOverrideSeconds: number;
|
||||||
/** How often server should process insurance in seconds */
|
/** How often server should process insurance in seconds */
|
||||||
runIntervalSeconds: number;
|
runIntervalSeconds: number;
|
||||||
|
minAttachmentRoublePriceToBeTaken: number;
|
||||||
|
chanceNoAttachmentsTakenPercent: number;
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { WebSocketServer } from "@spt-aki/servers/WebSocketServer";
|
|
||||||
import { IHttpListener } from "@spt-aki/servers/http/IHttpListener";
|
import { IHttpListener } from "@spt-aki/servers/http/IHttpListener";
|
||||||
|
import { WebSocketServer } from "@spt-aki/servers/WebSocketServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
export declare class HttpServer {
|
export declare class HttpServer {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
@ -100,9 +100,9 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
getDynamicOfferPriceForOffer(offerItems: Item[], desiredCurrency: string, isPackOffer: boolean): number;
|
getDynamicOfferPriceForOffer(offerItems: Item[], desiredCurrency: string, isPackOffer: boolean): number;
|
||||||
/**
|
/**
|
||||||
* @param itemTemplateId
|
* @param itemTemplateId items tpl value
|
||||||
* @param desiredCurrency
|
* @param desiredCurrency Currency to return result in
|
||||||
* @param item
|
* @param item Item object (used for weapon presets)
|
||||||
* @param offerItems
|
* @param offerItems
|
||||||
* @param isPackOffer
|
* @param isPackOffer
|
||||||
* @returns
|
* @returns
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { DialogueController } from "@spt-aki/controllers/DialogueController";
|
import { DialogueController } from "@spt-aki/controllers/DialogueController";
|
||||||
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData";
|
import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData";
|
||||||
import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer";
|
import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer";
|
||||||
import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest";
|
import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest";
|
||||||
@ -92,13 +93,9 @@ export declare class DialogueCallbacks implements OnUpdate {
|
|||||||
/** Handle client/friend/delete */
|
/** Handle client/friend/delete */
|
||||||
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
||||||
/** Handle client/friend/ignore/set */
|
/** Handle client/friend/ignore/set */
|
||||||
ignoreFriend(url: string, request: {
|
ignoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
uid: string;
|
|
||||||
}, sessionID: string): INullResponseData;
|
|
||||||
/** Handle client/friend/ignore/remove */
|
/** Handle client/friend/ignore/remove */
|
||||||
unIgnoreFriend(url: string, request: {
|
unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
uid: string;
|
|
||||||
}, sessionID: string): INullResponseData;
|
|
||||||
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { GameController } from "@spt-aki/controllers/GameController";
|
import { GameController } from "@spt-aki/controllers/GameController";
|
||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
|
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
|
||||||
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
|
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
|
||||||
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
|
||||||
@ -10,7 +11,6 @@ import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutRes
|
|||||||
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
|
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
|
||||||
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
|
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
|
||||||
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
||||||
import { IReportNicknameRequestData } from "@spt-aki/models/eft/game/IReportNicknameRequestData";
|
|
||||||
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
||||||
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
|
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
@ -69,7 +69,7 @@ export declare class GameCallbacks implements OnLoad {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
reportNickname(url: string, info: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/getRaidTime
|
* Handle singleplayer/settings/getRaidTime
|
||||||
* @returns string
|
* @returns string
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { NotifierController } from "@spt-aki/controllers/NotifierController";
|
import { NotifierController } from "@spt-aki/controllers/NotifierController";
|
||||||
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
|
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
@ -29,6 +29,6 @@ export declare class NotifierCallbacks {
|
|||||||
* Handle client/game/profile/select
|
* Handle client/game/profile/select
|
||||||
* @returns ISelectProfileResponse
|
* @returns ISelectProfileResponse
|
||||||
*/
|
*/
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper";
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData";
|
import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
@ -20,6 +21,7 @@ import { MailSendService } from "@spt-aki/services/MailSendService";
|
|||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -27,6 +29,7 @@ export declare class InsuranceController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
@ -35,6 +38,7 @@ export declare class InsuranceController {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -43,7 +47,7 @@ export declare class InsuranceController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
protected roubleTpl: string;
|
protected roubleTpl: string;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||||
*
|
*
|
||||||
@ -146,35 +150,15 @@ export declare class InsuranceController {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||||
|
protected logAttachmentsBeingRemoved(attachmentIdsToRemove: string[], attachments: Item[], attachmentPrices: Record<string, number>): void;
|
||||||
|
protected weightAttachmentsByPrice(attachments: Item[]): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Sorts the attachment items by their dynamic price in descending order.
|
* Get count of items to remove from weapon (take into account trader + price of attachment)
|
||||||
*
|
* @param weightedAttachmentByPrice Dict of item Tpls and thier rouble price
|
||||||
* @param attachments The array of attachments items.
|
* @param traderId Trader attachment insured against
|
||||||
* @returns An array of items enriched with their max price and common locale-name.
|
* @returns Attachment count to remove
|
||||||
*/
|
*/
|
||||||
protected sortAttachmentsByPrice(attachments: Item[]): EnrichedItem[];
|
protected getAttachmentCountToRemove(weightedAttachmentByPrice: Record<string, number>, traderId: string): number;
|
||||||
/**
|
|
||||||
* Logs the details of each attachment item.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
*/
|
|
||||||
protected logAttachmentsDetails(attachments: EnrichedItem[]): void;
|
|
||||||
/**
|
|
||||||
* Counts the number of successful rolls for the attachment items.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
* @param traderId The ID of the trader that has insured these attachments.
|
|
||||||
* @returns The number of successful rolls.
|
|
||||||
*/
|
|
||||||
protected countSuccessfulRolls(attachments: Item[], traderId: string): number;
|
|
||||||
/**
|
|
||||||
* Marks the most valuable attachments for deletion based on the number of successful rolls made.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
* @param successfulRolls The number of successful rolls.
|
|
||||||
* @param toDelete The array that accumulates the IDs of the items to be deleted.
|
|
||||||
*/
|
|
||||||
protected attachmentDeletionByValue(attachments: EnrichedItem[], successfulRolls: number, toDelete: Set<string>): void;
|
|
||||||
/**
|
/**
|
||||||
* Remove items from the insured items that should not be returned to the player.
|
* Remove items from the insured items that should not be returned to the player.
|
||||||
*
|
*
|
||||||
@ -192,7 +176,7 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
protected sendMail(sessionID: string, insurance: Insurance): void;
|
protected sendMail(sessionID: string, insurance: Insurance): void;
|
||||||
/**
|
/**
|
||||||
* Determines whether a insured item should be removed from the player's inventory based on a random roll and
|
* Determines whether an insured item should be removed from the player's inventory based on a random roll and
|
||||||
* trader-specific return chance.
|
* trader-specific return chance.
|
||||||
*
|
*
|
||||||
* @param traderId The ID of the trader who insured the item.
|
* @param traderId The ID of the trader who insured the item.
|
||||||
@ -220,8 +204,3 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
}
|
}
|
||||||
interface EnrichedItem extends Item {
|
|
||||||
name: string;
|
|
||||||
dynamicPrice: number;
|
|
||||||
}
|
|
||||||
export {};
|
|
||||||
|
@ -63,7 +63,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {string} _info Request from client
|
* @param {string} _info Request from client
|
||||||
* @param {string} sessionID Player's session id
|
* @param {string} sessionID Player's session id
|
||||||
*
|
*
|
||||||
* @returns {array} Array of "repeatableQuestObjects" as descibed above
|
* @returns {array} Array of "repeatableQuestObjects" as described above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -17,11 +18,13 @@ export declare class PMCLootGenerator {
|
|||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected pocketLootPool: Record<string, number>;
|
protected pocketLootPool: Record<string, number>;
|
||||||
protected vestLootPool: Record<string, number>;
|
protected vestLootPool: Record<string, number>;
|
||||||
protected backpackLootPool: Record<string, number>;
|
protected backpackLootPool: Record<string, number>;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService);
|
protected roubleTpl: string;
|
||||||
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper);
|
||||||
/**
|
/**
|
||||||
* Create an array of loot items a PMC can have in their pockets
|
* Create an array of loot items a PMC can have in their pockets
|
||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
@ -44,11 +47,4 @@ export declare class PMCLootGenerator {
|
|||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
*/
|
*/
|
||||||
generatePMCBackpackLootPool(botRole: string): Record<string, number>;
|
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;
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/Giv
|
|||||||
import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
||||||
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -30,10 +31,16 @@ export declare class GiveSptCommand implements ISptCommand {
|
|||||||
* spt give 5 <== this is the reply when the algo isn't sure about an item
|
* spt give 5 <== this is the reply when the algo isn't sure about an item
|
||||||
*/
|
*/
|
||||||
private static commandRegex;
|
private static commandRegex;
|
||||||
private static maxAllowedDistance;
|
private static acceptableConfidence;
|
||||||
protected savedCommand: Map<string, SavedCommand>;
|
protected savedCommand: Map<string, SavedCommand>;
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService);
|
||||||
getCommand(): string;
|
getCommand(): string;
|
||||||
getCommandHelp(): string;
|
getCommandHelp(): string;
|
||||||
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;
|
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;
|
||||||
|
/**
|
||||||
|
* A "simple" function that checks if an item is supposed to be given to a player or not
|
||||||
|
* @param templateItem the template item to check
|
||||||
|
* @returns true if its obtainable, false if its not
|
||||||
|
*/
|
||||||
|
protected isItemAllowed(templateItem: ITemplateItem): boolean;
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
|||||||
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
||||||
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
||||||
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
|
||||||
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
||||||
|
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
||||||
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
|
@ -34,4 +34,11 @@ export declare class WeightedRandomHelper {
|
|||||||
item: any;
|
item: any;
|
||||||
index: number;
|
index: number;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Find the greated common divisor of all weights and use it on the passed in dictionary
|
||||||
|
* @param weightedDict values to reduce
|
||||||
|
*/
|
||||||
|
reduceWeightValues(weightedDict: Record<string, number>): void;
|
||||||
|
protected commonDivisor(numbers: number[]): number;
|
||||||
|
protected gcd(a: number, b: number): number;
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,7 @@ export interface IBtrMapConfig {
|
|||||||
mapID: string;
|
mapID: string;
|
||||||
pathsConfigurations: IBtrMapConfig[];
|
pathsConfigurations: IBtrMapConfig[];
|
||||||
}
|
}
|
||||||
export interface IBtrMapConfig {
|
export interface IBtrPathConfig {
|
||||||
id: string;
|
id: string;
|
||||||
enterPoint: string;
|
enterPoint: string;
|
||||||
exitPoint: string;
|
exitPoint: string;
|
||||||
|
3
TypeScript/12ClassExtensionOverride/types/models/eft/common/request/IUIDRequestData.d.ts
vendored
Normal file
3
TypeScript/12ClassExtensionOverride/types/models/eft/common/request/IUIDRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface IUIDRequestData {
|
||||||
|
uid: string;
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
export interface IProfileTemplates {
|
export interface IProfileTemplates {
|
||||||
Standard: IProfileSides;
|
"Standard": IProfileSides;
|
||||||
"Left Behind": IProfileSides;
|
"Left Behind": IProfileSides;
|
||||||
"Prepare To Escape": IProfileSides;
|
"Prepare To Escape": IProfileSides;
|
||||||
"Edge Of Darkness": IProfileSides;
|
"Edge Of Darkness": IProfileSides;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface IReportNicknameRequestData {
|
|
||||||
uid: string;
|
|
||||||
}
|
|
@ -1,14 +1,14 @@
|
|||||||
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
||||||
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
||||||
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
|
||||||
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
|
||||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
|
||||||
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
||||||
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
||||||
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
||||||
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
||||||
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
||||||
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
||||||
|
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
export interface IQteData {
|
export interface IQteData {
|
||||||
id: string;
|
id: string;
|
||||||
type: QteActivityType;
|
type: QteActivityType;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface ISelectProfileRequestData {
|
|
||||||
uid: string;
|
|
||||||
}
|
|
@ -109,5 +109,6 @@ export declare enum BaseClasses {
|
|||||||
RECEIVER = "55818a304bdc2db5418b457d",
|
RECEIVER = "55818a304bdc2db5418b457d",
|
||||||
BARREL = "555ef6e44bdc2de9068b457e",
|
BARREL = "555ef6e44bdc2de9068b457e",
|
||||||
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
||||||
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 "
|
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 ",
|
||||||
|
HIDEOUT_AREA_CONTAINER = "63da6da4784a55176c018dba"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
export interface INotifierCallbacks {
|
export interface INotifierCallbacks {
|
||||||
/**
|
/**
|
||||||
* If we don't have anything to send, it's ok to not send anything back
|
* If we don't have anything to send, it's ok to not send anything back
|
||||||
@ -12,6 +12,6 @@ export interface INotifierCallbacks {
|
|||||||
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
||||||
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;
|
selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,6 @@ export interface IInsuranceConfig extends IBaseConfig {
|
|||||||
returnTimeOverrideSeconds: number;
|
returnTimeOverrideSeconds: number;
|
||||||
/** How often server should process insurance in seconds */
|
/** How often server should process insurance in seconds */
|
||||||
runIntervalSeconds: number;
|
runIntervalSeconds: number;
|
||||||
|
minAttachmentRoublePriceToBeTaken: number;
|
||||||
|
chanceNoAttachmentsTakenPercent: number;
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { WebSocketServer } from "@spt-aki/servers/WebSocketServer";
|
|
||||||
import { IHttpListener } from "@spt-aki/servers/http/IHttpListener";
|
import { IHttpListener } from "@spt-aki/servers/http/IHttpListener";
|
||||||
|
import { WebSocketServer } from "@spt-aki/servers/WebSocketServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
export declare class HttpServer {
|
export declare class HttpServer {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
@ -100,9 +100,9 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
getDynamicOfferPriceForOffer(offerItems: Item[], desiredCurrency: string, isPackOffer: boolean): number;
|
getDynamicOfferPriceForOffer(offerItems: Item[], desiredCurrency: string, isPackOffer: boolean): number;
|
||||||
/**
|
/**
|
||||||
* @param itemTemplateId
|
* @param itemTemplateId items tpl value
|
||||||
* @param desiredCurrency
|
* @param desiredCurrency Currency to return result in
|
||||||
* @param item
|
* @param item Item object (used for weapon presets)
|
||||||
* @param offerItems
|
* @param offerItems
|
||||||
* @param isPackOffer
|
* @param isPackOffer
|
||||||
* @returns
|
* @returns
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { DialogueController } from "@spt-aki/controllers/DialogueController";
|
import { DialogueController } from "@spt-aki/controllers/DialogueController";
|
||||||
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData";
|
import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData";
|
||||||
import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer";
|
import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer";
|
||||||
import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest";
|
import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest";
|
||||||
@ -92,13 +93,9 @@ export declare class DialogueCallbacks implements OnUpdate {
|
|||||||
/** Handle client/friend/delete */
|
/** Handle client/friend/delete */
|
||||||
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
||||||
/** Handle client/friend/ignore/set */
|
/** Handle client/friend/ignore/set */
|
||||||
ignoreFriend(url: string, request: {
|
ignoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
uid: string;
|
|
||||||
}, sessionID: string): INullResponseData;
|
|
||||||
/** Handle client/friend/ignore/remove */
|
/** Handle client/friend/ignore/remove */
|
||||||
unIgnoreFriend(url: string, request: {
|
unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
uid: string;
|
|
||||||
}, sessionID: string): INullResponseData;
|
|
||||||
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { GameController } from "@spt-aki/controllers/GameController";
|
import { GameController } from "@spt-aki/controllers/GameController";
|
||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
|
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
|
||||||
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
|
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
|
||||||
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
|
||||||
@ -10,7 +11,6 @@ import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutRes
|
|||||||
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
|
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
|
||||||
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
|
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
|
||||||
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
||||||
import { IReportNicknameRequestData } from "@spt-aki/models/eft/game/IReportNicknameRequestData";
|
|
||||||
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
||||||
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
|
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
@ -69,7 +69,7 @@ export declare class GameCallbacks implements OnLoad {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
reportNickname(url: string, info: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/getRaidTime
|
* Handle singleplayer/settings/getRaidTime
|
||||||
* @returns string
|
* @returns string
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { NotifierController } from "@spt-aki/controllers/NotifierController";
|
import { NotifierController } from "@spt-aki/controllers/NotifierController";
|
||||||
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
|
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
@ -29,6 +29,6 @@ export declare class NotifierCallbacks {
|
|||||||
* Handle client/game/profile/select
|
* Handle client/game/profile/select
|
||||||
* @returns ISelectProfileResponse
|
* @returns ISelectProfileResponse
|
||||||
*/
|
*/
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper";
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData";
|
import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
@ -20,6 +21,7 @@ import { MailSendService } from "@spt-aki/services/MailSendService";
|
|||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -27,6 +29,7 @@ export declare class InsuranceController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
@ -35,6 +38,7 @@ export declare class InsuranceController {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -43,7 +47,7 @@ export declare class InsuranceController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
protected roubleTpl: string;
|
protected roubleTpl: string;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||||
*
|
*
|
||||||
@ -146,35 +150,15 @@ export declare class InsuranceController {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||||
|
protected logAttachmentsBeingRemoved(attachmentIdsToRemove: string[], attachments: Item[], attachmentPrices: Record<string, number>): void;
|
||||||
|
protected weightAttachmentsByPrice(attachments: Item[]): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Sorts the attachment items by their dynamic price in descending order.
|
* Get count of items to remove from weapon (take into account trader + price of attachment)
|
||||||
*
|
* @param weightedAttachmentByPrice Dict of item Tpls and thier rouble price
|
||||||
* @param attachments The array of attachments items.
|
* @param traderId Trader attachment insured against
|
||||||
* @returns An array of items enriched with their max price and common locale-name.
|
* @returns Attachment count to remove
|
||||||
*/
|
*/
|
||||||
protected sortAttachmentsByPrice(attachments: Item[]): EnrichedItem[];
|
protected getAttachmentCountToRemove(weightedAttachmentByPrice: Record<string, number>, traderId: string): number;
|
||||||
/**
|
|
||||||
* Logs the details of each attachment item.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
*/
|
|
||||||
protected logAttachmentsDetails(attachments: EnrichedItem[]): void;
|
|
||||||
/**
|
|
||||||
* Counts the number of successful rolls for the attachment items.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
* @param traderId The ID of the trader that has insured these attachments.
|
|
||||||
* @returns The number of successful rolls.
|
|
||||||
*/
|
|
||||||
protected countSuccessfulRolls(attachments: Item[], traderId: string): number;
|
|
||||||
/**
|
|
||||||
* Marks the most valuable attachments for deletion based on the number of successful rolls made.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
* @param successfulRolls The number of successful rolls.
|
|
||||||
* @param toDelete The array that accumulates the IDs of the items to be deleted.
|
|
||||||
*/
|
|
||||||
protected attachmentDeletionByValue(attachments: EnrichedItem[], successfulRolls: number, toDelete: Set<string>): void;
|
|
||||||
/**
|
/**
|
||||||
* Remove items from the insured items that should not be returned to the player.
|
* Remove items from the insured items that should not be returned to the player.
|
||||||
*
|
*
|
||||||
@ -192,7 +176,7 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
protected sendMail(sessionID: string, insurance: Insurance): void;
|
protected sendMail(sessionID: string, insurance: Insurance): void;
|
||||||
/**
|
/**
|
||||||
* Determines whether a insured item should be removed from the player's inventory based on a random roll and
|
* Determines whether an insured item should be removed from the player's inventory based on a random roll and
|
||||||
* trader-specific return chance.
|
* trader-specific return chance.
|
||||||
*
|
*
|
||||||
* @param traderId The ID of the trader who insured the item.
|
* @param traderId The ID of the trader who insured the item.
|
||||||
@ -220,8 +204,3 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
}
|
}
|
||||||
interface EnrichedItem extends Item {
|
|
||||||
name: string;
|
|
||||||
dynamicPrice: number;
|
|
||||||
}
|
|
||||||
export {};
|
|
||||||
|
@ -63,7 +63,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {string} _info Request from client
|
* @param {string} _info Request from client
|
||||||
* @param {string} sessionID Player's session id
|
* @param {string} sessionID Player's session id
|
||||||
*
|
*
|
||||||
* @returns {array} Array of "repeatableQuestObjects" as descibed above
|
* @returns {array} Array of "repeatableQuestObjects" as described above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -17,11 +18,13 @@ export declare class PMCLootGenerator {
|
|||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected pocketLootPool: Record<string, number>;
|
protected pocketLootPool: Record<string, number>;
|
||||||
protected vestLootPool: Record<string, number>;
|
protected vestLootPool: Record<string, number>;
|
||||||
protected backpackLootPool: Record<string, number>;
|
protected backpackLootPool: Record<string, number>;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService);
|
protected roubleTpl: string;
|
||||||
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper);
|
||||||
/**
|
/**
|
||||||
* Create an array of loot items a PMC can have in their pockets
|
* Create an array of loot items a PMC can have in their pockets
|
||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
@ -44,11 +47,4 @@ export declare class PMCLootGenerator {
|
|||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
*/
|
*/
|
||||||
generatePMCBackpackLootPool(botRole: string): Record<string, number>;
|
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;
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/Giv
|
|||||||
import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
||||||
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -30,10 +31,16 @@ export declare class GiveSptCommand implements ISptCommand {
|
|||||||
* spt give 5 <== this is the reply when the algo isn't sure about an item
|
* spt give 5 <== this is the reply when the algo isn't sure about an item
|
||||||
*/
|
*/
|
||||||
private static commandRegex;
|
private static commandRegex;
|
||||||
private static maxAllowedDistance;
|
private static acceptableConfidence;
|
||||||
protected savedCommand: Map<string, SavedCommand>;
|
protected savedCommand: Map<string, SavedCommand>;
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService);
|
||||||
getCommand(): string;
|
getCommand(): string;
|
||||||
getCommandHelp(): string;
|
getCommandHelp(): string;
|
||||||
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;
|
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;
|
||||||
|
/**
|
||||||
|
* A "simple" function that checks if an item is supposed to be given to a player or not
|
||||||
|
* @param templateItem the template item to check
|
||||||
|
* @returns true if its obtainable, false if its not
|
||||||
|
*/
|
||||||
|
protected isItemAllowed(templateItem: ITemplateItem): boolean;
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
|||||||
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
||||||
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
||||||
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
|
||||||
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
||||||
|
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
||||||
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
|
@ -34,4 +34,11 @@ export declare class WeightedRandomHelper {
|
|||||||
item: any;
|
item: any;
|
||||||
index: number;
|
index: number;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Find the greated common divisor of all weights and use it on the passed in dictionary
|
||||||
|
* @param weightedDict values to reduce
|
||||||
|
*/
|
||||||
|
reduceWeightValues(weightedDict: Record<string, number>): void;
|
||||||
|
protected commonDivisor(numbers: number[]): number;
|
||||||
|
protected gcd(a: number, b: number): number;
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,7 @@ export interface IBtrMapConfig {
|
|||||||
mapID: string;
|
mapID: string;
|
||||||
pathsConfigurations: IBtrMapConfig[];
|
pathsConfigurations: IBtrMapConfig[];
|
||||||
}
|
}
|
||||||
export interface IBtrMapConfig {
|
export interface IBtrPathConfig {
|
||||||
id: string;
|
id: string;
|
||||||
enterPoint: string;
|
enterPoint: string;
|
||||||
exitPoint: string;
|
exitPoint: string;
|
||||||
|
3
TypeScript/13AddTrader/types/models/eft/common/request/IUIDRequestData.d.ts
vendored
Normal file
3
TypeScript/13AddTrader/types/models/eft/common/request/IUIDRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface IUIDRequestData {
|
||||||
|
uid: string;
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
export interface IProfileTemplates {
|
export interface IProfileTemplates {
|
||||||
Standard: IProfileSides;
|
"Standard": IProfileSides;
|
||||||
"Left Behind": IProfileSides;
|
"Left Behind": IProfileSides;
|
||||||
"Prepare To Escape": IProfileSides;
|
"Prepare To Escape": IProfileSides;
|
||||||
"Edge Of Darkness": IProfileSides;
|
"Edge Of Darkness": IProfileSides;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface IReportNicknameRequestData {
|
|
||||||
uid: string;
|
|
||||||
}
|
|
@ -1,14 +1,14 @@
|
|||||||
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
||||||
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
||||||
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
|
||||||
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
|
||||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
|
||||||
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
||||||
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
||||||
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
||||||
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
||||||
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
||||||
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
||||||
|
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
export interface IQteData {
|
export interface IQteData {
|
||||||
id: string;
|
id: string;
|
||||||
type: QteActivityType;
|
type: QteActivityType;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface ISelectProfileRequestData {
|
|
||||||
uid: string;
|
|
||||||
}
|
|
@ -109,5 +109,6 @@ export declare enum BaseClasses {
|
|||||||
RECEIVER = "55818a304bdc2db5418b457d",
|
RECEIVER = "55818a304bdc2db5418b457d",
|
||||||
BARREL = "555ef6e44bdc2de9068b457e",
|
BARREL = "555ef6e44bdc2de9068b457e",
|
||||||
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
||||||
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 "
|
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 ",
|
||||||
|
HIDEOUT_AREA_CONTAINER = "63da6da4784a55176c018dba"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
export interface INotifierCallbacks {
|
export interface INotifierCallbacks {
|
||||||
/**
|
/**
|
||||||
* If we don't have anything to send, it's ok to not send anything back
|
* If we don't have anything to send, it's ok to not send anything back
|
||||||
@ -12,6 +12,6 @@ export interface INotifierCallbacks {
|
|||||||
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
||||||
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;
|
selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,6 @@ export interface IInsuranceConfig extends IBaseConfig {
|
|||||||
returnTimeOverrideSeconds: number;
|
returnTimeOverrideSeconds: number;
|
||||||
/** How often server should process insurance in seconds */
|
/** How often server should process insurance in seconds */
|
||||||
runIntervalSeconds: number;
|
runIntervalSeconds: number;
|
||||||
|
minAttachmentRoublePriceToBeTaken: number;
|
||||||
|
chanceNoAttachmentsTakenPercent: number;
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { WebSocketServer } from "@spt-aki/servers/WebSocketServer";
|
|
||||||
import { IHttpListener } from "@spt-aki/servers/http/IHttpListener";
|
import { IHttpListener } from "@spt-aki/servers/http/IHttpListener";
|
||||||
|
import { WebSocketServer } from "@spt-aki/servers/WebSocketServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
export declare class HttpServer {
|
export declare class HttpServer {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
@ -100,9 +100,9 @@ export declare class RagfairPriceService implements OnLoad {
|
|||||||
*/
|
*/
|
||||||
getDynamicOfferPriceForOffer(offerItems: Item[], desiredCurrency: string, isPackOffer: boolean): number;
|
getDynamicOfferPriceForOffer(offerItems: Item[], desiredCurrency: string, isPackOffer: boolean): number;
|
||||||
/**
|
/**
|
||||||
* @param itemTemplateId
|
* @param itemTemplateId items tpl value
|
||||||
* @param desiredCurrency
|
* @param desiredCurrency Currency to return result in
|
||||||
* @param item
|
* @param item Item object (used for weapon presets)
|
||||||
* @param offerItems
|
* @param offerItems
|
||||||
* @param isPackOffer
|
* @param isPackOffer
|
||||||
* @returns
|
* @returns
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { DialogueController } from "@spt-aki/controllers/DialogueController";
|
import { DialogueController } from "@spt-aki/controllers/DialogueController";
|
||||||
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
import { OnUpdate } from "@spt-aki/di/OnUpdate";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData";
|
import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData";
|
||||||
import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer";
|
import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer";
|
||||||
import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest";
|
import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest";
|
||||||
@ -92,13 +93,9 @@ export declare class DialogueCallbacks implements OnUpdate {
|
|||||||
/** Handle client/friend/delete */
|
/** Handle client/friend/delete */
|
||||||
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
deleteFriend(url: string, request: IDeleteFriendRequest, sessionID: string): INullResponseData;
|
||||||
/** Handle client/friend/ignore/set */
|
/** Handle client/friend/ignore/set */
|
||||||
ignoreFriend(url: string, request: {
|
ignoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
uid: string;
|
|
||||||
}, sessionID: string): INullResponseData;
|
|
||||||
/** Handle client/friend/ignore/remove */
|
/** Handle client/friend/ignore/remove */
|
||||||
unIgnoreFriend(url: string, request: {
|
unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
uid: string;
|
|
||||||
}, sessionID: string): INullResponseData;
|
|
||||||
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
onUpdate(timeSinceLastRun: number): Promise<boolean>;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { GameController } from "@spt-aki/controllers/GameController";
|
import { GameController } from "@spt-aki/controllers/GameController";
|
||||||
import { OnLoad } from "@spt-aki/di/OnLoad";
|
import { OnLoad } from "@spt-aki/di/OnLoad";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
|
import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionResponse";
|
||||||
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
|
import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse";
|
||||||
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
|
import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse";
|
||||||
@ -10,7 +11,6 @@ import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutRes
|
|||||||
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
|
import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse";
|
||||||
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
|
import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest";
|
||||||
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse";
|
||||||
import { IReportNicknameRequestData } from "@spt-aki/models/eft/game/IReportNicknameRequestData";
|
|
||||||
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails";
|
||||||
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
|
import { IVersionValidateRequestData } from "@spt-aki/models/eft/game/IVersionValidateRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
@ -69,7 +69,7 @@ export declare class GameCallbacks implements OnLoad {
|
|||||||
* @returns string
|
* @returns string
|
||||||
*/
|
*/
|
||||||
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
|
||||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
reportNickname(url: string, info: IUIDRequestData, sessionID: string): INullResponseData;
|
||||||
/**
|
/**
|
||||||
* Handle singleplayer/settings/getRaidTime
|
* Handle singleplayer/settings/getRaidTime
|
||||||
* @returns string
|
* @returns string
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { NotifierController } from "@spt-aki/controllers/NotifierController";
|
import { NotifierController } from "@spt-aki/controllers/NotifierController";
|
||||||
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
|
||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
|
import { ISelectProfileResponse } from "@spt-aki/models/eft/notifier/ISelectProfileResponse";
|
||||||
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil";
|
||||||
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
@ -29,6 +29,6 @@ export declare class NotifierCallbacks {
|
|||||||
* Handle client/game/profile/select
|
* Handle client/game/profile/select
|
||||||
* @returns ISelectProfileResponse
|
* @returns ISelectProfileResponse
|
||||||
*/
|
*/
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData<ISelectProfileResponse>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper";
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper";
|
||||||
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
import { TraderHelper } from "@spt-aki/helpers/TraderHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData";
|
import { IGetInsuranceCostRequestData } from "@spt-aki/models/eft/insurance/IGetInsuranceCostRequestData";
|
||||||
@ -20,6 +21,7 @@ import { MailSendService } from "@spt-aki/services/MailSendService";
|
|||||||
import { PaymentService } from "@spt-aki/services/PaymentService";
|
import { PaymentService } from "@spt-aki/services/PaymentService";
|
||||||
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
|
||||||
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
import { HashUtil } from "@spt-aki/utils/HashUtil";
|
||||||
|
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
|
||||||
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
import { MathUtil } from "@spt-aki/utils/MathUtil";
|
||||||
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
import { RandomUtil } from "@spt-aki/utils/RandomUtil";
|
||||||
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
||||||
@ -27,6 +29,7 @@ export declare class InsuranceController {
|
|||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
protected randomUtil: RandomUtil;
|
protected randomUtil: RandomUtil;
|
||||||
protected mathUtil: MathUtil;
|
protected mathUtil: MathUtil;
|
||||||
|
protected jsonUtil: JsonUtil;
|
||||||
protected hashUtil: HashUtil;
|
protected hashUtil: HashUtil;
|
||||||
protected eventOutputHolder: EventOutputHolder;
|
protected eventOutputHolder: EventOutputHolder;
|
||||||
protected timeUtil: TimeUtil;
|
protected timeUtil: TimeUtil;
|
||||||
@ -35,6 +38,7 @@ export declare class InsuranceController {
|
|||||||
protected itemHelper: ItemHelper;
|
protected itemHelper: ItemHelper;
|
||||||
protected profileHelper: ProfileHelper;
|
protected profileHelper: ProfileHelper;
|
||||||
protected dialogueHelper: DialogueHelper;
|
protected dialogueHelper: DialogueHelper;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected traderHelper: TraderHelper;
|
protected traderHelper: TraderHelper;
|
||||||
protected paymentService: PaymentService;
|
protected paymentService: PaymentService;
|
||||||
protected insuranceService: InsuranceService;
|
protected insuranceService: InsuranceService;
|
||||||
@ -43,7 +47,7 @@ export declare class InsuranceController {
|
|||||||
protected configServer: ConfigServer;
|
protected configServer: ConfigServer;
|
||||||
protected insuranceConfig: IInsuranceConfig;
|
protected insuranceConfig: IInsuranceConfig;
|
||||||
protected roubleTpl: string;
|
protected roubleTpl: string;
|
||||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer);
|
||||||
/**
|
/**
|
||||||
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
* Process insurance items of all profiles prior to being given back to the player through the mail service.
|
||||||
*
|
*
|
||||||
@ -146,35 +150,15 @@ export declare class InsuranceController {
|
|||||||
* @returns void
|
* @returns void
|
||||||
*/
|
*/
|
||||||
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
protected processAttachmentByParent(attachments: Item[], traderId: string, toDelete: Set<string>): void;
|
||||||
|
protected logAttachmentsBeingRemoved(attachmentIdsToRemove: string[], attachments: Item[], attachmentPrices: Record<string, number>): void;
|
||||||
|
protected weightAttachmentsByPrice(attachments: Item[]): Record<string, number>;
|
||||||
/**
|
/**
|
||||||
* Sorts the attachment items by their dynamic price in descending order.
|
* Get count of items to remove from weapon (take into account trader + price of attachment)
|
||||||
*
|
* @param weightedAttachmentByPrice Dict of item Tpls and thier rouble price
|
||||||
* @param attachments The array of attachments items.
|
* @param traderId Trader attachment insured against
|
||||||
* @returns An array of items enriched with their max price and common locale-name.
|
* @returns Attachment count to remove
|
||||||
*/
|
*/
|
||||||
protected sortAttachmentsByPrice(attachments: Item[]): EnrichedItem[];
|
protected getAttachmentCountToRemove(weightedAttachmentByPrice: Record<string, number>, traderId: string): number;
|
||||||
/**
|
|
||||||
* Logs the details of each attachment item.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
*/
|
|
||||||
protected logAttachmentsDetails(attachments: EnrichedItem[]): void;
|
|
||||||
/**
|
|
||||||
* Counts the number of successful rolls for the attachment items.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
* @param traderId The ID of the trader that has insured these attachments.
|
|
||||||
* @returns The number of successful rolls.
|
|
||||||
*/
|
|
||||||
protected countSuccessfulRolls(attachments: Item[], traderId: string): number;
|
|
||||||
/**
|
|
||||||
* Marks the most valuable attachments for deletion based on the number of successful rolls made.
|
|
||||||
*
|
|
||||||
* @param attachments The array of attachment items.
|
|
||||||
* @param successfulRolls The number of successful rolls.
|
|
||||||
* @param toDelete The array that accumulates the IDs of the items to be deleted.
|
|
||||||
*/
|
|
||||||
protected attachmentDeletionByValue(attachments: EnrichedItem[], successfulRolls: number, toDelete: Set<string>): void;
|
|
||||||
/**
|
/**
|
||||||
* Remove items from the insured items that should not be returned to the player.
|
* Remove items from the insured items that should not be returned to the player.
|
||||||
*
|
*
|
||||||
@ -192,7 +176,7 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
protected sendMail(sessionID: string, insurance: Insurance): void;
|
protected sendMail(sessionID: string, insurance: Insurance): void;
|
||||||
/**
|
/**
|
||||||
* Determines whether a insured item should be removed from the player's inventory based on a random roll and
|
* Determines whether an insured item should be removed from the player's inventory based on a random roll and
|
||||||
* trader-specific return chance.
|
* trader-specific return chance.
|
||||||
*
|
*
|
||||||
* @param traderId The ID of the trader who insured the item.
|
* @param traderId The ID of the trader who insured the item.
|
||||||
@ -220,8 +204,3 @@ export declare class InsuranceController {
|
|||||||
*/
|
*/
|
||||||
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
cost(request: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
|
||||||
}
|
}
|
||||||
interface EnrichedItem extends Item {
|
|
||||||
name: string;
|
|
||||||
dynamicPrice: number;
|
|
||||||
}
|
|
||||||
export {};
|
|
||||||
|
@ -63,7 +63,7 @@ export declare class RepeatableQuestController {
|
|||||||
* @param {string} _info Request from client
|
* @param {string} _info Request from client
|
||||||
* @param {string} sessionID Player's session id
|
* @param {string} sessionID Player's session id
|
||||||
*
|
*
|
||||||
* @returns {array} Array of "repeatableQuestObjects" as descibed above
|
* @returns {array} Array of "repeatableQuestObjects" as described above
|
||||||
*/
|
*/
|
||||||
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
getClientRepeatableQuests(_info: IEmptyRequestData, sessionID: string): IPmcDataRepeatableQuest[];
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
@ -17,11 +18,13 @@ export declare class PMCLootGenerator {
|
|||||||
protected itemFilterService: ItemFilterService;
|
protected itemFilterService: ItemFilterService;
|
||||||
protected ragfairPriceService: RagfairPriceService;
|
protected ragfairPriceService: RagfairPriceService;
|
||||||
protected seasonalEventService: SeasonalEventService;
|
protected seasonalEventService: SeasonalEventService;
|
||||||
|
protected weightedRandomHelper: WeightedRandomHelper;
|
||||||
protected pocketLootPool: Record<string, number>;
|
protected pocketLootPool: Record<string, number>;
|
||||||
protected vestLootPool: Record<string, number>;
|
protected vestLootPool: Record<string, number>;
|
||||||
protected backpackLootPool: Record<string, number>;
|
protected backpackLootPool: Record<string, number>;
|
||||||
protected pmcConfig: IPmcConfig;
|
protected pmcConfig: IPmcConfig;
|
||||||
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService);
|
protected roubleTpl: string;
|
||||||
|
constructor(itemHelper: ItemHelper, databaseServer: DatabaseServer, configServer: ConfigServer, itemFilterService: ItemFilterService, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, weightedRandomHelper: WeightedRandomHelper);
|
||||||
/**
|
/**
|
||||||
* Create an array of loot items a PMC can have in their pockets
|
* Create an array of loot items a PMC can have in their pockets
|
||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
@ -44,11 +47,4 @@ export declare class PMCLootGenerator {
|
|||||||
* @returns string array of tpls
|
* @returns string array of tpls
|
||||||
*/
|
*/
|
||||||
generatePMCBackpackLootPool(botRole: string): Record<string, number>;
|
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;
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import { SavedCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/Giv
|
|||||||
import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
import { ISptCommand } from "@spt-aki/helpers/Dialogue/Commando/SptCommands/ISptCommand";
|
||||||
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
import { ItemHelper } from "@spt-aki/helpers/ItemHelper";
|
||||||
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
import { PresetHelper } from "@spt-aki/helpers/PresetHelper";
|
||||||
|
import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem";
|
||||||
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest";
|
||||||
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
@ -30,10 +31,16 @@ export declare class GiveSptCommand implements ISptCommand {
|
|||||||
* spt give 5 <== this is the reply when the algo isn't sure about an item
|
* spt give 5 <== this is the reply when the algo isn't sure about an item
|
||||||
*/
|
*/
|
||||||
private static commandRegex;
|
private static commandRegex;
|
||||||
private static maxAllowedDistance;
|
private static acceptableConfidence;
|
||||||
protected savedCommand: Map<string, SavedCommand>;
|
protected savedCommand: Map<string, SavedCommand>;
|
||||||
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService);
|
constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService);
|
||||||
getCommand(): string;
|
getCommand(): string;
|
||||||
getCommandHelp(): string;
|
getCommandHelp(): string;
|
||||||
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;
|
performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string;
|
||||||
|
/**
|
||||||
|
* A "simple" function that checks if an item is supposed to be given to a player or not
|
||||||
|
* @param templateItem the template item to check
|
||||||
|
* @returns true if its obtainable, false if its not
|
||||||
|
*/
|
||||||
|
protected isItemAllowed(templateItem: ITemplateItem): boolean;
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,8 @@ import { Inventory } from "@spt-aki/models/eft/common/tables/IBotBase";
|
|||||||
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
import { Item, Upd } from "@spt-aki/models/eft/common/tables/IItem";
|
||||||
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
import { IAddItemDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemDirectRequest";
|
||||||
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
import { AddItem } from "@spt-aki/models/eft/inventory/IAddItemRequestData";
|
||||||
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
|
||||||
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
import { IAddItemsDirectRequest } from "@spt-aki/models/eft/inventory/IAddItemsDirectRequest";
|
||||||
|
import { IAddItemTempObject } from "@spt-aki/models/eft/inventory/IAddItemTempObject";
|
||||||
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
import { IInventoryMergeRequestData } from "@spt-aki/models/eft/inventory/IInventoryMergeRequestData";
|
||||||
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
import { IInventoryMoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryMoveRequestData";
|
||||||
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
import { IInventoryRemoveRequestData } from "@spt-aki/models/eft/inventory/IInventoryRemoveRequestData";
|
||||||
|
@ -34,4 +34,11 @@ export declare class WeightedRandomHelper {
|
|||||||
item: any;
|
item: any;
|
||||||
index: number;
|
index: number;
|
||||||
};
|
};
|
||||||
|
/**
|
||||||
|
* Find the greated common divisor of all weights and use it on the passed in dictionary
|
||||||
|
* @param weightedDict values to reduce
|
||||||
|
*/
|
||||||
|
reduceWeightValues(weightedDict: Record<string, number>): void;
|
||||||
|
protected commonDivisor(numbers: number[]): number;
|
||||||
|
protected gcd(a: number, b: number): number;
|
||||||
}
|
}
|
||||||
|
@ -922,7 +922,7 @@ export interface IBtrMapConfig {
|
|||||||
mapID: string;
|
mapID: string;
|
||||||
pathsConfigurations: IBtrMapConfig[];
|
pathsConfigurations: IBtrMapConfig[];
|
||||||
}
|
}
|
||||||
export interface IBtrMapConfig {
|
export interface IBtrPathConfig {
|
||||||
id: string;
|
id: string;
|
||||||
enterPoint: string;
|
enterPoint: string;
|
||||||
exitPoint: string;
|
exitPoint: string;
|
||||||
|
3
TypeScript/14AfterDBLoadHook/types/models/eft/common/request/IUIDRequestData.d.ts
vendored
Normal file
3
TypeScript/14AfterDBLoadHook/types/models/eft/common/request/IUIDRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export interface IUIDRequestData {
|
||||||
|
uid: string;
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
import { IPmcData } from "@spt-aki/models/eft/common/IPmcData";
|
||||||
import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
import { Dialogue, IUserBuilds } from "@spt-aki/models/eft/profile/IAkiProfile";
|
||||||
export interface IProfileTemplates {
|
export interface IProfileTemplates {
|
||||||
Standard: IProfileSides;
|
"Standard": IProfileSides;
|
||||||
"Left Behind": IProfileSides;
|
"Left Behind": IProfileSides;
|
||||||
"Prepare To Escape": IProfileSides;
|
"Prepare To Escape": IProfileSides;
|
||||||
"Edge Of Darkness": IProfileSides;
|
"Edge Of Darkness": IProfileSides;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface IReportNicknameRequestData {
|
|
||||||
uid: string;
|
|
||||||
}
|
|
@ -1,14 +1,14 @@
|
|||||||
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
import { Effect } from "@spt-aki/models/eft/health/Effect";
|
||||||
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
import { BodyPart } from "@spt-aki/models/eft/health/IOffraidHealRequestData";
|
||||||
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
|
||||||
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
|
||||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
|
||||||
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
import { QteActivityType } from "@spt-aki/models/enums/hideout/QteActivityType";
|
||||||
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
import { QteEffectType } from "@spt-aki/models/enums/hideout/QteEffectType";
|
||||||
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
import { QteResultType } from "@spt-aki/models/enums/hideout/QteResultType";
|
||||||
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
import { QteRewardType } from "@spt-aki/models/enums/hideout/QteRewardType";
|
||||||
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
import { QteType } from "@spt-aki/models/enums/hideout/QteType";
|
||||||
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
import { RequirementType } from "@spt-aki/models/enums/hideout/RequirementType";
|
||||||
|
import { HideoutAreas } from "@spt-aki/models/enums/HideoutAreas";
|
||||||
|
import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||||
|
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||||
export interface IQteData {
|
export interface IQteData {
|
||||||
id: string;
|
id: string;
|
||||||
type: QteActivityType;
|
type: QteActivityType;
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
export interface ISelectProfileRequestData {
|
|
||||||
uid: string;
|
|
||||||
}
|
|
@ -109,5 +109,6 @@ export declare enum BaseClasses {
|
|||||||
RECEIVER = "55818a304bdc2db5418b457d",
|
RECEIVER = "55818a304bdc2db5418b457d",
|
||||||
BARREL = "555ef6e44bdc2de9068b457e",
|
BARREL = "555ef6e44bdc2de9068b457e",
|
||||||
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
CHARGING_HANDLE = "55818a6f4bdc2db9688b456b",
|
||||||
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 "
|
COMB_MUZZLE_DEVICE = "550aa4dd4bdc2dc9348b4569 ",
|
||||||
|
HIDEOUT_AREA_CONTAINER = "63da6da4784a55176c018dba"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||||
|
import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData";
|
||||||
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData";
|
||||||
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
import { INotifierChannel } from "@spt-aki/models/eft/notifier/INotifier";
|
||||||
import { ISelectProfileRequestData } from "@spt-aki/models/eft/notifier/ISelectProfileRequestData";
|
|
||||||
export interface INotifierCallbacks {
|
export interface INotifierCallbacks {
|
||||||
/**
|
/**
|
||||||
* If we don't have anything to send, it's ok to not send anything back
|
* If we don't have anything to send, it's ok to not send anything back
|
||||||
@ -12,6 +12,6 @@ export interface INotifierCallbacks {
|
|||||||
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
sendNotification(sessionID: string, req: any, resp: any, data: any): void;
|
||||||
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
getNotifier(url: string, info: any, sessionID: string): IGetBodyResponseData<any[]>;
|
||||||
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
createNotifierChannel(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<INotifierChannel>;
|
||||||
selectProfile(url: string, info: ISelectProfileRequestData, sessionID: string): IGetBodyResponseData<any>;
|
selectProfile(url: string, info: IUIDRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||||
notify(url: string, info: any, sessionID: string): string;
|
notify(url: string, info: any, sessionID: string): string;
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,6 @@ export interface IInsuranceConfig extends IBaseConfig {
|
|||||||
returnTimeOverrideSeconds: number;
|
returnTimeOverrideSeconds: number;
|
||||||
/** How often server should process insurance in seconds */
|
/** How often server should process insurance in seconds */
|
||||||
runIntervalSeconds: number;
|
runIntervalSeconds: number;
|
||||||
|
minAttachmentRoublePriceToBeTaken: number;
|
||||||
|
chanceNoAttachmentsTakenPercent: number;
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { WebSocketServer } from "@spt-aki/servers/WebSocketServer";
|
|
||||||
import { IHttpListener } from "@spt-aki/servers/http/IHttpListener";
|
import { IHttpListener } from "@spt-aki/servers/http/IHttpListener";
|
||||||
|
import { WebSocketServer } from "@spt-aki/servers/WebSocketServer";
|
||||||
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
import { LocalisationService } from "@spt-aki/services/LocalisationService";
|
||||||
export declare class HttpServer {
|
export declare class HttpServer {
|
||||||
protected logger: ILogger;
|
protected logger: ILogger;
|
||||||
|
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