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:
@@ -155,9 +155,6 @@ public sealed partial class NavMapSystem : SharedNavMapSystem
|
||||
|
||||
private void OnConfigureMessage(Entity<ConfigurableNavMapBeaconComponent> ent, ref NavMapBeaconConfigureBuiMessage args)
|
||||
{
|
||||
if (args.Session.AttachedEntity is not { } user)
|
||||
return;
|
||||
|
||||
if (!TryComp<NavMapBeaconComponent>(ent, out var beacon))
|
||||
return;
|
||||
|
||||
@@ -167,7 +164,7 @@ public sealed partial class NavMapSystem : SharedNavMapSystem
|
||||
return;
|
||||
|
||||
_adminLog.Add(LogType.Action, LogImpact.Medium,
|
||||
$"{ToPrettyString(user):player} configured NavMapBeacon \'{ToPrettyString(ent):entity}\' with text \'{args.Text}\', color {args.Color.ToHexNoAlpha()}, and {(args.Enabled ? "enabled" : "disabled")} it.");
|
||||
$"{ToPrettyString(args.Actor):player} configured NavMapBeacon \'{ToPrettyString(ent):entity}\' with text \'{args.Text}\', color {args.Color.ToHexNoAlpha()}, and {(args.Enabled ? "enabled" : "disabled")} it.");
|
||||
|
||||
if (TryComp<WarpPointComponent>(ent, out var warpPoint))
|
||||
{
|
||||
|
||||
@@ -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