fixes adminmenus sins (fixes it)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using JetBrains.Annotations;
|
||||
using Content.Shared.Administration;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Console;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
@@ -12,7 +13,7 @@ namespace Content.Client.Administration.UI.Tabs.AdminTab
|
||||
[UsedImplicitly]
|
||||
public partial class TeleportWindow : SS14Window
|
||||
{
|
||||
private ICommonSession? _selectedSession;
|
||||
private PlayerInfo? _selectedPlayer;
|
||||
|
||||
protected override void EnteredTree()
|
||||
{
|
||||
@@ -20,19 +21,19 @@ namespace Content.Client.Administration.UI.Tabs.AdminTab
|
||||
PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged;
|
||||
}
|
||||
|
||||
private void OnListOnOnSelectionChanged(ICommonSession? obj)
|
||||
private void OnListOnOnSelectionChanged(PlayerInfo? obj)
|
||||
{
|
||||
_selectedSession = obj;
|
||||
SubmitButton.Disabled = _selectedSession == null;
|
||||
_selectedPlayer = obj;
|
||||
SubmitButton.Disabled = _selectedPlayer == null;
|
||||
}
|
||||
|
||||
private void SubmitButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
|
||||
{
|
||||
if (_selectedSession == null)
|
||||
if (_selectedPlayer == null)
|
||||
return;
|
||||
// Execute command
|
||||
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
|
||||
$"tpto \"{_selectedSession.Name}\"");
|
||||
$"tpto \"{_selectedPlayer.Username}\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user