-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'refs/remotes/upstream/master' into mast…
…er-syndie # Conflicts: # Content.Client/Entry/EntryPoint.cs # Content.Client/IoC/ClientContentIoC.cs
- Loading branch information
Showing
12 changed files
with
89 additions
and
26 deletions.
There are no files selected for viewing
17 changes: 11 additions & 6 deletions
17
...ent.Client/DebugMon/DebugMonitorSystem.cs → ...nt.Client/DebugMon/DebugMonitorManager.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
using Content.Client.Administration.Managers; | ||
using Content.Client.Administration.Managers; | ||
using Content.Shared.CCVar; | ||
using Robust.Client; | ||
using Robust.Client.UserInterface; | ||
using Robust.Shared.Configuration; | ||
|
||
|
||
namespace Content.Client.DebugMon; | ||
|
||
/// <summary> | ||
/// This handles preventing certain debug monitors from appearing. | ||
/// This handles preventing certain debug monitors from being usable by non-admins. | ||
/// </summary> | ||
public sealed class DebugMonitorSystem : EntitySystem | ||
internal sealed class DebugMonitorManager | ||
{ | ||
[Dependency] private readonly IConfigurationManager _cfg = default!; | ||
[Dependency] private readonly IClientAdminManager _admin = default!; | ||
[Dependency] private readonly IUserInterfaceManager _userInterface = default!; | ||
[Dependency] private readonly IBaseClient _baseClient = default!; | ||
|
||
public override void FrameUpdate(float frameTime) | ||
public void FrameUpdate() | ||
{ | ||
if (!_admin.IsActive() && _cfg.GetCVar(CCVars.DebugCoordinatesAdminOnly)) | ||
if (_baseClient.RunLevel == ClientRunLevel.InGame | ||
&& !_admin.IsActive() | ||
&& _cfg.GetCVar(CCVars.DebugCoordinatesAdminOnly)) | ||
{ | ||
_userInterface.DebugMonitors.SetMonitor(DebugMonitor.Coords, false); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters