Roslyn analyzers for Slay the Spire 2 mods using STS2-RitsuLib. Complements StS2ModAnalyzers (BaseLib); both packages can be referenced together.
Satellite strings: Resources.zh-Hans.resx (embedded) for zh-Hans UI culture.
| Rule ID | Category | Severity | Summary |
|---|---|---|---|
RLA001 |
Localization |
Error | Missing model localization keys under {MOD}_{CATEGORY}_{TYPENAME}. |
RLA002 |
Localization |
Warning | Missing mod_manifest.json or localization JSON as <AdditionalFiles>. |
RLA003 |
Localization |
Warning | Content model should inherit RitsuLib Mod*Template instead of vanilla Core *Model only. |
RLA004 |
Usage |
Warning | Missing RitsuLib [Register*] auto-registration attribute on content models. |
sts-2-modanalyzers-ritsulib/
├─ STS2-ModAnalyzers-RitsuLib.sln
└─ ModAnalyzers/
├─ ModAnalyzers/
└─ ModAnalyzers.Sample/
dotnet build sts-2-modanalyzers-ritsulib\STS2-ModAnalyzers-RitsuLib.sln -c ReleaseProduces STS2.ModAnalyzers.RitsuLib.<version>.nupkg under ModAnalyzers/ModAnalyzers/bin/Release/.
<ItemGroup>
<PackageReference Include="STS2.ModAnalyzers.RitsuLib" Version="0.1.0" PrivateAssets="all" />
<AdditionalFiles Include="mod_manifest.json" />
<AdditionalFiles Include="localization/**/*.json" />
</ItemGroup>mod_manifest.json field "id" supplies the mod stem. Localization keys are read from any *.json under a path containing localization/; top-level object properties are collected per file stem (e.g. cards, relics).
JSON is read with System.Text.Json. Dependency DLLs are bundled under analyzers/dotnet/cs/ in the package.