[TF2] Add names to the vote controllers and add a dummy issue as the first issue in each vote controller #1157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Some community mods relied on vote index 0 effectively being a no-op for custom vote handling.
Prior to the team-based vote_controller rework, issue index 0 would be KickIssue, which when triggered by a community mod, would no-op since the kick vote had no target set. However, after the rework, index 0 became RestartGame and these mods would accidentally trigger a game restart if they attempted to use index 0. Workarounds for the mods such as using an out-of-bound index also resulted in problems.
This PR adds a dummy issue as index 0 on all 3 vote controllers so that those mods may function again.
Other Source games with voting should add the same type of Dummy issue so that these community mods can function on those games as well.
It also adds names to each vote controller, and in a followup PR I plan to add VScript support to CVoteController.