using Content.Client.Ghost; using Content.Shared.Voting; namespace Content.Client.Voting; public sealed class VotingSystem : EntitySystem { public event Action? VotePlayerListResponse; //Provides a list of players elligble for vote actions [Dependency] private readonly GhostSystem _ghostSystem = default!; public override void Initialize() { base.Initialize(); SubscribeNetworkEvent(OnVotePlayerListResponseEvent); } private void OnVotePlayerListResponseEvent(VotePlayerListResponseEvent msg) { if (!_ghostSystem.IsGhost) { return; } VotePlayerListResponse?.Invoke(msg); } public void RequestVotePlayerList() { RaiseNetworkEvent(new VotePlayerListRequestEvent()); } }