3.9.65-DEV #37
@ -1,4 +1,4 @@
|
||||
# Mod examples for v3.9.4
|
||||
# Mod examples for v3.9.6
|
||||
|
||||
A collection of example mods that perform typical actions in SPT
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export declare class Serializer {
|
||||
serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void;
|
||||
|
@ -76,6 +76,14 @@ export declare class BotEquipmentModGenerator {
|
||||
* @returns Weapon + mods array
|
||||
*/
|
||||
generateModsForWeapon(sessionId: string, request: IGenerateWeaponRequest): Item[];
|
||||
/**
|
||||
* Should the provided bot have its stock chance values altered to 100%
|
||||
* @param modSlot Slot to check
|
||||
* @param botEquipConfig Bots equipment config/chance values
|
||||
* @param modToAddTemplate Mod being added to bots weapon
|
||||
* @returns True if it should
|
||||
*/
|
||||
protected shouldForceSubStockSlots(modSlot: string, botEquipConfig: EquipmentFilters, modToAddTemplate: ITemplateItem): boolean;
|
||||
/**
|
||||
* Is this modslot a front or rear sight
|
||||
* @param modSlot Slot to check
|
||||
|
@ -22,19 +22,11 @@ export declare class BotLevelGenerator {
|
||||
generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult;
|
||||
protected chooseBotLevel(min: number, max: number, shift: number, number: number): number;
|
||||
/**
|
||||
* Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table
|
||||
* @param botGenerationDetails Details to help generate a bot
|
||||
* @param levelDetails
|
||||
* @param maxLevel Max possible level
|
||||
* @returns Highest level possible for bot
|
||||
*/
|
||||
protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number;
|
||||
/**
|
||||
* Get the lowest level a bot can be relative to the players level, but no lower than 1
|
||||
* Return the min and max bot level based on a relative delta from the PMC level
|
||||
* @param botGenerationDetails Details to help generate a bot
|
||||
* @param levelDetails
|
||||
* @param maxlevel Max level allowed
|
||||
* @returns Lowest level possible for bot
|
||||
* @returns A MinMax of the lowest and highest level to generate the bots
|
||||
*/
|
||||
protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number;
|
||||
protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ export declare class RepeatableQuestGenerator {
|
||||
protected configServer: ConfigServer;
|
||||
protected cloner: ICloner;
|
||||
protected questConfig: IQuestConfig;
|
||||
protected maxRandomNumberAttempts: number;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner);
|
||||
/**
|
||||
* This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||
|
@ -76,7 +76,13 @@ export declare class ItemHelper {
|
||||
*/
|
||||
generateUpdForItem(itemTemplate: ITemplateItem): Upd;
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||
* Checks if a tpl is a valid item. Valid meaning that it's an item that be stored in stash
|
||||
* Valid means:
|
||||
* Not quest item
|
||||
* 'Item' type
|
||||
* Not on the invalid base types array
|
||||
* Price above 0 roubles
|
||||
* Not on item config blacklist
|
||||
* @param {string} tpl the template id / tpl
|
||||
* @returns boolean; true for items that may be in player possession and not quest items
|
||||
*/
|
||||
|
@ -3,6 +3,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||
import { Common, CounterKeyValue, Stats } from "@spt/models/eft/common/tables/IBotBase";
|
||||
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData";
|
||||
import { BonusType } from "@spt/models/enums/BonusType";
|
||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||
import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
@ -190,6 +191,13 @@ export declare class ProfileHelper {
|
||||
* @param rowsToAdd How many rows to give profile
|
||||
*/
|
||||
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
||||
/**
|
||||
* Iterate over all bonuses and sum up all bonuses of desired type in provided profile
|
||||
* @param pmcProfile Player profile
|
||||
* @param desiredBonus Bonus to sum up
|
||||
* @returns Summed bonus value or 0 if no bonus found
|
||||
*/
|
||||
getBonusValueFromProfile(pmcProfile: IPmcData, desiredBonus: BonusType): number;
|
||||
playerIsFleaBanned(pmcProfile: IPmcData): boolean;
|
||||
/**
|
||||
* Add an achievement to player profile
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) => void;
|
||||
/**
|
||||
@ -6,7 +5,9 @@ export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) =
|
||||
* @param basePath The base path
|
||||
* @returns The decorator that create the listener proxy
|
||||
*/
|
||||
export declare const Listen: (basePath: string) => <T extends new (...args: any[]) => any>(Base: T) => T;
|
||||
export declare const Listen: (basePath: string) => <T extends {
|
||||
new (...args: any[]): any;
|
||||
}>(Base: T) => T;
|
||||
/**
|
||||
* HTTP DELETE decorator
|
||||
*/
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage } from "node:http";
|
||||
import { DynamicRouter, Router, StaticRouter } from "@spt/di/Router";
|
||||
export declare class HttpRouter {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { ImageRouteService } from "@spt/services/mod/image/ImageRouteService";
|
||||
import { HttpFileUtil } from "@spt/utils/HttpFileUtil";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { BundleLoader } from "@spt/loaders/BundleLoader";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { ImageRouter } from "@spt/routers/ImageRouter";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { NotifierController } from "@spt/controllers/NotifierController";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { ApplicationContext } from "@spt/context/ApplicationContext";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
@ -25,7 +24,7 @@ export declare class HttpServer {
|
||||
* Handle server loading event
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise<void>;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { SaveLoadRouter } from "@spt/di/Router";
|
||||
import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||
@ -18,6 +19,7 @@ export declare class SaveServer {
|
||||
protected profiles: {};
|
||||
protected onBeforeSaveCallbacks: {};
|
||||
protected saveMd5: {};
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer);
|
||||
/**
|
||||
* Add callback to occur prior to saving profile changes
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import http, { IncomingMessage } from "node:http";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export interface IHttpListener {
|
||||
canHandle(sessionId: string, req: IncomingMessage): boolean;
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage } from "node:http";
|
||||
import { WebSocket } from "ws";
|
||||
export interface IWebSocketConnectionHandler {
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage } from "http";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
||||
|
@ -22,6 +22,7 @@ import { HashUtil } from "@spt/utils/HashUtil";
|
||||
import { RandomUtil } from "@spt/utils/RandomUtil";
|
||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
export declare class InsuranceService {
|
||||
protected logger: ILogger;
|
||||
protected databaseService: DatabaseService;
|
||||
@ -39,10 +40,11 @@ export declare class InsuranceService {
|
||||
protected mailSendService: MailSendService;
|
||||
protected configServer: ConfigServer;
|
||||
protected cloner: ICloner;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected insured: Record<string, Record<string, Item[]>>;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner);
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner, profileHelper: ProfileHelper);
|
||||
/**
|
||||
* Does player have insurance array
|
||||
* @param sessionId Player id
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||
import { Item } from "@spt/models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||
@ -11,8 +12,9 @@ export declare class RagfairTaxService {
|
||||
protected databaseService: DatabaseService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected playerOfferTaxCache: Record<string, IStorePlayerOfferTaxAmountRequestData>;
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper);
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper, profileHelper: ProfileHelper);
|
||||
storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void;
|
||||
clearStoredOfferTaxById(offerIdToRemove: string): void;
|
||||
getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData;
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { IHttpListener } from "@spt/servers/http/IHttpListener";
|
||||
export declare class HttpListenerMod implements IHttpListener {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
export declare class HttpListenerModService {
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import crypto from "node:crypto";
|
||||
import fs from "node:fs";
|
||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { ServerResponse } from "node:http";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
export declare class HttpFileUtil {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||
export declare class ObjectId {
|
||||
protected timeUtil: TimeUtil;
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import "reflect-metadata";
|
||||
import fs from "node:fs";
|
||||
import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import fs from "node:fs";
|
||||
import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest";
|
||||
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export declare class Serializer {
|
||||
serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void;
|
||||
|
@ -76,6 +76,14 @@ export declare class BotEquipmentModGenerator {
|
||||
* @returns Weapon + mods array
|
||||
*/
|
||||
generateModsForWeapon(sessionId: string, request: IGenerateWeaponRequest): Item[];
|
||||
/**
|
||||
* Should the provided bot have its stock chance values altered to 100%
|
||||
* @param modSlot Slot to check
|
||||
* @param botEquipConfig Bots equipment config/chance values
|
||||
* @param modToAddTemplate Mod being added to bots weapon
|
||||
* @returns True if it should
|
||||
*/
|
||||
protected shouldForceSubStockSlots(modSlot: string, botEquipConfig: EquipmentFilters, modToAddTemplate: ITemplateItem): boolean;
|
||||
/**
|
||||
* Is this modslot a front or rear sight
|
||||
* @param modSlot Slot to check
|
||||
|
@ -22,19 +22,11 @@ export declare class BotLevelGenerator {
|
||||
generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult;
|
||||
protected chooseBotLevel(min: number, max: number, shift: number, number: number): number;
|
||||
/**
|
||||
* Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table
|
||||
* @param botGenerationDetails Details to help generate a bot
|
||||
* @param levelDetails
|
||||
* @param maxLevel Max possible level
|
||||
* @returns Highest level possible for bot
|
||||
*/
|
||||
protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number;
|
||||
/**
|
||||
* Get the lowest level a bot can be relative to the players level, but no lower than 1
|
||||
* Return the min and max bot level based on a relative delta from the PMC level
|
||||
* @param botGenerationDetails Details to help generate a bot
|
||||
* @param levelDetails
|
||||
* @param maxlevel Max level allowed
|
||||
* @returns Lowest level possible for bot
|
||||
* @returns A MinMax of the lowest and highest level to generate the bots
|
||||
*/
|
||||
protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number;
|
||||
protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ export declare class RepeatableQuestGenerator {
|
||||
protected configServer: ConfigServer;
|
||||
protected cloner: ICloner;
|
||||
protected questConfig: IQuestConfig;
|
||||
protected maxRandomNumberAttempts: number;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner);
|
||||
/**
|
||||
* This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||
|
@ -76,7 +76,13 @@ export declare class ItemHelper {
|
||||
*/
|
||||
generateUpdForItem(itemTemplate: ITemplateItem): Upd;
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||
* Checks if a tpl is a valid item. Valid meaning that it's an item that be stored in stash
|
||||
* Valid means:
|
||||
* Not quest item
|
||||
* 'Item' type
|
||||
* Not on the invalid base types array
|
||||
* Price above 0 roubles
|
||||
* Not on item config blacklist
|
||||
* @param {string} tpl the template id / tpl
|
||||
* @returns boolean; true for items that may be in player possession and not quest items
|
||||
*/
|
||||
|
@ -3,6 +3,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||
import { Common, CounterKeyValue, Stats } from "@spt/models/eft/common/tables/IBotBase";
|
||||
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData";
|
||||
import { BonusType } from "@spt/models/enums/BonusType";
|
||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||
import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
@ -190,6 +191,13 @@ export declare class ProfileHelper {
|
||||
* @param rowsToAdd How many rows to give profile
|
||||
*/
|
||||
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
||||
/**
|
||||
* Iterate over all bonuses and sum up all bonuses of desired type in provided profile
|
||||
* @param pmcProfile Player profile
|
||||
* @param desiredBonus Bonus to sum up
|
||||
* @returns Summed bonus value or 0 if no bonus found
|
||||
*/
|
||||
getBonusValueFromProfile(pmcProfile: IPmcData, desiredBonus: BonusType): number;
|
||||
playerIsFleaBanned(pmcProfile: IPmcData): boolean;
|
||||
/**
|
||||
* Add an achievement to player profile
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) => void;
|
||||
/**
|
||||
@ -6,7 +5,9 @@ export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) =
|
||||
* @param basePath The base path
|
||||
* @returns The decorator that create the listener proxy
|
||||
*/
|
||||
export declare const Listen: (basePath: string) => <T extends new (...args: any[]) => any>(Base: T) => T;
|
||||
export declare const Listen: (basePath: string) => <T extends {
|
||||
new (...args: any[]): any;
|
||||
}>(Base: T) => T;
|
||||
/**
|
||||
* HTTP DELETE decorator
|
||||
*/
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage } from "node:http";
|
||||
import { DynamicRouter, Router, StaticRouter } from "@spt/di/Router";
|
||||
export declare class HttpRouter {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { ImageRouteService } from "@spt/services/mod/image/ImageRouteService";
|
||||
import { HttpFileUtil } from "@spt/utils/HttpFileUtil";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { BundleLoader } from "@spt/loaders/BundleLoader";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { ImageRouter } from "@spt/routers/ImageRouter";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { NotifierController } from "@spt/controllers/NotifierController";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { ApplicationContext } from "@spt/context/ApplicationContext";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
@ -25,7 +24,7 @@ export declare class HttpServer {
|
||||
* Handle server loading event
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise<void>;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { SaveLoadRouter } from "@spt/di/Router";
|
||||
import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||
@ -18,6 +19,7 @@ export declare class SaveServer {
|
||||
protected profiles: {};
|
||||
protected onBeforeSaveCallbacks: {};
|
||||
protected saveMd5: {};
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer);
|
||||
/**
|
||||
* Add callback to occur prior to saving profile changes
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import http, { IncomingMessage } from "node:http";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export interface IHttpListener {
|
||||
canHandle(sessionId: string, req: IncomingMessage): boolean;
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage } from "node:http";
|
||||
import { WebSocket } from "ws";
|
||||
export interface IWebSocketConnectionHandler {
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage } from "http";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
||||
|
@ -22,6 +22,7 @@ import { HashUtil } from "@spt/utils/HashUtil";
|
||||
import { RandomUtil } from "@spt/utils/RandomUtil";
|
||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
export declare class InsuranceService {
|
||||
protected logger: ILogger;
|
||||
protected databaseService: DatabaseService;
|
||||
@ -39,10 +40,11 @@ export declare class InsuranceService {
|
||||
protected mailSendService: MailSendService;
|
||||
protected configServer: ConfigServer;
|
||||
protected cloner: ICloner;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected insured: Record<string, Record<string, Item[]>>;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner);
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner, profileHelper: ProfileHelper);
|
||||
/**
|
||||
* Does player have insurance array
|
||||
* @param sessionId Player id
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||
import { Item } from "@spt/models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||
@ -11,8 +12,9 @@ export declare class RagfairTaxService {
|
||||
protected databaseService: DatabaseService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected playerOfferTaxCache: Record<string, IStorePlayerOfferTaxAmountRequestData>;
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper);
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper, profileHelper: ProfileHelper);
|
||||
storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void;
|
||||
clearStoredOfferTaxById(offerIdToRemove: string): void;
|
||||
getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData;
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { IHttpListener } from "@spt/servers/http/IHttpListener";
|
||||
export declare class HttpListenerMod implements IHttpListener {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
export declare class HttpListenerModService {
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import crypto from "node:crypto";
|
||||
import fs from "node:fs";
|
||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { ServerResponse } from "node:http";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
export declare class HttpFileUtil {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||
export declare class ObjectId {
|
||||
protected timeUtil: TimeUtil;
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import "reflect-metadata";
|
||||
import fs from "node:fs";
|
||||
import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import fs from "node:fs";
|
||||
import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest";
|
||||
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export declare class Serializer {
|
||||
serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void;
|
||||
|
@ -76,6 +76,14 @@ export declare class BotEquipmentModGenerator {
|
||||
* @returns Weapon + mods array
|
||||
*/
|
||||
generateModsForWeapon(sessionId: string, request: IGenerateWeaponRequest): Item[];
|
||||
/**
|
||||
* Should the provided bot have its stock chance values altered to 100%
|
||||
* @param modSlot Slot to check
|
||||
* @param botEquipConfig Bots equipment config/chance values
|
||||
* @param modToAddTemplate Mod being added to bots weapon
|
||||
* @returns True if it should
|
||||
*/
|
||||
protected shouldForceSubStockSlots(modSlot: string, botEquipConfig: EquipmentFilters, modToAddTemplate: ITemplateItem): boolean;
|
||||
/**
|
||||
* Is this modslot a front or rear sight
|
||||
* @param modSlot Slot to check
|
||||
|
@ -22,19 +22,11 @@ export declare class BotLevelGenerator {
|
||||
generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult;
|
||||
protected chooseBotLevel(min: number, max: number, shift: number, number: number): number;
|
||||
/**
|
||||
* Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table
|
||||
* @param botGenerationDetails Details to help generate a bot
|
||||
* @param levelDetails
|
||||
* @param maxLevel Max possible level
|
||||
* @returns Highest level possible for bot
|
||||
*/
|
||||
protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number;
|
||||
/**
|
||||
* Get the lowest level a bot can be relative to the players level, but no lower than 1
|
||||
* Return the min and max bot level based on a relative delta from the PMC level
|
||||
* @param botGenerationDetails Details to help generate a bot
|
||||
* @param levelDetails
|
||||
* @param maxlevel Max level allowed
|
||||
* @returns Lowest level possible for bot
|
||||
* @returns A MinMax of the lowest and highest level to generate the bots
|
||||
*/
|
||||
protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number;
|
||||
protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ export declare class RepeatableQuestGenerator {
|
||||
protected configServer: ConfigServer;
|
||||
protected cloner: ICloner;
|
||||
protected questConfig: IQuestConfig;
|
||||
protected maxRandomNumberAttempts: number;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner);
|
||||
/**
|
||||
* This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||
|
@ -76,7 +76,13 @@ export declare class ItemHelper {
|
||||
*/
|
||||
generateUpdForItem(itemTemplate: ITemplateItem): Upd;
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||
* Checks if a tpl is a valid item. Valid meaning that it's an item that be stored in stash
|
||||
* Valid means:
|
||||
* Not quest item
|
||||
* 'Item' type
|
||||
* Not on the invalid base types array
|
||||
* Price above 0 roubles
|
||||
* Not on item config blacklist
|
||||
* @param {string} tpl the template id / tpl
|
||||
* @returns boolean; true for items that may be in player possession and not quest items
|
||||
*/
|
||||
|
@ -3,6 +3,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||
import { Common, CounterKeyValue, Stats } from "@spt/models/eft/common/tables/IBotBase";
|
||||
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData";
|
||||
import { BonusType } from "@spt/models/enums/BonusType";
|
||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||
import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
@ -190,6 +191,13 @@ export declare class ProfileHelper {
|
||||
* @param rowsToAdd How many rows to give profile
|
||||
*/
|
||||
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
||||
/**
|
||||
* Iterate over all bonuses and sum up all bonuses of desired type in provided profile
|
||||
* @param pmcProfile Player profile
|
||||
* @param desiredBonus Bonus to sum up
|
||||
* @returns Summed bonus value or 0 if no bonus found
|
||||
*/
|
||||
getBonusValueFromProfile(pmcProfile: IPmcData, desiredBonus: BonusType): number;
|
||||
playerIsFleaBanned(pmcProfile: IPmcData): boolean;
|
||||
/**
|
||||
* Add an achievement to player profile
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) => void;
|
||||
/**
|
||||
@ -6,7 +5,9 @@ export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) =
|
||||
* @param basePath The base path
|
||||
* @returns The decorator that create the listener proxy
|
||||
*/
|
||||
export declare const Listen: (basePath: string) => <T extends new (...args: any[]) => any>(Base: T) => T;
|
||||
export declare const Listen: (basePath: string) => <T extends {
|
||||
new (...args: any[]): any;
|
||||
}>(Base: T) => T;
|
||||
/**
|
||||
* HTTP DELETE decorator
|
||||
*/
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage } from "node:http";
|
||||
import { DynamicRouter, Router, StaticRouter } from "@spt/di/Router";
|
||||
export declare class HttpRouter {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { ImageRouteService } from "@spt/services/mod/image/ImageRouteService";
|
||||
import { HttpFileUtil } from "@spt/utils/HttpFileUtil";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { BundleLoader } from "@spt/loaders/BundleLoader";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { ImageRouter } from "@spt/routers/ImageRouter";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { NotifierController } from "@spt/controllers/NotifierController";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { ApplicationContext } from "@spt/context/ApplicationContext";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
@ -25,7 +24,7 @@ export declare class HttpServer {
|
||||
* Handle server loading event
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise<void>;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { SaveLoadRouter } from "@spt/di/Router";
|
||||
import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||
@ -18,6 +19,7 @@ export declare class SaveServer {
|
||||
protected profiles: {};
|
||||
protected onBeforeSaveCallbacks: {};
|
||||
protected saveMd5: {};
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer);
|
||||
/**
|
||||
* Add callback to occur prior to saving profile changes
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import http, { IncomingMessage } from "node:http";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export interface IHttpListener {
|
||||
canHandle(sessionId: string, req: IncomingMessage): boolean;
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage } from "node:http";
|
||||
import { WebSocket } from "ws";
|
||||
export interface IWebSocketConnectionHandler {
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage } from "http";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
import { IWsNotificationEvent } from "@spt/models/eft/ws/IWsNotificationEvent";
|
||||
|
@ -22,6 +22,7 @@ import { HashUtil } from "@spt/utils/HashUtil";
|
||||
import { RandomUtil } from "@spt/utils/RandomUtil";
|
||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||
import { ICloner } from "@spt/utils/cloners/ICloner";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
export declare class InsuranceService {
|
||||
protected logger: ILogger;
|
||||
protected databaseService: DatabaseService;
|
||||
@ -39,10 +40,11 @@ export declare class InsuranceService {
|
||||
protected mailSendService: MailSendService;
|
||||
protected configServer: ConfigServer;
|
||||
protected cloner: ICloner;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected insured: Record<string, Record<string, Item[]>>;
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
protected lostOnDeathConfig: ILostOnDeathConfig;
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner);
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner, profileHelper: ProfileHelper);
|
||||
/**
|
||||
* Does player have insurance array
|
||||
* @param sessionId Player id
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { ItemHelper } from "@spt/helpers/ItemHelper";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||
import { Item } from "@spt/models/eft/common/tables/IItem";
|
||||
import { ITemplateItem } from "@spt/models/eft/common/tables/ITemplateItem";
|
||||
@ -11,8 +12,9 @@ export declare class RagfairTaxService {
|
||||
protected databaseService: DatabaseService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected playerOfferTaxCache: Record<string, IStorePlayerOfferTaxAmountRequestData>;
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper);
|
||||
constructor(logger: ILogger, databaseService: DatabaseService, ragfairPriceService: RagfairPriceService, itemHelper: ItemHelper, profileHelper: ProfileHelper);
|
||||
storeClientOfferTaxValue(sessionId: string, offer: IStorePlayerOfferTaxAmountRequestData): void;
|
||||
clearStoredOfferTaxById(offerIdToRemove: string): void;
|
||||
getStoredClientOfferTaxValueById(offerIdToGet: string): IStorePlayerOfferTaxAmountRequestData;
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { IHttpListener } from "@spt/servers/http/IHttpListener";
|
||||
export declare class HttpListenerMod implements IHttpListener {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
export declare class HttpListenerModService {
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import crypto from "node:crypto";
|
||||
import fs from "node:fs";
|
||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { ServerResponse } from "node:http";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
export declare class HttpFileUtil {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { TimeUtil } from "@spt/utils/TimeUtil";
|
||||
export declare class ObjectId {
|
||||
protected timeUtil: TimeUtil;
|
||||
|
@ -1,5 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
/// <reference types="node" />
|
||||
import "reflect-metadata";
|
||||
import fs from "node:fs";
|
||||
import { IAsyncQueue } from "@spt/models/spt/utils/IAsyncQueue";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import fs from "node:fs";
|
||||
import { Daum } from "@spt/models/eft/itemEvent/IItemEventRouterRequest";
|
||||
import { LogBackgroundColor } from "@spt/models/spt/logging/LogBackgroundColor";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export declare class Serializer {
|
||||
serialize(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: any): void;
|
||||
|
@ -76,6 +76,14 @@ export declare class BotEquipmentModGenerator {
|
||||
* @returns Weapon + mods array
|
||||
*/
|
||||
generateModsForWeapon(sessionId: string, request: IGenerateWeaponRequest): Item[];
|
||||
/**
|
||||
* Should the provided bot have its stock chance values altered to 100%
|
||||
* @param modSlot Slot to check
|
||||
* @param botEquipConfig Bots equipment config/chance values
|
||||
* @param modToAddTemplate Mod being added to bots weapon
|
||||
* @returns True if it should
|
||||
*/
|
||||
protected shouldForceSubStockSlots(modSlot: string, botEquipConfig: EquipmentFilters, modToAddTemplate: ITemplateItem): boolean;
|
||||
/**
|
||||
* Is this modslot a front or rear sight
|
||||
* @param modSlot Slot to check
|
||||
|
@ -22,19 +22,11 @@ export declare class BotLevelGenerator {
|
||||
generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult;
|
||||
protected chooseBotLevel(min: number, max: number, shift: number, number: number): number;
|
||||
/**
|
||||
* Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table
|
||||
* @param botGenerationDetails Details to help generate a bot
|
||||
* @param levelDetails
|
||||
* @param maxLevel Max possible level
|
||||
* @returns Highest level possible for bot
|
||||
*/
|
||||
protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number;
|
||||
/**
|
||||
* Get the lowest level a bot can be relative to the players level, but no lower than 1
|
||||
* Return the min and max bot level based on a relative delta from the PMC level
|
||||
* @param botGenerationDetails Details to help generate a bot
|
||||
* @param levelDetails
|
||||
* @param maxlevel Max level allowed
|
||||
* @returns Lowest level possible for bot
|
||||
* @returns A MinMax of the lowest and highest level to generate the bots
|
||||
*/
|
||||
protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number;
|
||||
protected getRelativeBotLevelRange(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxAvailableLevel: number): MinMax;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ export declare class RepeatableQuestGenerator {
|
||||
protected configServer: ConfigServer;
|
||||
protected cloner: ICloner;
|
||||
protected questConfig: IQuestConfig;
|
||||
protected maxRandomNumberAttempts: number;
|
||||
constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseService: DatabaseService, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner);
|
||||
/**
|
||||
* This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json).
|
||||
|
@ -76,7 +76,13 @@ export declare class ItemHelper {
|
||||
*/
|
||||
generateUpdForItem(itemTemplate: ITemplateItem): Upd;
|
||||
/**
|
||||
* Checks if an id is a valid item. Valid meaning that it's an item that be stored in stash
|
||||
* Checks if a tpl is a valid item. Valid meaning that it's an item that be stored in stash
|
||||
* Valid means:
|
||||
* Not quest item
|
||||
* 'Item' type
|
||||
* Not on the invalid base types array
|
||||
* Price above 0 roubles
|
||||
* Not on item config blacklist
|
||||
* @param {string} tpl the template id / tpl
|
||||
* @returns boolean; true for items that may be in player possession and not quest items
|
||||
*/
|
||||
|
@ -3,6 +3,7 @@ import { IPmcData } from "@spt/models/eft/common/IPmcData";
|
||||
import { Common, CounterKeyValue, Stats } from "@spt/models/eft/common/tables/IBotBase";
|
||||
import { ISptProfile } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { IValidateNicknameRequestData } from "@spt/models/eft/profile/IValidateNicknameRequestData";
|
||||
import { BonusType } from "@spt/models/enums/BonusType";
|
||||
import { SkillTypes } from "@spt/models/enums/SkillTypes";
|
||||
import { IInventoryConfig } from "@spt/models/spt/config/IInventoryConfig";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
@ -190,6 +191,13 @@ export declare class ProfileHelper {
|
||||
* @param rowsToAdd How many rows to give profile
|
||||
*/
|
||||
addStashRowsBonusToProfile(sessionId: string, rowsToAdd: number): void;
|
||||
/**
|
||||
* Iterate over all bonuses and sum up all bonuses of desired type in provided profile
|
||||
* @param pmcProfile Player profile
|
||||
* @param desiredBonus Bonus to sum up
|
||||
* @returns Summed bonus value or 0 if no bonus found
|
||||
*/
|
||||
getBonusValueFromProfile(pmcProfile: IPmcData, desiredBonus: BonusType): number;
|
||||
playerIsFleaBanned(pmcProfile: IPmcData): boolean;
|
||||
/**
|
||||
* Add an achievement to player profile
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) => void;
|
||||
/**
|
||||
@ -6,7 +5,9 @@ export type HandleFn = (_: string, req: IncomingMessage, resp: ServerResponse) =
|
||||
* @param basePath The base path
|
||||
* @returns The decorator that create the listener proxy
|
||||
*/
|
||||
export declare const Listen: (basePath: string) => <T extends new (...args: any[]) => any>(Base: T) => T;
|
||||
export declare const Listen: (basePath: string) => <T extends {
|
||||
new (...args: any[]): any;
|
||||
}>(Base: T) => T;
|
||||
/**
|
||||
* HTTP DELETE decorator
|
||||
*/
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage } from "node:http";
|
||||
import { DynamicRouter, Router, StaticRouter } from "@spt/di/Router";
|
||||
export declare class HttpRouter {
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { ImageRouteService } from "@spt/services/mod/image/ImageRouteService";
|
||||
import { HttpFileUtil } from "@spt/utils/HttpFileUtil";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { BundleLoader } from "@spt/loaders/BundleLoader";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
import { ImageRouter } from "@spt/routers/ImageRouter";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { NotifierController } from "@spt/controllers/NotifierController";
|
||||
import { Serializer } from "@spt/di/Serializer";
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import { IncomingMessage, ServerResponse } from "node:http";
|
||||
import { ApplicationContext } from "@spt/context/ApplicationContext";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
@ -25,7 +24,7 @@ export declare class HttpServer {
|
||||
* Handle server loading event
|
||||
*/
|
||||
load(): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): void;
|
||||
protected handleRequest(req: IncomingMessage, resp: ServerResponse): Promise<void>;
|
||||
/**
|
||||
* Check against hardcoded values that determine its from a local address
|
||||
* @param remoteAddress Address to check
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { SaveLoadRouter } from "@spt/di/Router";
|
||||
import { ISptProfile, Info } from "@spt/models/eft/profile/ISptProfile";
|
||||
import { ICoreConfig } from "@spt/models/spt/config/ICoreConfig";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||
import { LocalisationService } from "@spt/services/LocalisationService";
|
||||
@ -18,6 +19,7 @@ export declare class SaveServer {
|
||||
protected profiles: {};
|
||||
protected onBeforeSaveCallbacks: {};
|
||||
protected saveMd5: {};
|
||||
protected coreConfig: ICoreConfig;
|
||||
constructor(vfs: VFS, saveLoadRouters: SaveLoadRouter[], jsonUtil: JsonUtil, hashUtil: HashUtil, localisationService: LocalisationService, logger: ILogger, configServer: ConfigServer);
|
||||
/**
|
||||
* Add callback to occur prior to saving profile changes
|
||||
|
@ -1,4 +1,3 @@
|
||||
/// <reference types="node" />
|
||||
import http, { IncomingMessage } from "node:http";
|
||||
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
||||
import { ILogger } from "@spt/models/spt/utils/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