Import march-2020-03-10 from private repo (scrubbed 2026-05-27)

Targets Rec Room 2020.03.10 client (also serves 2020.03.06).

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 dorknet-clientpatch-{key}.zip
  for v1-march-* Release uploads.
- .github/workflows/release.yml — on tag push publishes both
  dorknet-server-march_2020_03_10-win-x64.zip and
  dorknet-clientpatch-march_2020_03_10.zip as Release assets.

Same scrub rules as december; tools/build-patcher-zip.ps1 added to
the maintainer-side allow-list so it survives.
This commit is contained in:
Alexa
2026-05-27 01:06:12 +03:00
commit d471b418b9
389 changed files with 104767 additions and 0 deletions
@@ -0,0 +1,55 @@
using System.ComponentModel.DataAnnotations;
namespace DorkNet.Server.Data.Entities;
/// <summary>
/// One leaderboard stat row per (player, statChannel). Backs
/// <c>api/Leaderboard/v1/SetStats</c> + <c>api/Leaderboard/v2/getPlayerRank</c>.
///
/// The 2020 watch's <c>RecNet.Leaderboards</c> uses an int channel
/// id (e.g. 1=PaintballWins, 2=DodgeballHits, etc.) and a single
/// long value per channel. A player's "rank" is computed as
/// <c>1 + count(*)</c> of rows in the same channel with a higher
/// value.
/// </summary>
public class LeaderboardStatEntity
{
public long Id { get; set; }
public long PlayerId { get; set; }
/// <summary>RecNet stat channel id (small int per game mode +
/// stat type — e.g. paintball-CTF-wins, dodgeball-hits).</summary>
public int StatChannel { get; set; }
/// <summary>Aggregate stat value. Set semantics depend on
/// <see cref="SetMode"/>: 0=Always, 1=OnlyIfHigher, 2=OnlyIfLower,
/// 3=Increment. Most stat channels are mode 1 (high score).</summary>
public long Value { get; set; }
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}
/// <summary>
/// Match-result Elo per (player, game mode). Backs
/// <c>api/PlayerElo/v1/reportPlayerElo</c>. The 2020 watch reports
/// an Elo delta after each ranked match (Royale, Paintball,
/// Soccer); we accumulate it per game mode for matchmaking.
/// </summary>
public class PlayerEloEntity
{
public long Id { get; set; }
public long PlayerId { get; set; }
/// <summary>RecNet game mode id (small int). We don't enumerate
/// these; the wire just sends an int and we pass it through.</summary>
public int GameMode { get; set; }
/// <summary>Current Elo. Default 1000 on first row.</summary>
public int Elo { get; set; } = 1000;
public int Wins { get; set; }
public int Losses { get; set; }
public int MatchesPlayed { get; set; }
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
}