Added minReserveRaiderSpawnChance
to location.json
config, set to 72 by default, wired up to adjust reserve values on server start
This commit is contained in:
parent
37d2fa63aa
commit
7964d8ef5a
@ -537,5 +537,6 @@
|
|||||||
"mod_mount": 5,
|
"mod_mount": 5,
|
||||||
"mod_equipment": 5
|
"mod_equipment": 5
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"minReserveRaiderSpawnChance": 72
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,8 @@ export interface ILocationConfig extends IBaseConfig {
|
|||||||
scavRaidTimeSettings: IScavRaidTimeSettings;
|
scavRaidTimeSettings: IScavRaidTimeSettings;
|
||||||
/** Settings to adjust mods for lootable equipment in raid */
|
/** Settings to adjust mods for lootable equipment in raid */
|
||||||
equipmentLootSettings: IEquipmentLootSettings;
|
equipmentLootSettings: IEquipmentLootSettings;
|
||||||
|
/** min percentage to set raider spawns at, -1 makes no changes */
|
||||||
|
minReserveRaiderSpawnChance: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IEquipmentLootSettings {
|
export interface IEquipmentLootSettings {
|
||||||
|
@ -58,6 +58,8 @@ export class PostDbLoadService {
|
|||||||
|
|
||||||
this.addCustomLooseLootPositions();
|
this.addCustomLooseLootPositions();
|
||||||
|
|
||||||
|
this.adjustMinReserveRaiderSpawnChance();
|
||||||
|
|
||||||
if (this.coreConfig.fixes.fixShotgunDispersion) {
|
if (this.coreConfig.fixes.fixShotgunDispersion) {
|
||||||
this.fixShotgunDispersions();
|
this.fixShotgunDispersions();
|
||||||
}
|
}
|
||||||
@ -107,6 +109,19 @@ export class PostDbLoadService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected adjustMinReserveRaiderSpawnChance(): void {
|
||||||
|
if (this.locationConfig.minReserveRaiderSpawnChance === -1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const reserveBase = this.databaseService.getLocation("rezervbase").base;
|
||||||
|
for (const raiderSpawn of reserveBase.BossLocationSpawn.filter((x) => x.BossName === "pmcBot")) {
|
||||||
|
if (raiderSpawn.BossChance < this.locationConfig.minReserveRaiderSpawnChance) {
|
||||||
|
raiderSpawn.BossChance = this.locationConfig.minReserveRaiderSpawnChance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected addCustomLooseLootPositions(): void {
|
protected addCustomLooseLootPositions(): void {
|
||||||
const looseLootPositionsToAdd = this.lootConfig.looseLoot;
|
const looseLootPositionsToAdd = this.lootConfig.looseLoot;
|
||||||
for (const [mapId, positionsToAdd] of Object.entries(looseLootPositionsToAdd)) {
|
for (const [mapId, positionsToAdd] of Object.entries(looseLootPositionsToAdd)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user