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

@@ -197,13 +197,12 @@ public sealed class SurveillanceCameraSystem : EntitySystem
private void OpenSetupInterface(EntityUid uid, EntityUid player, SurveillanceCameraComponent? camera = null, ActorComponent? actor = null)
{
if (!Resolve(uid, ref camera)
|| !Resolve(player, ref actor))
{
if (!Resolve(uid, ref camera) || !Resolve(player, ref actor))
return;
if (!_userInterface.TryGetUi(uid, SurveillanceCameraSetupUiKey.Camera, out var bui))
return;
}
_userInterface.GetUiOrNull(uid, SurveillanceCameraSetupUiKey.Camera)!.Open(actor.PlayerSession);
_userInterface.OpenUi(bui, actor.PlayerSession);
UpdateSetupInterface(uid, camera);
}