Made ragfair run interval time dynamic based on players current location:
Player in raid = longer time between checks (60 secs) Player out of raid = shorter time between checks (8 secs) Original value was 45 secs
This commit is contained in:
parent
95f5a49c5c
commit
2ffe44d153
@ -1,5 +1,9 @@
|
||||
{
|
||||
"runIntervalSeconds": 45,
|
||||
"runIntervalSeconds": 8,
|
||||
"runIntervalValues": {
|
||||
"inRaid": 60,
|
||||
"outOfRaid": 8
|
||||
},
|
||||
"sell": {
|
||||
"fees": true,
|
||||
"chance": {
|
||||
|
@ -465,6 +465,9 @@ export class GameController
|
||||
*/
|
||||
public getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse
|
||||
{
|
||||
// Set flea interval time to in-raid value
|
||||
this.ragfairConfig.runIntervalSeconds = this.ragfairConfig.runIntervalValues.inRaid;
|
||||
|
||||
return this.raidTimeAdjustmentService.getRaidAdjustments(sessionId, request);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@ import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
|
||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||
import { ITraderConfig } from "@spt-aki/models/spt/config/ITraderConfig";
|
||||
import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
@ -50,6 +51,7 @@ export class InraidController
|
||||
protected inRaidConfig: IInRaidConfig;
|
||||
protected traderConfig: ITraderConfig;
|
||||
protected locationConfig: ILocationConfig;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
|
||||
constructor(
|
||||
@inject("WinstonLogger") protected logger: ILogger,
|
||||
@ -79,6 +81,7 @@ export class InraidController
|
||||
this.inRaidConfig = this.configServer.getConfig(ConfigTypes.IN_RAID);
|
||||
this.traderConfig = this.configServer.getConfig(ConfigTypes.TRADER);
|
||||
this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION);
|
||||
this.ragfairConfig = this.configServer.getConfig(ConfigTypes.RAGFAIR);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -116,6 +119,9 @@ export class InraidController
|
||||
{
|
||||
this.savePmcProgress(sessionID, offraidData);
|
||||
}
|
||||
|
||||
// Set flea interval time to out-of-raid value
|
||||
this.ragfairConfig.runIntervalSeconds = this.ragfairConfig.runIntervalValues.outOfRaid;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -6,6 +6,8 @@ export interface IRagfairConfig extends IBaseConfig
|
||||
kind: "aki-ragfair";
|
||||
/** How many seconds should pass before expired offers and procesed + player offers checked if sold */
|
||||
runIntervalSeconds: number;
|
||||
/** Default values used to hydrate `runIntervalSeconds` with */
|
||||
runIntervalValues: IRunIntervalValues;
|
||||
/** Player listing settings */
|
||||
sell: Sell;
|
||||
/** Trader ids + should their assorts be listed on flea*/
|
||||
@ -13,6 +15,12 @@ export interface IRagfairConfig extends IBaseConfig
|
||||
dynamic: Dynamic;
|
||||
}
|
||||
|
||||
export interface IRunIntervalValues
|
||||
{
|
||||
inRaid: number;
|
||||
outOfRaid: number;
|
||||
}
|
||||
|
||||
export interface Sell
|
||||
{
|
||||
/** Should a fee be deducted from player when liting an item for sale */
|
||||
|
Loading…
Reference in New Issue
Block a user