Voting (#3185)
* Basic voting * Rewrite lobby in XAML. Working lobby voting. * Escape menu is now XAML. * Vote menu works, custom votes, gamemode votes. * Vote timeouts & administration. Basically done now. * I will now pretend I was never planning to code voting hotkeys. * Make vote call UI a bit... funny. * Fix exception on round restart. * Fix some vote command definitions.
This commit is contained in:
committed by
GitHub
parent
db290fd91e
commit
cea87d6985
32
Content.Shared/Network/NetMessages/MsgVoteCanCall.cs
Normal file
32
Content.Shared/Network/NetMessages/MsgVoteCanCall.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Lidgren.Network;
|
||||
using Robust.Shared.Network;
|
||||
|
||||
namespace Content.Shared.Network.NetMessages
|
||||
{
|
||||
/// <summary>
|
||||
/// Used to tell clients whether they are able to currently call votes.
|
||||
/// </summary>
|
||||
public sealed class MsgVoteCanCall : NetMessage
|
||||
{
|
||||
#region REQUIRED
|
||||
|
||||
public const MsgGroups GROUP = MsgGroups.Command;
|
||||
public const string NAME = nameof(MsgVoteCanCall);
|
||||
|
||||
public MsgVoteCanCall(INetChannel channel) : base(NAME, GROUP) { }
|
||||
|
||||
#endregion
|
||||
|
||||
public bool CanCall;
|
||||
|
||||
public override void ReadFromBuffer(NetIncomingMessage buffer)
|
||||
{
|
||||
CanCall = buffer.ReadBoolean();
|
||||
}
|
||||
|
||||
public override void WriteToBuffer(NetOutgoingMessage buffer)
|
||||
{
|
||||
buffer.Write(CanCall);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user