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:
@@ -118,8 +118,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
if (!Resolve(uid, ref component))
|
||||
return;
|
||||
|
||||
if (user != null && TryComp<ActorComponent>(user, out var actor))
|
||||
_userInterface.TryClose(uid, GasAnalyzerUiKey.Key, actor.PlayerSession);
|
||||
_userInterface.CloseUi(uid, GasAnalyzerUiKey.Key, user);
|
||||
|
||||
component.Enabled = false;
|
||||
Dirty(uid, component);
|
||||
@@ -132,8 +131,6 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
/// </summary>
|
||||
private void OnDisabledMessage(EntityUid uid, GasAnalyzerComponent component, GasAnalyzerDisableMessage message)
|
||||
{
|
||||
if (message.Session.AttachedEntity is not { Valid: true })
|
||||
return;
|
||||
DisableAnalyzer(uid, component);
|
||||
}
|
||||
|
||||
@@ -142,10 +139,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
if (!Resolve(uid, ref component, false))
|
||||
return;
|
||||
|
||||
if (!TryComp<ActorComponent>(user, out var actor))
|
||||
return;
|
||||
|
||||
_userInterface.TryOpen(uid, GasAnalyzerUiKey.Key, actor.PlayerSession);
|
||||
_userInterface.OpenUi(uid, GasAnalyzerUiKey.Key, user);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -242,7 +236,7 @@ namespace Content.Server.Atmos.EntitySystems
|
||||
if (gasMixList.Count == 0)
|
||||
return false;
|
||||
|
||||
_userInterface.TrySendUiMessage(uid, GasAnalyzerUiKey.Key,
|
||||
_userInterface.ServerSendUiMessage(uid, GasAnalyzerUiKey.Key,
|
||||
new GasAnalyzerUserMessage(gasMixList.ToArray(),
|
||||
component.Target != null ? Name(component.Target.Value) : string.Empty,
|
||||
GetNetEntity(component.Target) ?? NetEntity.Invalid,
|
||||
|
||||
Reference in New Issue
Block a user