Files
tbd-station-14/Content.Client/Voting/VotingSystem.cs
2025-02-11 20:59:50 +11:00

26 lines
671 B
C#

using Content.Shared.Voting;
namespace Content.Client.Voting;
public sealed class VotingSystem : EntitySystem
{
public event Action<VotePlayerListResponseEvent>? VotePlayerListResponse; //Provides a list of players elligble for vote actions
public override void Initialize()
{
base.Initialize();
SubscribeNetworkEvent<VotePlayerListResponseEvent>(OnVotePlayerListResponseEvent);
}
private void OnVotePlayerListResponseEvent(VotePlayerListResponseEvent msg)
{
VotePlayerListResponse?.Invoke(msg);
}
public void RequestVotePlayerList()
{
RaiseNetworkEvent(new VotePlayerListRequestEvent());
}
}