diff --git a/Content.Client/GameObjects/Components/Access/IdCardConsoleBoundUserInterface.cs b/Content.Client/GameObjects/Components/Access/IdCardConsoleBoundUserInterface.cs index ebd658d479..9efddf6230 100644 --- a/Content.Client/GameObjects/Components/Access/IdCardConsoleBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Access/IdCardConsoleBoundUserInterface.cs @@ -20,7 +20,6 @@ namespace Content.Client.GameObjects.Components.Access protected override void Open() { - IoCManager.InjectDependencies(this); base.Open(); _window = new IdCardConsoleWindow(this, _localizationManager); diff --git a/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs b/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs index 571c5f9e6b..85582a6a0d 100644 --- a/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Research/LatheBoundUserInterface.cs @@ -37,7 +37,6 @@ namespace Content.Client.GameObjects.Components.Research protected override void Open() { base.Open(); - IoCManager.InjectDependencies(this); if (!Owner.Owner.TryGetComponent(out MaterialStorageComponent storage) || !Owner.Owner.TryGetComponent(out SharedLatheComponent lathe) diff --git a/Content.Client/GameObjects/Components/Wires/WiresBoundUserInterface.cs b/Content.Client/GameObjects/Components/Wires/WiresBoundUserInterface.cs index c88f87ef00..7f472ed585 100644 --- a/Content.Client/GameObjects/Components/Wires/WiresBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Wires/WiresBoundUserInterface.cs @@ -1,12 +1,17 @@ using System; using Robust.Client.GameObjects.Components.UserInterface; using Robust.Shared.GameObjects.Components.UserInterface; +using Robust.Shared.IoC; +using Robust.Shared.Localization; using static Content.Shared.GameObjects.Components.SharedWiresComponent; namespace Content.Client.GameObjects.Components.Wires { public class WiresBoundUserInterface : BoundUserInterface { +#pragma warning disable 649 + [Dependency] private readonly ILocalizationManager _localizationManager; +#pragma warning restore 649 public WiresBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey) { } @@ -16,7 +21,7 @@ namespace Content.Client.GameObjects.Components.Wires protected override void Open() { base.Open(); - _menu = new WiresMenu() {Owner = this}; + _menu = new WiresMenu(_localizationManager) {Owner = this}; _menu.OnClose += Close; _menu.OpenCentered(); diff --git a/Content.Client/GameObjects/Components/Wires/WiresMenu.cs b/Content.Client/GameObjects/Components/Wires/WiresMenu.cs index f2e516df26..3b15c9cf76 100644 --- a/Content.Client/GameObjects/Components/Wires/WiresMenu.cs +++ b/Content.Client/GameObjects/Components/Wires/WiresMenu.cs @@ -10,17 +10,15 @@ namespace Content.Client.GameObjects.Components.Wires { public class WiresMenu : SS14Window { -#pragma warning disable 649 - [Dependency] private readonly ILocalizationManager _localizationManager; -#pragma warning restore 649 + private readonly ILocalizationManager _localizationManager; protected override Vector2? CustomSize => (300, 450); public WiresBoundUserInterface Owner { get; set; } private readonly VBoxContainer _wiresContainer; - public WiresMenu() + public WiresMenu(ILocalizationManager localizationManager) { - IoCManager.InjectDependencies(this); // TODO: Remove this and use DynamicTypeFactory? + _localizationManager = localizationManager; Title = _localizationManager.GetString("Wires"); _wiresContainer = new VBoxContainer(); Contents.AddChild(_wiresContainer); diff --git a/RobustToolbox b/RobustToolbox index 782f36ee63..566ed9cbdc 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 782f36ee6308234d8b02b0d2dc86d1b49b36e623 +Subproject commit 566ed9cbdc63465b69b1f65bb09c8d42cf2b5ff0