Replace GridEntityId with Owner (#12743)

This commit is contained in:
metalgearsloth
2022-12-12 14:59:02 +11:00
committed by GitHub
parent 4cbf78646a
commit 3b3963083b
75 changed files with 190 additions and 190 deletions

View File

@@ -21,12 +21,12 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
protected override void EnteredTree()
{
_data = IoCManager.Resolve<IMapManager>().GetAllGrids().Where(g => (int) g.GridEntityId != 0);
_data = IoCManager.Resolve<IMapManager>().GetAllGrids().Where(g => (int) g.Owner != 0);
foreach (var grid in _data)
{
var player = IoCManager.Resolve<IPlayerManager>().LocalPlayer?.ControlledEntity;
var playerGrid = IoCManager.Resolve<IEntityManager>().GetComponentOrNull<TransformComponent>(player)?.GridUid;
GridOptions.AddItem($"{grid.GridEntityId} {(playerGrid == grid.GridEntityId ? " (Current)" : "")}");
GridOptions.AddItem($"{grid.Owner} {(playerGrid == grid.Owner ? " (Current)" : "")}");
}
GridOptions.OnItemSelected += eventArgs => GridOptions.SelectId(eventArgs.Id);
@@ -38,7 +38,7 @@ namespace Content.Client.Administration.UI.Tabs.AtmosTab
if (_data == null)
return;
var dataList = _data.ToList();
var selectedGrid = dataList[GridOptions.SelectedId].GridEntityId;
var selectedGrid = dataList[GridOptions.SelectedId].Owner;
IoCManager.Resolve<IClientConsoleHost>().ExecuteCommand($"addatmos {selectedGrid}");
}
}