Aetheria/tools/AetherDb/AetherDb.csproj
Meta Vens 2399d7b9ed Parse the settings asset with YamlDotNet
Unity assets are YAML, so parsing them is a solved problem. The hand rolled
indentation parser produced three bugs in sequences alone: bare scalar items
dropped, mapping items parented to the wrong node, then only the first item
of each sequence kept. YamlDotNet does the parsing; what remains is mapping
a parsed node onto a settings class by field name, with unknown keys
reported rather than silently misplaced.

The settings command keeps asserting counts, since that check is what caught
the parser both times.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 02:11:05 +02:00

18 lines
939 B
XML

<Project Sdk="Microsoft.NET.Sdk">
<!-- Inspects and edits GameData/AetherDB.msgpack through the headless Aetheria.Shared build of ServerShared.
A real project rather than file-based scripts on purpose: running a loose script file caches a build per
script and does not rebuild when the referenced project changes, so scripts ran against stale schemas. -->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>disable</ImplicitUsings>
<RootNamespace>AetherDbTool</RootNamespace>
<NoWarn>$(NoWarn);CS1701;CS1702</NoWarn>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Aetheria.Shared\Aetheria.Shared.csproj" />
<!-- Unity asset files are YAML; parsing them is a solved problem, not one to hand roll -->
<PackageReference Include="YamlDotNet" Version="16.2.1" />
</ItemGroup>
</Project>