Skip to content

Commit

Permalink
Fix possible generation bug with predator spawns.
Browse files Browse the repository at this point in the history
  • Loading branch information
ComplexRobot committed Dec 24, 2024
1 parent 7c57c41 commit 68ef7b3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions PalSpawn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ public AreaData Clone()
isField = isField,
isBoss = isBoss,
isInDungeon = isInDungeon,
isPredator = isPredator,
uAsset = UAssetData.LoadAsset($"Assets\\{filename}"),
spawnExportData =
new()
Expand Down
2 changes: 1 addition & 1 deletion Palworld Randomizer.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<Version>2.8</Version>
<Version>2.8.1</Version>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWPF>True</UseWPF>
<Nullable>enable</Nullable>
Expand Down
5 changes: 4 additions & 1 deletion Randomize.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Numerics;
using System.Resources;
using System.Runtime.ExceptionServices;
using System.Runtime.InteropServices;
Expand Down Expand Up @@ -1426,6 +1425,10 @@ List<SpawnEntry> FilterSpawnList(List<SpawnEntry> spawnList, bool bossList)
}
bool FilterVanillaSpawns(List<SpawnEntry> spawnEntries, AreaData area)
{
if (area.isPredator)
{
return false;
}
int changes = 0;
foreach (SpawnEntry spawnEntry in spawnEntries)
{
Expand Down

0 comments on commit 68ef7b3

Please sign in to comment.