Inline UID

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 15:53:09 +01:00
parent 2654775bf0
commit 5cd42c9ad6
803 changed files with 3613 additions and 3577 deletions

View File

@@ -46,11 +46,11 @@ namespace Content.Server.AME
foreach (var node in groupNodes)
{
var nodeOwner = node.Owner;
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(nodeOwner.Uid, out AMEShieldComponent? shield))
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(nodeOwner, out AMEShieldComponent? shield))
{
var nodeNeighbors = grid.GetCellsInSquareArea(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(nodeOwner.Uid).Coordinates, 1)
var nodeNeighbors = grid.GetCellsInSquareArea(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(nodeOwner).Coordinates, 1)
.Select(sgc => IoCManager.Resolve<IEntityManager>().GetEntity(sgc))
.Where(entity => entity != nodeOwner && IoCManager.Resolve<IEntityManager>().HasComponent<AMEShieldComponent>(entity.Uid));
.Where(entity => entity != nodeOwner && IoCManager.Resolve<IEntityManager>().HasComponent<AMEShieldComponent>(entity));
if (nodeNeighbors.Count() >= 8)
{
@@ -69,7 +69,7 @@ namespace Content.Server.AME
foreach (var node in groupNodes)
{
var nodeOwner = node.Owner;
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(nodeOwner.Uid, out AMEControllerComponent? controller))
if (IoCManager.Resolve<IEntityManager>().TryGetComponent(nodeOwner, out AMEControllerComponent? controller))
{
if (_masterController == null)
{
@@ -177,7 +177,7 @@ namespace Content.Server.AME
intensity = Math.Min(intensity, 8);
EntitySystem.Get<ExplosionSystem>().SpawnExplosion(epicenter.Owner.Uid, intensity / 2, intensity, intensity * 2, intensity * 3);
EntitySystem.Get<ExplosionSystem>().SpawnExplosion(epicenter.Owner, intensity / 2, intensity, intensity * 2, intensity * 3);
}
}
}