Skip to content

Commit 384ebfc

Browse files
Add NpcParser and build script
Include NpcParser and its XML dependencies in the Unity project by adding Compile entries to Maple2.File.Unity.csproj (NpcParser.cs, Xml/Npc/*.cs and Xml/Common/StatValue.cs). Add build-unity-package.bat to provide a simple dotnet pack workflow that outputs the package to an artifacts directory and fails on build errors.
1 parent 0e95925 commit 384ebfc

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

Maple2.File.Unity/Maple2.File.Unity.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
<Compile Include="..\Maple2.File.Parser\Tools\Sanitizer.cs" Link="Tools\Sanitizer.cs" />
3939
<Compile Include="..\Maple2.File.Parser\Tools\Filter.cs" Link="Tools\Filter.cs" />
4040

41+
<!-- NpcParser and dependencies -->
42+
<Compile Include="..\Maple2.File.Parser\NpcParser.cs" Link="NpcParser.cs" />
43+
<Compile Include="..\Maple2.File.Parser\Xml\Npc\*.cs" Link="Xml\Npc\%(Filename)%(Extension)" />
44+
<Compile Include="..\Maple2.File.Parser\Xml\Common\StatValue.cs" Link="Xml\Common\StatValue.cs" />
45+
4146
<!-- Filter dependencies (FeatureSetting, Feature) -->
4247
<Compile Include="..\Maple2.File.Parser\Xml\Table\FeatureSetting.cs" Link="Xml\Table\FeatureSetting.cs" />
4348
<Compile Include="..\Maple2.File.Parser\Xml\Table\Feature.cs" Link="Xml\Table\Feature.cs" />

build-unity-package.bat

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@echo off
2+
dotnet pack Maple2.File.Unity\Maple2.File.Unity.csproj -c Release -o artifacts
3+
if %errorlevel% neq 0 (
4+
echo Build failed.
5+
exit /b %errorlevel%
6+
)
7+
echo Package output to artifacts\

0 commit comments

Comments
 (0)