diff --git a/Content.Client/Construction/ConstructionButton.cs b/Content.Client/Construction/ConstructionButton.cs index ecf00408f8..900ed2b302 100644 --- a/Content.Client/Construction/ConstructionButton.cs +++ b/Content.Client/Construction/ConstructionButton.cs @@ -8,8 +8,6 @@ namespace Content.Client.Construction { public class ConstructionButton : Button { - private readonly IDisplayManager _displayManager; - public ConstructorComponent Owner { get => Menu.Owner; @@ -17,9 +15,8 @@ namespace Content.Client.Construction } ConstructionMenu Menu; - public ConstructionButton(IDisplayManager displayManager) + public ConstructionButton() { - _displayManager = displayManager; PerformLayout(); } @@ -38,7 +35,7 @@ namespace Content.Client.Construction private void PerformLayout() { - Menu = new ConstructionMenu(_displayManager); + Menu = new ConstructionMenu(); Menu.AddToScreen(); } diff --git a/Content.Client/Construction/ConstructionMenu.cs b/Content.Client/Construction/ConstructionMenu.cs index fb0f35670d..3d2a7cf776 100644 --- a/Content.Client/Construction/ConstructionMenu.cs +++ b/Content.Client/Construction/ConstructionMenu.cs @@ -49,7 +49,7 @@ namespace Content.Client.Construction List FlattenedCategories; PlacementManager Placement; - public ConstructionMenu(IDisplayManager displayMan) : base(displayMan) + public ConstructionMenu() { Size = new Vector2(500.0f, 350.0f); } diff --git a/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs b/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs index 09abf4636c..b1022fecf3 100644 --- a/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs +++ b/Content.Client/GameObjects/Components/Actor/CharacterInterface.cs @@ -82,7 +82,7 @@ namespace Content.Client.GameObjects.Components.Actor { private readonly VBoxContainer _contentsVBox; - public CharacterWindow(IEnumerable windowComponents) : base(IoCManager.Resolve()) + public CharacterWindow(IEnumerable windowComponents) { Title = "Character"; HideOnClose = true; diff --git a/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs b/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs index a1addc3171..00c3870cef 100644 --- a/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs +++ b/Content.Client/GameObjects/Components/Construction/ConstructorComponent.cs @@ -40,8 +40,7 @@ namespace Content.Client.GameObjects.Components.Construction case PlayerAttachedMsg _: if (Button == null) { - Button = new ConstructionButton(IoCManager.Resolve()); - Button.Owner = this; + Button = new ConstructionButton {Owner = this}; } Button.AddToScreen(); break; diff --git a/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs b/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs index b308ad3425..f6196c7a56 100644 --- a/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Power/ApcBoundUserInterface.cs @@ -26,7 +26,7 @@ namespace Content.Client.GameObjects.Components.Power { base.Open(); - _window = new ApcWindow(IoCManager.Resolve()) + _window = new ApcWindow() { MarginRight = 426.0f, MarginBottom = 270.0f }; @@ -124,7 +124,7 @@ namespace Content.Client.GameObjects.Components.Power public Label ExternalPowerStateLabel { get; set; } public ProgressBar ChargeBar { get; set; } - public ApcWindow(IDisplayManager displayMan) : base(displayMan) + public ApcWindow() { Title = "APC"; var rows = new VBoxContainer("Rows"); diff --git a/Content.Client/GameObjects/Components/Power/PowerDebugTool.cs b/Content.Client/GameObjects/Components/Power/PowerDebugTool.cs index c9e1fd958d..586d45acfe 100644 --- a/Content.Client/GameObjects/Components/Power/PowerDebugTool.cs +++ b/Content.Client/GameObjects/Components/Power/PowerDebugTool.cs @@ -23,7 +23,7 @@ namespace Content.Client.GameObjects.Components.Power { LastWindow.Dispose(); } - LastWindow = new SS14Window(IoCManager.Resolve()) + LastWindow = new SS14Window() { Title = "Power Debug Tool", }; diff --git a/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs b/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs index c8fbeb063a..ed984762c8 100644 --- a/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs @@ -3,7 +3,6 @@ using Content.Client.Research; using Content.Shared.GameObjects.Components.Research; using Content.Shared.Research; using Robust.Client.GameObjects.Components.UserInterface; -using Robust.Client.Interfaces.Graphics; using Robust.Shared.GameObjects.Components.UserInterface; using Robust.Shared.IoC; using Robust.Shared.Prototypes; @@ -14,8 +13,6 @@ namespace Content.Client.GameObjects.Components.Research public class LatheBoundUserInterface : BoundUserInterface { #pragma warning disable CS0649 - [Dependency] - private IDisplayManager _displayManager; [Dependency] private IPrototypeManager _prototypeManager; #pragma warning restore @@ -50,8 +47,8 @@ namespace Content.Client.GameObjects.Components.Research Lathe = lathe; Database = database; - menu = new LatheMenu(_displayManager) {Owner = this}; - queueMenu = new LatheQueueMenu(_displayManager) { Owner = this }; + menu = new LatheMenu {Owner = this}; + queueMenu = new LatheQueueMenu { Owner = this }; menu.OnClose += Close; diff --git a/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs b/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs index ff0b90eeea..7acddfa922 100644 --- a/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs +++ b/Content.Client/GameObjects/Components/Storage/ClientStorageComponent.cs @@ -31,7 +31,7 @@ namespace Content.Client.GameObjects.Components.Storage { base.OnAdd(); - Window = new StorageWindow(IoCManager.Resolve()) + Window = new StorageWindow() { StorageEntity = this}; } @@ -109,7 +109,7 @@ namespace Content.Client.GameObjects.Components.Storage private Label Information; public ClientStorageComponent StorageEntity; - public StorageWindow(IDisplayManager displayMan) : base(displayMan) + public StorageWindow() { Size = new Vector2(180.0f, 320.0f); } diff --git a/Content.Client/Research/LatheMenu.cs b/Content.Client/Research/LatheMenu.cs index ffc38e56bd..52ce852bfb 100644 --- a/Content.Client/Research/LatheMenu.cs +++ b/Content.Client/Research/LatheMenu.cs @@ -35,11 +35,11 @@ namespace Content.Client.Research private List _recipes = new List(); private List _shownRecipes = new List(); - public LatheMenu(IDisplayManager displayMan) : base(displayMan) + public LatheMenu() { } - public LatheMenu(IDisplayManager displayMan, string name) : base(displayMan, name) + public LatheMenu(string name) : base(name) { } diff --git a/Content.Client/Research/LatheQueueMenu.cs b/Content.Client/Research/LatheQueueMenu.cs index f2e2f5493f..e28ea9a9c6 100644 --- a/Content.Client/Research/LatheQueueMenu.cs +++ b/Content.Client/Research/LatheQueueMenu.cs @@ -25,11 +25,6 @@ namespace Content.Client.Research private Label Description; private TextureRect Icon; - public LatheQueueMenu(IDisplayManager displayManager) : base(displayManager) - { - - } - protected override void Initialize() { base.Initialize(); diff --git a/Content.Client/UserInterface/HandsGui.cs b/Content.Client/UserInterface/HandsGui.cs index 779e74c744..be4f8678bb 100644 --- a/Content.Client/UserInterface/HandsGui.cs +++ b/Content.Client/UserInterface/HandsGui.cs @@ -252,15 +252,5 @@ namespace Content.Client.UserInterface esm.GetEntitySystem().OpenContextMenu(entity, new ScreenCoordinates(args.GlobalPosition)); } } - - private static ISpriteProxy GetSpriteMirror(IEntity entity) - { - if (entity.TryGetComponent(out ISpriteComponent component)) - { - return component.CreateProxy(); - } - - return null; - } } } diff --git a/RobustToolbox b/RobustToolbox index bb4a1eda8e..4892d0d0fa 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit bb4a1eda8e0f32224616fe05e30be05ed3800540 +Subproject commit 4892d0d0fa9d6f228b4c0c368fc4c81e3a98b01f