Move trainArrivalDelaySeconds
value into config
This commit is contained in:
parent
1994832281
commit
2a3839f6de
@ -841,6 +841,10 @@
|
|||||||
"allowDuplicateItemsInStaticContainers": true,
|
"allowDuplicateItemsInStaticContainers": true,
|
||||||
"looseLootBlacklist": {},
|
"looseLootBlacklist": {},
|
||||||
"scavRaidTimeSettings": {
|
"scavRaidTimeSettings": {
|
||||||
|
"settings": {
|
||||||
|
"trainArrivalDelaySeconds": 90
|
||||||
|
},
|
||||||
|
"maps": {
|
||||||
"bigmap": {
|
"bigmap": {
|
||||||
"reduceLootByPercent": true,
|
"reduceLootByPercent": true,
|
||||||
"minDynamicLootPercent": 50,
|
"minDynamicLootPercent": 50,
|
||||||
@ -1027,4 +1031,5 @@
|
|||||||
"adjustWaves": true
|
"adjustWaves": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,31 +39,7 @@ export interface ILocationConfig extends IBaseConfig
|
|||||||
/** Key: map, value: loose loot ids to ignore */
|
/** Key: map, value: loose loot ids to ignore */
|
||||||
looseLootBlacklist: Record<string, string[]>;
|
looseLootBlacklist: Record<string, string[]>;
|
||||||
/** Key: map, value: settings to control how long scav raids are*/
|
/** Key: map, value: settings to control how long scav raids are*/
|
||||||
scavRaidTimeSettings: Record<string, IScavRaidTimeLocationSettings>;
|
scavRaidTimeSettings: IScavRaidTimeSettings;
|
||||||
}
|
|
||||||
|
|
||||||
export interface IScavRaidTimeLocationSettings
|
|
||||||
{
|
|
||||||
/** Should loot be reduced by same percent length of raid is reduced by */
|
|
||||||
reduceLootByPercent: boolean;
|
|
||||||
minStaticLootPercent: number;
|
|
||||||
minDynamicLootPercent: number;
|
|
||||||
/** Chance raid time is reduced */
|
|
||||||
reducedChancePercent: number;
|
|
||||||
reductionPercentWeights: Record<string, number>;
|
|
||||||
/** Should bot waves be removed / spawn times be adjusted */
|
|
||||||
adjustWaves: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface IContainerRandomistionSettings
|
|
||||||
{
|
|
||||||
enabled: boolean;
|
|
||||||
/** What maps can use the container randomisation feature */
|
|
||||||
maps: Record<string, boolean>;
|
|
||||||
/** Some container types don't work when randomised */
|
|
||||||
containerTypesToNotRandomise: string[];
|
|
||||||
containerGroupMinSizeMultiplier: number;
|
|
||||||
containerGroupMaxSizeMultiplier: number;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IFixEmptyBotWavesSettings
|
export interface IFixEmptyBotWavesSettings
|
||||||
@ -119,3 +95,38 @@ export interface LootMultiplier
|
|||||||
terminal: number;
|
terminal: number;
|
||||||
town: number;
|
town: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface IContainerRandomistionSettings
|
||||||
|
{
|
||||||
|
enabled: boolean;
|
||||||
|
/** What maps can use the container randomisation feature */
|
||||||
|
maps: Record<string, boolean>;
|
||||||
|
/** Some container types don't work when randomised */
|
||||||
|
containerTypesToNotRandomise: string[];
|
||||||
|
containerGroupMinSizeMultiplier: number;
|
||||||
|
containerGroupMaxSizeMultiplier: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IScavRaidTimeSettings
|
||||||
|
{
|
||||||
|
settings: IScavRaidTimeConfigSettings
|
||||||
|
maps: Record<string, IScavRaidTimeLocationSettings>
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IScavRaidTimeConfigSettings
|
||||||
|
{
|
||||||
|
trainArrivalDelaySeconds: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IScavRaidTimeLocationSettings
|
||||||
|
{
|
||||||
|
/** Should loot be reduced by same percent length of raid is reduced by */
|
||||||
|
reduceLootByPercent: boolean;
|
||||||
|
minStaticLootPercent: number;
|
||||||
|
minDynamicLootPercent: number;
|
||||||
|
/** Chance raid time is reduced */
|
||||||
|
reducedChancePercent: number;
|
||||||
|
reductionPercentWeights: Record<string, number>;
|
||||||
|
/** Should bot waves be removed / spawn times be adjusted */
|
||||||
|
adjustWaves: boolean;
|
||||||
|
}
|
||||||
|
@ -171,11 +171,11 @@ export class RaidTimeAdjustmentService
|
|||||||
*/
|
*/
|
||||||
protected getMapSettings(location: string): IScavRaidTimeLocationSettings
|
protected getMapSettings(location: string): IScavRaidTimeLocationSettings
|
||||||
{
|
{
|
||||||
const mapSettings = this.locationConfig.scavRaidTimeSettings[location.toLowerCase()];
|
const mapSettings = this.locationConfig.scavRaidTimeSettings.maps[location.toLowerCase()];
|
||||||
if (!mapSettings)
|
if (!mapSettings)
|
||||||
{
|
{
|
||||||
this.logger.warning(`Unable to find scav raid time settings for map: ${location}, using defaults`);
|
this.logger.warning(`Unable to find scav raid time settings for map: ${location}, using defaults`);
|
||||||
return this.locationConfig.scavRaidTimeSettings.default;
|
return this.locationConfig.scavRaidTimeSettings.maps.default;
|
||||||
}
|
}
|
||||||
|
|
||||||
return mapSettings;
|
return mapSettings;
|
||||||
@ -226,7 +226,7 @@ export class RaidTimeAdjustmentService
|
|||||||
//
|
//
|
||||||
// I added 2 seconds just to be safe...
|
// I added 2 seconds just to be safe...
|
||||||
//
|
//
|
||||||
const trainArrivalDelaySeconds = 90;
|
const trainArrivalDelaySeconds = this.locationConfig.scavRaidTimeSettings.settings.trainArrivalDelaySeconds;
|
||||||
|
|
||||||
// Determine the earliest possible time in the raid when the train would leave
|
// Determine the earliest possible time in the raid when the train would leave
|
||||||
const earliestPossibleDepartureMinutes = (exit.MinTime + exit.Count + exit.ExfiltrationTime + trainArrivalDelaySeconds) / 60;
|
const earliestPossibleDepartureMinutes = (exit.MinTime + exit.Count + exit.ExfiltrationTime + trainArrivalDelaySeconds) / 60;
|
||||||
|
Loading…
Reference in New Issue
Block a user