Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions DawnLib.Dusk/src/API/Definitions/Enemies/DuskEnemyDefinition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,14 @@ public override void Register(DuskMod mod)
using ConfigContext section = mod.ConfigManager.CreateConfigSectionForBundleData(AssetBundleData);
Config = CreateEnemyConfig(section);

EnemyType enemy = EnemyType;
enemy.MaxCount = Config.MaxSpawnCount.Value;
enemy.PowerLevel = Config.PowerLevel.Value;
if (GeneratePowerLevelConfig && Config.PowerLevel is { } ConfigPowerLevel)
{
EnemyType.PowerLevel = ConfigPowerLevel.Value;
}
if (GenerateMaxSpawnCountConfig && Config.MaxSpawnCount is { } ConfigMaxSpawnCount)
{
EnemyType.MaxCount = ConfigMaxSpawnCount.Value;
}

List<NamespacedConfigWeight> Moons = NamespacedConfigWeight.ConvertManyFromString(Config.MoonSpawnWeights?.Value ?? MoonSpawnWeightsCompat);
List<NamespacedConfigWeight> Interiors = NamespacedConfigWeight.ConvertManyFromString(Config.InteriorSpawnWeights?.Value ?? InteriorSpawnWeightsCompat);
Expand Down
Loading