mirror of
https://github.com/ppy/osu
synced 2025-01-19 04:20:59 +00:00
Add union attributes for derived class deserialisation
This commit is contained in:
parent
ce92a47ec6
commit
4cf2c6188d
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using MessagePack;
|
||||
using osu.Game.Online.Multiplayer.MatchRulesets.TeamVs;
|
||||
|
||||
#nullable enable
|
||||
|
||||
@ -14,7 +15,8 @@ namespace osu.Game.Online.Multiplayer
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[MessagePackObject]
|
||||
public class MatchRulesetRoomState
|
||||
[Union(0, typeof(TeamVsMatchRoomState))]
|
||||
public abstract class MatchRulesetRoomState
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using MessagePack;
|
||||
using osu.Game.Online.Multiplayer.MatchRulesets.TeamVs;
|
||||
|
||||
#nullable enable
|
||||
|
||||
@ -14,7 +15,8 @@ namespace osu.Game.Online.Multiplayer
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[MessagePackObject]
|
||||
public class MatchRulesetUserState
|
||||
[Union(0, typeof(TeamVsMatchUserState))]
|
||||
public abstract class MatchRulesetUserState
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -8,6 +8,7 @@ using MessagePack;
|
||||
|
||||
namespace osu.Game.Online.Multiplayer.MatchRulesets.TeamVs
|
||||
{
|
||||
[MessagePackObject]
|
||||
public class TeamVsMatchRoomState : MatchRulesetRoomState
|
||||
{
|
||||
[Key(0)]
|
||||
|
Loading…
Reference in New Issue
Block a user