-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resurrect The Build And Test Debug (#1591)
I'm trying something out.
- Loading branch information
Showing
58 changed files
with
2,096 additions
and
96 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<mapping:MappingActionsButton | ||
xmlns="https://spacestation14.io" | ||
xmlns:mapping="clr-namespace:Content.Client.Mapping" | ||
StyleClasses="ButtonSquare" ToggleMode="True" SetSize="32 32" Margin="0 0 5 0" | ||
TooltipDelay="0"> | ||
<TextureRect Name="Texture" Access="Public" Stretch="Scale" SetSize="16 16" | ||
HorizontalAlignment="Center" VerticalAlignment="Center" /> | ||
</mapping:MappingActionsButton> |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface.Controls; | ||
using Robust.Client.UserInterface.XAML; | ||
|
||
namespace Content.Client.Mapping; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class MappingActionsButton : Button | ||
{ | ||
public MappingActionsButton() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
} | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<mapping:MappingDoNotMeasure | ||
xmlns="https://spacestation14.io" | ||
xmlns:mapping="clr-namespace:Content.Client.Mapping"> | ||
</mapping:MappingDoNotMeasure> |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using System.Numerics; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface; | ||
using Robust.Client.UserInterface.XAML; | ||
|
||
namespace Content.Client.Mapping; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class MappingDoNotMeasure : Control | ||
{ | ||
public MappingDoNotMeasure() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
} | ||
|
||
protected override Vector2 MeasureOverride(Vector2 availableSize) | ||
{ | ||
return Vector2.Zero; | ||
} | ||
} | ||
|
Oops, something went wrong.