Added variable hideout update() check times when in and out of raid
This commit is contained in:
parent
df939c693f
commit
c05347279b
@ -1,5 +1,9 @@
|
||||
{
|
||||
"runIntervalSeconds": 15,
|
||||
"runIntervalSeconds": 10,
|
||||
"hoursForSkillCrafting": 28800,
|
||||
"runIntervalValues": {
|
||||
"inRaid": 60,
|
||||
"outOfRaid": 10
|
||||
},
|
||||
"expCraftAmount": 10
|
||||
}
|
@ -25,6 +25,7 @@ import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
import { ICoreConfig } from "@spt-aki/models/spt/config/ICoreConfig";
|
||||
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||
import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig";
|
||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||
import { ILootConfig } from "@spt-aki/models/spt/config/ILootConfig";
|
||||
@ -53,6 +54,7 @@ export class GameController
|
||||
protected coreConfig: ICoreConfig;
|
||||
protected locationConfig: ILocationConfig;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
protected pmcConfig: IPmcConfig;
|
||||
protected lootConfig: ILootConfig;
|
||||
protected botConfig: IBotConfig;
|
||||
@ -84,6 +86,7 @@ export class GameController
|
||||
this.coreConfig = this.configServer.getConfig(ConfigTypes.CORE);
|
||||
this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION);
|
||||
this.ragfairConfig = this.configServer.getConfig(ConfigTypes.RAGFAIR);
|
||||
this.hideoutConfig = this.configServer.getConfig(ConfigTypes.HIDEOUT);
|
||||
this.pmcConfig = this.configServer.getConfig(ConfigTypes.PMC);
|
||||
this.lootConfig = this.configServer.getConfig(ConfigTypes.LOOT);
|
||||
this.botConfig = this.configServer.getConfig(ConfigTypes.BOT);
|
||||
@ -465,9 +468,11 @@ export class GameController
|
||||
*/
|
||||
public getRaidTime(sessionId: string, request: IGetRaidTimeRequest): IGetRaidTimeResponse
|
||||
{
|
||||
// Set flea interval time to in-raid value
|
||||
// Set interval times to in-raid value
|
||||
this.ragfairConfig.runIntervalSeconds = this.ragfairConfig.runIntervalValues.inRaid;
|
||||
|
||||
this.hideoutConfig.runIntervalSeconds = this.hideoutConfig.runIntervalValues.inRaid;
|
||||
|
||||
return this.raidTimeAdjustmentService.getRaidAdjustments(sessionId, request);
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@ import { SkillTypes } from "@spt-aki/models/enums/SkillTypes";
|
||||
import { Traders } from "@spt-aki/models/enums/Traders";
|
||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { IBTRConfig } from "@spt-aki/models/spt/config/IBTRConfig";
|
||||
import { IHideoutConfig } from "@spt-aki/models/spt/config/IHideoutConfig";
|
||||
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";
|
||||
@ -53,6 +54,7 @@ export class InraidController
|
||||
protected traderConfig: ITraderConfig;
|
||||
protected locationConfig: ILocationConfig;
|
||||
protected ragfairConfig: IRagfairConfig;
|
||||
protected hideoutConfig: IHideoutConfig;
|
||||
|
||||
constructor(
|
||||
@inject("WinstonLogger") protected logger: ILogger,
|
||||
@ -83,6 +85,7 @@ export class InraidController
|
||||
this.traderConfig = this.configServer.getConfig(ConfigTypes.TRADER);
|
||||
this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION);
|
||||
this.ragfairConfig = this.configServer.getConfig(ConfigTypes.RAGFAIR);
|
||||
this.hideoutConfig = this.configServer.getConfig(ConfigTypes.HIDEOUT);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -123,6 +126,7 @@ export class InraidController
|
||||
|
||||
// Set flea interval time to out-of-raid value
|
||||
this.ragfairConfig.runIntervalSeconds = this.ragfairConfig.runIntervalValues.outOfRaid;
|
||||
this.hideoutConfig.runIntervalSeconds = this.hideoutConfig.runIntervalValues.outOfRaid;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,3 +2,9 @@ export interface IBaseConfig
|
||||
{
|
||||
kind: string;
|
||||
}
|
||||
|
||||
export interface IRunIntervalValues
|
||||
{
|
||||
inRaid: number;
|
||||
outOfRaid: number;
|
||||
}
|
||||
|
@ -1,9 +1,12 @@
|
||||
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
import { IBaseConfig, IRunIntervalValues } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
|
||||
export interface IHideoutConfig extends IBaseConfig
|
||||
{
|
||||
kind: "aki-hideout";
|
||||
/** How many seconds should pass before hideout crafts / fuel usage is checked and procesed */
|
||||
runIntervalSeconds: number;
|
||||
/** Default values used to hydrate `runIntervalSeconds` with */
|
||||
runIntervalValues: IRunIntervalValues;
|
||||
hoursForSkillCrafting: number;
|
||||
expCraftAmount: number;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { MinMax } from "@spt-aki/models/common/MinMax";
|
||||
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
import { IBaseConfig, IRunIntervalValues } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
|
||||
export interface IRagfairConfig extends IBaseConfig
|
||||
{
|
||||
@ -15,12 +15,6 @@ 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