Archived
Updated SWAG/DONUTS
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
"factory": 0,
|
||||
"factory_night": 2,
|
||||
"groundzero": 0,
|
||||
"groundzero_high": 44,
|
||||
"groundzero_high": 4,
|
||||
"interchange": 0,
|
||||
"laboratory": 0,
|
||||
"lighthouse": 0,
|
||||
|
||||
@@ -65,6 +65,7 @@ import scav_snipers from "../config/other/scav_snipers.json";
|
||||
// Custom
|
||||
import punisher from "../config/custom/punisher.json"
|
||||
import legion from "../config/custom/legion.json"
|
||||
import {DatabaseService} from "@spt/services/DatabaseService";
|
||||
|
||||
const otherSpawnConfigs = [
|
||||
bloodhounds,
|
||||
@@ -230,7 +231,7 @@ class SWAG implements IPreSptLoadMod, IPostDBLoadMod
|
||||
!config?.UseDefaultSpawns?.TriggeredWaves
|
||||
)
|
||||
{
|
||||
SWAG.disableSpawnSystems();
|
||||
SWAG.disableSpawnSystems(container);
|
||||
}
|
||||
|
||||
// disable more vanilla spawn stuff
|
||||
@@ -240,10 +241,6 @@ class SWAG implements IPreSptLoadMod, IPostDBLoadMod
|
||||
locationConfig.addCustomBotWavesToMaps = false;
|
||||
locationConfig.enableBotTypeLimits = false;
|
||||
|
||||
logger.info(
|
||||
"SWAG: Vanilla spawn systems disabled"
|
||||
);
|
||||
|
||||
return output;
|
||||
}
|
||||
}],
|
||||
@@ -511,8 +508,6 @@ class SWAG implements IPreSptLoadMod, IPostDBLoadMod
|
||||
{
|
||||
SWAG.spawnCustom(custom, globalmap);
|
||||
});
|
||||
|
||||
logger.warning(`SWAG: Configured boss spawns for map ${globalmap}`);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -753,20 +748,20 @@ class SWAG implements IPreSptLoadMod, IPostDBLoadMod
|
||||
return Math.floor(Math.random() * (max - min + 1)) + min;
|
||||
}
|
||||
|
||||
static disableSpawnSystems(): void
|
||||
static disableSpawnSystems(container: DependencyContainer): void
|
||||
{
|
||||
let map: keyof ILocations;
|
||||
for (map in locations)
|
||||
{
|
||||
if (map === "base" || map === "hideout")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// locations[map].base.OfflineNewSpawn = false;
|
||||
// locations[map].base.OfflineOldSpawn = true;
|
||||
locations[map].base.NewSpawn = false;
|
||||
locations[map].base.OldSpawn = true;
|
||||
const DB = container.resolve<DatabaseService>("DatabaseService").getTables();
|
||||
const locations = Object.keys(DB.locations);
|
||||
for (const loc of locations) {
|
||||
const base = DB.locations[loc].base;
|
||||
if (!base) continue;
|
||||
// Set spawn systems
|
||||
base.NewSpawn = false;
|
||||
base.OfflineNewSpawn = false;
|
||||
base.OldSpawn = true;
|
||||
base.OfflineOldSpawn = true;
|
||||
}
|
||||
logger.info("SWAG: Spawn Systems Set")
|
||||
}
|
||||
|
||||
static clearDefaultSpawns(): void
|
||||
@@ -790,6 +785,17 @@ class SWAG implements IPreSptLoadMod, IPostDBLoadMod
|
||||
};
|
||||
}
|
||||
|
||||
// Set bot USECs and BEARs to always be hostile to their chanced enemies
|
||||
locations[map].base.BotLocationModifier.AdditionalHostilitySettings.forEach(setting =>
|
||||
{
|
||||
setting.BearEnemyChance = 100;
|
||||
setting.UsecEnemyChance = 100;
|
||||
setting.ChancedEnemies.forEach(enemy =>
|
||||
{
|
||||
enemy.EnemyChance = 100;
|
||||
})
|
||||
})
|
||||
|
||||
// Reset Database, Cringe -- i stole this code from LUA
|
||||
locations[map].base.waves = [...SWAG.savedLocationData[map].waves];
|
||||
locations[map].base.BossLocationSpawn = [
|
||||
|
||||
Reference in New Issue
Block a user