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

@@ -65,7 +65,7 @@ namespace Content.Client.Suspicion
return false;
}
return IoCManager.Resolve<IEntityManager>().TryGetComponent(_playerManager.LocalPlayer.ControlledEntity.Uid, out suspicion);
return IoCManager.Resolve<IEntityManager>().TryGetComponent(_playerManager.LocalPlayer.ControlledEntity, out suspicion);
}
public void UpdateLabel()

View File

@@ -41,7 +41,7 @@ namespace Content.Client.Suspicion
var viewport = _eyeManager.GetWorldViewport();
var ent = _playerManager.LocalPlayer?.ControlledEntity;
if (ent == null || IoCManager.Resolve<IEntityManager>().TryGetComponent(ent.Uid, out SuspicionRoleComponent? sus) != true)
if (ent == null || IoCManager.Resolve<IEntityManager>().TryGetComponent(ent, out SuspicionRoleComponent? sus) != true)
{
return;
}
@@ -54,19 +54,19 @@ namespace Content.Client.Suspicion
continue;
}
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(ally.Uid, out IPhysBody? physics))
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent(ally, out IPhysBody? physics))
{
continue;
}
if (!ExamineSystemShared.InRangeUnOccluded(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(ent.Uid).MapPosition, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(ally.Uid).MapPosition, 15,
if (!ExamineSystemShared.InRangeUnOccluded(IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(ent).MapPosition, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(ally).MapPosition, 15,
entity => entity == ent || entity == ally))
{
continue;
}
// if not on the same map, continue
if (IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(physics.Owner.Uid).MapID != _eyeManager.CurrentMap || physics.Owner.IsInContainer())
if (IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(physics.Owner).MapID != _eyeManager.CurrentMap || physics.Owner.IsInContainer())
{
continue;
}