Cleaner BoundUserInterfaces (#17736)

This commit is contained in:
TemporalOroboros
2023-07-08 09:02:17 -07:00
committed by GitHub
parent 55b4fb1649
commit 3ac4cf85db
137 changed files with 1069 additions and 972 deletions

View File

@@ -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);
}
}
}