3.1.x mod examples update
This commit is contained in:
parent
640ab2ece6
commit
c43ccd8dc4
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.0.1",
|
||||
"akiVersion": "3.1.0",
|
||||
"scripts": {
|
||||
"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",
|
||||
|
@ -1,14 +1,14 @@
|
||||
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 { Processing } from "./Processing";
|
||||
|
||||
class Mod implements IMod
|
||||
class Mod implements IPreAkiLoadMod, IPostAkiLoadMod
|
||||
{
|
||||
|
||||
// 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
|
||||
// of this class will ever exist.
|
||||
container.register<MyMod>("MyMod", MyMod, {lifecycle: Lifecycle.Singleton});
|
||||
@ -18,7 +18,7 @@ class Mod implements IMod
|
||||
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
|
||||
for (let i = 0; i < 5; i++)
|
||||
|
@ -2,6 +2,7 @@ import { GameController } from "../controllers/GameController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
||||
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
||||
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
@ -20,5 +21,6 @@ declare class GameCallbacks {
|
||||
validateGameVersion(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;
|
||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
||||
}
|
||||
export { GameCallbacks };
|
||||
|
@ -13,6 +13,13 @@ export declare class HealthCallbacks {
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected 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>;
|
||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
|
@ -3,6 +3,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||
@ -17,7 +18,7 @@ export declare class InsuranceCallbacks extends OnLoadOnUpdate {
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||
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;
|
||||
onUpdate(secondsSinceLastRun: number): boolean;
|
||||
getRoute(): string;
|
||||
|
@ -1,9 +1,13 @@
|
||||
import { MatchController } from "../controllers/MatchController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
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 { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
@ -16,18 +20,18 @@ export declare class MatchCallbacks {
|
||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
exitToMenu(url: string, info: any, sessionID: string): INullResponseData;
|
||||
startGroupSearch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
stopGroupSearch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
putMetrics(url: string, info: any, sessionID: string): INullResponseData;
|
||||
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
||||
serverAvailable(url: string, info: any, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||
joinMatch(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
|
||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||
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>;
|
||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { DelayedModLoader } from "../loaders/DelayedModLoader";
|
||||
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -9,10 +9,10 @@ declare class ModCallbacks extends OnLoad {
|
||||
protected logger: ILogger;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected httpServer: IHttpServer;
|
||||
protected modLoader: DelayedModLoader;
|
||||
protected postAkiModLoader: PostAkiModLoader;
|
||||
protected configServer: ConfigServer;
|
||||
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;
|
||||
getRoute(): string;
|
||||
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||
|
@ -3,6 +3,7 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
||||
import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData";
|
||||
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
||||
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
||||
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
||||
@ -23,7 +24,14 @@ export declare class ProfileCallbacks {
|
||||
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
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[]>;
|
||||
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
|
||||
getAllMiniProfiles(url: string, info: any, sessionID: string): string;
|
||||
|
@ -9,6 +9,7 @@ import { IAddOfferRequestData } from "../models/eft/ragfair/IAddOfferRequestData
|
||||
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
|
||||
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
|
||||
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
||||
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||
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);
|
||||
onLoad(): void;
|
||||
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>;
|
||||
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
|
@ -28,6 +28,11 @@ export declare class GameController {
|
||||
protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void;
|
||||
protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): 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 fixNullTraderSalesSums(pmcProfile: IPmcData): void;
|
||||
protected removeDanglingBackendCounters(pmcProfile: IPmcData): void;
|
||||
|
@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||
@ -33,6 +34,12 @@ export declare class InsuranceController {
|
||||
insuranceService: InsuranceService, configServer: ConfigServer);
|
||||
processReturn(): void;
|
||||
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;
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class InventoryController {
|
||||
@ -31,12 +33,14 @@ export declare class InventoryController {
|
||||
protected hashUtil: HashUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected fenceService: FenceService;
|
||||
protected presetHelper: PresetHelper;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
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
|
||||
* change location of item with parentId and slotId
|
||||
@ -93,9 +97,19 @@ export declare class InventoryController {
|
||||
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, 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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Handles sorting of Inventory.
|
||||
|
@ -2,7 +2,10 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
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 { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
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);
|
||||
getEnabled(): boolean;
|
||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||
protected getMatch(location: any): any;
|
||||
createGroup(sessionID: string, info: any): any;
|
||||
deleteGroup(info: any): void;
|
||||
joinMatch(info: any, sessionID: string): any[];
|
||||
getGroupStatus(info: any): any;
|
||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||
protected getMatch(location: string): any;
|
||||
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
||||
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||
}
|
||||
|
@ -60,6 +60,8 @@ export declare class RagfairController {
|
||||
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);
|
||||
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
|
||||
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
||||
update(): void;
|
||||
getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
|
@ -41,6 +41,13 @@ export declare class BotWeaponGenerator {
|
||||
* @returns
|
||||
*/
|
||||
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
|
||||
* @param magCounts min and max value returned value can be between
|
||||
|
@ -18,6 +18,7 @@ import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
|
||||
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
|
||||
export declare class RagfairOfferGenerator {
|
||||
protected logger: ILogger;
|
||||
protected jsonUtil: JsonUtil;
|
||||
@ -31,11 +32,12 @@ export declare class RagfairOfferGenerator {
|
||||
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
||||
protected fenceService: FenceService;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected configServer: ConfigServer;
|
||||
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;
|
||||
protected getTraderId(userID: string): string;
|
||||
protected getRating(userID: string): number;
|
||||
|
@ -29,6 +29,12 @@ export declare class BotGeneratorHelper {
|
||||
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);
|
||||
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
|
||||
* @param modSlot mod item slot
|
||||
@ -69,6 +75,12 @@ export declare class BotGeneratorHelper {
|
||||
* @param {object} parentTemplate The CylinderMagazine's template
|
||||
*/
|
||||
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): {
|
||||
upd?: Upd;
|
||||
};
|
||||
|
@ -4,14 +4,14 @@ import { IModLoader } from "../models/spt/mod/IModLoader";
|
||||
import { ModCompilerService } from "../services/ModCompilerService";
|
||||
import { VFS } from "../utils/VFS";
|
||||
import { BundleLoader } from "./BundleLoader";
|
||||
import { InitialModLoader } from "./InitialModLoader";
|
||||
export declare class DelayedModLoader implements IModLoader {
|
||||
import { PreAkiModLoader } from "./PreAkiModLoader";
|
||||
export declare class PostAkiModLoader implements IModLoader {
|
||||
protected bundleLoader: BundleLoader;
|
||||
protected handbookController: HandbookController;
|
||||
protected vfs: VFS;
|
||||
protected modCompilerService: ModCompilerService;
|
||||
protected initialModLoader: InitialModLoader;
|
||||
constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader);
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, preAkiModLoader: PreAkiModLoader);
|
||||
getBundles(local: boolean): string;
|
||||
getBundle(key: string, local: boolean): void;
|
||||
getModPath(mod: string): string;
|
@ -1,9 +1,9 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { InitialModLoader } from "./InitialModLoader";
|
||||
export declare class AfterDbModLoader implements OnLoad {
|
||||
protected initialModLoader: InitialModLoader;
|
||||
constructor(initialModLoader: InitialModLoader);
|
||||
import { PreAkiModLoader } from "./PreAkiModLoader";
|
||||
export declare class PostDBModLoader implements OnLoad {
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
constructor(preAkiModLoader: PreAkiModLoader);
|
||||
onLoad(): void;
|
||||
getRoute(): string;
|
||||
getModPath(mod: string): string;
|
@ -9,7 +9,7 @@ import { ModCompilerService } from "../services/ModCompilerService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { VFS } from "../utils/VFS";
|
||||
import { BundleLoader } from "./BundleLoader";
|
||||
export declare class InitialModLoader implements IModLoader {
|
||||
export declare class PreAkiModLoader implements IModLoader {
|
||||
protected logger: ILogger;
|
||||
protected vfs: VFS;
|
||||
protected jsonUtil: JsonUtil;
|
||||
@ -50,7 +50,7 @@ export declare class InitialModLoader implements IModLoader {
|
||||
* @param modToValidate package.json details
|
||||
* @returns boolean
|
||||
*/
|
||||
protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean;
|
||||
protected isModSpt3XXCompatible(modFolderName: string, modToValidate: IPackageJsonData): boolean;
|
||||
protected isModCombatibleWithAki(mod: IPackageJsonData): boolean;
|
||||
protected executeMods(container: DependencyContainer): void;
|
||||
sortModsLoadOrder(): string[];
|
@ -1128,8 +1128,11 @@ export interface Inertia {
|
||||
SprintAccelerationLimits: xyz;
|
||||
SideTime: xyz;
|
||||
DiagonalTime: xyz;
|
||||
MaxTimeWithoutInput: xyz;
|
||||
MinDirectionBlendTime: number;
|
||||
MoveTime: number;
|
||||
MoveTimeRange: xyz;
|
||||
ProneDirectionAccelerationRange: xyz;
|
||||
ProneSpeedAccelerationRange: xyz;
|
||||
MinMovementAccelerationRangeRight: xyz;
|
||||
MaxMovementAccelerationRangeRight: xyz;
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ export interface ILocationBase {
|
||||
DisabledForScav: boolean;
|
||||
DisabledScavExits: string;
|
||||
Enabled: boolean;
|
||||
EnableCoop: boolean;
|
||||
GlobalLootChanceModifier: number;
|
||||
IconX: number;
|
||||
IconY: number;
|
||||
@ -41,6 +42,7 @@ export interface ILocationBase {
|
||||
MinDistToFreePoint: number;
|
||||
MinMaxBots: MinMaxBot[];
|
||||
MinPlayers: number;
|
||||
MaxCoopGroup: number;
|
||||
Name: string;
|
||||
NewSpawn: boolean;
|
||||
OcculsionCullingEnabled: boolean;
|
||||
@ -48,6 +50,8 @@ export interface ILocationBase {
|
||||
OpenZones: string;
|
||||
Preview: Preview;
|
||||
RequiredPlayerLevel: number;
|
||||
PmcMaxPlayersInGroup: number;
|
||||
ScavMaxPlayersInGroup: number;
|
||||
Rules: string;
|
||||
SafeLocation: boolean;
|
||||
Scene: Scene;
|
||||
@ -55,7 +59,8 @@ export interface ILocationBase {
|
||||
UnixDateTime: number;
|
||||
_Id: string;
|
||||
doors: any[];
|
||||
escape_time_limit: number;
|
||||
EscapeTimeLimit: number;
|
||||
EscapeTimeLimitCoop: number;
|
||||
exit_access_time: number;
|
||||
exit_count: number;
|
||||
exit_time: number;
|
||||
@ -63,6 +68,7 @@ export interface ILocationBase {
|
||||
filter_ex: string[];
|
||||
limits: ILimit[];
|
||||
matching_min_seconds: number;
|
||||
GenerateLocalLootCache: boolean;
|
||||
maxItemCountInLocation: MaxItemCountInLocation[];
|
||||
sav_summon_seconds: number;
|
||||
tmp_location_field_remove_me: number;
|
||||
@ -106,6 +112,7 @@ export interface BossLocationSpawn {
|
||||
BossName: string;
|
||||
BossPlayer: boolean;
|
||||
BossZone: string;
|
||||
RandomTimeSpawn: boolean;
|
||||
Time: number;
|
||||
TriggerId: string;
|
||||
TriggerName: string;
|
||||
|
@ -6,7 +6,7 @@ import { MemberCategory } from "../../enums/MemberCategory";
|
||||
export interface IPmcData {
|
||||
_id: string;
|
||||
aid: string;
|
||||
savage: string;
|
||||
savage?: string;
|
||||
Info: Info;
|
||||
Customization: Customization;
|
||||
Health: Health;
|
||||
@ -28,13 +28,6 @@ export interface IPmcData {
|
||||
CarExtractCounts: CarExtractCounts;
|
||||
SurvivorClass: SurvivorClass;
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
Unknown = 0,
|
||||
Neutralizer = 1,
|
||||
Marauder = 2,
|
||||
Paramedic = 3,
|
||||
Survivor = 4
|
||||
}
|
||||
export interface Info {
|
||||
EntryPoint: string;
|
||||
Nickname: string;
|
||||
@ -56,6 +49,9 @@ export interface Info {
|
||||
Bans: IBan[];
|
||||
BannedState: boolean;
|
||||
BannedUntil: number;
|
||||
NeedWipeOptions: any[];
|
||||
lastCompletedWipe: LastCompleted;
|
||||
lastCompletedEvent?: LastCompleted;
|
||||
}
|
||||
export interface Settings {
|
||||
Role: string;
|
||||
@ -339,3 +335,13 @@ export interface RagfairInfo {
|
||||
}
|
||||
export interface CarExtractCounts {
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
Unknown = 0,
|
||||
Neutralizer = 1,
|
||||
Marauder = 2,
|
||||
Paramedic = 3,
|
||||
Survivor = 4
|
||||
}
|
||||
export interface LastCompleted {
|
||||
$oid: string;
|
||||
}
|
||||
|
23
TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IProfileTemplate.d.ts
vendored
Normal file
23
TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IProfileTemplate.d.ts
vendored
Normal 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;
|
||||
}
|
@ -23,6 +23,7 @@ export interface IQuest {
|
||||
status: string;
|
||||
KeyQuest: boolean;
|
||||
changeQuestMessageText: string;
|
||||
side: string;
|
||||
}
|
||||
export interface Conditions {
|
||||
Started: AvailableForConditions[];
|
||||
@ -56,6 +57,7 @@ export interface AvailableForProps {
|
||||
plantTime?: number;
|
||||
zoneId?: string;
|
||||
type?: boolean;
|
||||
countInRaid?: boolean;
|
||||
}
|
||||
export interface AvailableForCounter {
|
||||
id: string;
|
||||
|
@ -50,6 +50,7 @@ export interface Props {
|
||||
UnlootableFromSide?: string[];
|
||||
AnimationVariantsNumber?: number;
|
||||
DiscardingBlock?: boolean;
|
||||
DropSoundType?: string;
|
||||
RagFairCommissionModifier?: number;
|
||||
IsAlwaysAvailableForInsurance?: boolean;
|
||||
DiscardLimit?: number;
|
||||
@ -89,7 +90,7 @@ export interface Props {
|
||||
SightModesCount?: number;
|
||||
OpticCalibrationDistances?: number[];
|
||||
ScopesCount?: number;
|
||||
AimSensitivity: any;
|
||||
AimSensitivity?: number | number[][];
|
||||
Zooms?: number[][];
|
||||
CalibrationDistances?: number[][];
|
||||
Intensity?: number;
|
||||
@ -200,6 +201,9 @@ export interface Props {
|
||||
MinRepairDegradation?: number;
|
||||
MaxRepairDegradation?: number;
|
||||
IronSightRange?: number;
|
||||
IsFlareGun?: boolean;
|
||||
IsGrenadeLauncher?: boolean;
|
||||
IsOneoff?: boolean;
|
||||
MustBoltBeOpennedForExternalReload?: boolean;
|
||||
MustBoltBeOpennedForInternalReload?: boolean;
|
||||
BoltAction?: boolean;
|
||||
|
3
TypeScript/10ScopesAndTypes/types/models/eft/game/IReportNicknameRequestData.d.ts
vendored
Normal file
3
TypeScript/10ScopesAndTypes/types/models/eft/game/IReportNicknameRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export interface IReportNicknameRequestData {
|
||||
uid: string;
|
||||
}
|
1
TypeScript/10ScopesAndTypes/types/models/eft/insurance/IGetInsuranceCostResponseData.d.ts
vendored
Normal file
1
TypeScript/10ScopesAndTypes/types/models/eft/insurance/IGetInsuranceCostResponseData.d.ts
vendored
Normal file
@ -0,0 +1 @@
|
||||
export declare type IGetInsuranceCostResponseData = Record<string, Record<string, number>>;
|
8
TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusRequestData.d.ts
vendored
Normal file
8
TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusRequestData.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
export interface IGetGroupStatusRequestData {
|
||||
location: string;
|
||||
savage: boolean;
|
||||
dt: string;
|
||||
keyId: string;
|
||||
raidMode: string;
|
||||
startInGroup: boolean;
|
||||
}
|
12
TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchRequestData.d.ts
vendored
Normal file
12
TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchRequestData.d.ts
vendored
Normal 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;
|
||||
}
|
11
TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchResult.d.ts
vendored
Normal file
11
TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchResult.d.ts
vendored
Normal 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;
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
export interface IStartOfflineRaidRequestData {
|
||||
locationName: string;
|
||||
entryPoint: string;
|
||||
startTime: number;
|
||||
dateTime: string;
|
||||
gameSettings: GameSettings;
|
||||
|
11
TypeScript/10ScopesAndTypes/types/models/eft/profile/GetProfileStatusResponseData.d.ts
vendored
Normal file
11
TypeScript/10ScopesAndTypes/types/models/eft/profile/GetProfileStatusResponseData.d.ts
vendored
Normal 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;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { IRagfairOffer } from "./IRagfairOffer";
|
||||
export interface IGetOffersResult {
|
||||
categories: Record<string, number>;
|
||||
categories?: Record<string, number>;
|
||||
offers: IRagfairOffer[];
|
||||
offersCount: number;
|
||||
selectedCategory: string;
|
||||
|
@ -1,10 +0,0 @@
|
||||
export declare enum QuestStatus {
|
||||
Locked = 0,
|
||||
AvailableForStart = 1,
|
||||
Started = 2,
|
||||
AvailableForFinish = 3,
|
||||
Success = 4,
|
||||
Fail = 5,
|
||||
FailRestartable = 6,
|
||||
MarkedAsFailed = 7
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IAfterDBLoadMod {
|
||||
loadAfterDbInit(container: DependencyContainer): void;
|
||||
}
|
4
TypeScript/10ScopesAndTypes/types/models/external/IPostAkiLoadMod.d.ts
vendored
Normal file
4
TypeScript/10ScopesAndTypes/types/models/external/IPostAkiLoadMod.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IPostAkiLoadMod {
|
||||
postAkiLoad(container: DependencyContainer): void;
|
||||
}
|
4
TypeScript/10ScopesAndTypes/types/models/external/IPostDBLoadMod.d.ts
vendored
Normal file
4
TypeScript/10ScopesAndTypes/types/models/external/IPostDBLoadMod.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IPostDBLoadMod {
|
||||
postDBLoad(container: DependencyContainer): void;
|
||||
}
|
4
TypeScript/10ScopesAndTypes/types/models/external/IPreAkiLoadMod.d.ts
vendored
Normal file
4
TypeScript/10ScopesAndTypes/types/models/external/IPreAkiLoadMod.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IPreAkiLoadMod {
|
||||
preAkiLoad(container: DependencyContainer): void;
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IMod {
|
||||
load(container: DependencyContainer): void;
|
||||
delayedLoad(container: DependencyContainer): void;
|
||||
}
|
@ -18,6 +18,7 @@ export interface PresetBatch {
|
||||
bossKojaniy: number;
|
||||
bossSanitar: number;
|
||||
bossTagilla: number;
|
||||
bossKnight: number;
|
||||
bossTest: number;
|
||||
cursedAssault: number;
|
||||
followerBully: number;
|
||||
@ -28,6 +29,8 @@ export interface PresetBatch {
|
||||
followerKojaniy: number;
|
||||
followerSanitar: number;
|
||||
followerTagilla: number;
|
||||
followerBirdEye: number;
|
||||
followerBigPipe: number;
|
||||
followerTest: number;
|
||||
marksman: number;
|
||||
pmcBot: number;
|
||||
|
@ -30,6 +30,7 @@ export interface Dynamic {
|
||||
expiredOfferThreshold: number;
|
||||
offerItemCount: MinMax;
|
||||
price: MinMax;
|
||||
presetPrice: MinMax;
|
||||
endTimeSeconds: MinMax;
|
||||
condition: Condition;
|
||||
stackablePercent: MinMax;
|
||||
|
@ -6,6 +6,7 @@ import { ICustomizationItem } from "../../eft/common/tables/ICustomizationItem";
|
||||
import { IHandbookBase } from "../../eft/common/tables/IHandbookBase";
|
||||
import { ILootBase } from "../../eft/common/tables/ILootBase";
|
||||
import { IMatch } from "../../eft/common/tables/IMatch";
|
||||
import { IProfileTemplates } from "../../eft/common/tables/IProfileTemplate";
|
||||
import { IQuest } from "../../eft/common/tables/IQuest";
|
||||
import { IRepeatableQuestDatabase } from "../../eft/common/tables/IRepeatableQuests";
|
||||
import { ITemplateItem } from "../../eft/common/tables/ITemplateItem";
|
||||
@ -39,10 +40,13 @@ export interface IDatabaseTables {
|
||||
items: Record<string, ITemplateItem>;
|
||||
quests: IQuest[];
|
||||
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>;
|
||||
handbook: IHandbookBase;
|
||||
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>;
|
||||
};
|
||||
traders?: Record<string, ITrader>;
|
||||
|
@ -17,7 +17,8 @@ export declare class RagfairServer {
|
||||
constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer);
|
||||
load(): void;
|
||||
update(): void;
|
||||
getCategories(): Record<string, number>;
|
||||
getAllCategories(): Record<string, number>;
|
||||
getBespokeCategories(offers: IRagfairOffer[]): Record<string, number>;
|
||||
/**
|
||||
* Disable/Hide an offer from flea
|
||||
* @param offerId
|
||||
|
@ -1,10 +1,40 @@
|
||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
export declare class RagfairCategoriesService {
|
||||
updateCategories(offers: IRagfairOffer[]): void;
|
||||
protected logger: ILogger;
|
||||
protected categories: Record<string, number>;
|
||||
getCategories(): Record<string, number>;
|
||||
getCategoryByItemId(itemId: string): number;
|
||||
resetCategories(): void;
|
||||
setCategoryValue(itemId: string, newValue: number): void;
|
||||
incrementCategory(itemId: string): void;
|
||||
constructor(logger: ILogger);
|
||||
/**
|
||||
* Get all flea categories and their count of offers
|
||||
* @returns item categories and count
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
@ -11,12 +11,14 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { RagfairCategoriesService } from "./RagfairCategoriesService";
|
||||
export declare class RagfairOfferService {
|
||||
protected logger: ILogger;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected saveServer: SaveServer;
|
||||
protected ragfairServerHelper: RagfairServerHelper;
|
||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
@ -26,12 +28,16 @@ export declare class RagfairOfferService {
|
||||
protected expiredOffers: Item[];
|
||||
protected offers: IRagfairOffer[];
|
||||
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[];
|
||||
getOfferByOfferId(offerId: string): IRagfairOffer;
|
||||
getOffersOfType(templateId: string): IRagfairOffer[];
|
||||
addOffer(offer: IRagfairOffer): void;
|
||||
addOfferToExpired(offer: Item): void;
|
||||
addOfferToExpired(staleOffer: IRagfairOffer): void;
|
||||
setTraderUpdateStatus(traderId: string, shouldUpdate: boolean): void;
|
||||
shouldTraderBeUpdated(traderID: string): boolean;
|
||||
getExpiredOfferCount(): number;
|
||||
|
@ -28,5 +28,19 @@ export declare class RagfairPriceService {
|
||||
getFleaPriceForItem(tplId: string): number;
|
||||
getBarterPrice(barterScheme: IBarterScheme[]): 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;
|
||||
}
|
||||
|
@ -28,7 +28,12 @@ export declare class Watermark {
|
||||
protected text: string[];
|
||||
protected versionLabel: string;
|
||||
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;
|
||||
/** Set window title */
|
||||
setTitle(): void;
|
||||
|
@ -4,7 +4,7 @@
|
||||
"author": "Chomp",
|
||||
"license": "MIT",
|
||||
"main": "src/mod.js",
|
||||
"akiVersion": "3.0.1",
|
||||
"akiVersion": "3.1.0",
|
||||
"isBundleMod": true,
|
||||
"scripts": {
|
||||
"setup:environment": "npm i",
|
||||
|
@ -1,15 +1,10 @@
|
||||
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";
|
||||
|
||||
class Mod implements IMod
|
||||
class Mod implements IPostAkiLoadMod
|
||||
{
|
||||
public load(container: DependencyContainer): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public delayedLoad(container: DependencyContainer): void
|
||||
public postAkiLoad(container: DependencyContainer): void
|
||||
{
|
||||
// get the logger from the server container
|
||||
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||
|
@ -2,6 +2,7 @@ import { GameController } from "../controllers/GameController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
||||
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
||||
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
@ -20,5 +21,6 @@ declare class GameCallbacks {
|
||||
validateGameVersion(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;
|
||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
||||
}
|
||||
export { GameCallbacks };
|
||||
|
@ -13,6 +13,13 @@ export declare class HealthCallbacks {
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected 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>;
|
||||
offraidEat(pmcData: IPmcData, body: IOffraidEatRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
offraidHeal(pmcData: IPmcData, body: IOffraidHealRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
|
@ -3,6 +3,7 @@ import { OnLoadOnUpdate } from "../di/OnLoadOnUpdate";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||
@ -17,7 +18,7 @@ export declare class InsuranceCallbacks extends OnLoadOnUpdate {
|
||||
protected insuranceConfig: IInsuranceConfig;
|
||||
constructor(insuranceController: InsuranceController, insuranceService: InsuranceService, httpResponse: HttpResponseUtil, configServer: ConfigServer);
|
||||
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;
|
||||
onUpdate(secondsSinceLastRun: number): boolean;
|
||||
getRoute(): string;
|
||||
|
@ -1,9 +1,13 @@
|
||||
import { MatchController } from "../controllers/MatchController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
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 { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
@ -16,18 +20,18 @@ export declare class MatchCallbacks {
|
||||
constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, matchController: MatchController, databaseServer: DatabaseServer);
|
||||
updatePing(url: string, info: any, sessionID: string): INullResponseData;
|
||||
exitMatch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
exitToMenu(url: string, info: any, sessionID: string): INullResponseData;
|
||||
startGroupSearch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
stopGroupSearch(url: string, info: any, sessionID: string): INullResponseData;
|
||||
exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData;
|
||||
sendGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
acceptGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
cancelGroupInvite(url: string, info: any, sessionID: string): INullResponseData;
|
||||
putMetrics(url: string, info: any, sessionID: string): INullResponseData;
|
||||
getProfile(url: string, info: IGetProfileRequestData, sessionID: string): IGetBodyResponseData<IPmcData[]>;
|
||||
serverAvailable(url: string, info: any, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||
joinMatch(url: string, info: any, sessionID: string): IGetBodyResponseData<any>;
|
||||
serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any> | IGetBodyResponseData<true>;
|
||||
joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData<IJoinMatchResult[]>;
|
||||
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>;
|
||||
deleteGroup(url: string, info: any, sessionID: string): INullResponseData;
|
||||
startOfflineRaid(url: string, info: IStartOfflineRaidRequestData, sessionID: string): INullResponseData;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { DelayedModLoader } from "../loaders/DelayedModLoader";
|
||||
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
|
||||
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
|
||||
import { IHttpServer } from "../models/spt/server/IHttpServer";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
@ -9,10 +9,10 @@ declare class ModCallbacks extends OnLoad {
|
||||
protected logger: ILogger;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
protected httpServer: IHttpServer;
|
||||
protected modLoader: DelayedModLoader;
|
||||
protected postAkiModLoader: PostAkiModLoader;
|
||||
protected configServer: ConfigServer;
|
||||
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;
|
||||
getRoute(): string;
|
||||
sendBundle(sessionID: string, req: any, resp: any, body: any): void;
|
||||
|
@ -3,6 +3,7 @@ import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
import { IGetMiniProfileRequestData } from "../models/eft/launcher/IGetMiniProfileRequestData";
|
||||
import { GetProfileStatusResponseData } from "../models/eft/profile/GetProfileStatusResponseData";
|
||||
import { IProfileChangeNicknameRequestData } from "../models/eft/profile/IProfileChangeNicknameRequestData";
|
||||
import { IProfileChangeVoiceRequestData } from "../models/eft/profile/IProfileChangeVoiceRequestData";
|
||||
import { IProfileCreateRequestData } from "../models/eft/profile/IProfileCreateRequestData";
|
||||
@ -23,7 +24,14 @@ export declare class ProfileCallbacks {
|
||||
changeNickname(url: string, info: IProfileChangeNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
validateNickname(url: string, info: IValidateNicknameRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
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[]>;
|
||||
getMiniProfile(url: string, info: IGetMiniProfileRequestData, sessionID: string): string;
|
||||
getAllMiniProfiles(url: string, info: any, sessionID: string): string;
|
||||
|
@ -9,6 +9,7 @@ import { IAddOfferRequestData } from "../models/eft/ragfair/IAddOfferRequestData
|
||||
import { IExtendOfferRequestData } from "../models/eft/ragfair/IExtendOfferRequestData";
|
||||
import { IGetItemPriceResult } from "../models/eft/ragfair/IGetItemPriceResult";
|
||||
import { IGetMarketPriceRequestData } from "../models/eft/ragfair/IGetMarketPriceRequestData";
|
||||
import { IGetOffersResult } from "../models/eft/ragfair/IGetOffersResult";
|
||||
import { IRemoveOfferRequestData } from "../models/eft/ragfair/IRemoveOfferRequestData";
|
||||
import { ISearchRequestData } from "../models/eft/ragfair/ISearchRequestData";
|
||||
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);
|
||||
onLoad(): void;
|
||||
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>;
|
||||
getItemPrices(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData<any>;
|
||||
addOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
|
@ -28,6 +28,11 @@ export declare class GameController {
|
||||
protected addMissingRepeatableQuestsProperty(pmcProfile: IPmcData): void;
|
||||
protected addMissingWeaponRepairSkill(pmcProfile: IPmcData): 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 fixNullTraderSalesSums(pmcProfile: IPmcData): void;
|
||||
protected removeDanglingBackendCounters(pmcProfile: IPmcData): void;
|
||||
|
@ -3,6 +3,7 @@ import { ItemHelper } from "../helpers/ItemHelper";
|
||||
import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IGetInsuranceCostRequestData } from "../models/eft/insurance/IGetInsuranceCostRequestData";
|
||||
import { IGetInsuranceCostResponseData } from "../models/eft/insurance/IGetInsuranceCostResponseData";
|
||||
import { IInsureRequestData } from "../models/eft/insurance/IInsureRequestData";
|
||||
import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRouterResponse";
|
||||
import { IInsuranceConfig } from "../models/spt/config/IInsuranceConfig";
|
||||
@ -33,6 +34,12 @@ export declare class InsuranceController {
|
||||
insuranceService: InsuranceService, configServer: ConfigServer);
|
||||
processReturn(): void;
|
||||
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;
|
||||
}
|
||||
|
@ -24,6 +24,8 @@ import { IItemEventRouterResponse } from "../models/eft/itemEvent/IItemEventRout
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
import { ItemEventRouter } from "../routers/ItemEventRouter";
|
||||
import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { FenceService } from "../services/FenceService";
|
||||
import { RagfairOfferService } from "../services/RagfairOfferService";
|
||||
import { HashUtil } from "../utils/HashUtil";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
export declare class InventoryController {
|
||||
@ -31,12 +33,14 @@ export declare class InventoryController {
|
||||
protected hashUtil: HashUtil;
|
||||
protected jsonUtil: JsonUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected fenceService: FenceService;
|
||||
protected presetHelper: PresetHelper;
|
||||
protected inventoryHelper: InventoryHelper;
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected paymentHelper: PaymentHelper;
|
||||
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
|
||||
* change location of item with parentId and slotId
|
||||
@ -93,9 +97,19 @@ export declare class InventoryController {
|
||||
tagItem(pmcData: IPmcData, body: IInventoryTagRequestData, 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;
|
||||
/**
|
||||
* 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;
|
||||
/**
|
||||
* Handles sorting of Inventory.
|
||||
|
@ -2,7 +2,10 @@ import { ProfileHelper } from "../helpers/ProfileHelper";
|
||||
import { TraderHelper } from "../helpers/TraderHelper";
|
||||
import { IPmcData } from "../models/eft/common/IPmcData";
|
||||
import { IEndOfflineRaidRequestData } from "../models/eft/match/IEndOfflineRaidRequestData";
|
||||
import { IGetGroupStatusRequestData } from "../models/eft/match/IGetGroupStatusRequestData";
|
||||
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 { IInRaidConfig } from "../models/spt/config/IInRaidConfig";
|
||||
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);
|
||||
getEnabled(): boolean;
|
||||
getProfile(info: IGetProfileRequestData): IPmcData[];
|
||||
protected getMatch(location: any): any;
|
||||
createGroup(sessionID: string, info: any): any;
|
||||
deleteGroup(info: any): void;
|
||||
joinMatch(info: any, sessionID: string): any[];
|
||||
getGroupStatus(info: any): any;
|
||||
joinMatch(info: IJoinMatchRequestData, sessionID: string): IJoinMatchResult[];
|
||||
protected getMatch(location: string): any;
|
||||
getGroupStatus(info: IGetGroupStatusRequestData): any;
|
||||
startOfflineRaid(info: IStartOfflineRaidRequestData, sessionID: string): void;
|
||||
endOfflineRaid(info: IEndOfflineRaidRequestData, sessionID: string): void;
|
||||
}
|
||||
|
@ -60,6 +60,8 @@ export declare class RagfairController {
|
||||
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);
|
||||
getOffers(sessionID: string, info: ISearchRequestData): IGetOffersResult;
|
||||
protected isLinkedSearch(info: ISearchRequestData): boolean;
|
||||
protected isRequiredSearch(info: ISearchRequestData): boolean;
|
||||
update(): void;
|
||||
getItemPrice(info: IGetMarketPriceRequestData): IGetItemPriceResult;
|
||||
addPlayerOffer(pmcData: IPmcData, info: IAddOfferRequestData, sessionID: string): IItemEventRouterResponse;
|
||||
|
@ -41,6 +41,13 @@ export declare class BotWeaponGenerator {
|
||||
* @returns
|
||||
*/
|
||||
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
|
||||
* @param magCounts min and max value returned value can be between
|
||||
|
@ -18,6 +18,7 @@ import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { RandomUtil } from "../utils/RandomUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { RagfairAssortGenerator } from "./RagfairAssortGenerator";
|
||||
import { RagfairCategoriesService } from "../services/RagfairCategoriesService";
|
||||
export declare class RagfairOfferGenerator {
|
||||
protected logger: ILogger;
|
||||
protected jsonUtil: JsonUtil;
|
||||
@ -31,11 +32,12 @@ export declare class RagfairOfferGenerator {
|
||||
protected ragfairAssortGenerator: RagfairAssortGenerator;
|
||||
protected ragfairOfferService: RagfairOfferService;
|
||||
protected ragfairPriceService: RagfairPriceService;
|
||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
||||
protected fenceService: FenceService;
|
||||
protected itemHelper: ItemHelper;
|
||||
protected configServer: ConfigServer;
|
||||
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;
|
||||
protected getTraderId(userID: string): string;
|
||||
protected getRating(userID: string): number;
|
||||
|
@ -29,6 +29,12 @@ export declare class BotGeneratorHelper {
|
||||
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);
|
||||
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
|
||||
* @param modSlot mod item slot
|
||||
@ -69,6 +75,12 @@ export declare class BotGeneratorHelper {
|
||||
* @param {object} parentTemplate The CylinderMagazine's template
|
||||
*/
|
||||
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): {
|
||||
upd?: Upd;
|
||||
};
|
||||
|
@ -4,14 +4,14 @@ import { IModLoader } from "../models/spt/mod/IModLoader";
|
||||
import { ModCompilerService } from "../services/ModCompilerService";
|
||||
import { VFS } from "../utils/VFS";
|
||||
import { BundleLoader } from "./BundleLoader";
|
||||
import { InitialModLoader } from "./InitialModLoader";
|
||||
export declare class DelayedModLoader implements IModLoader {
|
||||
import { PreAkiModLoader } from "./PreAkiModLoader";
|
||||
export declare class PostAkiModLoader implements IModLoader {
|
||||
protected bundleLoader: BundleLoader;
|
||||
protected handbookController: HandbookController;
|
||||
protected vfs: VFS;
|
||||
protected modCompilerService: ModCompilerService;
|
||||
protected initialModLoader: InitialModLoader;
|
||||
constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, initialModLoader: InitialModLoader);
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
constructor(bundleLoader: BundleLoader, handbookController: HandbookController, vfs: VFS, modCompilerService: ModCompilerService, preAkiModLoader: PreAkiModLoader);
|
||||
getBundles(local: boolean): string;
|
||||
getBundle(key: string, local: boolean): void;
|
||||
getModPath(mod: string): string;
|
@ -1,9 +1,9 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { OnLoad } from "../di/OnLoad";
|
||||
import { InitialModLoader } from "./InitialModLoader";
|
||||
export declare class AfterDbModLoader implements OnLoad {
|
||||
protected initialModLoader: InitialModLoader;
|
||||
constructor(initialModLoader: InitialModLoader);
|
||||
import { PreAkiModLoader } from "./PreAkiModLoader";
|
||||
export declare class PostDBModLoader implements OnLoad {
|
||||
protected preAkiModLoader: PreAkiModLoader;
|
||||
constructor(preAkiModLoader: PreAkiModLoader);
|
||||
onLoad(): void;
|
||||
getRoute(): string;
|
||||
getModPath(mod: string): string;
|
@ -9,7 +9,7 @@ import { ModCompilerService } from "../services/ModCompilerService";
|
||||
import { JsonUtil } from "../utils/JsonUtil";
|
||||
import { VFS } from "../utils/VFS";
|
||||
import { BundleLoader } from "./BundleLoader";
|
||||
export declare class InitialModLoader implements IModLoader {
|
||||
export declare class PreAkiModLoader implements IModLoader {
|
||||
protected logger: ILogger;
|
||||
protected vfs: VFS;
|
||||
protected jsonUtil: JsonUtil;
|
||||
@ -50,7 +50,7 @@ export declare class InitialModLoader implements IModLoader {
|
||||
* @param modToValidate package.json details
|
||||
* @returns boolean
|
||||
*/
|
||||
protected isModSpt300Compatible(modFolderName: string, modToValidate: IPackageJsonData): boolean;
|
||||
protected isModSpt3XXCompatible(modFolderName: string, modToValidate: IPackageJsonData): boolean;
|
||||
protected isModCombatibleWithAki(mod: IPackageJsonData): boolean;
|
||||
protected executeMods(container: DependencyContainer): void;
|
||||
sortModsLoadOrder(): string[];
|
@ -1128,8 +1128,11 @@ export interface Inertia {
|
||||
SprintAccelerationLimits: xyz;
|
||||
SideTime: xyz;
|
||||
DiagonalTime: xyz;
|
||||
MaxTimeWithoutInput: xyz;
|
||||
MinDirectionBlendTime: number;
|
||||
MoveTime: number;
|
||||
MoveTimeRange: xyz;
|
||||
ProneDirectionAccelerationRange: xyz;
|
||||
ProneSpeedAccelerationRange: xyz;
|
||||
MinMovementAccelerationRangeRight: xyz;
|
||||
MaxMovementAccelerationRangeRight: xyz;
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ export interface ILocationBase {
|
||||
DisabledForScav: boolean;
|
||||
DisabledScavExits: string;
|
||||
Enabled: boolean;
|
||||
EnableCoop: boolean;
|
||||
GlobalLootChanceModifier: number;
|
||||
IconX: number;
|
||||
IconY: number;
|
||||
@ -41,6 +42,7 @@ export interface ILocationBase {
|
||||
MinDistToFreePoint: number;
|
||||
MinMaxBots: MinMaxBot[];
|
||||
MinPlayers: number;
|
||||
MaxCoopGroup: number;
|
||||
Name: string;
|
||||
NewSpawn: boolean;
|
||||
OcculsionCullingEnabled: boolean;
|
||||
@ -48,6 +50,8 @@ export interface ILocationBase {
|
||||
OpenZones: string;
|
||||
Preview: Preview;
|
||||
RequiredPlayerLevel: number;
|
||||
PmcMaxPlayersInGroup: number;
|
||||
ScavMaxPlayersInGroup: number;
|
||||
Rules: string;
|
||||
SafeLocation: boolean;
|
||||
Scene: Scene;
|
||||
@ -55,7 +59,8 @@ export interface ILocationBase {
|
||||
UnixDateTime: number;
|
||||
_Id: string;
|
||||
doors: any[];
|
||||
escape_time_limit: number;
|
||||
EscapeTimeLimit: number;
|
||||
EscapeTimeLimitCoop: number;
|
||||
exit_access_time: number;
|
||||
exit_count: number;
|
||||
exit_time: number;
|
||||
@ -63,6 +68,7 @@ export interface ILocationBase {
|
||||
filter_ex: string[];
|
||||
limits: ILimit[];
|
||||
matching_min_seconds: number;
|
||||
GenerateLocalLootCache: boolean;
|
||||
maxItemCountInLocation: MaxItemCountInLocation[];
|
||||
sav_summon_seconds: number;
|
||||
tmp_location_field_remove_me: number;
|
||||
@ -106,6 +112,7 @@ export interface BossLocationSpawn {
|
||||
BossName: string;
|
||||
BossPlayer: boolean;
|
||||
BossZone: string;
|
||||
RandomTimeSpawn: boolean;
|
||||
Time: number;
|
||||
TriggerId: string;
|
||||
TriggerName: string;
|
||||
|
@ -6,7 +6,7 @@ import { MemberCategory } from "../../enums/MemberCategory";
|
||||
export interface IPmcData {
|
||||
_id: string;
|
||||
aid: string;
|
||||
savage: string;
|
||||
savage?: string;
|
||||
Info: Info;
|
||||
Customization: Customization;
|
||||
Health: Health;
|
||||
@ -28,13 +28,6 @@ export interface IPmcData {
|
||||
CarExtractCounts: CarExtractCounts;
|
||||
SurvivorClass: SurvivorClass;
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
Unknown = 0,
|
||||
Neutralizer = 1,
|
||||
Marauder = 2,
|
||||
Paramedic = 3,
|
||||
Survivor = 4
|
||||
}
|
||||
export interface Info {
|
||||
EntryPoint: string;
|
||||
Nickname: string;
|
||||
@ -56,6 +49,9 @@ export interface Info {
|
||||
Bans: IBan[];
|
||||
BannedState: boolean;
|
||||
BannedUntil: number;
|
||||
NeedWipeOptions: any[];
|
||||
lastCompletedWipe: LastCompleted;
|
||||
lastCompletedEvent?: LastCompleted;
|
||||
}
|
||||
export interface Settings {
|
||||
Role: string;
|
||||
@ -339,3 +335,13 @@ export interface RagfairInfo {
|
||||
}
|
||||
export interface CarExtractCounts {
|
||||
}
|
||||
export declare enum SurvivorClass {
|
||||
Unknown = 0,
|
||||
Neutralizer = 1,
|
||||
Marauder = 2,
|
||||
Paramedic = 3,
|
||||
Survivor = 4
|
||||
}
|
||||
export interface LastCompleted {
|
||||
$oid: string;
|
||||
}
|
||||
|
23
TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IProfileTemplate.d.ts
vendored
Normal file
23
TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IProfileTemplate.d.ts
vendored
Normal 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;
|
||||
}
|
@ -23,6 +23,7 @@ export interface IQuest {
|
||||
status: string;
|
||||
KeyQuest: boolean;
|
||||
changeQuestMessageText: string;
|
||||
side: string;
|
||||
}
|
||||
export interface Conditions {
|
||||
Started: AvailableForConditions[];
|
||||
@ -56,6 +57,7 @@ export interface AvailableForProps {
|
||||
plantTime?: number;
|
||||
zoneId?: string;
|
||||
type?: boolean;
|
||||
countInRaid?: boolean;
|
||||
}
|
||||
export interface AvailableForCounter {
|
||||
id: string;
|
||||
|
@ -50,6 +50,7 @@ export interface Props {
|
||||
UnlootableFromSide?: string[];
|
||||
AnimationVariantsNumber?: number;
|
||||
DiscardingBlock?: boolean;
|
||||
DropSoundType?: string;
|
||||
RagFairCommissionModifier?: number;
|
||||
IsAlwaysAvailableForInsurance?: boolean;
|
||||
DiscardLimit?: number;
|
||||
@ -89,7 +90,7 @@ export interface Props {
|
||||
SightModesCount?: number;
|
||||
OpticCalibrationDistances?: number[];
|
||||
ScopesCount?: number;
|
||||
AimSensitivity: any;
|
||||
AimSensitivity?: number | number[][];
|
||||
Zooms?: number[][];
|
||||
CalibrationDistances?: number[][];
|
||||
Intensity?: number;
|
||||
@ -200,6 +201,9 @@ export interface Props {
|
||||
MinRepairDegradation?: number;
|
||||
MaxRepairDegradation?: number;
|
||||
IronSightRange?: number;
|
||||
IsFlareGun?: boolean;
|
||||
IsGrenadeLauncher?: boolean;
|
||||
IsOneoff?: boolean;
|
||||
MustBoltBeOpennedForExternalReload?: boolean;
|
||||
MustBoltBeOpennedForInternalReload?: boolean;
|
||||
BoltAction?: boolean;
|
||||
|
3
TypeScript/11BundleLoadingSample/types/models/eft/game/IReportNicknameRequestData.d.ts
vendored
Normal file
3
TypeScript/11BundleLoadingSample/types/models/eft/game/IReportNicknameRequestData.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export interface IReportNicknameRequestData {
|
||||
uid: string;
|
||||
}
|
@ -0,0 +1 @@
|
||||
export declare type IGetInsuranceCostResponseData = Record<string, Record<string, number>>;
|
8
TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusRequestData.d.ts
vendored
Normal file
8
TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusRequestData.d.ts
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
export interface IGetGroupStatusRequestData {
|
||||
location: string;
|
||||
savage: boolean;
|
||||
dt: string;
|
||||
keyId: string;
|
||||
raidMode: string;
|
||||
startInGroup: boolean;
|
||||
}
|
12
TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchRequestData.d.ts
vendored
Normal file
12
TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchRequestData.d.ts
vendored
Normal 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;
|
||||
}
|
11
TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchResult.d.ts
vendored
Normal file
11
TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchResult.d.ts
vendored
Normal 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;
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
export interface IStartOfflineRaidRequestData {
|
||||
locationName: string;
|
||||
entryPoint: string;
|
||||
startTime: number;
|
||||
dateTime: string;
|
||||
gameSettings: GameSettings;
|
||||
|
11
TypeScript/11BundleLoadingSample/types/models/eft/profile/GetProfileStatusResponseData.d.ts
vendored
Normal file
11
TypeScript/11BundleLoadingSample/types/models/eft/profile/GetProfileStatusResponseData.d.ts
vendored
Normal 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;
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { IRagfairOffer } from "./IRagfairOffer";
|
||||
export interface IGetOffersResult {
|
||||
categories: Record<string, number>;
|
||||
categories?: Record<string, number>;
|
||||
offers: IRagfairOffer[];
|
||||
offersCount: number;
|
||||
selectedCategory: string;
|
||||
|
@ -1,10 +0,0 @@
|
||||
export declare enum QuestStatus {
|
||||
Locked = 0,
|
||||
AvailableForStart = 1,
|
||||
Started = 2,
|
||||
AvailableForFinish = 3,
|
||||
Success = 4,
|
||||
Fail = 5,
|
||||
FailRestartable = 6,
|
||||
MarkedAsFailed = 7
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IAfterDBLoadMod {
|
||||
loadAfterDbInit(container: DependencyContainer): void;
|
||||
}
|
4
TypeScript/11BundleLoadingSample/types/models/external/IPostAkiLoadMod.d.ts
vendored
Normal file
4
TypeScript/11BundleLoadingSample/types/models/external/IPostAkiLoadMod.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IPostAkiLoadMod {
|
||||
postAkiLoad(container: DependencyContainer): void;
|
||||
}
|
4
TypeScript/11BundleLoadingSample/types/models/external/IPostDBLoadMod.d.ts
vendored
Normal file
4
TypeScript/11BundleLoadingSample/types/models/external/IPostDBLoadMod.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IPostDBLoadMod {
|
||||
postDBLoad(container: DependencyContainer): void;
|
||||
}
|
4
TypeScript/11BundleLoadingSample/types/models/external/IPreAkiLoadMod.d.ts
vendored
Normal file
4
TypeScript/11BundleLoadingSample/types/models/external/IPreAkiLoadMod.d.ts
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IPreAkiLoadMod {
|
||||
preAkiLoad(container: DependencyContainer): void;
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
import { DependencyContainer } from "./tsyringe";
|
||||
export interface IMod {
|
||||
load(container: DependencyContainer): void;
|
||||
delayedLoad(container: DependencyContainer): void;
|
||||
}
|
@ -18,6 +18,7 @@ export interface PresetBatch {
|
||||
bossKojaniy: number;
|
||||
bossSanitar: number;
|
||||
bossTagilla: number;
|
||||
bossKnight: number;
|
||||
bossTest: number;
|
||||
cursedAssault: number;
|
||||
followerBully: number;
|
||||
@ -28,6 +29,8 @@ export interface PresetBatch {
|
||||
followerKojaniy: number;
|
||||
followerSanitar: number;
|
||||
followerTagilla: number;
|
||||
followerBirdEye: number;
|
||||
followerBigPipe: number;
|
||||
followerTest: number;
|
||||
marksman: number;
|
||||
pmcBot: number;
|
||||
|
@ -30,6 +30,7 @@ export interface Dynamic {
|
||||
expiredOfferThreshold: number;
|
||||
offerItemCount: MinMax;
|
||||
price: MinMax;
|
||||
presetPrice: MinMax;
|
||||
endTimeSeconds: MinMax;
|
||||
condition: Condition;
|
||||
stackablePercent: MinMax;
|
||||
|
@ -6,6 +6,7 @@ import { ICustomizationItem } from "../../eft/common/tables/ICustomizationItem";
|
||||
import { IHandbookBase } from "../../eft/common/tables/IHandbookBase";
|
||||
import { ILootBase } from "../../eft/common/tables/ILootBase";
|
||||
import { IMatch } from "../../eft/common/tables/IMatch";
|
||||
import { IProfileTemplates } from "../../eft/common/tables/IProfileTemplate";
|
||||
import { IQuest } from "../../eft/common/tables/IQuest";
|
||||
import { IRepeatableQuestDatabase } from "../../eft/common/tables/IRepeatableQuests";
|
||||
import { ITemplateItem } from "../../eft/common/tables/ITemplateItem";
|
||||
@ -39,10 +40,13 @@ export interface IDatabaseTables {
|
||||
items: Record<string, ITemplateItem>;
|
||||
quests: IQuest[];
|
||||
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>;
|
||||
handbook: IHandbookBase;
|
||||
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>;
|
||||
};
|
||||
traders?: Record<string, ITrader>;
|
||||
|
@ -17,7 +17,8 @@ export declare class RagfairServer {
|
||||
constructor(logger: ILogger, ragfairOfferGenerator: RagfairOfferGenerator, ragfairOfferService: RagfairOfferService, ragfairCategoriesService: RagfairCategoriesService, ragfairRequiredItemsService: RagfairRequiredItemsService, configServer: ConfigServer);
|
||||
load(): void;
|
||||
update(): void;
|
||||
getCategories(): Record<string, number>;
|
||||
getAllCategories(): Record<string, number>;
|
||||
getBespokeCategories(offers: IRagfairOffer[]): Record<string, number>;
|
||||
/**
|
||||
* Disable/Hide an offer from flea
|
||||
* @param offerId
|
||||
|
@ -1,10 +1,40 @@
|
||||
import { IRagfairOffer } from "../models/eft/ragfair/IRagfairOffer";
|
||||
import { ILogger } from "../models/spt/utils/ILogger";
|
||||
export declare class RagfairCategoriesService {
|
||||
updateCategories(offers: IRagfairOffer[]): void;
|
||||
protected logger: ILogger;
|
||||
protected categories: Record<string, number>;
|
||||
getCategories(): Record<string, number>;
|
||||
getCategoryByItemId(itemId: string): number;
|
||||
resetCategories(): void;
|
||||
setCategoryValue(itemId: string, newValue: number): void;
|
||||
incrementCategory(itemId: string): void;
|
||||
constructor(logger: ILogger);
|
||||
/**
|
||||
* Get all flea categories and their count of offers
|
||||
* @returns item categories and count
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
@ -11,12 +11,14 @@ import { DatabaseServer } from "../servers/DatabaseServer";
|
||||
import { SaveServer } from "../servers/SaveServer";
|
||||
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
|
||||
import { TimeUtil } from "../utils/TimeUtil";
|
||||
import { RagfairCategoriesService } from "./RagfairCategoriesService";
|
||||
export declare class RagfairOfferService {
|
||||
protected logger: ILogger;
|
||||
protected timeUtil: TimeUtil;
|
||||
protected databaseServer: DatabaseServer;
|
||||
protected saveServer: SaveServer;
|
||||
protected ragfairServerHelper: RagfairServerHelper;
|
||||
protected ragfairCategoriesService: RagfairCategoriesService;
|
||||
protected profileHelper: ProfileHelper;
|
||||
protected itemEventRouter: ItemEventRouter;
|
||||
protected httpResponse: HttpResponseUtil;
|
||||
@ -26,12 +28,16 @@ export declare class RagfairOfferService {
|
||||
protected expiredOffers: Item[];
|
||||
protected offers: IRagfairOffer[];
|
||||
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[];
|
||||
getOfferByOfferId(offerId: string): IRagfairOffer;
|
||||
getOffersOfType(templateId: string): IRagfairOffer[];
|
||||
addOffer(offer: IRagfairOffer): void;
|
||||
addOfferToExpired(offer: Item): void;
|
||||
addOfferToExpired(staleOffer: IRagfairOffer): void;
|
||||
setTraderUpdateStatus(traderId: string, shouldUpdate: boolean): void;
|
||||
shouldTraderBeUpdated(traderID: string): boolean;
|
||||
getExpiredOfferCount(): number;
|
||||
|
@ -28,5 +28,19 @@ export declare class RagfairPriceService {
|
||||
getFleaPriceForItem(tplId: string): number;
|
||||
getBarterPrice(barterScheme: IBarterScheme[]): 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;
|
||||
}
|
||||
|
@ -28,7 +28,12 @@ export declare class Watermark {
|
||||
protected text: string[];
|
||||
protected versionLabel: string;
|
||||
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;
|
||||
/** Set window title */
|
||||
setTitle(): void;
|
||||
|
@ -4,7 +4,7 @@
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "Chomp",
|
||||
"akiVersion": "3.0.1",
|
||||
"akiVersion": "3.1.0",
|
||||
"scripts": {
|
||||
"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",
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {LauncherCallbacks} from "@spt-aki/callbacks/LauncherCallbacks";
|
||||
import {LauncherController} from "@spt-aki/controllers/LauncherController";
|
||||
import { LauncherCallbacks } from "@spt-aki/callbacks/LauncherCallbacks";
|
||||
import { LauncherController } from "@spt-aki/controllers/LauncherController";
|
||||
import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
||||
|
@ -1,18 +1,17 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import {IMod} from "@spt-aki/models/external/mod"
|
||||
import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod"
|
||||
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
|
||||
// The container will by default register all AKI dependencies, but you can inject into it
|
||||
// you own custom implementations the server will then use.
|
||||
// In this example we will take the LauncherCallbacks class and override the ping() method
|
||||
// for our own custom method that will return "Lets dance" instead of "pong!"
|
||||
|
||||
|
||||
// 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
|
||||
// token the server is using to register it.
|
||||
// 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
|
||||
|
||||
}
|
||||
|
||||
// Nothing to do here
|
||||
public delayedLoad(container: DependencyContainer): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { mod: new Mod() }
|
@ -2,6 +2,7 @@ import { GameController } from "../controllers/GameController";
|
||||
import { IEmptyRequestData } from "../models/eft/common/IEmptyRequestData";
|
||||
import { IGameConfigResponse } from "../models/eft/game/IGameConfigResponse";
|
||||
import { IGameEmptyCrcRequestData } from "../models/eft/game/IGameEmptyCrcRequestData";
|
||||
import { IReportNicknameRequestData } from "../models/eft/game/IReportNicknameRequestData";
|
||||
import { IVersionValidateRequestData } from "../models/eft/game/IVersionValidateRequestData";
|
||||
import { IGetBodyResponseData } from "../models/eft/httpResponse/IGetBodyResponseData";
|
||||
import { INullResponseData } from "../models/eft/httpResponse/INullResponseData";
|
||||
@ -20,5 +21,6 @@ declare class GameCallbacks {
|
||||
validateGameVersion(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;
|
||||
reportNickname(url: string, info: IReportNicknameRequestData, sessionID: string): INullResponseData;
|
||||
}
|
||||
export { GameCallbacks };
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user