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

@@ -18,12 +18,12 @@ namespace Content.Client.Power.APC.UI
public sealed partial class ApcMenu : FancyWindow
{
[Dependency] private readonly IEntityManager _entityManager = default!;
public ApcMenu(ApcBoundUserInterface owner, ClientUserInterfaceComponent component)
public ApcMenu(ApcBoundUserInterface owner)
{
IoCManager.InjectDependencies(this);
RobustXamlLoader.Load(this);
EntityView.Sprite = _entityManager.GetComponent<SpriteComponent>(component.Owner);
EntityView.SetEntity(owner.Owner);
BreakerButton.OnPressed += _ => owner.BreakerPressed();
}