Files
wwdpublic/Content.Client/Voting/VotingSystem.cs
SpaceManiac a1a8139916 Fix 38 non-obsolete warnings (#33794)
(cherry picked from commit 41223107356553ccbc7ba4f8b95e4f9049873d09)
2025-09-20 20:34:22 +03: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());
}
}