Skip to content

BAKAOLC/STS2-ModAnalyzers-RitsuLib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STS2-ModAnalyzers-RitsuLib

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.

Diagnostics

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.

Layout

sts-2-modanalyzers-ritsulib/
├─ STS2-ModAnalyzers-RitsuLib.sln
└─ ModAnalyzers/
   ├─ ModAnalyzers/
   └─ ModAnalyzers.Sample/

Build

dotnet build sts-2-modanalyzers-ritsulib\STS2-ModAnalyzers-RitsuLib.sln -c Release

Produces STS2.ModAnalyzers.RitsuLib.<version>.nupkg under ModAnalyzers/ModAnalyzers/bin/Release/.

Consumer project

<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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors