Re-organize all projects (#4166)

This commit is contained in:
DrSmugleaf
2021-06-09 22:19:39 +02:00
committed by GitHub
parent 9f50e4061b
commit ff1a2d97ea
1773 changed files with 5258 additions and 5508 deletions

View File

@@ -0,0 +1,19 @@
<Control
xmlns="https://spacestation14.io"
xmlns:amc="clr-namespace:Content.Client.UserInterface.AdminMenu.CustomControls"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:at="clr-namespace:Content.Client.UserInterface.AdminMenu.Tabs.AdminTab"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:adminTab="clr-namespace:Content.Client.Administration.UI.Tabs.AdminTab"
Margin="4"
MinSize="50 50">
<VBoxContainer>
<GridContainer Columns="4">
<customControls:UICommandButton Command="kick" Text="{Loc Kick}" WindowType="{x:Type adminTab:KickWindow}" />
<customControls:UICommandButton Command="ban" Text="{Loc Ban}" WindowType="{x:Type adminTab:BanWindow}" />
<customControls:CommandButton Command="aghost" Text="{Loc Admin Ghost}" />
<customControls:UICommandButton Command="tpto" Text="{Loc Teleport}" WindowType="{x:Type adminTab:TeleportWindow}" />
<customControls:CommandButton Command="permissions" Text="{Loc Permissions Panel}" />
</GridContainer>
</VBoxContainer>
</Control>

View File

@@ -0,0 +1,11 @@
#nullable enable
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
namespace Content.Client.Administration.UI.Tabs.AdminTab
{
[GenerateTypedNameReferences]
public partial class AdminTab : Control
{
}
}

View File

@@ -0,0 +1,24 @@
<SS14Window
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.UserInterface.AdminMenu.CustomControls"
Title="{Loc Ban}" MinSize="425 162">
<VBoxContainer>
<HBoxContainer>
<Label Text="{Loc Player}" MinWidth="100" />
<Control MinWidth="50" />
<LineEdit Name="PlayerNameLine" MinWidth="100" HorizontalExpand="True" />
</HBoxContainer>
<HBoxContainer>
<Label Text="{Loc Reason}" MinSize="100 0" />
<Control MinSize="50 0" />
<LineEdit Name="ReasonLine" MinSize="100 0" HorizontalExpand="True" />
</HBoxContainer>
<HBoxContainer>
<Label Text="{Loc Minutes}" MinWidth="100" />
<Control MinWidth="50" />
<LineEdit Name="MinutesLine" MinWidth="100" HorizontalExpand="True" PlaceHolder="{Loc 0 minutes for a permanent ban}" />
</HBoxContainer>
<Control MinWidth="50" />
<Button Name="SubmitButton" Text="{Loc Ban}" />
</VBoxContainer>
</SS14Window>

View File

@@ -0,0 +1,35 @@
#nullable enable
using JetBrains.Annotations;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC;
using Robust.Shared.Utility;
namespace Content.Client.Administration.UI.Tabs.AdminTab
{
[GenerateTypedNameReferences]
[UsedImplicitly]
public partial class BanWindow : SS14Window
{
protected override void EnteredTree()
{
PlayerNameLine.OnTextChanged += PlayerNameLineOnOnTextChanged;
SubmitButton.OnPressed += SubmitButtonOnOnPressed;
}
private void PlayerNameLineOnOnTextChanged(LineEdit.LineEditEventArgs obj)
{
SubmitButton.Disabled = string.IsNullOrEmpty(PlayerNameLine.Text);
}
private void SubmitButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
{
// Small verification if Player Name exists
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
$"ban \"{PlayerNameLine.Text}\" \"{CommandParsing.Escape(ReasonLine.Text)}\" {MinutesLine.Text}");
}
}
}

View File

@@ -0,0 +1,15 @@
<SS14Window
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.UserInterface.AdminMenu.CustomControls"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
Title="{Loc Kick}" MinSize="425 272">
<VBoxContainer>
<HBoxContainer>
<Label Text="{Loc Reason}" MinWidth="100" />
<Control MinWidth="50" />
<LineEdit Name="ReasonLine" MinWidth="100" HorizontalExpand="True" />
</HBoxContainer>
<customControls:PlayerListControl Name="PlayerList" />
<Button Name="SubmitButton" Text="{Loc Kick}" />
</VBoxContainer>
</SS14Window>

View File

@@ -0,0 +1,39 @@
#nullable enable
using JetBrains.Annotations;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
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.Administration.UI.Tabs.AdminTab
{
[GenerateTypedNameReferences]
[UsedImplicitly]
public partial class KickWindow : SS14Window
{
private ICommonSession? _selectedSession;
protected override void EnteredTree()
{
SubmitButton.OnPressed += SubmitButtonOnOnPressed;
PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged;
}
private void OnListOnOnSelectionChanged(ICommonSession? obj)
{
_selectedSession = obj;
SubmitButton.Disabled = _selectedSession == null;
}
private void SubmitButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
{
if (_selectedSession == null)
return;
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
$"kick \"{_selectedSession.Name}\" \"{CommandParsing.Escape(ReasonLine.Text)}\"");
}
}
}

View File

@@ -0,0 +1,10 @@
<SS14Window
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.UserInterface.AdminMenu.CustomControls"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
Title="{Loc Teleport}" MinSize="425 230">
<VBoxContainer>
<customControls:PlayerListControl Name="PlayerList" />
<Button Name="SubmitButton" Text="{Loc Teleport}" />
</VBoxContainer>
</SS14Window>

View File

@@ -0,0 +1,39 @@
#nullable enable
using JetBrains.Annotations;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.IoC;
using Robust.Shared.Players;
namespace Content.Client.Administration.UI.Tabs.AdminTab
{
[GenerateTypedNameReferences]
[UsedImplicitly]
public partial class TeleportWindow : SS14Window
{
private ICommonSession? _selectedSession;
protected override void EnteredTree()
{
SubmitButton.OnPressed += SubmitButtonOnOnPressed;
PlayerList.OnSelectionChanged += OnListOnOnSelectionChanged;
}
private void OnListOnOnSelectionChanged(ICommonSession? obj)
{
_selectedSession = obj;
SubmitButton.Disabled = _selectedSession == null;
}
private void SubmitButtonOnOnPressed(BaseButton.ButtonEventArgs obj)
{
if (_selectedSession == null)
return;
// Execute command
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand(
$"tpto \"{_selectedSession.Name}\"");
}
}
}