Fix load error when trying to parse non-json file as quest

arr-p5 v0.14
Liza 2024-06-14 07:49:30 +02:00
parent 55d8daef93
commit 39e5a5a81d
Signed by: liza
GPG Key ID: 7199F8D727D55F67
2 changed files with 6 additions and 3 deletions

View File

@ -17,8 +17,11 @@ public static class AssemblyQuestLoader
new ZipArchive(typeof(AssemblyQuestLoader).Assembly.GetManifestResourceStream(resourceName)!); new ZipArchive(typeof(AssemblyQuestLoader).Assembly.GetManifestResourceStream(resourceName)!);
foreach (ZipArchiveEntry entry in zipArchive.Entries) foreach (ZipArchiveEntry entry in zipArchive.Entries)
{ {
using Stream stream = entry.Open(); if (entry.Name.EndsWith(".json"))
loadFunction(entry.Name, stream); {
using Stream stream = entry.Open();
loadFunction(entry.Name, stream);
}
} }
} }
} }

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<Version>0.13</Version> <Version>0.14</Version>
<LangVersion>12</LangVersion> <LangVersion>12</LangVersion>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>