diff --git a/Content.Client/Lobby/LobbyState.cs b/Content.Client/Lobby/LobbyState.cs index b4e8971f71..628e698d31 100644 --- a/Content.Client/Lobby/LobbyState.cs +++ b/Content.Client/Lobby/LobbyState.cs @@ -71,7 +71,6 @@ namespace Content.Client.Lobby }; LayoutContainer.SetAnchorPreset(_lobby, LayoutContainer.LayoutPreset.Wide); - _voteManager.SetPopupContainer(_lobby.VoteContainer); _lobby.ServerName.Text = _baseClient.GameInfo?.ServerName; //The eye of refactor gazes upon you... UpdateLobbyUi(); diff --git a/Content.Client/Voting/VoteManager.cs b/Content.Client/Voting/VoteManager.cs index 00c53b38c6..e379ca6803 100644 --- a/Content.Client/Voting/VoteManager.cs +++ b/Content.Client/Voting/VoteManager.cs @@ -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 _standardVoteTimeouts = new(); private readonly Dictionary _votes = new(); @@ -120,6 +121,9 @@ namespace Content.Client.Voting @new = true; IoCManager.Resolve().GetEntitySystem() .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) diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index fd521a9615..dc6fefcb56 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -911,12 +911,11 @@ namespace Content.Shared.CCVar public static readonly CVarDef VoteEnabled = CVarDef.Create("vote.enabled", true, CVar.SERVERONLY); - // TODO HUD REFACTOR REENABLE /// /// See vote.enabled, but specific to restart votes /// public static readonly CVarDef VoteRestartEnabled = - CVarDef.Create("vote.restart_enabled", false, CVar.SERVERONLY); + CVarDef.Create("vote.restart_enabled", true, CVar.SERVERONLY); /// /// See vote.enabled, but specific to preset votes