From 372ab2199fca5826c47d5554de4c6798ef071a8a Mon Sep 17 00:00:00 2001 From: Zekins <136648667+Zekins3366@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:33:05 +0300 Subject: [PATCH 1/4] Update ObjectsTab.xaml --- .../Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml index fb68e6c7908..0280018f14c 100644 --- a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml +++ b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml @@ -2,8 +2,12 @@ xmlns:cc="clr-namespace:Content.Client.Administration.UI.CustomControls"> - From 9be2b3bea648fc4fbb9fa7a100367c04c9a63839 Mon Sep 17 00:00:00 2001 From: Zekins <136648667+Zekins3366@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:39:59 +0300 Subject: [PATCH 2/4] Update ObjectsTab.xaml.cs --- .../UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs index a5c30084365..acff214b2c7 100644 --- a/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs +++ b/Content.Client/Administration/UI/Tabs/ObjectsTab/ObjectsTab.xaml.cs @@ -1,4 +1,7 @@ +using Content.Client.Salvage; using Content.Client.Station; +using Content.Server.Worldgen.Components.Debris; +using Content.Shared.Shipyard.Components; using Robust.Client.AutoGenerated; using Robust.Client.UserInterface; using Robust.Client.UserInterface.XAML; @@ -95,6 +98,33 @@ private void RefreshObjectList(ObjectsTabSelection selection) ObjectList.AddChild(ctrl); ctrl.OnKeyBindDown += args => OnEntryKeyBindDown?.Invoke(ctrl, args); } + + var shuttlesCount = 0; + var shuttlesQuery = _entityManager.AllEntityQueryEnumerator(); + while (shuttlesQuery.MoveNext(out var uid, out _, out _)) + { + shuttlesCount++; + } + + ShuttlesCount.Text = $"Шаттлы: {shuttlesCount}"; + + var debrisCount = 0; + var debrisQuery = _entityManager.AllEntityQueryEnumerator(); + while (debrisQuery.MoveNext(out var uid, out _, out _)) + { + debrisCount++; + } + + DebrisCount.Text = $"Обломки: {debrisCount}"; + + var expeditionCount = 0; + var expeditionQuery = _entityManager.AllEntityQueryEnumerator(); + while (expeditionQuery.MoveNext(out var uid, out _, out _)) + { + expeditionCount++; + } + + ExpeditionCount.Text = $"Экспедиции: {expeditionCount}"; } protected override void FrameUpdate(FrameEventArgs args) From e932a3ce62ca83d51ebf4081c7a9d528739c1893 Mon Sep 17 00:00:00 2001 From: Zekins <136648667+Zekins3366@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:41:25 +0300 Subject: [PATCH 3/4] Update DebrisFeaturePlacerSystem.cs --- .../Worldgen/Systems/Debris/DebrisFeaturePlacerSystem.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Content.Server/Worldgen/Systems/Debris/DebrisFeaturePlacerSystem.cs b/Content.Server/Worldgen/Systems/Debris/DebrisFeaturePlacerSystem.cs index 98a807c424d..f6d2112a757 100644 --- a/Content.Server/Worldgen/Systems/Debris/DebrisFeaturePlacerSystem.cs +++ b/Content.Server/Worldgen/Systems/Debris/DebrisFeaturePlacerSystem.cs @@ -227,6 +227,7 @@ private void OnChunkLoaded(EntityUid uid, DebrisFeaturePlacerControllerComponent var owned = EnsureComp(ent); owned.OwningController = uid; owned.LastKey = point; + EnsureComp(ent); } if (failures > 0) From 4b83905851b35fb75ef5b5ee9315baac0d05994d Mon Sep 17 00:00:00 2001 From: Zekins <136648667+Zekins3366@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:42:29 +0300 Subject: [PATCH 4/4] Create SpaceDebrisComponent.cs --- Content.Shared/SpaceDebrisComponent.cs | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Content.Shared/SpaceDebrisComponent.cs diff --git a/Content.Shared/SpaceDebrisComponent.cs b/Content.Shared/SpaceDebrisComponent.cs new file mode 100644 index 00000000000..6325eddf893 --- /dev/null +++ b/Content.Shared/SpaceDebrisComponent.cs @@ -0,0 +1,8 @@ +using Robust.Shared.GameStates; + +namespace Content.Server.Worldgen.Components.Debris; + +[RegisterComponent, NetworkedComponent] +public sealed partial class SpaceDebrisComponent : Component +{ +}