Clean up all missing EntitySystem proxy method uses (#38353)

This commit is contained in:
Tayrtahn
2025-06-26 19:50:49 -04:00
committed by GitHub
parent 73df3b1593
commit 75db49f9c0
185 changed files with 418 additions and 418 deletions

View File

@@ -69,7 +69,7 @@ namespace Content.Server.Construction
if(!containerSlot.ContainedEntity.HasValue)
continue;
if (EntityManager.TryGetComponent(containerSlot.ContainedEntity.Value, out StorageComponent? storage))
if (TryComp(containerSlot.ContainedEntity.Value, out StorageComponent? storage))
{
foreach (var storedEntity in storage.Container.ContainedEntities)
{
@@ -270,7 +270,7 @@ namespace Content.Server.Construction
}
var newEntityProto = graph.Nodes[edge.Target].Entity.GetId(null, user, new(EntityManager));
var newEntity = EntityManager.SpawnAttachedTo(newEntityProto, coords, rotation: angle);
var newEntity = SpawnAttachedTo(newEntityProto, coords, rotation: angle);
if (!TryComp(newEntity, out ConstructionComponent? construction))
{
@@ -471,7 +471,7 @@ namespace Content.Server.Construction
}
if (!_actionBlocker.CanInteract(user, null)
|| !EntityManager.TryGetComponent(user, out HandsComponent? hands) || _handsSystem.GetActiveItem((user, hands)) == null)
|| !TryComp(user, out HandsComponent? hands) || _handsSystem.GetActiveItem((user, hands)) == null)
{
Cleanup();
return;