mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-26 07:28:45 -07:00
4edf25b2d5
Targets Rec Room 2020.12.18 client.
Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces the dorknet-clientpatch-{key}.zip
Release asset the launcher fetches.
- .github/workflows/release.yml — auto-publishes both Release assets
on v1-december-* tag push.
Scrubbed via maintainer-side scrub-for-public.ps1: same drop rules as
the prior import, plus build-patcher-zip.ps1 added to the tools/
allow-list so it survives the scrub.
29 lines
1.3 KiB
C#
29 lines
1.3 KiB
C#
namespace DorkNet.Server.Compat;
|
|
|
|
/// <summary>Identifies a specific Rec Room client build.
|
|
/// <para>
|
|
/// <see cref="Key"/> is the wire-format identifier the client mod
|
|
/// stamps on every request via the <c>X-DorkNet-Version</c> header.
|
|
/// Format is <c>{branch}_{semver}</c>: <c>march_2020_03_10</c>,
|
|
/// <c>december_2020_12_18</c>. Keep it lowercase, underscore-separated;
|
|
/// it shows up in admin logs and error responses.
|
|
/// </para>
|
|
/// <para>
|
|
/// <see cref="Generation"/> is the wire-format-compatibility group:
|
|
/// every version inside the same generation shares the same wire
|
|
/// shapes (JSON DTO casing, route names, etc.) and therefore the same
|
|
/// strategy implementations. Adding a new build that's protocol-compatible
|
|
/// with an existing generation = a one-line registration; only a new
|
|
/// generation entails new strategy code.
|
|
/// </para>
|
|
/// </summary>
|
|
public sealed record ClientVersion(string Key, string Generation)
|
|
{
|
|
/// <summary>Sentinel returned when a request has no
|
|
/// <c>X-DorkNet-Version</c> header AND no
|
|
/// <c>DorkNet:DefaultClientVersion</c> is configured. Controllers
|
|
/// can branch on this to either fall through to a sensible default
|
|
/// or 426 the request.</summary>
|
|
public static readonly ClientVersion Unknown = new("unknown", "unknown");
|
|
}
|