mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-27 03:35:20 +00:00
40 lines
766 B
C#
40 lines
766 B
C#
using QSB.Messaging;
|
|
using QuantumUNET.Components;
|
|
using QuantumUNET.Transport;
|
|
|
|
namespace QSB.AuthoritySync
|
|
{
|
|
public class AuthQueueMessage : EnumMessage<AuthQueueAction>
|
|
{
|
|
public QNetworkIdentity Identity;
|
|
|
|
public override void Deserialize(QNetworkReader reader)
|
|
{
|
|
base.Deserialize(reader);
|
|
Identity = reader.ReadNetworkIdentity();
|
|
}
|
|
|
|
public override void Serialize(QNetworkWriter writer)
|
|
{
|
|
base.Serialize(writer);
|
|
writer.Write(Identity);
|
|
}
|
|
}
|
|
|
|
public enum AuthQueueAction
|
|
{
|
|
/// <summary>
|
|
/// add identity to the queue
|
|
/// </summary>
|
|
Add,
|
|
/// <summary>
|
|
/// remove identity from the queue
|
|
/// </summary>
|
|
Remove,
|
|
/// <summary>
|
|
/// add identity to the queue and force it to the front
|
|
/// </summary>
|
|
Force
|
|
}
|
|
}
|