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"> - 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) 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) 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 +{ +}