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 .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# C# Dev Kit cache
*.lscache

# User-specific files
*.suo
*.user
Expand Down
35 changes: 35 additions & 0 deletions osu.Game/Online/Multiplayer/Countdown/CountdownTickEvent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using MessagePack;
using Newtonsoft.Json;

namespace osu.Game.Online.Multiplayer.Countdown
{
/// <summary>
/// Indicates a countdown tick (periodic reminder) in a <see cref="MultiplayerRoom"/>.
/// </summary>
[MessagePackObject]
public class CountdownTickEvent : MatchServerEvent
{
/// <summary>
/// The identifier of the countdown this tick pertains to.
/// </summary>
[Key(0)]
public readonly int CountdownId;

/// <summary>
/// Number of seconds (fractional) until the completion of the countdown.
/// </summary>
[Key(1)]
public readonly double Seconds;

[JsonConstructor]
[SerializationConstructor]
public CountdownTickEvent(int countdownId, double seconds)
{
CountdownId = countdownId;
Seconds = seconds;
}
}
}
16 changes: 16 additions & 0 deletions osu.Game/Online/Multiplayer/Countdown/ReminderCountdown.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using MessagePack;

namespace osu.Game.Online.Multiplayer.Countdown
{
/// <summary>
/// A countdown for match notifications/reminders, does not start the match.
/// </summary>
[MessagePackObject]
public class ReminderCountdown : MultiplayerCountdown
{
public override bool IsExclusive => true;
}
}
1 change: 1 addition & 0 deletions osu.Game/Online/Multiplayer/MultiplayerCountdown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ namespace osu.Game.Online.Multiplayer
[Union(2, typeof(ServerShuttingDownCountdown))]
[Union(3, typeof(MatchmakingStageCountdown))]
[Union(4, typeof(RankedPlayStageCountdown))]
[Union(5, typeof(ReminderCountdown))]
public abstract class MultiplayerCountdown
{
/// <summary>
Expand Down
1 change: 1 addition & 0 deletions osu.Game/Online/SignalRWorkaroundTypes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ internal static class SignalRWorkaroundTypes
(typeof(MatchStartCountdown), typeof(MultiplayerCountdown)),
(typeof(ForceGameplayStartCountdown), typeof(MultiplayerCountdown)),
(typeof(ServerShuttingDownCountdown), typeof(MultiplayerCountdown)),
(typeof(ReminderCountdown), typeof(MultiplayerCountdown)),

// metadata
(typeof(UserActivity.ChoosingBeatmap), typeof(UserActivity)),
Expand Down
Loading