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

@@ -20,8 +20,7 @@ public sealed partial class ResearchSystem
private void OnConsoleUnlock(EntityUid uid, ResearchConsoleComponent component, ConsoleUnlockTechnologyMessage args)
{
if (args.Session.AttachedEntity is not { } ent)
return;
var act = args.Actor;
if (!this.IsPowered(uid, EntityManager))
return;
@@ -29,13 +28,13 @@ public sealed partial class ResearchSystem
if (!PrototypeManager.TryIndex<TechnologyPrototype>(args.Id, out var technologyPrototype))
return;
if (TryComp<AccessReaderComponent>(uid, out var access) && !_accessReader.IsAllowed(ent, uid, access))
if (TryComp<AccessReaderComponent>(uid, out var access) && !_accessReader.IsAllowed(act, uid, access))
{
_popup.PopupEntity(Loc.GetString("research-console-no-access-popup"), ent);
_popup.PopupEntity(Loc.GetString("research-console-no-access-popup"), act);
return;
}
if (!UnlockTechnology(uid, args.Id, ent))
if (!UnlockTechnology(uid, args.Id, act))
return;
var message = Loc.GetString("research-console-unlock-technology-radio-broadcast",
@@ -68,7 +67,7 @@ public sealed partial class ResearchSystem
state = new ResearchConsoleBoundInterfaceState(default);
}
_uiSystem.TrySetUiState(uid, ResearchConsoleUiKey.Key, state);
_uiSystem.SetUiState(uid, ResearchConsoleUiKey.Key, state);
}
private void OnPointsChanged(EntityUid uid, ResearchConsoleComponent component, ref ResearchServerPointsChangedEvent args)