Fix in-game voting (#12932)
* Fix in-game voting * Add comment * Re-enable vote.restart_enabled by default
This commit is contained in:
@@ -34,6 +34,7 @@ namespace Content.Client.Voting
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IClientConsoleHost _console = default!;
|
||||
[Dependency] private readonly IBaseClient _client = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
|
||||
|
||||
private readonly Dictionary<StandardVoteType, TimeSpan> _standardVoteTimeouts = new();
|
||||
private readonly Dictionary<int, ActiveVote> _votes = new();
|
||||
@@ -120,6 +121,9 @@ namespace Content.Client.Voting
|
||||
@new = true;
|
||||
IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<AudioSystem>()
|
||||
.PlayGlobal("/Audio/Effects/voteding.ogg", Filter.Local(), false);
|
||||
// TODO: It would be better if this used a per-state container, i.e. a container
|
||||
// for the lobby and each HUD layout.
|
||||
SetPopupContainer(_userInterfaceManager.WindowRoot);
|
||||
|
||||
// New vote from the server.
|
||||
var vote = new ActiveVote(voteId)
|
||||
|
||||
Reference in New Issue
Block a user