From 3c307f3b36a7e337804aded8c5dea2ab2fcdd8ce Mon Sep 17 00:00:00 2001 From: J Date: Thu, 10 Apr 2025 10:47:05 +0000 Subject: [PATCH] Various UI warnings cleanup (#36169) * Various UI warnings cleanup * Revert unnecessary change * Redoing SpriteSystem as it's non-injectable * Missed one * Better entity instantiation * General cleanup of warnings changes * Wrong class name! --- Content.Client/Changelog/ChangelogWindow.xaml.cs | 3 --- .../Chasm/ChasmFallingVisualsSystem.cs | 16 ++++++++++------ Content.Client/Chat/UI/SpeechBubble.cs | 2 +- .../UI/CommunicationsConsoleMenu.xaml.cs | 6 +++--- Content.Client/Decals/DecalPlacementSystem.cs | 2 +- .../Decals/UI/DecalPlacerWindow.xaml.cs | 5 ++++- Content.Client/Guidebook/GuidebookSystem.cs | 4 ---- .../Holopad/HolopadBoundUserInterface.cs | 2 -- Content.Client/Humanoid/MarkingPicker.xaml.cs | 14 ++++++++++---- .../Humanoid/SingleMarkingPicker.xaml.cs | 7 ++++++- .../Implants/UI/DeimplantBoundUserInterface.cs | 3 --- Content.Client/Jittering/JitteringSystem.cs | 4 ++-- .../Lobby/UI/HumanoidProfileEditor.xaml.cs | 7 +++++-- Content.Client/Outline/TargetOutlineSystem.cs | 2 +- Content.Client/Parallax/ParallaxGenerator.cs | 2 +- Content.Client/Popups/PopupOverlay.cs | 2 +- .../Visualizers/RadiationCollectorSystem.cs | 4 ++-- .../SprayPainter/UI/SprayPainterWindow.xaml.cs | 8 +++++--- .../Systems/Chat/ChatUIController.cs | 2 +- .../Systems/Storage/Controls/StorageWindow.cs | 2 +- .../Systems/Viewport/ViewportUIController.cs | 2 -- 21 files changed, 54 insertions(+), 45 deletions(-) diff --git a/Content.Client/Changelog/ChangelogWindow.xaml.cs b/Content.Client/Changelog/ChangelogWindow.xaml.cs index 0b1afcbb0a..f46ffa7b91 100644 --- a/Content.Client/Changelog/ChangelogWindow.xaml.cs +++ b/Content.Client/Changelog/ChangelogWindow.xaml.cs @@ -8,8 +8,6 @@ using JetBrains.Annotations; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface; using Robust.Client.UserInterface.XAML; -using Robust.Shared; -using Robust.Shared.Configuration; using Robust.Shared.Console; namespace Content.Client.Changelog @@ -19,7 +17,6 @@ namespace Content.Client.Changelog { [Dependency] private readonly ChangelogManager _changelog = default!; [Dependency] private readonly IClientAdminManager _adminManager = default!; - [Dependency] private readonly IConfigurationManager _cfg = default!; public ChangelogWindow() { diff --git a/Content.Client/Chasm/ChasmFallingVisualsSystem.cs b/Content.Client/Chasm/ChasmFallingVisualsSystem.cs index ddcd509cb3..204b90a8d8 100644 --- a/Content.Client/Chasm/ChasmFallingVisualsSystem.cs +++ b/Content.Client/Chasm/ChasmFallingVisualsSystem.cs @@ -1,4 +1,4 @@ -using Content.Shared.Chasm; +using Content.Shared.Chasm; using Robust.Client.Animations; using Robust.Client.GameObjects; using Robust.Shared.Animations; @@ -32,7 +32,9 @@ public sealed class ChasmFallingVisualsSystem : EntitySystem component.OriginalScale = sprite.Scale; - var player = EnsureComp(uid); + if (!TryComp(uid, out var player)) + return; + if (_anim.HasRunningAnimation(player, _chasmFallAnimationKey)) return; @@ -44,11 +46,13 @@ public sealed class ChasmFallingVisualsSystem : EntitySystem if (!TryComp(uid, out var sprite)) return; - var player = EnsureComp(uid); - if (_anim.HasRunningAnimation(player, _chasmFallAnimationKey)) - _anim.Stop(player, _chasmFallAnimationKey); - sprite.Scale = component.OriginalScale; + + if (!TryComp(uid, out var player)) + return; + + if (_anim.HasRunningAnimation(player, _chasmFallAnimationKey)) + _anim.Stop((uid, player), _chasmFallAnimationKey); } private Animation GetFallingAnimation(ChasmFallingComponent component) diff --git a/Content.Client/Chat/UI/SpeechBubble.cs b/Content.Client/Chat/UI/SpeechBubble.cs index 94505fd892..442368a3e6 100644 --- a/Content.Client/Chat/UI/SpeechBubble.cs +++ b/Content.Client/Chat/UI/SpeechBubble.cs @@ -125,7 +125,7 @@ namespace Content.Client.Chat.UI _verticalOffsetAchieved = MathHelper.Lerp(_verticalOffsetAchieved, VerticalOffset, 10 * args.DeltaSeconds); } - if (!_entityManager.TryGetComponent(_senderEntity, out var xform) || xform.MapID != _eyeManager.CurrentMap) + if (!_entityManager.TryGetComponent(_senderEntity, out var xform) || xform.MapID != _eyeManager.CurrentEye.Position.MapId) { Modulate = Color.White.WithAlpha(0); return; diff --git a/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml.cs b/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml.cs index 56604ba526..926b8c6567 100644 --- a/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml.cs +++ b/Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using Content.Client.UserInterface.Controls; using Content.Shared.CCVar; using Robust.Client.AutoGenerated; @@ -91,7 +91,7 @@ namespace Content.Client.Communications.UI if (alerts == null) { var name = currentAlert; - if (Loc.TryGetString($"alert-level-{currentAlert}", out var locName)) + if (_loc.TryGetString($"alert-level-{currentAlert}", out var locName)) { name = locName; } @@ -103,7 +103,7 @@ namespace Content.Client.Communications.UI foreach (var alert in alerts) { var name = alert; - if (Loc.TryGetString($"alert-level-{alert}", out var locName)) + if (_loc.TryGetString($"alert-level-{alert}", out var locName)) { name = locName; } diff --git a/Content.Client/Decals/DecalPlacementSystem.cs b/Content.Client/Decals/DecalPlacementSystem.cs index c97f8281a1..a4495042c6 100644 --- a/Content.Client/Decals/DecalPlacementSystem.cs +++ b/Content.Client/Decals/DecalPlacementSystem.cs @@ -111,7 +111,7 @@ public sealed class DecalPlacementSystem : EntitySystem if (args.Handled) return; - if (args.Target.GetGridUid(EntityManager) == null) + if (_transform.GetGrid(args.Target) == null) return; args.Handled = true; diff --git a/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs b/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs index 21b816515a..adeb451a07 100644 --- a/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs +++ b/Content.Client/Decals/UI/DecalPlacerWindow.xaml.cs @@ -2,6 +2,7 @@ using System.Linq; using Content.Client.Stylesheets; using Content.Shared.Decals; using Robust.Client.AutoGenerated; +using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; @@ -19,6 +20,7 @@ public sealed partial class DecalPlacerWindow : DefaultWindow [Dependency] private readonly IEntityManager _e = default!; private readonly DecalPlacementSystem _decalPlacementSystem; + private readonly SpriteSystem _sprite; public FloatSpinBox RotationSpinBox; @@ -41,6 +43,7 @@ public sealed partial class DecalPlacerWindow : DefaultWindow IoCManager.InjectDependencies(this); _decalPlacementSystem = _e.System(); + _sprite = _e.System(); // This needs to be done in C# so we can have custom stuff passed in the constructor // and thus have a proper step size @@ -204,7 +207,7 @@ public sealed partial class DecalPlacerWindow : DefaultWindow foreach (var decalPrototype in prototypes) { if (decalPrototype.ShowMenu) - _decals.Add(decalPrototype.ID, decalPrototype.Sprite.Frame0()); + _decals.Add(decalPrototype.ID, _sprite.Frame0(decalPrototype.Sprite)); } RefreshList(); diff --git a/Content.Client/Guidebook/GuidebookSystem.cs b/Content.Client/Guidebook/GuidebookSystem.cs index 25c8ead0ec..e08c335f2c 100644 --- a/Content.Client/Guidebook/GuidebookSystem.cs +++ b/Content.Client/Guidebook/GuidebookSystem.cs @@ -10,10 +10,7 @@ using Content.Shared.Tag; using Content.Shared.Verbs; using Robust.Client.GameObjects; using Robust.Client.Player; -using Robust.Shared.Audio; -using Robust.Shared.Audio.Systems; using Robust.Shared.Map; -using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Timing; using Robust.Shared.Utility; @@ -27,7 +24,6 @@ public sealed class GuidebookSystem : EntitySystem { [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; - [Dependency] private readonly SharedAudioSystem _audioSystem = default!; [Dependency] private readonly VerbSystem _verbSystem = default!; [Dependency] private readonly RgbLightControllerSystem _rgbLightControllerSystem = default!; [Dependency] private readonly SharedPointLightSystem _pointLightSystem = default!; diff --git a/Content.Client/Holopad/HolopadBoundUserInterface.cs b/Content.Client/Holopad/HolopadBoundUserInterface.cs index 20b55ea8c7..e0a263cb0e 100644 --- a/Content.Client/Holopad/HolopadBoundUserInterface.cs +++ b/Content.Client/Holopad/HolopadBoundUserInterface.cs @@ -1,6 +1,5 @@ using Content.Shared.Holopad; using Content.Shared.Silicons.StationAi; -using Robust.Client.Graphics; using Robust.Client.UserInterface; using Robust.Shared.Player; using System.Numerics; @@ -10,7 +9,6 @@ namespace Content.Client.Holopad; public sealed class HolopadBoundUserInterface : BoundUserInterface { [Dependency] private readonly ISharedPlayerManager _playerManager = default!; - [Dependency] private readonly IClyde _displayManager = default!; [ViewVariables] private HolopadWindow? _window; diff --git a/Content.Client/Humanoid/MarkingPicker.xaml.cs b/Content.Client/Humanoid/MarkingPicker.xaml.cs index 0e0b9dd384..629f379f71 100644 --- a/Content.Client/Humanoid/MarkingPicker.xaml.cs +++ b/Content.Client/Humanoid/MarkingPicker.xaml.cs @@ -3,6 +3,7 @@ using Content.Shared.Humanoid; using Content.Shared.Humanoid.Markings; using Content.Shared.Humanoid.Prototypes; using Robust.Client.AutoGenerated; +using Robust.Client.GameObjects; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; @@ -18,6 +19,9 @@ public sealed partial class MarkingPicker : Control { [Dependency] private readonly MarkingManager _markingManager = default!; [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly IEntityManager _entityManager = default!; + + private readonly SpriteSystem _sprite; public Action? OnMarkingAdded; public Action? OnMarkingRemoved; @@ -124,6 +128,8 @@ public sealed partial class MarkingPicker : Control RobustXamlLoader.Load(this); IoCManager.InjectDependencies(this); + _sprite = _entityManager.System(); + CMarkingCategoryButton.OnItemSelected += OnCategoryChange; CMarkingsUnused.OnItemSelected += item => _selectedUnusedMarking = CMarkingsUnused[item.ItemIndex]; @@ -222,7 +228,7 @@ public sealed partial class MarkingPicker : Control continue; } - var item = CMarkingsUnused.AddItem($"{GetMarkingName(marking)}", marking.Sprites[0].Frame0()); + var item = CMarkingsUnused.AddItem($"{GetMarkingName(marking)}", _sprite.Frame0(marking.Sprites[0])); item.Metadata = marking; } @@ -256,7 +262,7 @@ public sealed partial class MarkingPicker : Control var _item = new ItemList.Item(CMarkingsUsed) { Text = text, - Icon = newMarking.Sprites[0].Frame0(), + Icon = _sprite.Frame0(newMarking.Sprites[0]), Selectable = true, Metadata = newMarking, IconModulate = marking.MarkingColors[0] @@ -512,7 +518,7 @@ public sealed partial class MarkingPicker : Control var item = new ItemList.Item(CMarkingsUsed) { Text = Loc.GetString("marking-used", ("marking-name", $"{GetMarkingName(marking)}"), ("marking-category", Loc.GetString($"markings-category-{marking.MarkingCategory}"))), - Icon = marking.Sprites[0].Frame0(), + Icon = _sprite.Frame0(marking.Sprites[0]), Selectable = true, Metadata = marking, }; @@ -536,7 +542,7 @@ public sealed partial class MarkingPicker : Control if (marking.MarkingCategory == _selectedMarkingCategory) { - var item = CMarkingsUnused.AddItem($"{GetMarkingName(marking)}", marking.Sprites[0].Frame0()); + var item = CMarkingsUnused.AddItem($"{GetMarkingName(marking)}", _sprite.Frame0(marking.Sprites[0])); item.Metadata = marking; } _selectedMarking = null; diff --git a/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs b/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs index 093bfdcf41..50a6036c8b 100644 --- a/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs +++ b/Content.Client/Humanoid/SingleMarkingPicker.xaml.cs @@ -1,6 +1,7 @@ using System.Linq; using Content.Shared.Humanoid.Markings; using Robust.Client.AutoGenerated; +using Robust.Client.GameObjects; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; using Robust.Client.Utility; @@ -11,7 +12,10 @@ namespace Content.Client.Humanoid; public sealed partial class SingleMarkingPicker : BoxContainer { [Dependency] private readonly MarkingManager _markingManager = default!; + [Dependency] private readonly IEntityManager _entityManager = default!; + private readonly SpriteSystem _sprite; + /// /// What happens if a marking is selected. /// It will send the 'slot' (marking index) @@ -123,6 +127,7 @@ public sealed partial class SingleMarkingPicker : BoxContainer RobustXamlLoader.Load(this); IoCManager.InjectDependencies(this); + _sprite = _entityManager.System(); MarkingList.OnItemSelected += SelectMarking; AddButton.OnPressed += _ => { @@ -188,7 +193,7 @@ public sealed partial class SingleMarkingPicker : BoxContainer foreach (var (id, marking) in sortedMarkings) { - var item = MarkingList.AddItem(Loc.GetString($"marking-{id}"), marking.Sprites[0].Frame0()); + var item = MarkingList.AddItem(Loc.GetString($"marking-{id}"), _sprite.Frame0(marking.Sprites[0])); item.Metadata = marking.ID; if (_markings[Slot].MarkingId == id) diff --git a/Content.Client/Implants/UI/DeimplantBoundUserInterface.cs b/Content.Client/Implants/UI/DeimplantBoundUserInterface.cs index 0857cdf86f..1f985b9fa3 100644 --- a/Content.Client/Implants/UI/DeimplantBoundUserInterface.cs +++ b/Content.Client/Implants/UI/DeimplantBoundUserInterface.cs @@ -1,13 +1,10 @@ using Content.Shared.Implants; using Robust.Client.UserInterface; -using Robust.Shared.Prototypes; namespace Content.Client.Implants.UI; public sealed class DeimplantBoundUserInterface : BoundUserInterface { - [Dependency] private readonly IPrototypeManager _protomanager = default!; - [ViewVariables] private DeimplantChoiceWindow? _window; diff --git a/Content.Client/Jittering/JitteringSystem.cs b/Content.Client/Jittering/JitteringSystem.cs index 0c11a13963..4448c60462 100644 --- a/Content.Client/Jittering/JitteringSystem.cs +++ b/Content.Client/Jittering/JitteringSystem.cs @@ -31,7 +31,7 @@ namespace Content.Client.Jittering var animationPlayer = EnsureComp(uid); jittering.StartOffset = sprite.Offset; - _animationPlayer.Play(uid, animationPlayer, GetAnimation(jittering, sprite), _jitterAnimationKey); + _animationPlayer.Play((uid, animationPlayer), GetAnimation(jittering, sprite), _jitterAnimationKey); } private void OnShutdown(EntityUid uid, JitteringComponent jittering, ComponentShutdown args) @@ -53,7 +53,7 @@ namespace Content.Client.Jittering if (TryComp(uid, out AnimationPlayerComponent? animationPlayer) && TryComp(uid, out SpriteComponent? sprite)) - _animationPlayer.Play(uid, animationPlayer, GetAnimation(jittering, sprite), _jitterAnimationKey); + _animationPlayer.Play((uid, animationPlayer), GetAnimation(jittering, sprite), _jitterAnimationKey); } private Animation GetAnimation(JitteringComponent jittering, SpriteComponent sprite) diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs index 97a70987e9..135bd58d78 100644 --- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs @@ -21,6 +21,7 @@ using Content.Shared.Preferences.Loadouts; using Content.Shared.Roles; using Content.Shared.Traits; using Robust.Client.AutoGenerated; +using Robust.Client.GameObjects; using Robust.Client.Graphics; using Robust.Client.Player; using Robust.Client.UserInterface; @@ -50,6 +51,8 @@ namespace Content.Client.Lobby.UI private readonly JobRequirementsManager _requirements; private readonly LobbyUIController _controller; + private readonly SpriteSystem _sprite; + private FlavorText.FlavorText? _flavorText; private TextEdit? _flavorTextEdit; @@ -127,7 +130,7 @@ namespace Content.Client.Lobby.UI _resManager = resManager; _requirements = requirements; _controller = UserInterfaceManager.GetUIController(); - + _sprite = _entManager.System(); ImportButton.OnPressed += args => { ImportProfile(); @@ -906,7 +909,7 @@ namespace Content.Client.Lobby.UI VerticalAlignment = VAlignment.Center }; var jobIcon = _prototypeManager.Index(job.Icon); - icon.Texture = jobIcon.Icon.Frame0(); + icon.Texture = _sprite.Frame0(jobIcon.Icon); selector.Setup(items, job.LocalizedName, 200, job.LocalizedDescription, icon, job.Guides); if (!_requirements.IsAllowed(job, (HumanoidCharacterProfile?)_preferencesManager.Preferences?.SelectedCharacter, out var reason)) diff --git a/Content.Client/Outline/TargetOutlineSystem.cs b/Content.Client/Outline/TargetOutlineSystem.cs index 591bfc171e..0d9b9787ae 100644 --- a/Content.Client/Outline/TargetOutlineSystem.cs +++ b/Content.Client/Outline/TargetOutlineSystem.cs @@ -132,7 +132,7 @@ public sealed class TargetOutlineSystem : EntitySystem // TODO: Duplicated in SpriteSystem and DragDropSystem. Should probably be cached somewhere for a frame? var mousePos = _eyeManager.PixelToMap(_inputManager.MouseScreenPosition).Position; var bounds = new Box2(mousePos - LookupVector, mousePos + LookupVector); - var pvsEntities = _lookup.GetEntitiesIntersecting(_eyeManager.CurrentMap, bounds, LookupFlags.Approximate | LookupFlags.Static); + var pvsEntities = _lookup.GetEntitiesIntersecting(_eyeManager.CurrentEye.Position.MapId, bounds, LookupFlags.Approximate | LookupFlags.Static); var spriteQuery = GetEntityQuery(); foreach (var entity in pvsEntities) diff --git a/Content.Client/Parallax/ParallaxGenerator.cs b/Content.Client/Parallax/ParallaxGenerator.cs index a2296741fd..4fed1fc933 100644 --- a/Content.Client/Parallax/ParallaxGenerator.cs +++ b/Content.Client/Parallax/ParallaxGenerator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Collections.Generic; using System.Diagnostics; diff --git a/Content.Client/Popups/PopupOverlay.cs b/Content.Client/Popups/PopupOverlay.cs index 5a69457720..cf22c8bbd5 100644 --- a/Content.Client/Popups/PopupOverlay.cs +++ b/Content.Client/Popups/PopupOverlay.cs @@ -85,7 +85,7 @@ public sealed class PopupOverlay : Overlay foreach (var popup in _popup.WorldLabels) { - var mapPos = popup.InitialPos.ToMap(_entManager, _transform); + var mapPos = _transform.ToMapCoordinates(popup.InitialPos); if (mapPos.MapId != args.MapId) continue; diff --git a/Content.Client/Singularity/Visualizers/RadiationCollectorSystem.cs b/Content.Client/Singularity/Visualizers/RadiationCollectorSystem.cs index 89c0f901b8..15bbf8bc19 100644 --- a/Content.Client/Singularity/Visualizers/RadiationCollectorSystem.cs +++ b/Content.Client/Singularity/Visualizers/RadiationCollectorSystem.cs @@ -56,10 +56,10 @@ public sealed class RadiationCollectorSystem : VisualizerSystem? OnSpritePicked; @@ -32,17 +34,17 @@ public sealed partial class SprayPainterWindow : DefaultWindow _spriteSystem = _sysMan.GetEntitySystem(); } - private static string GetColorLocString(string? colorKey) + private string GetColorLocString(string? colorKey) { if (string.IsNullOrEmpty(colorKey)) return Loc.GetString("pipe-painter-no-color-selected"); var locKey = colorLocKeyPrefix + colorKey; - if (!Loc.TryGetString(locKey, out var locString)) + if (!_loc.TryGetString(locKey, out var locString)) locString = colorKey; return locString; - } + } public string? IndexToColorKey(int index) { diff --git a/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs b/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs index 8d96a5d670..a77bc10f7b 100644 --- a/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs +++ b/Content.Client/UserInterface/Systems/Chat/ChatUIController.cs @@ -482,7 +482,7 @@ public sealed class ChatUIController : UIController private void EnqueueSpeechBubble(EntityUid entity, ChatMessage message, SpeechBubble.SpeechType speechType) { // Don't enqueue speech bubbles for other maps. TODO: Support multiple viewports/maps? - if (EntityManager.GetComponent(entity).MapID != _eye.CurrentMap) + if (EntityManager.GetComponent(entity).MapID != _eye.CurrentEye.Position.MapId) return; if (!_queuedSpeechBubbles.TryGetValue(entity, out var queueData)) diff --git a/Content.Client/UserInterface/Systems/Storage/Controls/StorageWindow.cs b/Content.Client/UserInterface/Systems/Storage/Controls/StorageWindow.cs index 39ffd883bb..8b66ed8892 100644 --- a/Content.Client/UserInterface/Systems/Storage/Controls/StorageWindow.cs +++ b/Content.Client/UserInterface/Systems/Storage/Controls/StorageWindow.cs @@ -1,4 +1,4 @@ -using System.Diagnostics.CodeAnalysis; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Numerics; using Content.Client.Hands.Systems; diff --git a/Content.Client/UserInterface/Systems/Viewport/ViewportUIController.cs b/Content.Client/UserInterface/Systems/Viewport/ViewportUIController.cs index 338b5fc7e5..77f9b3f904 100644 --- a/Content.Client/UserInterface/Systems/Viewport/ViewportUIController.cs +++ b/Content.Client/UserInterface/Systems/Viewport/ViewportUIController.cs @@ -3,7 +3,6 @@ using Content.Client.UserInterface.Systems.Gameplay; using Content.Shared.CCVar; using Robust.Client.Graphics; using Robust.Client.Player; -using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controllers; using Robust.Shared.Configuration; using Robust.Shared.Map; @@ -17,7 +16,6 @@ public sealed class ViewportUIController : UIController [Dependency] private readonly IPlayerManager _playerMan = default!; [Dependency] private readonly IEntityManager _entMan = default!; [Dependency] private readonly IConfigurationManager _configurationManager = default!; - [UISystemDependency] private readonly SharedTransformSystem? _transformSystem = default!; public static readonly Vector2i ViewportSize = (EyeManager.PixelsPerMeter * 21, EyeManager.PixelsPerMeter * 15); public const int ViewportHeight = 15; private MainViewport? Viewport => UIManager.ActiveScreen?.GetWidget();