Skip to content

Commit 7f8990f

Browse files
committed
Updated for SPT v3.2.4
1 parent e0caaf3 commit 7f8990f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2871
-130
lines changed

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v14.15.3
1+
v16.17.0

package-lock.json

Lines changed: 2332 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "CustomCameraRecoil",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"main": "src/mod.js",
55
"license": "MIT",
66
"author": "Refringe",
7-
"akiVersion": "3.2.3",
7+
"akiVersion": "3.2.4",
88
"scripts": {
99
"setup": "npm i",
1010
"build": "node ./packageBuild.ts"

types/ErrorHandler.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export declare class ErrorHandler {
2+
private logger;
3+
private readLine;
4+
constructor();
5+
handleCriticalError(err: any): void;
6+
}

types/Program.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export declare class Program {
2+
private errorHandler;
23
constructor();
34
start(): void;
45
}

types/callbacks/BundleCallbacks.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import { BundleLoader } from "../loaders/BundleLoader";
22
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
3-
import { IHttpServer } from "../models/spt/server/IHttpServer";
43
import { ILogger } from "../models/spt/utils/ILogger";
54
import { ConfigServer } from "../servers/ConfigServer";
5+
import { HttpFileUtil } from "../utils/HttpFileUtil";
66
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
77
export declare class BundleCallbacks {
88
protected logger: ILogger;
99
protected httpResponse: HttpResponseUtil;
10-
protected httpServer: IHttpServer;
10+
protected httpFileUtil: HttpFileUtil;
1111
protected bundleLoader: BundleLoader;
1212
protected configServer: ConfigServer;
1313
protected httpConfig: IHttpConfig;
14-
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, bundleLoader: BundleLoader, configServer: ConfigServer);
14+
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, bundleLoader: BundleLoader, configServer: ConfigServer);
1515
sendBundle(sessionID: string, req: any, resp: any, body: any): any;
1616
getBundles(url: string, info: any, sessionID: string): string;
1717
getBundle(url: string, info: any, sessionID: string): string;

types/callbacks/HttpCallbacks.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { OnLoad } from "../di/OnLoad";
2-
import { IHttpServer } from "../models/spt/server/IHttpServer";
2+
import { HttpServer } from "../servers/HttpServer";
33
export declare class HttpCallbacks extends OnLoad {
4-
protected httpServer: IHttpServer;
5-
constructor(httpServer: IHttpServer);
4+
protected httpServer: HttpServer;
5+
constructor(httpServer: HttpServer);
66
onLoad(): void;
77
getRoute(): string;
88
getImage(): string;

types/callbacks/ModCallbacks.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { OnLoad } from "../di/OnLoad";
22
import { PostAkiModLoader } from "../loaders/PostAkiModLoader";
33
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
4-
import { IHttpServer } from "../models/spt/server/IHttpServer";
54
import { ILogger } from "../models/spt/utils/ILogger";
65
import { ConfigServer } from "../servers/ConfigServer";
6+
import { HttpFileUtil } from "../utils/HttpFileUtil";
77
import { HttpResponseUtil } from "../utils/HttpResponseUtil";
88
declare class ModCallbacks extends OnLoad {
99
protected logger: ILogger;
1010
protected httpResponse: HttpResponseUtil;
11-
protected httpServer: IHttpServer;
11+
protected httpFileUtil: HttpFileUtil;
1212
protected postAkiModLoader: PostAkiModLoader;
1313
protected configServer: ConfigServer;
1414
protected httpConfig: IHttpConfig;
15-
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpServer: IHttpServer, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
15+
constructor(logger: ILogger, httpResponse: HttpResponseUtil, httpFileUtil: HttpFileUtil, postAkiModLoader: PostAkiModLoader, configServer: ConfigServer);
1616
onLoad(): void;
1717
getRoute(): string;
1818
sendBundle(sessionID: string, req: any, resp: any, body: any): void;

types/callbacks/RepairCallbacks.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ import { ITraderRepairActionDataRequest } from "../models/eft/repair/ITraderRepa
66
export declare class RepairCallbacks {
77
protected repairController: RepairController;
88
constructor(repairController: RepairController);
9+
/**
10+
* use trader to repair item
11+
* @param pmcData
12+
* @param body
13+
* @param sessionID
14+
* @returns
15+
*/
916
traderRepair(pmcData: IPmcData, body: ITraderRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
17+
/**
18+
* Use repair kit to repair item
19+
* @param pmcData
20+
* @param body
21+
* @param sessionID
22+
* @returns
23+
*/
1024
repair(pmcData: IPmcData, body: IRepairActionDataRequest, sessionID: string): IItemEventRouterResponse;
1125
}

types/controllers/BotController.d.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { ApplicationContext } from "../context/ApplicationContext";
12
import { BotGenerator } from "../generators/BotGenerator";
23
import { BotHelper } from "../helpers/BotHelper";
34
import { IGenerateBotsRequestData } from "../models/eft/bot/IGenerateBotsRequestData";
@@ -18,8 +19,9 @@ export declare class BotController {
1819
protected pmcAiService: PmcAiService;
1920
protected botGenerationCacheService: BotGenerationCacheService;
2021
protected configServer: ConfigServer;
22+
protected applicationContext: ApplicationContext;
2123
protected botConfig: IBotConfig;
22-
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, pmcAiService: PmcAiService, botGenerationCacheService: BotGenerationCacheService, configServer: ConfigServer);
24+
constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, pmcAiService: PmcAiService, botGenerationCacheService: BotGenerationCacheService, configServer: ConfigServer, applicationContext: ApplicationContext);
2325
/**
2426
* Return the number of bot loadout varieties to be generated
2527
* @param type bot Type we want the loadout gen count for
@@ -36,6 +38,17 @@ export declare class BotController {
3638
*/
3739
getBotDifficulty(type: string, difficulty: string): Difficulty;
3840
protected getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty;
41+
/**
42+
* Generate bot profiles and store in cache
43+
* @param sessionId Session id
44+
* @param info bot generation request info
45+
* @returns IBotBase array
46+
*/
3947
generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[];
48+
/**
49+
* Get the max number of bots allowed on a map
50+
* Looks up location player is entering when getting cap value
51+
* @returns cap number
52+
*/
4053
getBotCap(): number;
4154
}

0 commit comments

Comments
 (0)