Content update for UI prediction (#27214)
* Content update for UI refactor * Big update * Sharing * Remaining content updates * First big update * Prototype updates * AUGH * Fix UI comp ref * Cleanup - Fix predicted message, fix item slots, fix interaction range check. * Fix regressions * Make this predictive idk why it wasn't. * Fix slime merge * Merge conflict * Fix merge
This commit is contained in:
@@ -196,14 +196,14 @@ public sealed class SurveillanceCameraSystem : EntitySystem
|
||||
UpdateSetupInterface(uid, component);
|
||||
}
|
||||
|
||||
private void OpenSetupInterface(EntityUid uid, EntityUid player, SurveillanceCameraComponent? camera = null, ActorComponent? actor = null)
|
||||
private void OpenSetupInterface(EntityUid uid, EntityUid player, SurveillanceCameraComponent? camera = null)
|
||||
{
|
||||
if (!Resolve(uid, ref camera) || !Resolve(player, ref actor))
|
||||
return;
|
||||
if (!_userInterface.TryGetUi(uid, SurveillanceCameraSetupUiKey.Camera, out var bui))
|
||||
if (!Resolve(uid, ref camera))
|
||||
return;
|
||||
|
||||
if (!_userInterface.TryOpenUi(uid, SurveillanceCameraSetupUiKey.Camera, player))
|
||||
return;
|
||||
|
||||
_userInterface.OpenUi(bui, actor.PlayerSession);
|
||||
UpdateSetupInterface(uid, camera);
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ public sealed class SurveillanceCameraSystem : EntitySystem
|
||||
|
||||
if (camera.NameSet && camera.NetworkSet)
|
||||
{
|
||||
_userInterface.TryCloseAll(uid, SurveillanceCameraSetupUiKey.Camera);
|
||||
_userInterface.CloseUi(uid, SurveillanceCameraSetupUiKey.Camera);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -228,14 +228,14 @@ public sealed class SurveillanceCameraSystem : EntitySystem
|
||||
}
|
||||
else if (!camera.NetworkSet)
|
||||
{
|
||||
_userInterface.TryCloseAll(uid, SurveillanceCameraSetupUiKey.Camera);
|
||||
_userInterface.CloseUi(uid, SurveillanceCameraSetupUiKey.Camera);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var state = new SurveillanceCameraSetupBoundUiState(camera.CameraId, deviceNet.ReceiveFrequency ?? 0,
|
||||
camera.AvailableNetworks, camera.NameSet, camera.NetworkSet);
|
||||
_userInterface.TrySetUiState(uid, SurveillanceCameraSetupUiKey.Camera, state);
|
||||
_userInterface.SetUiState(uid, SurveillanceCameraSetupUiKey.Camera, state);
|
||||
}
|
||||
|
||||
// If the camera deactivates for any reason, it must have all viewers removed,
|
||||
|
||||
Reference in New Issue
Block a user