3.1.x mod examples update #4

Merged
chomp merged 1 commits from :3xx-update into master 2022-07-09 14:34:41 -04:00
1114 changed files with 5063 additions and 2063 deletions

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.0.1", "akiVersion": "3.1.0",
"scripts": { "scripts": {
"setup:environment": "npm i", "setup:environment": "npm i",
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist", "build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist",

View File

@ -1,14 +1,14 @@
import { DependencyContainer, Lifecycle } from "tsyringe"; import { DependencyContainer, Lifecycle } from "tsyringe";
import { IMod } from "@spt-aki/models/external/mod"; import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod";
import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod";
import { MyMod } from "./MyMod"; import { MyMod } from "./MyMod";
import { Processing } from "./Processing"; import { Processing } from "./Processing";
class Mod implements IMod class Mod implements IPreAkiLoadMod, IPostAkiLoadMod
{ {
// Perform these actions before server fully loads // Perform these actions before server fully loads
public load(container: DependencyContainer): void public preAkiLoad(container: DependencyContainer): void {
{
// This class is registered as a singleton. This means ONE and only ONE bean // This class is registered as a singleton. This means ONE and only ONE bean
// of this class will ever exist. // of this class will ever exist.
container.register<MyMod>("MyMod", MyMod, {lifecycle: Lifecycle.Singleton}); container.register<MyMod>("MyMod", MyMod, {lifecycle: Lifecycle.Singleton});
@ -18,7 +18,7 @@ class Mod implements IMod
container.register<Processing>("Processing", Processing); container.register<Processing>("Processing", Processing);
} }
public delayedLoad(container: DependencyContainer): void public postAkiLoad(container: DependencyContainer): void
{ {
// We will run this in a quick 5 loop to show how singletons and transients work // We will run this in a quick 5 loop to show how singletons and transients work
for (let i = 0; i < 5; i++) for (let i = 0; i < 5; i++)

View File

@ -2,6 +2,7 @@ import { GameController } from "../controllers/GameController";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData"; import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData"; import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
@ -20,5 +21,6 @@ declare class GameCallbacks {
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string; getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
} }
export { GameCallbacks }; export { GameCallbacks };

View File

@ -13,6 +13,13 @@ export declare class HealthCallbacks {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected healthController: HealthController; protected healthController: HealthController;
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController);
/**
* Custom aki server request found in modules/HealthSynchronizer.cs
* @param url
* @param info HealthListener.Instance.CurrentHealth class
* @param sessionID session id
* @returns empty response, no data sent back to client
*/
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>; syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -3,6 +3,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
@ -17,7 +18,7 @@ export declare class InsuranceCallbacks extends OnLoadOnUpdate {
protected insuranceConfig: IInsuranceConfig; protected insuranceConfig: IInsuranceConfig;
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
onLoad(): void; onLoad(): void;
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<any>; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
onUpdate(secondsSinceLastRun: number): boolean; onUpdate(secondsSinceLastRun: number): boolean;
getRoute(): string; getRoute(): string;

View File

@ -1,9 +1,13 @@
import { MatchController } from "../controllers/MatchController"; import { MatchController } from "../controllers/MatchController";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil";
@ -16,18 +20,18 @@ export declare class MatchCallbacks {
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
updatePing(url: string, info: any, sessionID: string): INullResponseData; updatePing(url: string, info: any, sessionID: string): INullResponseData;
exitMatch(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData;
exitToMenu(url: string, info: any, sessionID: string): INullResponseData; exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
startGroupSearch(url: string, info: any, sessionID: string): INullResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
stopGroupSearch(url: string, info: any, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData; sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData; acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData; cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
putMetrics(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: any, sessionID: string): INullResponseData;
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
serverAvailable(url: string, info: any, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
joinMatch(url: string, info: any, sessionID: string): IGetBodyResponseData<any>; joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
getGroupStatus(url: string, info: any, sessionID: string): IGetBodyResponseData<any>; getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
createGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<any>; createGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
deleteGroup(url: string, info: any, sessionID: string): INullResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData; startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;

View File

@ -1,5 +1,5 @@
import { OnLoad } from "../di/OnLoad"; import { OnLoad } from "../di/OnLoad";
import { DelayedModLoader } from "../loaders/DelayedModLoader"; import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { IHttpServer } from "../models/spt/server/IHttpServer"; import { IHttpServer } from "../models/spt/server/IHttpServer";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
@ -9,10 +9,10 @@ declare class ModCallbacks extends OnLoad {
protected logger: ILogger; protected logger: ILogger;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected httpServer: IHttpServer; protected httpServer: IHttpServer;
protected modLoader: DelayedModLoader; protected postAkiModLoader: PostAkiModLoader;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
onLoad(): void; onLoad(): void;
getRoute(): string; getRoute(): string;
sendBundle(sessionID: string, req: any, resp: any, body: any): void; sendBundle(sessionID: string, req: any, resp: any, body: any): void;

View File

@ -3,6 +3,7 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData";
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
@ -23,7 +24,14 @@ export declare class ProfileCallbacks {
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>; changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>; validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>; getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; /**
* Called when creating a character, when you choose a character face/voice
* @param url
* @param info response (empty)
* @param sessionID
* @returns
*/
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>;
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
getAllMiniProfiles(url: string, info: any, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string;

View File

@ -9,6 +9,7 @@ import { IAddOfferRequestData } from "../models/eft/ragfair/IAddOfferRequestData
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData"; import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
@ -28,7 +29,7 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
onLoad(): void; onLoad(): void;
getRoute(): string; getRoute(): string;
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<any>; search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>; getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -28,6 +28,11 @@ export declare class GameController {
protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void;
protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void;
protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void;
/**
* In 18876 bsg changed the pockets tplid to be one that has 3 additional special slots
* @param pmcProfile
*/
protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void;
protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void;
protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; protected fixNullTraderSalesSums(pmcProfile: IPmcData): void;
protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; protected removeDanglingBackendCounters(pmcProfile: IPmcData): void;

View File

@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
@ -33,6 +34,12 @@ export declare class InsuranceController {
insuranceService: InsuranceService, configServer: ConfigServer); insuranceService: InsuranceService, configServer: ConfigServer);
processReturn(): void; processReturn(): void;
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
cost(info: IGetInsuranceCostRequestData, sessionID: string): any; /**
* Calculate insurance cost
* @param info request object
* @param sessionID session id
* @returns response object to send to client
*/
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
doAbsolutelyNothing(): void; doAbsolutelyNothing(): void;
} }

View File

@ -24,6 +24,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ItemEventRouter } from "../routers/ItemEventRouter";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { FenceService } from "../services/FenceService";
import { RagfairOfferService } from "../services/RagfairOfferService";
import { HashUtil } from "../utils/HashUtil"; import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
export declare class InventoryController { export declare class InventoryController {
@ -31,12 +33,14 @@ export declare class InventoryController {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected fenceService: FenceService;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected ragfairOfferService: RagfairOfferService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected paymentHelper: PaymentHelper; protected paymentHelper: PaymentHelper;
protected itemEventRouter: ItemEventRouter; protected itemEventRouter: ItemEventRouter;
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
/** /**
* Move Item * Move Item
* change location of item with parentId and slotId * change location of item with parentId and slotId
@ -93,9 +97,19 @@ export declare class InventoryController {
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handles examining of the item * * Handles examining an item
* @param pmcData player profile
* @param body request object
* @param sessionID session id
* @returns response
*/ */
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse; examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Get the tplid of an item from the examine request object
* @param body response request
* @returns tplid
*/
protected getItemTpl(body: IInventoryExamineRequestData): string;
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse; readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handles sorting of Inventory. * Handles sorting of Inventory.

View File

@ -2,7 +2,10 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig";
@ -20,11 +23,11 @@ export declare class MatchController {
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
getEnabled(): boolean; getEnabled(): boolean;
getProfile(info: IGetProfileRequestData): IPmcData[]; getProfile(info: IGetProfileRequestData): IPmcData[];
protected getMatch(location: any): any;
createGroup(sessionID: string, info: any): any; createGroup(sessionID: string, info: any): any;
deleteGroup(info: any): void; deleteGroup(info: any): void;
joinMatch(info: any, sessionID: string): any[]; joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
getGroupStatus(info: any): any; protected getMatch(location: string): any;
getGroupStatus(info: IGetGroupStatusRequestData): any;
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void; startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void; endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
} }

View File

@ -60,6 +60,8 @@ export declare class RagfairController {
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
protected isLinkedSearch(info: ISearchRequestData): boolean;
protected isRequiredSearch(info: ISearchRequestData): boolean;
update(): void; update(): void;
getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult; getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult;
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -41,6 +41,13 @@ export declare class BotWeaponGenerator {
* @returns * @returns
*/ */
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void;
/**
* Get a randomised number of bullets for a specific magazine
* @param magCounts min and max count of magazines
* @param magTemplate magazine to generate bullet count for
* @returns bullet count number
*/
protected getRandomisedBulletCount(magCounts: MinMax, magTemplate: ITemplateItem): number;
/** /**
* Get a randomised count of magazines * Get a randomised count of magazines
* @param magCounts min and max value returned value can be between * @param magCounts min and max value returned value can be between

View File

@ -18,6 +18,7 @@ import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil"; import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
export declare class RagfairOfferGenerator { export declare class RagfairOfferGenerator {
protected logger: ILogger; protected logger: ILogger;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
@ -31,11 +32,12 @@ export declare class RagfairOfferGenerator {
protected ragfairAssortGenerator: RagfairAssortGenerator; protected ragfairAssortGenerator: RagfairAssortGenerator;
protected ragfairOfferService: RagfairOfferService; protected ragfairOfferService: RagfairOfferService;
protected ragfairPriceService: RagfairPriceService; protected ragfairPriceService: RagfairPriceService;
protected ragfairCategoriesService: RagfairCategoriesService;
protected fenceService: FenceService; protected fenceService: FenceService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
protected getTraderId(userID: string): string; protected getTraderId(userID: string): string;
protected getRating(userID: string): number; protected getRating(userID: string): number;

View File

@ -29,6 +29,12 @@ export declare class BotGeneratorHelper {
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer);
generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[];
/**
* Is this magazine cylinder related (revolvers and grenade launchers)
* @param magazineParentName the name of the magazines parent
* @returns true if it is cylinder related
*/
magazineIsCylinderRelated(magazineParentName: string): boolean;
/** /**
* Get a list of non black-listed cartridges from the PMC bot config * Get a list of non black-listed cartridges from the PMC bot config
* @param modSlot mod item slot * @param modSlot mod item slot
@ -69,6 +75,12 @@ export declare class BotGeneratorHelper {
* @param {object} parentTemplate The CylinderMagazine's template * @param {object} parentTemplate The CylinderMagazine's template
*/ */
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
/**
* Take a record of camoras and merge the compatable shells into one array
* @param camorasWithShells camoras we want to merge into one array
* @returns string array of shells fro luitple camora sources
*/
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
upd?: Upd; upd?: Upd;
}; };

View File

@ -4,14 +4,14 @@ import { IModLoader } from "../models/spt/mod/IModLoader";
import { ModCompilerService } from "../services/ModCompilerService"; import { ModCompilerService } from "../services/ModCompilerService";
import { VFS } from "../utils/VFS"; import { VFS } from "../utils/VFS";
import { BundleLoader } from "./BundleLoader"; import { BundleLoader } from "./BundleLoader";
import { InitialModLoader } from "./InitialModLoader"; import { PreAkiModLoader } from "./PreAkiModLoader";
export declare class DelayedModLoader implements IModLoader { export declare class PostAkiModLoader implements IModLoader {
protected bundleLoader: BundleLoader; protected bundleLoader: BundleLoader;
protected handbookController: HandbookController; protected handbookController: HandbookController;
protected vfs: VFS; protected vfs: VFS;
protected modCompilerService: ModCompilerService; protected modCompilerService: ModCompilerService;
protected initialModLoader: InitialModLoader; protected preAkiModLoader: PreAkiModLoader;
constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, preAkiModLoader: PreAkiModLoader);
getBundles(local: boolean): string; getBundles(local: boolean): string;
getBundle(key: string, local: boolean): void; getBundle(key: string, local: boolean): void;
getModPath(mod: string): string; getModPath(mod: string): string;

View File

@ -1,9 +1,9 @@
import { DependencyContainer } from "tsyringe"; import { DependencyContainer } from "tsyringe";
import { OnLoad } from "../di/OnLoad"; import { OnLoad } from "../di/OnLoad";
import { InitialModLoader } from "./InitialModLoader"; import { PreAkiModLoader } from "./PreAkiModLoader";
export declare class AfterDbModLoader implements OnLoad { export declare class PostDBModLoader implements OnLoad {
protected initialModLoader: InitialModLoader; protected preAkiModLoader: PreAkiModLoader;
constructor(initialModLoader: InitialModLoader); constructor(preAkiModLoader: PreAkiModLoader);
onLoad(): void; onLoad(): void;
getRoute(): string; getRoute(): string;
getModPath(mod: string): string; getModPath(mod: string): string;

View File

@ -9,7 +9,7 @@ import { ModCompilerService } from "../services/ModCompilerService";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
import { VFS } from "../utils/VFS"; import { VFS } from "../utils/VFS";
import { BundleLoader } from "./BundleLoader"; import { BundleLoader } from "./BundleLoader";
export declare class InitialModLoader implements IModLoader { export declare class PreAkiModLoader implements IModLoader {
protected logger: ILogger; protected logger: ILogger;
protected vfs: VFS; protected vfs: VFS;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
@ -50,7 +50,7 @@ export declare class InitialModLoader implements IModLoader {
* @param modToValidate package.json details * @param modToValidate package.json details
* @returns boolean * @returns boolean
*/ */
protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; protected isModSpt3XXCompatible(modFolderName: string, modToValidate: IPackageJsonData): boolean;
protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; protected isModCombatibleWithAki(mod: IPackageJsonData): boolean;
protected executeMods(container: DependencyContainer): void; protected executeMods(container: DependencyContainer): void;
sortModsLoadOrder(): string[]; sortModsLoadOrder(): string[];

View File

@ -1128,8 +1128,11 @@ export interface Inertia {
SprintAccelerationLimits: xyz; SprintAccelerationLimits: xyz;
SideTime: xyz; SideTime: xyz;
DiagonalTime: xyz; DiagonalTime: xyz;
MaxTimeWithoutInput: xyz;
MinDirectionBlendTime: number; MinDirectionBlendTime: number;
MoveTime: number; MoveTimeRange: xyz;
ProneDirectionAccelerationRange: xyz;
ProneSpeedAccelerationRange: xyz;
MinMovementAccelerationRangeRight: xyz; MinMovementAccelerationRangeRight: xyz;
MaxMovementAccelerationRangeRight: xyz; MaxMovementAccelerationRangeRight: xyz;
} }

View File

@ -26,6 +26,7 @@ export interface ILocationBase {
DisabledForScav: boolean; DisabledForScav: boolean;
DisabledScavExits: string; DisabledScavExits: string;
Enabled: boolean; Enabled: boolean;
EnableCoop: boolean;
GlobalLootChanceModifier: number; GlobalLootChanceModifier: number;
IconX: number; IconX: number;
IconY: number; IconY: number;
@ -41,6 +42,7 @@ export interface ILocationBase {
MinDistToFreePoint: number; MinDistToFreePoint: number;
MinMaxBots: MinMaxBot[]; MinMaxBots: MinMaxBot[];
MinPlayers: number; MinPlayers: number;
MaxCoopGroup: number;
Name: string; Name: string;
NewSpawn: boolean; NewSpawn: boolean;
OcculsionCullingEnabled: boolean; OcculsionCullingEnabled: boolean;
@ -48,6 +50,8 @@ export interface ILocationBase {
OpenZones: string; OpenZones: string;
Preview: Preview; Preview: Preview;
RequiredPlayerLevel: number; RequiredPlayerLevel: number;
PmcMaxPlayersInGroup: number;
ScavMaxPlayersInGroup: number;
Rules: string; Rules: string;
SafeLocation: boolean; SafeLocation: boolean;
Scene: Scene; Scene: Scene;
@ -55,7 +59,8 @@ export interface ILocationBase {
UnixDateTime: number; UnixDateTime: number;
_Id: string; _Id: string;
doors: any[]; doors: any[];
escape_time_limit: number; EscapeTimeLimit: number;
EscapeTimeLimitCoop: number;
exit_access_time: number; exit_access_time: number;
exit_count: number; exit_count: number;
exit_time: number; exit_time: number;
@ -63,6 +68,7 @@ export interface ILocationBase {
filter_ex: string[]; filter_ex: string[];
limits: ILimit[]; limits: ILimit[];
matching_min_seconds: number; matching_min_seconds: number;
GenerateLocalLootCache: boolean;
maxItemCountInLocation: MaxItemCountInLocation[]; maxItemCountInLocation: MaxItemCountInLocation[];
sav_summon_seconds: number; sav_summon_seconds: number;
tmp_location_field_remove_me: number; tmp_location_field_remove_me: number;
@ -106,6 +112,7 @@ export interface BossLocationSpawn {
BossName: string; BossName: string;
BossPlayer: boolean; BossPlayer: boolean;
BossZone: string; BossZone: string;
RandomTimeSpawn: boolean;
Time: number; Time: number;
TriggerId: string; TriggerId: string;
TriggerName: string; TriggerName: string;

View File

@ -6,7 +6,7 @@ import { MemberCategory } from "../../enums/MemberCategory";
export interface IPmcData { export interface IPmcData {
_id: string; _id: string;
aid: string; aid: string;
savage: string; savage?: string;
Info: Info; Info: Info;
Customization: Customization; Customization: Customization;
Health: Health; Health: Health;
@ -28,13 +28,6 @@ export interface IPmcData {
CarExtractCounts: CarExtractCounts; CarExtractCounts: CarExtractCounts;
SurvivorClass: SurvivorClass; SurvivorClass: SurvivorClass;
} }
export declare enum SurvivorClass {
Unknown = 0,
Neutralizer = 1,
Marauder = 2,
Paramedic = 3,
Survivor = 4
}
export interface Info { export interface Info {
EntryPoint: string; EntryPoint: string;
Nickname: string; Nickname: string;
@ -56,6 +49,9 @@ export interface Info {
Bans: IBan[]; Bans: IBan[];
BannedState: boolean; BannedState: boolean;
BannedUntil: number; BannedUntil: number;
NeedWipeOptions: any[];
lastCompletedWipe: LastCompleted;
lastCompletedEvent?: LastCompleted;
} }
export interface Settings { export interface Settings {
Role: string; Role: string;
@ -339,3 +335,13 @@ export interface RagfairInfo {
} }
export interface CarExtractCounts { export interface CarExtractCounts {
} }
export declare enum SurvivorClass {
Unknown = 0,
Neutralizer = 1,
Marauder = 2,
Paramedic = 3,
Survivor = 4
}
export interface LastCompleted {
$oid: string;
}

View File

@ -0,0 +1,23 @@
import { Dialogue, WeaponBuild } from "../../profile/IAkiProfile";
import { IPmcData } from "../IPmcData";
export interface IProfileTemplates {
Standard: IProfileSides;
"Left Behind": IProfileSides;
"Prepare To Escape": IProfileSides;
"Edge Of Darkness": IProfileSides;
}
export interface IProfileSides {
usec: TemplateSide;
bear: TemplateSide;
}
export interface TemplateSide {
character: IPmcData;
suits: string[];
dialogues: Record<string, Dialogue>;
weaponbuilds: WeaponBuild[];
trader: ProfileTraderTemplate;
}
export interface ProfileTraderTemplate {
initialStanding: number;
initialSalesSum: number;
}

View File

@ -23,6 +23,7 @@ export interface IQuest {
status: string; status: string;
KeyQuest: boolean; KeyQuest: boolean;
changeQuestMessageText: string; changeQuestMessageText: string;
side: string;
} }
export interface Conditions { export interface Conditions {
Started: AvailableForConditions[]; Started: AvailableForConditions[];
@ -56,6 +57,7 @@ export interface AvailableForProps {
plantTime?: number; plantTime?: number;
zoneId?: string; zoneId?: string;
type?: boolean; type?: boolean;
countInRaid?: boolean;
} }
export interface AvailableForCounter { export interface AvailableForCounter {
id: string; id: string;

View File

@ -50,6 +50,7 @@ export interface Props {
UnlootableFromSide?: string[]; UnlootableFromSide?: string[];
AnimationVariantsNumber?: number; AnimationVariantsNumber?: number;
DiscardingBlock?: boolean; DiscardingBlock?: boolean;
DropSoundType?: string;
RagFairCommissionModifier?: number; RagFairCommissionModifier?: number;
IsAlwaysAvailableForInsurance?: boolean; IsAlwaysAvailableForInsurance?: boolean;
DiscardLimit?: number; DiscardLimit?: number;
@ -89,7 +90,7 @@ export interface Props {
SightModesCount?: number; SightModesCount?: number;
OpticCalibrationDistances?: number[]; OpticCalibrationDistances?: number[];
ScopesCount?: number; ScopesCount?: number;
AimSensitivity: any; AimSensitivity?: number | number[][];
Zooms?: number[][]; Zooms?: number[][];
CalibrationDistances?: number[][]; CalibrationDistances?: number[][];
Intensity?: number; Intensity?: number;
@ -200,6 +201,9 @@ export interface Props {
MinRepairDegradation?: number; MinRepairDegradation?: number;
MaxRepairDegradation?: number; MaxRepairDegradation?: number;
IronSightRange?: number; IronSightRange?: number;
IsFlareGun?: boolean;
IsGrenadeLauncher?: boolean;
IsOneoff?: boolean;
MustBoltBeOpennedForExternalReload?: boolean; MustBoltBeOpennedForExternalReload?: boolean;
MustBoltBeOpennedForInternalReload?: boolean; MustBoltBeOpennedForInternalReload?: boolean;
BoltAction?: boolean; BoltAction?: boolean;

View File

@ -0,0 +1,3 @@
export interface IReportNicknameRequestData {
uid: string;
}

View File

@ -0,0 +1 @@
export declare type IGetInsuranceCostResponseData = Record<string, Record<string, number>>;

View File

@ -0,0 +1,8 @@
export interface IGetGroupStatusRequestData {
location: string;
savage: boolean;
dt: string;
keyId: string;
raidMode: string;
startInGroup: boolean;
}

View File

@ -0,0 +1,12 @@
export interface IJoinMatchRequestData {
location: string;
savage: boolean;
dt: string;
servers: Server[];
keyId: string;
}
export interface Server {
ping: number;
ip: string;
port: string;
}

View File

@ -0,0 +1,11 @@
export interface IJoinMatchResult {
profileid: string;
status: string;
sid: string;
ip: string;
port: number;
version: string;
location: string;
gamemode: string;
shortid: string;
}

View File

@ -1,6 +1,5 @@
export interface IStartOfflineRaidRequestData { export interface IStartOfflineRaidRequestData {
locationName: string; locationName: string;
entryPoint: string;
startTime: number; startTime: number;
dateTime: string; dateTime: string;
gameSettings: GameSettings; gameSettings: GameSettings;

View File

@ -0,0 +1,11 @@
export interface GetProfileStatusResponseData {
maxPveCountExceeded: false;
profiles: ProfileData[];
}
export interface ProfileData {
profileid: string;
status: string;
sid: string;
ip: string;
port: number;
}

View File

@ -1,6 +1,6 @@
import { IRagfairOffer } from "./IRagfairOffer"; import { IRagfairOffer } from "./IRagfairOffer";
export interface IGetOffersResult { export interface IGetOffersResult {
categories: Record<string, number>; categories?: Record<string, number>;
offers: IRagfairOffer[]; offers: IRagfairOffer[];
offersCount: number; offersCount: number;
selectedCategory: string; selectedCategory: string;

View File

@ -1,10 +0,0 @@
export declare enum QuestStatus {
Locked = 0,
AvailableForStart = 1,
Started = 2,
AvailableForFinish = 3,
Success = 4,
Fail = 5,
FailRestartable = 6,
MarkedAsFailed = 7
}

View File

@ -1,4 +0,0 @@
import { DependencyContainer } from "./tsyringe";
export interface IAfterDBLoadMod {
loadAfterDbInit(container: DependencyContainer): void;
}

View File

@ -0,0 +1,4 @@
import { DependencyContainer } from "./tsyringe";
export interface IPostAkiLoadMod {
postAkiLoad(container: DependencyContainer): void;
}

View File

@ -0,0 +1,4 @@
import { DependencyContainer } from "./tsyringe";
export interface IPostDBLoadMod {
postDBLoad(container: DependencyContainer): void;
}

View File

@ -0,0 +1,4 @@
import { DependencyContainer } from "./tsyringe";
export interface IPreAkiLoadMod {
preAkiLoad(container: DependencyContainer): void;
}

View File

@ -1,5 +0,0 @@
import { DependencyContainer } from "./tsyringe";
export interface IMod {
load(container: DependencyContainer): void;
delayedLoad(container: DependencyContainer): void;
}

View File

@ -18,6 +18,7 @@ export interface PresetBatch {
bossKojaniy: number; bossKojaniy: number;
bossSanitar: number; bossSanitar: number;
bossTagilla: number; bossTagilla: number;
bossKnight: number;
bossTest: number; bossTest: number;
cursedAssault: number; cursedAssault: number;
followerBully: number; followerBully: number;
@ -28,6 +29,8 @@ export interface PresetBatch {
followerKojaniy: number; followerKojaniy: number;
followerSanitar: number; followerSanitar: number;
followerTagilla: number; followerTagilla: number;
followerBirdEye: number;
followerBigPipe: number;
followerTest: number; followerTest: number;
marksman: number; marksman: number;
pmcBot: number; pmcBot: number;

View File

@ -30,6 +30,7 @@ export interface Dynamic {
expiredOfferThreshold: number; expiredOfferThreshold: number;
offerItemCount: MinMax; offerItemCount: MinMax;
price: MinMax; price: MinMax;
presetPrice: MinMax;
endTimeSeconds: MinMax; endTimeSeconds: MinMax;
condition: Condition; condition: Condition;
stackablePercent: MinMax; stackablePercent: MinMax;

View File

@ -6,6 +6,7 @@ import { ICustomizationItem } from "../../eft/common/tables/ICustomizationItem";
import { IHandbookBase } from "../../eft/common/tables/IHandbookBase"; import { IHandbookBase } from "../../eft/common/tables/IHandbookBase";
import { ILootBase } from "../../eft/common/tables/ILootBase"; import { ILootBase } from "../../eft/common/tables/ILootBase";
import { IMatch } from "../../eft/common/tables/IMatch"; import { IMatch } from "../../eft/common/tables/IMatch";
import { IProfileTemplates } from "../../eft/common/tables/IProfileTemplate";
import { IQuest } from "../../eft/common/tables/IQuest"; import { IQuest } from "../../eft/common/tables/IQuest";
import { IRepeatableQuestDatabase } from "../../eft/common/tables/IRepeatableQuests"; import { IRepeatableQuestDatabase } from "../../eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "../../eft/common/tables/ITemplateItem"; import { ITemplateItem } from "../../eft/common/tables/ITemplateItem";
@ -39,10 +40,13 @@ export interface IDatabaseTables {
items: Record<string, ITemplateItem>; items: Record<string, ITemplateItem>;
quests: IQuest[]; quests: IQuest[];
repeatableQuests: IRepeatableQuestDatabase; repeatableQuests: IRepeatableQuestDatabase;
/** DEPRECATED - Items file found in the client, massivly out of date compared to templates.items, try not to use this, remove ASAP*/
clientItems: Record<string, ITemplateItem>; clientItems: Record<string, ITemplateItem>;
handbook: IHandbookBase; handbook: IHandbookBase;
customization: Record<string, ICustomizationItem>; customization: Record<string, ICustomizationItem>;
profiles: any; /** The profile templates listed in the launcher on profile creation, split by account type (e.g. Standard) then side (e.g. bear/usec) */
profiles: IProfileTemplates;
/** Flea prices of items - gathered from online flea market dump */
prices: Record<string, number>; prices: Record<string, number>;
}; };
traders?: Record<string, ITrader>; traders?: Record<string, ITrader>;

View File

@ -17,7 +17,8 @@ export declare class RagfairServer {
constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer);
load(): void; load(): void;
update(): void; update(): void;
getCategories(): Record<string, number>; getAllCategories(): Record<string, number>;
getBespokeCategories(offers: IRagfairOffer[]): Record<string, number>;
/** /**
* Disable/Hide an offer from flea * Disable/Hide an offer from flea
* @param offerId * @param offerId

View File

@ -1,10 +1,40 @@
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class RagfairCategoriesService { export declare class RagfairCategoriesService {
updateCategories(offers: IRagfairOffer[]): void; protected logger: ILogger;
protected categories: Record<string, number>; protected categories: Record<string, number>;
getCategories(): Record<string, number>; constructor(logger: ILogger);
getCategoryByItemId(itemId: string): number; /**
resetCategories(): void; * Get all flea categories and their count of offers
setCategoryValue(itemId: string, newValue: number): void; * @returns item categories and count
incrementCategory(itemId: string): void; */
getAllCategories(): Record<string, number>;
/**
* With the supplied items, get custom categories
* @returns a custom list of categories
*/
getBespokeCategories(offers: IRagfairOffer[]): Record<string, number>;
/**
* Take an array of ragfair offers and create a dictionary of items with thier corrisponding offer count
* @param offers ragfair offers
* @returns categories and count
*/
protected processOffersIntoCategories(offers: IRagfairOffer[]): Record<string, number>;
/**
* Increment or decrement a category array
* @param offer offer to process
* @param categories categories to update
* @param increment should item be incremented or decremented
*/
protected addOrIncrementCategory(offer: IRagfairOffer, categories: Record<string, number>, increment?: boolean): void;
/**
* Increase category count by 1
* @param offer
*/
incrementCategory(offer: IRagfairOffer): void;
/**
* Reduce category count by 1
* @param offer
*/
decrementCategory(offer: IRagfairOffer): void;
} }

View File

@ -11,12 +11,14 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
import { RagfairCategoriesService } from "./RagfairCategoriesService";
export declare class RagfairOfferService { export declare class RagfairOfferService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected ragfairServerHelper: RagfairServerHelper; protected ragfairServerHelper: RagfairServerHelper;
protected ragfairCategoriesService: RagfairCategoriesService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected itemEventRouter: ItemEventRouter; protected itemEventRouter: ItemEventRouter;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
@ -26,12 +28,16 @@ export declare class RagfairOfferService {
protected expiredOffers: Item[]; protected expiredOffers: Item[];
protected offers: IRagfairOffer[]; protected offers: IRagfairOffer[];
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer);
/**
* Get all offers
* @returns IRagfairOffer array
*/
getOffers(): IRagfairOffer[]; getOffers(): IRagfairOffer[];
getOfferByOfferId(offerId: string): IRagfairOffer; getOfferByOfferId(offerId: string): IRagfairOffer;
getOffersOfType(templateId: string): IRagfairOffer[]; getOffersOfType(templateId: string): IRagfairOffer[];
addOffer(offer: IRagfairOffer): void; addOffer(offer: IRagfairOffer): void;
addOfferToExpired(offer: Item): void; addOfferToExpired(staleOffer: IRagfairOffer): void;
setTraderUpdateStatus(traderId: string, shouldUpdate: boolean): void; setTraderUpdateStatus(traderId: string, shouldUpdate: boolean): void;
shouldTraderBeUpdated(traderID: string): boolean; shouldTraderBeUpdated(traderID: string): boolean;
getExpiredOfferCount(): number; getExpiredOfferCount(): number;

View File

@ -28,5 +28,19 @@ export declare class RagfairPriceService {
getFleaPriceForItem(tplId: string): number; getFleaPriceForItem(tplId: string): number;
getBarterPrice(barterScheme: IBarterScheme[]): number; getBarterPrice(barterScheme: IBarterScheme[]): number;
getDynamicOfferPrice(items: Item[], desiredCurrency: string): number; getDynamicOfferPrice(items: Item[], desiredCurrency: string): number;
/**
* Multiply the price by a randomised curve where n = 2, shift = 2
* @param existingPrice price to alter
* @param isPreset is the item we're multiplying a preset
* @returns multiplied price
*/
protected randomisePrice(existingPrice: number, isPreset: boolean): number;
/**
* Calculate the cost of a weapon preset by adding together the price of its mods + base price of default weapon preset
* @param item base weapon
* @param items weapon plus mods
* @param existingPrice price of existing base weapon
* @returns
*/
getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
} }

View File

@ -28,7 +28,12 @@ export declare class Watermark {
protected text: string[]; protected text: string[];
protected versionLabel: string; protected versionLabel: string;
initialize(): void; initialize(): void;
getVersionTag(): string; /**
* Get a version string (x.x.x) or (x.x.x-BLEEDINGEDGE) OR (X.X.X (18xxx))
* @param withEftVersion Include the eft version this spt version was made for
* @returns string
*/
getVersionTag(withEftVersion?: boolean): string;
getVersionLabel(): string; getVersionLabel(): string;
/** Set window title */ /** Set window title */
setTitle(): void; setTitle(): void;

View File

@ -4,7 +4,7 @@
"author": "Chomp", "author": "Chomp",
"license": "MIT", "license": "MIT",
"main": "src/mod.js", "main": "src/mod.js",
"akiVersion": "3.0.1", "akiVersion": "3.1.0",
"isBundleMod": true, "isBundleMod": true,
"scripts": { "scripts": {
"setup:environment": "npm i", "setup:environment": "npm i",

View File

@ -1,15 +1,10 @@
import { DependencyContainer } from "tsyringe"; import { DependencyContainer } from "tsyringe";
import { IMod } from "@spt-aki/models/external/mod"; import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
class Mod implements IMod class Mod implements IPostAkiLoadMod
{ {
public load(container: DependencyContainer): void public postAkiLoad(container: DependencyContainer): void
{
return;
}
public delayedLoad(container: DependencyContainer): void
{ {
// get the logger from the server container // get the logger from the server container
const logger = container.resolve<ILogger>("WinstonLogger"); const logger = container.resolve<ILogger>("WinstonLogger");

View File

@ -2,6 +2,7 @@ import { GameController } from "../controllers/GameController";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData"; import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData"; import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
@ -20,5 +21,6 @@ declare class GameCallbacks {
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string; getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
} }
export { GameCallbacks }; export { GameCallbacks };

View File

@ -13,6 +13,13 @@ export declare class HealthCallbacks {
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected healthController: HealthController; protected healthController: HealthController;
constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController); constructor(httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, healthController: HealthController);
/**
* Custom aki server request found in modules/HealthSynchronizer.cs
* @param url
* @param info HealthListener.Instance.CurrentHealth class
* @param sessionID session id
* @returns empty response, no data sent back to client
*/
syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>; syncHealth(url: string, info: ISyncHealthRequestData, sessionID: string): IGetBodyResponseData<string>;
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse; offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse; offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -3,6 +3,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
@ -17,7 +18,7 @@ export declare class InsuranceCallbacks extends OnLoadOnUpdate {
protected insuranceConfig: IInsuranceConfig; protected insuranceConfig: IInsuranceConfig;
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer); constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
onLoad(): void; onLoad(): void;
getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<any>; getInsuranceCost(url: string, info: IGetInsuranceCostRequestData, sessionID: string): IGetBodyResponseData<IGetInsuranceCostResponseData>;
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
onUpdate(secondsSinceLastRun: number): boolean; onUpdate(secondsSinceLastRun: number): boolean;
getRoute(): string; getRoute(): string;

View File

@ -1,9 +1,13 @@
import { MatchController } from "../controllers/MatchController"; import { MatchController } from "../controllers/MatchController";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil";
@ -16,18 +20,18 @@ export declare class MatchCallbacks {
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer); constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
updatePing(url: string, info: any, sessionID: string): INullResponseData; updatePing(url: string, info: any, sessionID: string): INullResponseData;
exitMatch(url: string, info: any, sessionID: string): INullResponseData; exitMatch(url: string, info: any, sessionID: string): INullResponseData;
exitToMenu(url: string, info: any, sessionID: string): INullResponseData; exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
startGroupSearch(url: string, info: any, sessionID: string): INullResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
stopGroupSearch(url: string, info: any, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData; sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData; acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData; cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
putMetrics(url: string, info: any, sessionID: string): INullResponseData; putMetrics(url: string, info: any, sessionID: string): INullResponseData;
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>; getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
serverAvailable(url: string, info: any, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>; serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
joinMatch(url: string, info: any, sessionID: string): IGetBodyResponseData<any>; joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>; getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData<string>;
getGroupStatus(url: string, info: any, sessionID: string): IGetBodyResponseData<any>; getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData<any>;
createGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<any>; createGroup(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
deleteGroup(url: string, info: any, sessionID: string): INullResponseData; deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData; startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;

View File

@ -1,5 +1,5 @@
import { OnLoad } from "../di/OnLoad"; import { OnLoad } from "../di/OnLoad";
import { DelayedModLoader } from "../loaders/DelayedModLoader"; import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
import { IHttpConfig } from "../models/spt/config/IHttpConfig"; import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { IHttpServer } from "../models/spt/server/IHttpServer"; import { IHttpServer } from "../models/spt/server/IHttpServer";
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
@ -9,10 +9,10 @@ declare class ModCallbacks extends OnLoad {
protected logger: ILogger; protected logger: ILogger;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
protected httpServer: IHttpServer; protected httpServer: IHttpServer;
protected modLoader: DelayedModLoader; protected postAkiModLoader: PostAkiModLoader;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected httpConfig: IHttpConfig; protected httpConfig: IHttpConfig;
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, modLoader: DelayedModLoader, configServer: ConfigServer); constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
onLoad(): void; onLoad(): void;
getRoute(): string; getRoute(): string;
sendBundle(sessionID: string, req: any, resp: any, body: any): void; sendBundle(sessionID: string, req: any, resp: any, body: any): void;

View File

@ -3,6 +3,7 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData"; import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData";
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData"; import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData"; import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData"; import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
@ -23,7 +24,14 @@ export declare class ProfileCallbacks {
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>; changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>; validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>; getReservedNickname(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<string>;
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; /**
* Called when creating a character, when you choose a character face/voice
* @param url
* @param info response (empty)
* @param sessionID
* @returns
*/
getProfileStatus(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<GetProfileStatusResponseData>;
searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>; searchFriend(url: string, info: ISearchFriendRequestData, sessionID: string): IGetBodyResponseData<ISearchFriendResponse[]>;
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string; getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
getAllMiniProfiles(url: string, info: any, sessionID: string): string; getAllMiniProfiles(url: string, info: any, sessionID: string): string;

View File

@ -9,6 +9,7 @@ import { IAddOfferRequestData } from "../models/eft/ragfair/IAddOfferRequestData
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData"; import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult"; import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData"; import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData"; import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData"; import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
import { IRagfairConfig } from "../models/spt/config/IRagfairConfig"; import { IRagfairConfig } from "../models/spt/config/IRagfairConfig";
@ -28,7 +29,7 @@ export declare class RagfairCallbacks extends OnLoadOnUpdate {
constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer); constructor(httpResponse: HttpResponseUtil, logger: ILogger, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, configServer: ConfigServer);
onLoad(): void; onLoad(): void;
getRoute(): string; getRoute(): string;
search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<any>; search(url: string, info: ISearchRequestData, sessionID: string): IGetBodyResponseData<IGetOffersResult>;
getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>; getMarketPrice(url: string, info: IGetMarketPriceRequestData, sessionID: string): IGetBodyResponseData<IGetItemPriceResult>;
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -28,6 +28,11 @@ export declare class GameController {
protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void; protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void;
protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void; protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): void;
protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void; protected addMissingAkiVersionTagToProfile(fullProfile: IAkiProfile): void;
/**
* In 18876 bsg changed the pockets tplid to be one that has 3 additional special slots
* @param pmcProfile
*/
protected updateProfilePocketsToNewId(pmcProfile: IPmcData): void;
protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void; protected addMissingArmorRepairSkill(pmcProfile: IPmcData): void;
protected fixNullTraderSalesSums(pmcProfile: IPmcData): void; protected fixNullTraderSalesSums(pmcProfile: IPmcData): void;
protected removeDanglingBackendCounters(pmcProfile: IPmcData): void; protected removeDanglingBackendCounters(pmcProfile: IPmcData): void;

View File

@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper";
import { ProfileHelper } from "../helpers/ProfileHelper"; import { ProfileHelper } from "../helpers/ProfileHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData"; import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData"; import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse"; import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig"; import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
@ -33,6 +34,12 @@ export declare class InsuranceController {
insuranceService: InsuranceService, configServer: ConfigServer); insuranceService: InsuranceService, configServer: ConfigServer);
processReturn(): void; processReturn(): void;
insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse; insure(pmcData: IPmcData, body: IInsureRequestData, sessionID: string): IItemEventRouterResponse;
cost(info: IGetInsuranceCostRequestData, sessionID: string): any; /**
* Calculate insurance cost
* @param info request object
* @param sessionID session id
* @returns response object to send to client
*/
cost(info: IGetInsuranceCostRequestData, sessionID: string): IGetInsuranceCostResponseData;
doAbsolutelyNothing(): void; doAbsolutelyNothing(): void;
} }

View File

@ -24,6 +24,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
import { ILogger } from "../models/spt/utils/ILogger"; import { ILogger } from "../models/spt/utils/ILogger";
import { ItemEventRouter } from "../routers/ItemEventRouter"; import { ItemEventRouter } from "../routers/ItemEventRouter";
import { DatabaseServer } from "../servers/DatabaseServer"; import { DatabaseServer } from "../servers/DatabaseServer";
import { FenceService } from "../services/FenceService";
import { RagfairOfferService } from "../services/RagfairOfferService";
import { HashUtil } from "../utils/HashUtil"; import { HashUtil } from "../utils/HashUtil";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
export declare class InventoryController { export declare class InventoryController {
@ -31,12 +33,14 @@ export declare class InventoryController {
protected hashUtil: HashUtil; protected hashUtil: HashUtil;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected fenceService: FenceService;
protected presetHelper: PresetHelper; protected presetHelper: PresetHelper;
protected inventoryHelper: InventoryHelper; protected inventoryHelper: InventoryHelper;
protected ragfairOfferService: RagfairOfferService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected paymentHelper: PaymentHelper; protected paymentHelper: PaymentHelper;
protected itemEventRouter: ItemEventRouter; protected itemEventRouter: ItemEventRouter;
constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter); constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, itemEventRouter: ItemEventRouter);
/** /**
* Move Item * Move Item
* change location of item with parentId and slotId * change location of item with parentId and slotId
@ -93,9 +97,19 @@ export declare class InventoryController {
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse; tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, sessionID: string): IItemEventRouterResponse;
bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse; bindItem(pmcData: IPmcData, body: IInventoryBindRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handles examining of the item * * Handles examining an item
* @param pmcData player profile
* @param body request object
* @param sessionID session id
* @returns response
*/ */
examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse; examineItem(pmcData: IPmcData, body: IInventoryExamineRequestData, sessionID: string): IItemEventRouterResponse;
/**
* Get the tplid of an item from the examine request object
* @param body response request
* @returns tplid
*/
protected getItemTpl(body: IInventoryExamineRequestData): string;
readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse; readEncyclopedia(pmcData: IPmcData, body: IInventoryReadEncyclopediaRequestData, sessionID: string): IItemEventRouterResponse;
/** /**
* Handles sorting of Inventory. * Handles sorting of Inventory.

View File

@ -2,7 +2,10 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
import { TraderHelper } from "../helpers/TraderHelper"; import { TraderHelper } from "../helpers/TraderHelper";
import { IPmcData } from "../models/eft/common/IPmcData"; import { IPmcData } from "../models/eft/common/IPmcData";
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData"; import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData"; import { IGetProfileRequestData } from "../models/eft/match/IGetProfileRequestData";
import { IJoinMatchRequestData } from "../models/eft/match/IJoinMatchRequestData";
import { IJoinMatchResult } from "../models/eft/match/IJoinMatchResult";
import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData"; import { IStartOfflineRaidRequestData } from "../models/eft/match/IStartOffineRaidRequestData";
import { IInRaidConfig } from "../models/spt/config/IInRaidConfig"; import { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
import { IMatchConfig } from "../models/spt/config/IMatchConfig"; import { IMatchConfig } from "../models/spt/config/IMatchConfig";
@ -20,11 +23,11 @@ export declare class MatchController {
constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer); constructor(saveServer: SaveServer, profileHelper: ProfileHelper, matchLocationService: MatchLocationService, traderHelper: TraderHelper, configServer: ConfigServer);
getEnabled(): boolean; getEnabled(): boolean;
getProfile(info: IGetProfileRequestData): IPmcData[]; getProfile(info: IGetProfileRequestData): IPmcData[];
protected getMatch(location: any): any;
createGroup(sessionID: string, info: any): any; createGroup(sessionID: string, info: any): any;
deleteGroup(info: any): void; deleteGroup(info: any): void;
joinMatch(info: any, sessionID: string): any[]; joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
getGroupStatus(info: any): any; protected getMatch(location: string): any;
getGroupStatus(info: IGetGroupStatusRequestData): any;
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void; startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void; endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
} }

View File

@ -60,6 +60,8 @@ export declare class RagfairController {
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter, ragfairServer: RagfairServer, ragfairPriceService: RagfairPriceService, databaseServer: DatabaseServer, itemHelper: ItemHelper, saveServer: SaveServer, ragfairSellHelper: RagfairSellHelper, ragfairTaxHelper: RagfairTaxHelper, ragfairSortHelper: RagfairSortHelper, ragfairOfferHelper: RagfairOfferHelper, profileHelper: ProfileHelper, paymentService: PaymentService, handbookHelper: HandbookHelper, paymentHelper: PaymentHelper, inventoryHelper: InventoryHelper, ragfairHelper: RagfairHelper, ragfairOfferService: RagfairOfferService, ragfairRequiredItemsService: RagfairRequiredItemsService, ragfairOfferGenerator: RagfairOfferGenerator, configServer: ConfigServer);
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult; getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
protected isLinkedSearch(info: ISearchRequestData): boolean;
protected isRequiredSearch(info: ISearchRequestData): boolean;
update(): void; update(): void;
getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult; getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult;
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse; addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;

View File

@ -41,6 +41,13 @@ export declare class BotWeaponGenerator {
* @returns * @returns
*/ */
protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void; protected generateExtraMagazines(weaponMods: Item[], weaponTemplate: ITemplateItem, magCounts: MinMax, ammoTpl: string, inventory: PmcInventory): void;
/**
* Get a randomised number of bullets for a specific magazine
* @param magCounts min and max count of magazines
* @param magTemplate magazine to generate bullet count for
* @returns bullet count number
*/
protected getRandomisedBulletCount(magCounts: MinMax, magTemplate: ITemplateItem): number;
/** /**
* Get a randomised count of magazines * Get a randomised count of magazines
* @param magCounts min and max value returned value can be between * @param magCounts min and max value returned value can be between

View File

@ -18,6 +18,7 @@ import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil"; import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
import { RagfairAssortGenerator } from "./RagfairAssortGenerator"; import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
export declare class RagfairOfferGenerator { export declare class RagfairOfferGenerator {
protected logger: ILogger; protected logger: ILogger;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
@ -31,11 +32,12 @@ export declare class RagfairOfferGenerator {
protected ragfairAssortGenerator: RagfairAssortGenerator; protected ragfairAssortGenerator: RagfairAssortGenerator;
protected ragfairOfferService: RagfairOfferService; protected ragfairOfferService: RagfairOfferService;
protected ragfairPriceService: RagfairPriceService; protected ragfairPriceService: RagfairPriceService;
protected ragfairCategoriesService: RagfairCategoriesService;
protected fenceService: FenceService; protected fenceService: FenceService;
protected itemHelper: ItemHelper; protected itemHelper: ItemHelper;
protected configServer: ConfigServer; protected configServer: ConfigServer;
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, ragfairCategoriesService: RagfairCategoriesService, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer);
createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer; createOffer(userID: string, time: number, items: Item[], barterScheme: IBarterScheme[], loyalLevel: number, price: number, sellInOnePiece?: boolean): IRagfairOffer;
protected getTraderId(userID: string): string; protected getTraderId(userID: string): string;
protected getRating(userID: string): number; protected getRating(userID: string): number;

View File

@ -29,6 +29,12 @@ export declare class BotGeneratorHelper {
protected botConfig: IBotConfig; protected botConfig: IBotConfig;
constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer); constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, durabilityLimitsHelper: DurabilityLimitsHelper, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, containerHelper: ContainerHelper, configServer: ConfigServer);
generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[]; generateModsForItem(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem, modSpawnChances: ModsChances, isPmc?: boolean): Item[];
/**
* Is this magazine cylinder related (revolvers and grenade launchers)
* @param magazineParentName the name of the magazines parent
* @returns true if it is cylinder related
*/
magazineIsCylinderRelated(magazineParentName: string): boolean;
/** /**
* Get a list of non black-listed cartridges from the PMC bot config * Get a list of non black-listed cartridges from the PMC bot config
* @param modSlot mod item slot * @param modSlot mod item slot
@ -69,6 +75,12 @@ export declare class BotGeneratorHelper {
* @param {object} parentTemplate The CylinderMagazine's template * @param {object} parentTemplate The CylinderMagazine's template
*/ */
protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void; protected fillCamora(items: Item[], modPool: Mods, parentId: string, parentTemplate: ITemplateItem): void;
/**
* Take a record of camoras and merge the compatable shells into one array
* @param camorasWithShells camoras we want to merge into one array
* @returns string array of shells fro luitple camora sources
*/
protected mergeCamoraPoolsTogether(camorasWithShells: Record<string, string[]>): string[];
generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): { generateExtraPropertiesForItem(itemTemplate: ITemplateItem, botRole?: any): {
upd?: Upd; upd?: Upd;
}; };

View File

@ -4,14 +4,14 @@ import { IModLoader } from "../models/spt/mod/IModLoader";
import { ModCompilerService } from "../services/ModCompilerService"; import { ModCompilerService } from "../services/ModCompilerService";
import { VFS } from "../utils/VFS"; import { VFS } from "../utils/VFS";
import { BundleLoader } from "./BundleLoader"; import { BundleLoader } from "./BundleLoader";
import { InitialModLoader } from "./InitialModLoader"; import { PreAkiModLoader } from "./PreAkiModLoader";
export declare class DelayedModLoader implements IModLoader { export declare class PostAkiModLoader implements IModLoader {
protected bundleLoader: BundleLoader; protected bundleLoader: BundleLoader;
protected handbookController: HandbookController; protected handbookController: HandbookController;
protected vfs: VFS; protected vfs: VFS;
protected modCompilerService: ModCompilerService; protected modCompilerService: ModCompilerService;
protected initialModLoader: InitialModLoader; protected preAkiModLoader: PreAkiModLoader;
constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader); constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, preAkiModLoader: PreAkiModLoader);
getBundles(local: boolean): string; getBundles(local: boolean): string;
getBundle(key: string, local: boolean): void; getBundle(key: string, local: boolean): void;
getModPath(mod: string): string; getModPath(mod: string): string;

View File

@ -1,9 +1,9 @@
import { DependencyContainer } from "tsyringe"; import { DependencyContainer } from "tsyringe";
import { OnLoad } from "../di/OnLoad"; import { OnLoad } from "../di/OnLoad";
import { InitialModLoader } from "./InitialModLoader"; import { PreAkiModLoader } from "./PreAkiModLoader";
export declare class AfterDbModLoader implements OnLoad { export declare class PostDBModLoader implements OnLoad {
protected initialModLoader: InitialModLoader; protected preAkiModLoader: PreAkiModLoader;
constructor(initialModLoader: InitialModLoader); constructor(preAkiModLoader: PreAkiModLoader);
onLoad(): void; onLoad(): void;
getRoute(): string; getRoute(): string;
getModPath(mod: string): string; getModPath(mod: string): string;

View File

@ -9,7 +9,7 @@ import { ModCompilerService } from "../services/ModCompilerService";
import { JsonUtil } from "../utils/JsonUtil"; import { JsonUtil } from "../utils/JsonUtil";
import { VFS } from "../utils/VFS"; import { VFS } from "../utils/VFS";
import { BundleLoader } from "./BundleLoader"; import { BundleLoader } from "./BundleLoader";
export declare class InitialModLoader implements IModLoader { export declare class PreAkiModLoader implements IModLoader {
protected logger: ILogger; protected logger: ILogger;
protected vfs: VFS; protected vfs: VFS;
protected jsonUtil: JsonUtil; protected jsonUtil: JsonUtil;
@ -50,7 +50,7 @@ export declare class InitialModLoader implements IModLoader {
* @param modToValidate package.json details * @param modToValidate package.json details
* @returns boolean * @returns boolean
*/ */
protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean; protected isModSpt3XXCompatible(modFolderName: string, modToValidate: IPackageJsonData): boolean;
protected isModCombatibleWithAki(mod: IPackageJsonData): boolean; protected isModCombatibleWithAki(mod: IPackageJsonData): boolean;
protected executeMods(container: DependencyContainer): void; protected executeMods(container: DependencyContainer): void;
sortModsLoadOrder(): string[]; sortModsLoadOrder(): string[];

View File

@ -1128,8 +1128,11 @@ export interface Inertia {
SprintAccelerationLimits: xyz; SprintAccelerationLimits: xyz;
SideTime: xyz; SideTime: xyz;
DiagonalTime: xyz; DiagonalTime: xyz;
MaxTimeWithoutInput: xyz;
MinDirectionBlendTime: number; MinDirectionBlendTime: number;
MoveTime: number; MoveTimeRange: xyz;
ProneDirectionAccelerationRange: xyz;
ProneSpeedAccelerationRange: xyz;
MinMovementAccelerationRangeRight: xyz; MinMovementAccelerationRangeRight: xyz;
MaxMovementAccelerationRangeRight: xyz; MaxMovementAccelerationRangeRight: xyz;
} }

View File

@ -26,6 +26,7 @@ export interface ILocationBase {
DisabledForScav: boolean; DisabledForScav: boolean;
DisabledScavExits: string; DisabledScavExits: string;
Enabled: boolean; Enabled: boolean;
EnableCoop: boolean;
GlobalLootChanceModifier: number; GlobalLootChanceModifier: number;
IconX: number; IconX: number;
IconY: number; IconY: number;
@ -41,6 +42,7 @@ export interface ILocationBase {
MinDistToFreePoint: number; MinDistToFreePoint: number;
MinMaxBots: MinMaxBot[]; MinMaxBots: MinMaxBot[];
MinPlayers: number; MinPlayers: number;
MaxCoopGroup: number;
Name: string; Name: string;
NewSpawn: boolean; NewSpawn: boolean;
OcculsionCullingEnabled: boolean; OcculsionCullingEnabled: boolean;
@ -48,6 +50,8 @@ export interface ILocationBase {
OpenZones: string; OpenZones: string;
Preview: Preview; Preview: Preview;
RequiredPlayerLevel: number; RequiredPlayerLevel: number;
PmcMaxPlayersInGroup: number;
ScavMaxPlayersInGroup: number;
Rules: string; Rules: string;
SafeLocation: boolean; SafeLocation: boolean;
Scene: Scene; Scene: Scene;
@ -55,7 +59,8 @@ export interface ILocationBase {
UnixDateTime: number; UnixDateTime: number;
_Id: string; _Id: string;
doors: any[]; doors: any[];
escape_time_limit: number; EscapeTimeLimit: number;
EscapeTimeLimitCoop: number;
exit_access_time: number; exit_access_time: number;
exit_count: number; exit_count: number;
exit_time: number; exit_time: number;
@ -63,6 +68,7 @@ export interface ILocationBase {
filter_ex: string[]; filter_ex: string[];
limits: ILimit[]; limits: ILimit[];
matching_min_seconds: number; matching_min_seconds: number;
GenerateLocalLootCache: boolean;
maxItemCountInLocation: MaxItemCountInLocation[]; maxItemCountInLocation: MaxItemCountInLocation[];
sav_summon_seconds: number; sav_summon_seconds: number;
tmp_location_field_remove_me: number; tmp_location_field_remove_me: number;
@ -106,6 +112,7 @@ export interface BossLocationSpawn {
BossName: string; BossName: string;
BossPlayer: boolean; BossPlayer: boolean;
BossZone: string; BossZone: string;
RandomTimeSpawn: boolean;
Time: number; Time: number;
TriggerId: string; TriggerId: string;
TriggerName: string; TriggerName: string;

View File

@ -6,7 +6,7 @@ import { MemberCategory } from "../../enums/MemberCategory";
export interface IPmcData { export interface IPmcData {
_id: string; _id: string;
aid: string; aid: string;
savage: string; savage?: string;
Info: Info; Info: Info;
Customization: Customization; Customization: Customization;
Health: Health; Health: Health;
@ -28,13 +28,6 @@ export interface IPmcData {
CarExtractCounts: CarExtractCounts; CarExtractCounts: CarExtractCounts;
SurvivorClass: SurvivorClass; SurvivorClass: SurvivorClass;
} }
export declare enum SurvivorClass {
Unknown = 0,
Neutralizer = 1,
Marauder = 2,
Paramedic = 3,
Survivor = 4
}
export interface Info { export interface Info {
EntryPoint: string; EntryPoint: string;
Nickname: string; Nickname: string;
@ -56,6 +49,9 @@ export interface Info {
Bans: IBan[]; Bans: IBan[];
BannedState: boolean; BannedState: boolean;
BannedUntil: number; BannedUntil: number;
NeedWipeOptions: any[];
lastCompletedWipe: LastCompleted;
lastCompletedEvent?: LastCompleted;
} }
export interface Settings { export interface Settings {
Role: string; Role: string;
@ -339,3 +335,13 @@ export interface RagfairInfo {
} }
export interface CarExtractCounts { export interface CarExtractCounts {
} }
export declare enum SurvivorClass {
Unknown = 0,
Neutralizer = 1,
Marauder = 2,
Paramedic = 3,
Survivor = 4
}
export interface LastCompleted {
$oid: string;
}

View File

@ -0,0 +1,23 @@
import { Dialogue, WeaponBuild } from "../../profile/IAkiProfile";
import { IPmcData } from "../IPmcData";
export interface IProfileTemplates {
Standard: IProfileSides;
"Left Behind": IProfileSides;
"Prepare To Escape": IProfileSides;
"Edge Of Darkness": IProfileSides;
}
export interface IProfileSides {
usec: TemplateSide;
bear: TemplateSide;
}
export interface TemplateSide {
character: IPmcData;
suits: string[];
dialogues: Record<string, Dialogue>;
weaponbuilds: WeaponBuild[];
trader: ProfileTraderTemplate;
}
export interface ProfileTraderTemplate {
initialStanding: number;
initialSalesSum: number;
}

View File

@ -23,6 +23,7 @@ export interface IQuest {
status: string; status: string;
KeyQuest: boolean; KeyQuest: boolean;
changeQuestMessageText: string; changeQuestMessageText: string;
side: string;
} }
export interface Conditions { export interface Conditions {
Started: AvailableForConditions[]; Started: AvailableForConditions[];
@ -56,6 +57,7 @@ export interface AvailableForProps {
plantTime?: number; plantTime?: number;
zoneId?: string; zoneId?: string;
type?: boolean; type?: boolean;
countInRaid?: boolean;
} }
export interface AvailableForCounter { export interface AvailableForCounter {
id: string; id: string;

View File

@ -50,6 +50,7 @@ export interface Props {
UnlootableFromSide?: string[]; UnlootableFromSide?: string[];
AnimationVariantsNumber?: number; AnimationVariantsNumber?: number;
DiscardingBlock?: boolean; DiscardingBlock?: boolean;
DropSoundType?: string;
RagFairCommissionModifier?: number; RagFairCommissionModifier?: number;
IsAlwaysAvailableForInsurance?: boolean; IsAlwaysAvailableForInsurance?: boolean;
DiscardLimit?: number; DiscardLimit?: number;
@ -89,7 +90,7 @@ export interface Props {
SightModesCount?: number; SightModesCount?: number;
OpticCalibrationDistances?: number[]; OpticCalibrationDistances?: number[];
ScopesCount?: number; ScopesCount?: number;
AimSensitivity: any; AimSensitivity?: number | number[][];
Zooms?: number[][]; Zooms?: number[][];
CalibrationDistances?: number[][]; CalibrationDistances?: number[][];
Intensity?: number; Intensity?: number;
@ -200,6 +201,9 @@ export interface Props {
MinRepairDegradation?: number; MinRepairDegradation?: number;
MaxRepairDegradation?: number; MaxRepairDegradation?: number;
IronSightRange?: number; IronSightRange?: number;
IsFlareGun?: boolean;
IsGrenadeLauncher?: boolean;
IsOneoff?: boolean;
MustBoltBeOpennedForExternalReload?: boolean; MustBoltBeOpennedForExternalReload?: boolean;
MustBoltBeOpennedForInternalReload?: boolean; MustBoltBeOpennedForInternalReload?: boolean;
BoltAction?: boolean; BoltAction?: boolean;

View File

@ -0,0 +1,3 @@
export interface IReportNicknameRequestData {
uid: string;
}

View File

@ -0,0 +1 @@
export declare type IGetInsuranceCostResponseData = Record<string, Record<string, number>>;

View File

@ -0,0 +1,8 @@
export interface IGetGroupStatusRequestData {
location: string;
savage: boolean;
dt: string;
keyId: string;
raidMode: string;
startInGroup: boolean;
}

View File

@ -0,0 +1,12 @@
export interface IJoinMatchRequestData {
location: string;
savage: boolean;
dt: string;
servers: Server[];
keyId: string;
}
export interface Server {
ping: number;
ip: string;
port: string;
}

View File

@ -0,0 +1,11 @@
export interface IJoinMatchResult {
profileid: string;
status: string;
sid: string;
ip: string;
port: number;
version: string;
location: string;
gamemode: string;
shortid: string;
}

View File

@ -1,6 +1,5 @@
export interface IStartOfflineRaidRequestData { export interface IStartOfflineRaidRequestData {
locationName: string; locationName: string;
entryPoint: string;
startTime: number; startTime: number;
dateTime: string; dateTime: string;
gameSettings: GameSettings; gameSettings: GameSettings;

View File

@ -0,0 +1,11 @@
export interface GetProfileStatusResponseData {
maxPveCountExceeded: false;
profiles: ProfileData[];
}
export interface ProfileData {
profileid: string;
status: string;
sid: string;
ip: string;
port: number;
}

View File

@ -1,6 +1,6 @@
import { IRagfairOffer } from "./IRagfairOffer"; import { IRagfairOffer } from "./IRagfairOffer";
export interface IGetOffersResult { export interface IGetOffersResult {
categories: Record<string, number>; categories?: Record<string, number>;
offers: IRagfairOffer[]; offers: IRagfairOffer[];
offersCount: number; offersCount: number;
selectedCategory: string; selectedCategory: string;

View File

@ -1,10 +0,0 @@
export declare enum QuestStatus {
Locked = 0,
AvailableForStart = 1,
Started = 2,
AvailableForFinish = 3,
Success = 4,
Fail = 5,
FailRestartable = 6,
MarkedAsFailed = 7
}

View File

@ -1,4 +0,0 @@
import { DependencyContainer } from "./tsyringe";
export interface IAfterDBLoadMod {
loadAfterDbInit(container: DependencyContainer): void;
}

View File

@ -0,0 +1,4 @@
import { DependencyContainer } from "./tsyringe";
export interface IPostAkiLoadMod {
postAkiLoad(container: DependencyContainer): void;
}

View File

@ -0,0 +1,4 @@
import { DependencyContainer } from "./tsyringe";
export interface IPostDBLoadMod {
postDBLoad(container: DependencyContainer): void;
}

View File

@ -0,0 +1,4 @@
import { DependencyContainer } from "./tsyringe";
export interface IPreAkiLoadMod {
preAkiLoad(container: DependencyContainer): void;
}

View File

@ -1,5 +0,0 @@
import { DependencyContainer } from "./tsyringe";
export interface IMod {
load(container: DependencyContainer): void;
delayedLoad(container: DependencyContainer): void;
}

View File

@ -18,6 +18,7 @@ export interface PresetBatch {
bossKojaniy: number; bossKojaniy: number;
bossSanitar: number; bossSanitar: number;
bossTagilla: number; bossTagilla: number;
bossKnight: number;
bossTest: number; bossTest: number;
cursedAssault: number; cursedAssault: number;
followerBully: number; followerBully: number;
@ -28,6 +29,8 @@ export interface PresetBatch {
followerKojaniy: number; followerKojaniy: number;
followerSanitar: number; followerSanitar: number;
followerTagilla: number; followerTagilla: number;
followerBirdEye: number;
followerBigPipe: number;
followerTest: number; followerTest: number;
marksman: number; marksman: number;
pmcBot: number; pmcBot: number;

View File

@ -30,6 +30,7 @@ export interface Dynamic {
expiredOfferThreshold: number; expiredOfferThreshold: number;
offerItemCount: MinMax; offerItemCount: MinMax;
price: MinMax; price: MinMax;
presetPrice: MinMax;
endTimeSeconds: MinMax; endTimeSeconds: MinMax;
condition: Condition; condition: Condition;
stackablePercent: MinMax; stackablePercent: MinMax;

View File

@ -6,6 +6,7 @@ import { ICustomizationItem } from "../../eft/common/tables/ICustomizationItem";
import { IHandbookBase } from "../../eft/common/tables/IHandbookBase"; import { IHandbookBase } from "../../eft/common/tables/IHandbookBase";
import { ILootBase } from "../../eft/common/tables/ILootBase"; import { ILootBase } from "../../eft/common/tables/ILootBase";
import { IMatch } from "../../eft/common/tables/IMatch"; import { IMatch } from "../../eft/common/tables/IMatch";
import { IProfileTemplates } from "../../eft/common/tables/IProfileTemplate";
import { IQuest } from "../../eft/common/tables/IQuest"; import { IQuest } from "../../eft/common/tables/IQuest";
import { IRepeatableQuestDatabase } from "../../eft/common/tables/IRepeatableQuests"; import { IRepeatableQuestDatabase } from "../../eft/common/tables/IRepeatableQuests";
import { ITemplateItem } from "../../eft/common/tables/ITemplateItem"; import { ITemplateItem } from "../../eft/common/tables/ITemplateItem";
@ -39,10 +40,13 @@ export interface IDatabaseTables {
items: Record<string, ITemplateItem>; items: Record<string, ITemplateItem>;
quests: IQuest[]; quests: IQuest[];
repeatableQuests: IRepeatableQuestDatabase; repeatableQuests: IRepeatableQuestDatabase;
/** DEPRECATED - Items file found in the client, massivly out of date compared to templates.items, try not to use this, remove ASAP*/
clientItems: Record<string, ITemplateItem>; clientItems: Record<string, ITemplateItem>;
handbook: IHandbookBase; handbook: IHandbookBase;
customization: Record<string, ICustomizationItem>; customization: Record<string, ICustomizationItem>;
profiles: any; /** The profile templates listed in the launcher on profile creation, split by account type (e.g. Standard) then side (e.g. bear/usec) */
profiles: IProfileTemplates;
/** Flea prices of items - gathered from online flea market dump */
prices: Record<string, number>; prices: Record<string, number>;
}; };
traders?: Record<string, ITrader>; traders?: Record<string, ITrader>;

View File

@ -17,7 +17,8 @@ export declare class RagfairServer {
constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer); constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer);
load(): void; load(): void;
update(): void; update(): void;
getCategories(): Record<string, number>; getAllCategories(): Record<string, number>;
getBespokeCategories(offers: IRagfairOffer[]): Record<string, number>;
/** /**
* Disable/Hide an offer from flea * Disable/Hide an offer from flea
* @param offerId * @param offerId

View File

@ -1,10 +1,40 @@
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer"; import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
import { ILogger } from "../models/spt/utils/ILogger";
export declare class RagfairCategoriesService { export declare class RagfairCategoriesService {
updateCategories(offers: IRagfairOffer[]): void; protected logger: ILogger;
protected categories: Record<string, number>; protected categories: Record<string, number>;
getCategories(): Record<string, number>; constructor(logger: ILogger);
getCategoryByItemId(itemId: string): number; /**
resetCategories(): void; * Get all flea categories and their count of offers
setCategoryValue(itemId: string, newValue: number): void; * @returns item categories and count
incrementCategory(itemId: string): void; */
getAllCategories(): Record<string, number>;
/**
* With the supplied items, get custom categories
* @returns a custom list of categories
*/
getBespokeCategories(offers: IRagfairOffer[]): Record<string, number>;
/**
* Take an array of ragfair offers and create a dictionary of items with thier corrisponding offer count
* @param offers ragfair offers
* @returns categories and count
*/
protected processOffersIntoCategories(offers: IRagfairOffer[]): Record<string, number>;
/**
* Increment or decrement a category array
* @param offer offer to process
* @param categories categories to update
* @param increment should item be incremented or decremented
*/
protected addOrIncrementCategory(offer: IRagfairOffer, categories: Record<string, number>, increment?: boolean): void;
/**
* Increase category count by 1
* @param offer
*/
incrementCategory(offer: IRagfairOffer): void;
/**
* Reduce category count by 1
* @param offer
*/
decrementCategory(offer: IRagfairOffer): void;
} }

View File

@ -11,12 +11,14 @@ import { DatabaseServer } from "../servers/DatabaseServer";
import { SaveServer } from "../servers/SaveServer"; import { SaveServer } from "../servers/SaveServer";
import { HttpResponseUtil } from "../utils/HttpResponseUtil"; import { HttpResponseUtil } from "../utils/HttpResponseUtil";
import { TimeUtil } from "../utils/TimeUtil"; import { TimeUtil } from "../utils/TimeUtil";
import { RagfairCategoriesService } from "./RagfairCategoriesService";
export declare class RagfairOfferService { export declare class RagfairOfferService {
protected logger: ILogger; protected logger: ILogger;
protected timeUtil: TimeUtil; protected timeUtil: TimeUtil;
protected databaseServer: DatabaseServer; protected databaseServer: DatabaseServer;
protected saveServer: SaveServer; protected saveServer: SaveServer;
protected ragfairServerHelper: RagfairServerHelper; protected ragfairServerHelper: RagfairServerHelper;
protected ragfairCategoriesService: RagfairCategoriesService;
protected profileHelper: ProfileHelper; protected profileHelper: ProfileHelper;
protected itemEventRouter: ItemEventRouter; protected itemEventRouter: ItemEventRouter;
protected httpResponse: HttpResponseUtil; protected httpResponse: HttpResponseUtil;
@ -26,12 +28,16 @@ export declare class RagfairOfferService {
protected expiredOffers: Item[]; protected expiredOffers: Item[];
protected offers: IRagfairOffer[]; protected offers: IRagfairOffer[];
protected ragfairConfig: IRagfairConfig; protected ragfairConfig: IRagfairConfig;
constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer); constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, saveServer: SaveServer, ragfairServerHelper: RagfairServerHelper, ragfairCategoriesService: RagfairCategoriesService, profileHelper: ProfileHelper, itemEventRouter: ItemEventRouter, httpResponse: HttpResponseUtil, configServer: ConfigServer);
/**
* Get all offers
* @returns IRagfairOffer array
*/
getOffers(): IRagfairOffer[]; getOffers(): IRagfairOffer[];
getOfferByOfferId(offerId: string): IRagfairOffer; getOfferByOfferId(offerId: string): IRagfairOffer;
getOffersOfType(templateId: string): IRagfairOffer[]; getOffersOfType(templateId: string): IRagfairOffer[];
addOffer(offer: IRagfairOffer): void; addOffer(offer: IRagfairOffer): void;
addOfferToExpired(offer: Item): void; addOfferToExpired(staleOffer: IRagfairOffer): void;
setTraderUpdateStatus(traderId: string, shouldUpdate: boolean): void; setTraderUpdateStatus(traderId: string, shouldUpdate: boolean): void;
shouldTraderBeUpdated(traderID: string): boolean; shouldTraderBeUpdated(traderID: string): boolean;
getExpiredOfferCount(): number; getExpiredOfferCount(): number;

View File

@ -28,5 +28,19 @@ export declare class RagfairPriceService {
getFleaPriceForItem(tplId: string): number; getFleaPriceForItem(tplId: string): number;
getBarterPrice(barterScheme: IBarterScheme[]): number; getBarterPrice(barterScheme: IBarterScheme[]): number;
getDynamicOfferPrice(items: Item[], desiredCurrency: string): number; getDynamicOfferPrice(items: Item[], desiredCurrency: string): number;
/**
* Multiply the price by a randomised curve where n = 2, shift = 2
* @param existingPrice price to alter
* @param isPreset is the item we're multiplying a preset
* @returns multiplied price
*/
protected randomisePrice(existingPrice: number, isPreset: boolean): number;
/**
* Calculate the cost of a weapon preset by adding together the price of its mods + base price of default weapon preset
* @param item base weapon
* @param items weapon plus mods
* @param existingPrice price of existing base weapon
* @returns
*/
getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number; getWeaponPresetPrice(item: Item, items: Item[], existingPrice: number): number;
} }

View File

@ -28,7 +28,12 @@ export declare class Watermark {
protected text: string[]; protected text: string[];
protected versionLabel: string; protected versionLabel: string;
initialize(): void; initialize(): void;
getVersionTag(): string; /**
* Get a version string (x.x.x) or (x.x.x-BLEEDINGEDGE) OR (X.X.X (18xxx))
* @param withEftVersion Include the eft version this spt version was made for
* @returns string
*/
getVersionTag(withEftVersion?: boolean): string;
getVersionLabel(): string; getVersionLabel(): string;
/** Set window title */ /** Set window title */
setTitle(): void; setTitle(): void;

View File

@ -4,7 +4,7 @@
"main": "src/mod.js", "main": "src/mod.js",
"license": "MIT", "license": "MIT",
"author": "Chomp", "author": "Chomp",
"akiVersion": "3.0.1", "akiVersion": "3.1.0",
"scripts": { "scripts": {
"setup:environment": "npm i", "setup:environment": "npm i",
"build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist", "build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist",

View File

@ -1,5 +1,5 @@
import {LauncherCallbacks} from "@spt-aki/callbacks/LauncherCallbacks"; import { LauncherCallbacks } from "@spt-aki/callbacks/LauncherCallbacks";
import {LauncherController} from "@spt-aki/controllers/LauncherController"; import { LauncherController } from "@spt-aki/controllers/LauncherController";
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { SaveServer } from "@spt-aki/servers/SaveServer"; import { SaveServer } from "@spt-aki/servers/SaveServer";

View File

@ -1,8 +1,8 @@
import { DependencyContainer } from "tsyringe"; import { DependencyContainer } from "tsyringe";
import {IMod} from "@spt-aki/models/external/mod" import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"
import { MyCustomLauncherCallbacks } from "./MyCustomLauncherCallbacks"; import { MyCustomLauncherCallbacks } from "./MyCustomLauncherCallbacks";
class Mod implements IMod class Mod implements IPreAkiLoadMod
{ {
// This example will show you how to override and register your own components and use them // This example will show you how to override and register your own components and use them
// The container will by default register all AKI dependencies, but you can inject into it // The container will by default register all AKI dependencies, but you can inject into it
@ -11,8 +11,7 @@ class Mod implements IMod
// for our own custom method that will return "Lets dance" instead of "pong!" // for our own custom method that will return "Lets dance" instead of "pong!"
// Perform these actions before server fully loads // Perform these actions before server fully loads
public load(container: DependencyContainer): void public preAkiLoad(container: DependencyContainer): void {
{
// Here we register our override for the component and we NEED to use the same // Here we register our override for the component and we NEED to use the same
// token the server is using to register it. // token the server is using to register it.
// You can find this tokens here: // You can find this tokens here:
@ -28,12 +27,6 @@ class Mod implements IMod
// Now that its registered, the server will automatically find this dependency and use it where ever its needed // Now that its registered, the server will automatically find this dependency and use it where ever its needed
} }
// Nothing to do here
public delayedLoad(container: DependencyContainer): void
{
return;
}
} }
module.exports = { mod: new Mod() } module.exports = { mod: new Mod() }

View File

@ -2,6 +2,7 @@ import { GameController } from "../controllers/GameController";
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData"; import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse"; import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData"; import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData"; import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData"; import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData"; import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
@ -20,5 +21,6 @@ declare class GameCallbacks {
validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; validateGameVersion(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>; gameKeepalive(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
getVersion(url: string, info: IEmptyRequestData, sessionID: string): string; getVersion(url: string, info: IEmptyRequestData, sessionID: string): string;
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
} }
export { GameCallbacks }; export { GameCallbacks };

Some files were not shown because too many files have changed in this diff Show More