Files
DorkNet/DorkNet.Models/GameSessions/GameSession.cs
Alexa 4edf25b2d5 Import december-2020-12-18 from private repo (scrubbed 2026-05-27)
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.
2026-05-27 01:04:12 +03:00

74 lines
1.8 KiB
C#

using System.Text.Json.Serialization;
namespace DorkNet.Models.GameSessions;
public class GameSession
{
[JsonPropertyName("GameSessionId")]
public long GameSessionId { get; set; }
[JsonPropertyName("RegionId")]
public string RegionId { get; set; } = "us";
[JsonPropertyName("RoomId")]
public string RoomId { get; set; } = string.Empty;
[JsonPropertyName("RoomName")]
public string RoomName { get; set; } = string.Empty;
[JsonPropertyName("ActivityLevelId")]
public string ActivityLevelId { get; set; } = string.Empty;
[JsonPropertyName("EventId")]
public long? EventId { get; set; }
[JsonPropertyName("Private")]
public bool Private { get; set; }
[JsonPropertyName("GameInProgress")]
public bool GameInProgress { get; set; }
[JsonPropertyName("MaxCapacity")]
public int MaxCapacity { get; set; } = 8;
[JsonPropertyName("IsFull")]
public bool IsFull { get; set; }
[JsonPropertyName("PlayerCount")]
public int PlayerCount { get; set; }
[JsonPropertyName("PhotonRoomName")]
public string PhotonRoomName { get; set; } = string.Empty;
}
public class JoinRandomGameSessionRequest
{
[JsonPropertyName("RoomId")]
public string? RoomId { get; set; }
[JsonPropertyName("ActivityLevelId")]
public string? ActivityLevelId { get; set; }
[JsonPropertyName("RegionId")]
public string RegionId { get; set; } = "us";
}
public class JoinGameSessionResponse
{
[JsonPropertyName("Result")]
public JoinGameErrorCode Result { get; set; } = JoinGameErrorCode.Success;
[JsonPropertyName("GameSession")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GameSession? GameSession { get; set; }
}
public enum JoinGameErrorCode
{
Success = 0,
Full = 1,
NotFound = 2,
Banned = 3,
Error = 4,
}