Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@

除此之外,仓库还包含一部分 **TeamOpenSirius 自有协议**。这些类型位于 `Sirius.Protocol.InternalApi`,用于 OpenSirius 内部服务之间通信,例如游戏服务端、账号平台和 Realtime 后端。它们属于 OpenSirius 私有基础设施协议,**不是客户端原始 API 的一部分**。

`PlatformScoreRecordMutationContracts.cs` 定义 SiriusServer 补录正常结算成绩、
清空指定谱面打歌记录的请求与响应类型。

简单来说,SiriusData 是以下模块之间的公共数据边界:

- 从 YMST 客户端恢复出的协议与数据结构;
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ Most game-facing models in `Sirius.Protocol` were reconstructed and adapted from

The repository also contains a small set of **TeamOpenSirius-specific contracts** under `Sirius.Protocol.InternalApi`. These models are private infrastructure contracts used for communication between OpenSirius services such as the game server, account/platform services, and realtime backend. They are **not** intended to represent original client APIs.

`PlatformScoreRecordMutationContracts.cs` defines the requests and replies for adding
a normally settled play and clearing one chart's play records in SiriusServer.

In short, SiriusData acts as the shared boundary between:

- reconstructed YMST client protocol structures;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
using System.Text.Json.Serialization;

namespace Sirius.Protocol.InternalApi;

[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
public sealed class PlatformClearScoresRequest
{
public required string OperationId { get; set; }
public required string Reason { get; set; }
}

[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
public sealed class PlatformAddScoreRequest
{
public required string OperationId { get; set; }
public required string Reason { get; set; }
public required long PartyId { get; set; }
public required long LiveSettingMasterId { get; set; }
public bool UseStamina { get; set; } = true;
public int StaminaConsumptionRatio { get; set; } = 1;
public bool IsStoryEventChallenge { get; set; }
public required long Score { get; set; }
public long SenseScore { get; set; }
public long StarActScore { get; set; }
public int StarActCount { get; set; }
public required int MaxCombo { get; set; }
public required int FinalLife { get; set; }
public required PlatformScoreJudgements Judgements { get; set; }
}

[JsonUnmappedMemberHandling(JsonUnmappedMemberHandling.Disallow)]
public sealed class PlatformScoreJudgements
{
public required int PerfectStar { get; set; }
public required int Perfect { get; set; }
public required int Great { get; set; }
public required int Good { get; set; }
public required int Bad { get; set; }
public required int Miss { get; set; }
}

public sealed record PlatformScoreReward(int ThingType, long ThingId, int Quantity);

public sealed record PlatformScoreMutationReply
{
public long AccountId { get; init; }
public long MusicId { get; init; }
public int Difficulty { get; init; }
public long? ResultId { get; init; }
public long ClearedRecords { get; init; }
public double PlayerRate { get; init; }
public double MaxPlayerRate { get; init; }
public int TotalSpCount { get; init; }
public int PlayerRank { get; init; }
public int CurrentStamina { get; init; }
public PlatformScoreReward[] Rewards { get; init; } = [];
public bool AlreadyProcessed { get; init; }
}
Loading