Cleaner BoundUserInterfaces (#17736)
This commit is contained in:
@@ -5,7 +5,6 @@ using Content.Shared.Containers.ItemSlots;
|
||||
using Content.Shared.CrewManifest;
|
||||
using Content.Shared.PDA;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.UserInterface;
|
||||
using Robust.Shared.Configuration;
|
||||
|
||||
@@ -14,14 +13,13 @@ namespace Content.Client.PDA
|
||||
[UsedImplicitly]
|
||||
public sealed class PdaBoundUserInterface : CartridgeLoaderBoundUserInterface
|
||||
{
|
||||
[Dependency] private readonly IEntityManager? _entityManager = default!;
|
||||
[Dependency] private readonly IConfigurationManager _configManager = default!;
|
||||
|
||||
[ViewVariables]
|
||||
private PdaMenu? _menu;
|
||||
|
||||
public PdaBoundUserInterface(ClientUserInterfaceComponent owner, Enum uiKey) : base(owner, uiKey)
|
||||
public PdaBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
}
|
||||
|
||||
protected override void Open()
|
||||
@@ -132,7 +130,7 @@ namespace Content.Client.PDA
|
||||
|
||||
private PdaBorderColorComponent? GetBorderColorComponent()
|
||||
{
|
||||
return _entityManager?.GetComponentOrNull<PdaBorderColorComponent>(Owner.Owner);
|
||||
return EntMan.GetComponentOrNull<PdaBorderColorComponent>(Owner);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user