Fix DisplayVotes doing nothing for a vote (#33170)

This commit is contained in:
DrSmugleaf
2024-11-04 16:12:29 -08:00
committed by GitHub
parent 01ac967640
commit 8f87bad83c

View File

@@ -24,7 +24,6 @@ using Robust.Shared.Random;
using Robust.Shared.Timing; using Robust.Shared.Timing;
using Robust.Shared.Utility; using Robust.Shared.Utility;
namespace Content.Server.Voting.Managers namespace Content.Server.Voting.Managers
{ {
public sealed partial class VoteManager : IVoteManager public sealed partial class VoteManager : IVoteManager
@@ -40,7 +39,7 @@ namespace Content.Server.Voting.Managers
[Dependency] private readonly IGameMapManager _gameMapManager = default!; [Dependency] private readonly IGameMapManager _gameMapManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!; [Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!; [Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly ISharedPlaytimeManager _playtimeManager = default!; [Dependency] private readonly ISharedPlaytimeManager _playtimeManager = default!;
private int _nextVoteId = 1; private int _nextVoteId = 1;
@@ -282,7 +281,7 @@ namespace Content.Server.Voting.Managers
} }
// Admin always see the vote count, even if the vote is set to hide it. // Admin always see the vote count, even if the vote is set to hide it.
if (_adminMgr.HasAdminFlag(player, AdminFlags.Moderator)) if (v.DisplayVotes || _adminMgr.HasAdminFlag(player, AdminFlags.Moderator))
{ {
msg.DisplayVotes = true; msg.DisplayVotes = true;
} }