3.4 KiB
CLAUDE.md
This is an SCP: Secret Laboratory LabAPI plugin, generated from the
labapi-plugin dotnet new template. EntryPoint.cs is the plugin's entry
point (Plugin<Config>); Config.cs is its YAML-backed settings class.
LabAPI contract (verified against northwood-studios/LabAPI source, not guessed)
Plugin<TConfig> (LabApi.Loader.Features.Plugins) requires implementing:
Name, Description, Author, RequiredApiVersion (all abstract get-only) plus
Enable()/Disable(). Overridable but optional: Version (defaults to the
assembly's version), Priority (LoadPriority, defaults to Medium),
ConfigFileName (defaults to "config.yml"). Config is a plain class with a
public parameterless constructor and public get/set properties — the base class
(de)serializes it via YamlDotNet automatically; don't hand-roll config I/O.
Never invent a LabAPI class/namespace/method/property/attribute. Before using one
you haven't already seen in this project, check the restored package (LabApi.dll +
LabApi.xml under %userprofile%\.nuget\packages\northwood.labapi\<version>\lib\net48\)
or https://github.com/northwood-studios/LabAPI. If you can't verify a member exists,
say so instead of guessing.
Toolchain choices — don't "fix" these without being asked
TargetFrameworkisnetstandard2.1on purpose, even though LabAPI's own docs and theNorthwood.LabAPINuGet package only targetnet48/net481. This is a deliberate compatibility choice (compiled output still loads under the game's Mono/.NET Framework 4.8 host) that trades away some netstandard2.1 BCL/language surface .NET Framework can't actually run (e.g. default interface members). Don't switch it tonet48, don't add multi-targeting, unless asked.LangVersionis pinned explicitly in the.csproj— don't let it drift tolatest.- The
.csprojsuppresses exactly two warnings, both scoped as narrowly as MSBuild allows, because of the netstandard2.1/net48-only-package combination above:NU1701(via a per-PackageReference<NoWarn>, not a project-wide one) andMSB3270(viaResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch=None). Don't broaden either into a blanket suppression and don't remove them without understanding why (both are explained here, not in the.csproj— this project's code style forbids comments, including in the.csproj, see "Code style" below). Northwood.LabAPIuses a floatingVersion="*"on purpose, so everydotnet restorepulls whatever is latest on NuGet at that moment. This is intentionally not wired toEntryPoint.cs'sRequiredApiVersion, which is a separate, manually-maintained literal for the minimum LabAPI version this code is known to work with — bump it by hand if you verify compatibility with a newer release, don't try to auto-sync it with the floating restore.
Code style
- No
//,/* */,///, or XML (<!-- -->) comments unless explicitly asked for. No comments restating self-explanatory code. - All text embedded in code defaults to English: string/log/console messages,
exception messages,
[Description]/config text, any user-facing string. - This never applies to identifiers picked deliberately (project name, namespace, class/method/property/variable names) — keep those as requested.
How to verify a change
There is no test project scaffolded. Verify with:
dotnet build
Expect Build succeeded. 0 Warning(s) 0 Error(s).