fix: Fixes region priority and resolution. (#1254)

- [X] Fixes world location JSON deserializer.
- [X] Fixes region resolver and priorities.
- [X] Removes DynamicJson from regions.
- [X] Adds missing region music.
This commit is contained in:
Kamron Batman 2022-11-21 10:38:20 -08:00 • committed by GitHub
parent 139be1bc23
commit 18c4459e6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 3809 additions and 3677 deletions

View file

@ -80,7 +80,6 @@ public class WorldLocationConverter : JsonConverter<WorldLocation>
private WorldLocation DeserializeObj(ref Utf8JsonReader reader, JsonSerializerOptions options)
{
Span<int> data = stackalloc int[3];
var count = 0;
var hasLoc = false;
var hasXYZ = false;
var hasMap = false;
@ -150,7 +149,6 @@ public class WorldLocationConverter : JsonConverter<WorldLocation>
data[0] = loc.X;
data[1] = loc.Y;
data[2] = loc.Z;
count = 3;
continue;
}
@ -160,7 +158,7 @@ public class WorldLocationConverter : JsonConverter<WorldLocation>
hasMap = true;
}
if (!hasMap || count != 3)
if (!hasMap)
{
throw new JsonException("WorldLocation must have an x, y, z, and map properties");
}