diff --git a/Content.Client/UserInterface/AdminMenu/CustomControls/PlayerListControl.xaml.cs b/Content.Client/UserInterface/AdminMenu/CustomControls/PlayerListControl.xaml.cs index 063a380a89..fc27e313be 100644 --- a/Content.Client/UserInterface/AdminMenu/CustomControls/PlayerListControl.xaml.cs +++ b/Content.Client/UserInterface/AdminMenu/CustomControls/PlayerListControl.xaml.cs @@ -6,20 +6,21 @@ using Robust.Client.AutoGenerated; using Robust.Client.Player; using Robust.Client.UserInterface.Controls; using Robust.Shared.IoC; +using Robust.Shared.Players; namespace Content.Client.UserInterface.AdminMenu.CustomControls { [GenerateTypedNameReferences] public partial class PlayerListControl : VBoxContainer { - private List? _data; + private List? _data; - public event Action? OnSelectionChanged; + public event Action? OnSelectionChanged; protected override void EnteredTree() { // Fill the Option data - _data = IoCManager.Resolve().Sessions.ToList(); + _data = IoCManager.Resolve().Sessions.OfType().ToList(); PopulateList(); PlayerItemList.OnItemSelected += PlayerItemListOnOnItemSelected; PlayerItemList.OnItemDeselected += PlayerItemListOnOnItemDeselected; @@ -31,14 +32,14 @@ namespace Content.Client.UserInterface.AdminMenu.CustomControls PopulateList(FilterLineEdit.Text); } - private static string GetDisplayName(IPlayerSession session) + private static string GetDisplayName(ICommonSession session) { return $"{session.Name} ({session.AttachedEntity?.Name})"; } private void PlayerItemListOnOnItemSelected(ItemList.ItemListSelectedEventArgs obj) { - var selectedPlayer = (IPlayerSession) obj.ItemList[obj.ItemIndex].Metadata!; + var selectedPlayer = (ICommonSession) obj.ItemList[obj.ItemIndex].Metadata!; OnSelectionChanged?.Invoke(selectedPlayer); } diff --git a/Content.Client/UserInterface/AdminMenu/Tabs/AdminTab/KickWindow.xaml.cs b/Content.Client/UserInterface/AdminMenu/Tabs/AdminTab/KickWindow.xaml.cs index 1f4bfa0625..24f694c4fd 100644 --- a/Content.Client/UserInterface/AdminMenu/Tabs/AdminTab/KickWindow.xaml.cs +++ b/Content.Client/UserInterface/AdminMenu/Tabs/AdminTab/KickWindow.xaml.cs @@ -2,10 +2,10 @@ using JetBrains.Annotations; using Robust.Client.AutoGenerated; using Robust.Client.Console; -using Robust.Client.Player; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.IoC; +using Robust.Shared.Players; using Robust.Shared.Utility; namespace Content.Client.UserInterface.AdminMenu.Tabs.AdminTab @@ -14,7 +14,7 @@ namespace Content.Client.UserInterface.AdminMenu.Tabs.AdminTab [UsedImplicitly] public partial class KickWindow : SS14Window { - private IPlayerSession? _selectedSession; + private ICommonSession? _selectedSession; protected override void EnteredTree() { @@ -22,7 +22,7 @@ namespace Content.Client.UserInterface.AdminMenu.Tabs.AdminTab PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged; } - private void OnListOnOnSelectionChanged(IPlayerSession? obj) + private void OnListOnOnSelectionChanged(ICommonSession? obj) { _selectedSession = obj; SubmitButton.Disabled = _selectedSession == null; diff --git a/Content.Client/UserInterface/AdminMenu/Tabs/AdminTab/TeleportWindow.xaml.cs b/Content.Client/UserInterface/AdminMenu/Tabs/AdminTab/TeleportWindow.xaml.cs index 7d8e243553..f38398e813 100644 --- a/Content.Client/UserInterface/AdminMenu/Tabs/AdminTab/TeleportWindow.xaml.cs +++ b/Content.Client/UserInterface/AdminMenu/Tabs/AdminTab/TeleportWindow.xaml.cs @@ -7,6 +7,7 @@ using Robust.Client.Player; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; using Robust.Shared.IoC; +using Robust.Shared.Players; namespace Content.Client.UserInterface.AdminMenu.Tabs.AdminTab { @@ -14,7 +15,7 @@ namespace Content.Client.UserInterface.AdminMenu.Tabs.AdminTab [UsedImplicitly] public partial class TeleportWindow : SS14Window { - private IPlayerSession? _selectedSession; + private ICommonSession? _selectedSession; protected override void EnteredTree() { @@ -22,7 +23,7 @@ namespace Content.Client.UserInterface.AdminMenu.Tabs.AdminTab PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged; } - private void OnListOnOnSelectionChanged(IPlayerSession? obj) + private void OnListOnOnSelectionChanged(ICommonSession? obj) { _selectedSession = obj; SubmitButton.Disabled = _selectedSession == null;