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:
metalgearsloth
2024-04-26 18:16:24 +10:00
committed by GitHub
parent 32b81de8c5
commit 5896e68752
279 changed files with 1308 additions and 1582 deletions

View File

@@ -48,9 +48,9 @@ public sealed class SignalTimerSystem : EntitySystem
{
var time = TryComp<ActiveSignalTimerComponent>(uid, out var active) ? active.TriggerTime : TimeSpan.Zero;
if (_ui.TryGetUi(uid, SignalTimerUiKey.Key, out var bui))
if (_ui.HasUi(uid, SignalTimerUiKey.Key))
{
_ui.SetUiState(bui, new SignalTimerBoundUserInterfaceState(component.Label,
_ui.SetUiState(uid, SignalTimerUiKey.Key, new SignalTimerBoundUserInterfaceState(component.Label,
TimeSpan.FromSeconds(component.Delay).Minutes.ToString("D2"),
TimeSpan.FromSeconds(component.Delay).Seconds.ToString("D2"),
component.CanEditLabel,
@@ -70,9 +70,9 @@ public sealed class SignalTimerSystem : EntitySystem
_audio.PlayPvs(signalTimer.DoneSound, uid);
_signalSystem.InvokePort(uid, signalTimer.TriggerPort);
if (_ui.TryGetUi(uid, SignalTimerUiKey.Key, out var bui))
if (_ui.HasUi(uid, SignalTimerUiKey.Key))
{
_ui.SetUiState(bui, new SignalTimerBoundUserInterfaceState(signalTimer.Label,
_ui.SetUiState(uid, SignalTimerUiKey.Key, new SignalTimerBoundUserInterfaceState(signalTimer.Label,
TimeSpan.FromSeconds(signalTimer.Delay).Minutes.ToString("D2"),
TimeSpan.FromSeconds(signalTimer.Delay).Seconds.ToString("D2"),
signalTimer.CanEditLabel,
@@ -117,10 +117,7 @@ public sealed class SignalTimerSystem : EntitySystem
/// <param name="uid">The entity that is interacted with.</param>
private bool IsMessageValid(EntityUid uid, BoundUserInterfaceMessage message)
{
if (message.Session.AttachedEntity is not { Valid: true } mob)
return false;
if (!_accessReader.IsAllowed(mob, uid))
if (!_accessReader.IsAllowed(message.Actor, uid))
return false;
return true;