Added ability to override hideout craft times via config
This commit is contained in:
parent
31641334aa
commit
35e48add20
@ -1,9 +1,11 @@
|
||||
{
|
||||
"runIntervalSeconds": 10,
|
||||
"hoursForSkillCrafting": 28800,
|
||||
"runIntervalValues": {
|
||||
"runIntervalValues": {
|
||||
"inRaid": 60,
|
||||
"outOfRaid": 10
|
||||
},
|
||||
"expCraftAmount": 10
|
||||
"expCraftAmount": 10,
|
||||
"overrideCraftTimeSeconds": -1,
|
||||
"overrideBuildTimeSeconds": -1
|
||||
}
|
@ -209,6 +209,9 @@ export class GameController
|
||||
|
||||
this.adjustLabsRaiderSpawnRate();
|
||||
|
||||
this.adjustHideoutCraftTimes();
|
||||
this.adjustHideoutBuildTimes();
|
||||
|
||||
this.removePraporTestMessage();
|
||||
|
||||
this.saveActiveModsToProfile(fullProfile);
|
||||
@ -240,6 +243,46 @@ export class GameController
|
||||
}
|
||||
}
|
||||
|
||||
protected adjustHideoutCraftTimes(): void
|
||||
{
|
||||
const craftTimeOverrideSeconds = this.hideoutConfig.overrideCraftTimeSeconds;
|
||||
if (craftTimeOverrideSeconds === -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (const craft of this.databaseServer.getTables().hideout.production)
|
||||
{
|
||||
// Only adjust crafts ABOVE the override
|
||||
if (craft.productionTime > craftTimeOverrideSeconds)
|
||||
{
|
||||
craft.productionTime = craftTimeOverrideSeconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected adjustHideoutBuildTimes(): void
|
||||
{
|
||||
const craftTimeOverrideSeconds = this.hideoutConfig.overrideBuildTimeSeconds;
|
||||
if (craftTimeOverrideSeconds === -1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (const area of this.databaseServer.getTables().hideout.areas)
|
||||
{
|
||||
for (const stageKey of Object.keys(area.stages))
|
||||
{
|
||||
const stage = area.stages[stageKey];
|
||||
// Only adjust crafts ABOVE the override
|
||||
if (stage.constructionTime > craftTimeOverrideSeconds)
|
||||
{
|
||||
stage.constructionTime = craftTimeOverrideSeconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected adjustLocationBotValues(): void
|
||||
{
|
||||
const mapsDb = this.databaseServer.getTables().locations;
|
||||
|
@ -9,4 +9,6 @@ export interface IHideoutConfig extends IBaseConfig
|
||||
runIntervalValues: IRunIntervalValues;
|
||||
hoursForSkillCrafting: number;
|
||||
expCraftAmount: number;
|
||||
overrideCraftTimeSeconds: number;
|
||||
overrideBuildTimeSeconds: number;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user