Remove 700 usages of Component.Owner (#21100)
This commit is contained in:
@@ -270,14 +270,13 @@ public sealed class CrewManifestCommand : IConsoleCommand
|
||||
return CompletionResult.Empty;
|
||||
}
|
||||
|
||||
var stations = _entityManager
|
||||
.EntityQuery<StationDataComponent>()
|
||||
.Select(stationData =>
|
||||
{
|
||||
var meta = _entityManager.GetComponent<MetaDataComponent>(stationData.Owner);
|
||||
|
||||
return new CompletionOption(stationData.Owner.ToString(), meta.EntityName);
|
||||
});
|
||||
var stations = new List<CompletionOption>();
|
||||
var query = _entityManager.EntityQueryEnumerator<StationDataComponent>();
|
||||
while (query.MoveNext(out var uid, out _))
|
||||
{
|
||||
var meta = _entityManager.GetComponent<MetaDataComponent>(uid);
|
||||
stations.Add(new CompletionOption(uid.ToString(), meta.EntityName));
|
||||
}
|
||||
|
||||
return CompletionResult.FromHintOptions(stations, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user