Files
wwdpublic/Content.Client/Voting/VotingSystem.cs
SlamBamActionman c895c7b7c6 Allow votekicks to be initiated in the lobby (#32528)
Initial commit

(cherry picked from commit 06da4fcc6020c41d8dcac6612724bf5309518501)
2025-09-20 20:33:36 +03:00

30 lines
772 B
C#

using Content.Client.Ghost;
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
[Dependency] private readonly GhostSystem _ghostSystem = default!;
public override void Initialize()
{
base.Initialize();
SubscribeNetworkEvent<VotePlayerListResponseEvent>(OnVotePlayerListResponseEvent);
}
private void OnVotePlayerListResponseEvent(VotePlayerListResponseEvent msg)
{
VotePlayerListResponse?.Invoke(msg);
}
public void RequestVotePlayerList()
{
RaiseNetworkEvent(new VotePlayerListRequestEvent());
}
}