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:
@@ -61,14 +61,14 @@ namespace Content.Server.Access.Systems
|
||||
|
||||
private void AfterUIOpen(EntityUid uid, AgentIDCardComponent component, AfterActivatableUIOpenEvent args)
|
||||
{
|
||||
if (!_uiSystem.TryGetUi(uid, AgentIDCardUiKey.Key, out var ui))
|
||||
if (!_uiSystem.HasUi(uid, AgentIDCardUiKey.Key))
|
||||
return;
|
||||
|
||||
if (!TryComp<IdCardComponent>(uid, out var idCard))
|
||||
return;
|
||||
|
||||
var state = new AgentIDCardBoundUserInterfaceState(idCard.FullName ?? "", idCard.JobTitle ?? "", component.Icons);
|
||||
_uiSystem.SetUiState(ui, state, args.Session);
|
||||
_uiSystem.SetUiState(uid, AgentIDCardUiKey.Key, state);
|
||||
}
|
||||
|
||||
private void OnJobChanged(EntityUid uid, AgentIDCardComponent comp, AgentIDCardJobChangedMessage args)
|
||||
|
||||
Reference in New Issue
Block a user