From 2a367af7ed1bfcef45536b8bdd7113af1b6a2a06 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Mon, 11 Sep 2023 15:43:24 +1000 Subject: [PATCH] Fix ghost warps (#20008) --- .../Systems/Ghost/Controls/GhostTargetWindow.xaml.cs | 8 ++++---- .../UserInterface/Systems/Ghost/GhostUIController.cs | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs b/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs index 1417b47771..3d86266df8 100644 --- a/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs +++ b/Content.Client/UserInterface/Systems/Ghost/Controls/GhostTargetWindow.xaml.cs @@ -11,16 +11,16 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls [GenerateTypedNameReferences] public sealed partial class GhostTargetWindow : DefaultWindow { - private List<(string, EntityUid)> _warps = new(); + private List<(string, NetEntity)> _warps = new(); - public event Action? WarpClicked; + public event Action? WarpClicked; public GhostTargetWindow() { RobustXamlLoader.Load(this); } - public void UpdateWarps(IEnumerable warps, IEntityManager entManager) + public void UpdateWarps(IEnumerable warps) { // Server COULD send these sorted but how about we just use the client to do it instead _warps = warps @@ -33,7 +33,7 @@ namespace Content.Client.UserInterface.Systems.Ghost.Controls ? Loc.GetString("ghost-target-window-current-button", ("name", w.DisplayName)) : w.DisplayName; - return (name, entManager.GetEntity(w.Entity)); + return (name, w.Entity); }) .ToList(); } diff --git a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs index 709b7c553c..12d6c65953 100644 --- a/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs +++ b/Content.Client/UserInterface/Systems/Ghost/GhostUIController.cs @@ -96,7 +96,7 @@ public sealed class GhostUIController : UIController, IOnSystemChanged