Add endpoint to configure trailtor scavs

This commit is contained in:
Dev 2024-02-11 10:32:13 +00:00
parent f2bcbbf8ab
commit ff1e80e302
5 changed files with 21 additions and 1 deletions

View File

@ -36,5 +36,6 @@
"coopExtractBaseStandingGain": 0.25,
"scavExtractGain": 0.01,
"pmcKillProbabilityForScavGain": 0.2,
"keepFiRSecureContainerOnDeath": false
"keepFiRSecureContainerOnDeath": false,
"playerScavHostileChancePercent": 20
}

View File

@ -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));
}
}

View File

@ -565,4 +565,9 @@ export class InraidController
messageStoreTime,
);
}
public getTraitorScavHostileChance(url: string, sessionID: string): number
{
return this.inRaidConfig.playerScavHostileChancePercent;
}
}

View File

@ -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

View File

@ -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);
},
),
]);
}
}