Predicted internals (#33800)

* Predicted gas pumps

I wanted to try out atmos and first thing I found.

* a

* Atmos device prediction

- Canisters
- Tanks
- Internals

AirMixes aren't predicted so nothing on that front but all the UIs should be a lot closer.

* Remove details range

* Gas tank prediction

* Even more sweeping changes

* Alerts

* rehg

* Popup fix

* Fix merge conflicts

* Fix

* Review
This commit is contained in:
metalgearsloth
2025-05-02 18:22:29 +10:00
committed by GitHub
parent d404422b5c
commit bd69fc612a
94 changed files with 1425 additions and 1167 deletions

View File

@@ -40,7 +40,7 @@ public sealed class LockSystem : EntitySystem
base.Initialize();
SubscribeLocalEvent<LockComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<LockComponent, ActivateInWorldEvent>(OnActivated);
SubscribeLocalEvent<LockComponent, ActivateInWorldEvent>(OnActivated, before: [typeof(ActivatableUISystem)]);
SubscribeLocalEvent<LockComponent, StorageOpenAttemptEvent>(OnStorageOpenAttempt);
SubscribeLocalEvent<LockComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<LockComponent, GetVerbsEvent<AlternativeVerb>>(AddToggleLockVerb);
@@ -70,13 +70,11 @@ public sealed class LockSystem : EntitySystem
// Only attempt an unlock by default on Activate
if (lockComp.Locked && lockComp.UnlockOnClick)
{
TryUnlock(uid, args.User, lockComp);
args.Handled = true;
args.Handled = TryUnlock(uid, args.User, lockComp);
}
else if (!lockComp.Locked && lockComp.LockOnClick)
{
TryLock(uid, args.User, lockComp);
args.Handled = true;
args.Handled = TryLock(uid, args.User, lockComp);
}
}
@@ -400,7 +398,11 @@ public sealed class LockSystem : EntitySystem
{
args.Cancel();
if (lockComp.Locked)
{
_sharedPopupSystem.PopupClient(Loc.GetString("entity-storage-component-locked-message"), uid, args.User);
}
_audio.PlayPredicted(component.AccessDeniedSound, uid, args.User);
}
}