96 std::array<bool, MaxPlayers> Waiting{};
104 Schema::CVoteController Controller();
107 void DropVoter(
int slot);
108 void CloseIfAllVoted();
109 void SendStart(
const Ballot&
ballot);
112 void PublishCounts(
const VoteTally&
tally);
114 MultiRecipientFilter Recipients()
const;
116 Interfaces& _interfaces;
117 EntitySystem& _entities;
118 PlayerManager& _players;
120 Scheduler& _scheduler;
126 std::optional<Ballot> _running;
128 Subscription _leaving;
runtime.Entities: finds and creates entities. Everything it returns is valid for this frame only; see...
Creates, fires and listens to game events.
The roster: every connected player, and the signals for the connection lifecycle.
One-shot delays and repeating timers, run on the game thread.
The game's yes/no vote panel (F1/F2), with the ballots counted here.
Vote(const Vote &)=delete
Vote & operator=(const Vote &)=delete
bool TryCastBallot(int slot, std::string_view option)
bool Start(VoteRequest request)
void End(VoteEndReason reason)
static std::string ReadFile(const std::filesystem::path &path)
@ Cancelled
an admin (or a peer feature) called it off
@ AllVoted
every eligible player cast a ballot
Who invoked the command, and how to answer them.
Centralized holder for all HL2SDK interface pointers.
std::function< bool(const VoteTally &)> Passed
std::function< void(bool passed, VoteEndReason reason)> Finished
int Eligible
players who could vote