diff --git a/.github/labeler.yml b/.github/labeler.yml
index e4f7b604184..e9267cbbc01 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -5,9 +5,9 @@
"Changes: Map":
- changed-files:
- any-glob-to-any-file:
- - 'Resources/Maps/**/*.yml'
- - 'Resources/Prototypes/Maps/**/*.yml'
- - 'Resources/Prototypes/Corvax/Maps/**/*.yml'
+ - 'Resources/Maps/*.yml'
+ - 'Resources/Prototypes/Maps/*.yml'
+ - 'Resources/Prototypes/Corvax/Maps/*.yml'
"Changes: UI":
- changed-files:
diff --git a/.github/workflows/labeler-pr.yml b/.github/workflows/labeler-pr.yml
index 2ae22b3b1cb..6cc86067fa9 100644
--- a/.github/workflows/labeler-pr.yml
+++ b/.github/workflows/labeler-pr.yml
@@ -1,4 +1,4 @@
-name: "Labels: PR"
+name: "Labels: PR"
on:
- pull_request_target
@@ -12,5 +12,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v5
- with: # ADT Tweak by Schrodinger
- sync-labels: true # Поправил auto-labels
+ with:
+ sync-labels: true
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index ba2e83614b6..9a2dfa12534 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -31,7 +31,7 @@ jobs:
chmod 600 ~/.ssh/id_rsa
echo "HOST *" > ~/.ssh/config
echo "StrictHostKeyChecking no" >> ~/.ssh/config
- git clone git@github.com:corvax-nexus/secrets.git Secrets
+ git -c submodule.Secrets.update=checkout submodule update --init
cp -R Secrets/Resources/Prototypes Resources/Prototypes/CorvaxSecrets
cp -R Secrets/Resources/ServerPrototypes Resources/Prototypes/CorvaxSecretsServer
cp -R Secrets/Resources/Locale Resources/Locale/ru-RU/corvax-secrets
diff --git a/.gitignore b/.gitignore
index df4947fd4b4..533060b4996 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,7 +11,6 @@
*.userprefs
# Secret
-Secrets
Resources/Prototypes/CorvaxSecrets
Resources/Prototypes/CorvaxSecretsServer
Resources/Textures/CorvaxSecrets
diff --git a/.vscode/settings.json b/.vscode/settings.json
index f641dcf9c86..0e0d3ae890c 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,5 +1,4 @@
{
"omnisharp.analyzeOpenDocumentsOnly": true,
- "dotnet.defaultSolution": "SpaceStation14.sln",
- "dotnet.preferCSharpExtension": true
+ "dotnet.defaultSolution": "SpaceStation14.sln"
}
diff --git a/Content.Client/Administration/UI/AdminMenuWindow.xaml b/Content.Client/Administration/UI/AdminMenuWindow.xaml
index 311d67b826c..d3d3df02d93 100644
--- a/Content.Client/Administration/UI/AdminMenuWindow.xaml
+++ b/Content.Client/Administration/UI/AdminMenuWindow.xaml
@@ -6,7 +6,8 @@
xmlns:tabs="clr-namespace:Content.Client.Administration.UI.Tabs"
xmlns:playerTab="clr-namespace:Content.Client.Administration.UI.Tabs.PlayerTab"
xmlns:objectsTab="clr-namespace:Content.Client.Administration.UI.Tabs.ObjectsTab"
- xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab">
+ xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab"
+ xmlns:baby="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab">
@@ -14,6 +15,7 @@
+
diff --git a/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs b/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs
index 51330a547ec..f3aa2572f2f 100644
--- a/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs
+++ b/Content.Client/Administration/UI/AdminMenuWindow.xaml.cs
@@ -3,53 +3,38 @@
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
-namespace Content.Client.Administration.UI;
-
-[GenerateTypedNameReferences]
-public sealed partial class AdminMenuWindow : DefaultWindow
+namespace Content.Client.Administration.UI
{
- public event Action? OnDisposed;
-
- public AdminMenuWindow()
- {
- MinSize = new Vector2(650, 250);
- Title = Loc.GetString("admin-menu-title");
- RobustXamlLoader.Load(this);
- MasterTabContainer.SetTabTitle(0, Loc.GetString("admin-menu-admin-tab"));
- MasterTabContainer.SetTabTitle(1, Loc.GetString("admin-menu-adminbus-tab"));
- MasterTabContainer.SetTabTitle(2, Loc.GetString("admin-menu-atmos-tab"));
- MasterTabContainer.SetTabTitle(3, Loc.GetString("admin-menu-round-tab"));
- MasterTabContainer.SetTabTitle(4, Loc.GetString("admin-menu-server-tab"));
- MasterTabContainer.SetTabTitle(5, Loc.GetString("admin-menu-panic-bunker-tab"));
- MasterTabContainer.SetTabTitle(6, Loc.GetString("admin-menu-players-tab"));
- MasterTabContainer.SetTabTitle(7, Loc.GetString("admin-menu-objects-tab"));
- MasterTabContainer.OnTabChanged += OnTabChanged;
- }
-
- private void OnTabChanged(int tabIndex)
+ [GenerateTypedNameReferences]
+ public sealed partial class AdminMenuWindow : DefaultWindow
{
- var tabEnum = (TabIndex)tabIndex;
- if (tabEnum == TabIndex.Objects)
- ObjectsTabControl.RefreshObjectList();
- }
+ public event Action? OnDisposed;
- protected override void Dispose(bool disposing)
- {
- OnDisposed?.Invoke();
- base.Dispose(disposing);
- OnDisposed = null;
- }
+ public AdminMenuWindow()
+ {
+ MinSize = new Vector2(650, 250);
+ Title = Loc.GetString("admin-menu-title");
+ RobustXamlLoader.Load(this);
+ MasterTabContainer.SetTabTitle(0, Loc.GetString("admin-menu-admin-tab"));
+ MasterTabContainer.SetTabTitle(1, Loc.GetString("admin-menu-adminbus-tab"));
+ MasterTabContainer.SetTabTitle(2, Loc.GetString("admin-menu-atmos-tab"));
+ MasterTabContainer.SetTabTitle(3, Loc.GetString("admin-menu-round-tab"));
+ MasterTabContainer.SetTabTitle(4, Loc.GetString("admin-menu-server-tab"));
+ MasterTabContainer.SetTabTitle(5, Loc.GetString("admin-menu-panic-bunker-tab"));
+ /*
+ * TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
+ */
+ MasterTabContainer.SetTabTitle(6, Loc.GetString("admin-menu-baby-jail-tab"));
+ MasterTabContainer.SetTabTitle(7, Loc.GetString("admin-menu-players-tab"));
+ MasterTabContainer.SetTabTitle(8, Loc.GetString("admin-menu-objects-tab"));
+ }
- private enum TabIndex
- {
- Admin = 0,
- Adminbus,
- Atmos,
- Round,
- Server,
- PanicBunker,
- BabyJail,
- Players,
- Objects,
+ protected override void Dispose(bool disposing)
+ {
+ OnDisposed?.Invoke();
+ base.Dispose(disposing);
+ OnDisposed = null;
+ }
}
}
+
diff --git a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml
new file mode 100644
index 00000000000..b8034faf52a
--- /dev/null
+++ b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml
@@ -0,0 +1,6 @@
+
+
+
diff --git a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs
new file mode 100644
index 00000000000..9e1d53818f2
--- /dev/null
+++ b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs
@@ -0,0 +1,21 @@
+using Content.Client.Message;
+using Content.Client.UserInterface.Controls;
+using Robust.Client.AutoGenerated;
+using Robust.Client.UserInterface.CustomControls;
+using Robust.Client.UserInterface.XAML;
+
+namespace Content.Client.Administration.UI.Tabs.BabyJailTab;
+
+/*
+ * TODO: Remove me once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
+ */
+
+[GenerateTypedNameReferences]
+public sealed partial class BabyJailStatusWindow : FancyWindow
+{
+ public BabyJailStatusWindow()
+ {
+ RobustXamlLoader.Load(this);
+ MessageLabel.SetMarkup(Loc.GetString("admin-ui-baby-jail-is-enabled"));
+ }
+}
diff --git a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml
new file mode 100644
index 00000000000..dd770c2be53
--- /dev/null
+++ b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml.cs b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml.cs
new file mode 100644
index 00000000000..aa9d6ced951
--- /dev/null
+++ b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml.cs
@@ -0,0 +1,75 @@
+using Content.Shared.Administration.Events;
+using Robust.Client.AutoGenerated;
+using Robust.Client.UserInterface;
+using Robust.Client.UserInterface.XAML;
+using Robust.Shared.Console;
+
+/*
+ * TODO: Remove me once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
+ */
+
+namespace Content.Client.Administration.UI.Tabs.BabyJailTab;
+
+[GenerateTypedNameReferences]
+public sealed partial class BabyJailTab : Control
+{
+ [Dependency] private readonly IConsoleHost _console = default!;
+
+ private string _maxAccountAge;
+ private string _maxOverallMinutes;
+
+ public BabyJailTab()
+ {
+ RobustXamlLoader.Load(this);
+ IoCManager.InjectDependencies(this);
+
+ MaxAccountAge.OnTextEntered += args => SendMaxAccountAge(args.Text);
+ MaxAccountAge.OnFocusExit += args => SendMaxAccountAge(args.Text);
+ _maxAccountAge = MaxAccountAge.Text;
+
+ MaxOverallMinutes.OnTextEntered += args => SendMaxOverallMinutes(args.Text);
+ MaxOverallMinutes.OnFocusExit += args => SendMaxOverallMinutes(args.Text);
+ _maxOverallMinutes = MaxOverallMinutes.Text;
+ }
+
+ private void SendMaxAccountAge(string text)
+ {
+ if (string.IsNullOrWhiteSpace(text) ||
+ text == _maxAccountAge ||
+ !int.TryParse(text, out var minutes))
+ {
+ return;
+ }
+
+ _console.ExecuteCommand($"babyjail_max_account_age {minutes}");
+ }
+
+ private void SendMaxOverallMinutes(string text)
+ {
+ if (string.IsNullOrWhiteSpace(text) ||
+ text == _maxOverallMinutes ||
+ !int.TryParse(text, out var minutes))
+ {
+ return;
+ }
+
+ _console.ExecuteCommand($"babyjail_max_overall_minutes {minutes}");
+ }
+
+ public void UpdateStatus(BabyJailStatus status)
+ {
+ EnabledButton.Pressed = status.Enabled;
+ EnabledButton.Text = Loc.GetString(status.Enabled
+ ? "admin-ui-baby-jail-enabled"
+ : "admin-ui-baby-jail-disabled"
+ );
+ EnabledButton.ModulateSelfOverride = status.Enabled ? Color.Red : null;
+ ShowReasonButton.Pressed = status.ShowReason;
+
+ MaxAccountAge.Text = status.MaxAccountAgeMinutes.ToString();
+ _maxAccountAge = MaxAccountAge.Text;
+
+ MaxOverallMinutes.Text = status.MaxOverallMinutes.ToString();
+ _maxOverallMinutes = MaxOverallMinutes.Text;
+ }
+}
diff --git a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml
index f4298bbc00f..821389150d6 100644
--- a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml
+++ b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml
@@ -4,17 +4,18 @@
xmlns:co="clr-namespace:Content.Client.UserInterface.Controls">
-
-
-
-
+
+
+
-
+
+
+
-
-
-
+
+
+
diff --git a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs
index 78eefa34628..67e0db01eeb 100644
--- a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs
+++ b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs
@@ -3,7 +3,6 @@
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
-using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Map.Components;
using Robust.Shared.Timing;
@@ -16,15 +15,18 @@ public sealed partial class ObjectsTab : Control
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IGameTiming _timing = default!;
+ private readonly List _objects = new();
+ private readonly List _selections = new();
+ private bool _ascending = false; // Set to false for descending order by default
+ private ObjectsTabHeader.Header _headerClicked = ObjectsTabHeader.Header.ObjectName;
private readonly Color _altColor = Color.FromHex("#292B38");
private readonly Color _defaultColor = Color.FromHex("#2F2F3B");
- private bool _ascending;
- private ObjectsTabHeader.Header _headerClicked = ObjectsTabHeader.Header.ObjectName;
-
- private readonly List _selections = [];
public event Action? OnEntryKeyBindDown;
+ private readonly TimeSpan _updateFrequency = TimeSpan.FromSeconds(2);
+ private TimeSpan _nextUpdate;
+
public ObjectsTab()
{
RobustXamlLoader.Load(this);
@@ -36,25 +38,40 @@ public ObjectsTab()
RefreshObjectList(_selections[ev.Id]);
};
- foreach (var type in Enum.GetValues())
+ foreach (var type in Enum.GetValues(typeof(ObjectsTabSelection)))
{
- _selections.Add(type);
- ObjectTypeOptions.AddItem(GetLocalizedEnumValue(type));
+ _selections.Add((ObjectsTabSelection)type!);
+ ObjectTypeOptions.AddItem(Loc.GetString($"object-tab-object-type-{((Enum.GetName((ObjectsTabSelection)type))!.ToString().ToLower())}"));
}
ListHeader.OnHeaderClicked += HeaderClicked;
SearchList.SearchBar = SearchLineEdit;
SearchList.GenerateItem += GenerateButton;
SearchList.DataFilterCondition += DataFilterCondition;
- SearchList.ItemKeyBindDown += (args, data) => OnEntryKeyBindDown?.Invoke(args, data);
- RefreshListButton.OnPressed += _ => RefreshObjectList();
+ RefreshObjectList();
+ // Set initial selection and refresh the list to apply the initial sort order
var defaultSelection = ObjectsTabSelection.Grids;
- ObjectTypeOptions.SelectId((int) defaultSelection);
- RefreshObjectList(defaultSelection);
+ ObjectTypeOptions.SelectId((int)defaultSelection); // Set the default selection
+ RefreshObjectList(defaultSelection); // Refresh the list with the default selection
+
+ // Initialize the next update time
+ _nextUpdate = TimeSpan.Zero;
+ }
+
+ protected override void FrameUpdate(FrameEventArgs args)
+ {
+ base.FrameUpdate(args);
+
+ if (_timing.CurTime < _nextUpdate)
+ return;
+
+ _nextUpdate = _timing.CurTime + _updateFrequency;
+
+ RefreshObjectList();
}
- public void RefreshObjectList()
+ private void RefreshObjectList()
{
RefreshObjectList(_selections[ObjectTypeOptions.SelectedId]);
}
@@ -84,7 +101,6 @@ private void RefreshObjectList(ObjectsTabSelection selection)
{
entities.Add((metadata.EntityName, _entityManager.GetNetEntity(uid)));
}
-
break;
}
default:
@@ -95,18 +111,14 @@ private void RefreshObjectList(ObjectsTabSelection selection)
{
var valueA = GetComparableValue(a, _headerClicked);
var valueB = GetComparableValue(b, _headerClicked);
- return _ascending
- ? Comparer