diff --git a/project/assets/configs/inraid.json b/project/assets/configs/inraid.json index 5e836fe9..031030d0 100644 --- a/project/assets/configs/inraid.json +++ b/project/assets/configs/inraid.json @@ -36,5 +36,6 @@ "coopExtractBaseStandingGain": 0.25, "scavExtractGain": 0.01, "pmcKillProbabilityForScavGain": 0.2, - "keepFiRSecureContainerOnDeath": false + "keepFiRSecureContainerOnDeath": false, + "playerScavHostileChancePercent": 20 } diff --git a/project/src/callbacks/InraidCallbacks.ts b/project/src/callbacks/InraidCallbacks.ts index 07b7d214..f92a33b4 100644 --- a/project/src/callbacks/InraidCallbacks.ts +++ b/project/src/callbacks/InraidCallbacks.ts @@ -110,4 +110,9 @@ export class InraidCallbacks this.inraidController.itemDelivery(sessionId, request.traderId, request.items); return this.httpResponse.nullResponse(); } + + public getTraitorScavHostileChance(url: string, info: IEmptyRequestData, sessionId: string): string + { + return this.httpResponse.noBody(this.inraidController.getTraitorScavHostileChance(url, sessionId)); + } } diff --git a/project/src/controllers/InraidController.ts b/project/src/controllers/InraidController.ts index 29ff33fc..bb9330a1 100644 --- a/project/src/controllers/InraidController.ts +++ b/project/src/controllers/InraidController.ts @@ -565,4 +565,9 @@ export class InraidController messageStoreTime, ); } + + public getTraitorScavHostileChance(url: string, sessionID: string): number + { + return this.inRaidConfig.playerScavHostileChancePercent; + } } diff --git a/project/src/models/spt/config/IInRaidConfig.ts b/project/src/models/spt/config/IInRaidConfig.ts index 201e2db1..0f836fcb 100644 --- a/project/src/models/spt/config/IInRaidConfig.ts +++ b/project/src/models/spt/config/IInRaidConfig.ts @@ -22,6 +22,8 @@ export interface IInRaidConfig extends IBaseConfig pmcKillProbabilityForScavGain: number; /** On death should items in your secure keep their Find in raid status regardless of how you finished the raid */ keepFiRSecureContainerOnDeath: boolean; + /** Percentage chance a player scav hot is hostile to the player when scavving */ + playerScavHostileChancePercent: number; } export interface RaidMenuSettings diff --git a/project/src/routers/static/InraidStaticRouter.ts b/project/src/routers/static/InraidStaticRouter.ts index cbfa18c4..4049a11f 100644 --- a/project/src/routers/static/InraidStaticRouter.ts +++ b/project/src/routers/static/InraidStaticRouter.ts @@ -55,6 +55,13 @@ export class InraidStaticRouter extends StaticRouter return this.inraidCallbacks.itemDelivery(url, info, sessionID); }, ), + new RouteAction( + "/singleplayer/scav/traitorscavhostile", + (url: string, info: any, sessionID: string, output: string): any => + { + return this.inraidCallbacks.getTraitorScavHostileChance(url, info, sessionID); + }, + ), ]); } }