mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
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
(cherry picked from commit 5896e68752)
This commit is contained in:
@@ -24,29 +24,23 @@ public sealed class StationMapSystem : EntitySystem
|
||||
|
||||
private void OnStationMapClosed(EntityUid uid, StationMapComponent component, BoundUIClosedEvent args)
|
||||
{
|
||||
if (!Equals(args.UiKey, StationMapUiKey.Key) || args.Session.AttachedEntity == null)
|
||||
if (!Equals(args.UiKey, StationMapUiKey.Key))
|
||||
return;
|
||||
|
||||
RemCompDeferred<StationMapUserComponent>(args.Session.AttachedEntity.Value);
|
||||
RemCompDeferred<StationMapUserComponent>(args.Actor);
|
||||
}
|
||||
|
||||
private void OnUserParentChanged(EntityUid uid, StationMapUserComponent component, ref EntParentChangedMessage args)
|
||||
{
|
||||
if (TryComp<ActorComponent>(uid, out var actor))
|
||||
{
|
||||
_ui.TryClose(component.Map, StationMapUiKey.Key, actor.PlayerSession);
|
||||
}
|
||||
_ui.CloseUi(component.Map, StationMapUiKey.Key, uid);
|
||||
}
|
||||
|
||||
private void OnStationMapOpened(EntityUid uid, StationMapComponent component, BoundUIOpenedEvent args)
|
||||
{
|
||||
if (args.Session.AttachedEntity == null)
|
||||
return;
|
||||
|
||||
if (!_cell.TryUseActivatableCharge(uid))
|
||||
return;
|
||||
|
||||
var comp = EnsureComp<StationMapUserComponent>(args.Session.AttachedEntity.Value);
|
||||
var comp = EnsureComp<StationMapUserComponent>(args.Actor);
|
||||
comp.Map = uid;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user