Gets rid of all ComponentManager usages. (#4707)

This commit is contained in:
Vera Aguilera Puerto
2021-09-28 13:35:29 +02:00
committed by GitHub
parent 7953e5b962
commit 0be5ff829b
158 changed files with 321 additions and 333 deletions

View File

@@ -50,8 +50,8 @@ namespace Content.Server.Ghost
private void OnRelayMoveInput(EntityUid uid, GhostOnMoveComponent component, RelayMoveInputEvent args)
{
// Let's not ghost if our mind is visiting...
if (ComponentManager.HasComponent<VisitingMindComponent>(uid)) return;
if (!ComponentManager.TryGetComponent<MindComponent>(uid, out var mind) || !mind.HasMind || mind.Mind!.IsVisitingEntity) return;
if (EntityManager.HasComponent<VisitingMindComponent>(uid)) return;
if (!EntityManager.TryGetComponent<MindComponent>(uid, out var mind) || !mind.HasMind || mind.Mind!.IsVisitingEntity) return;
_ticker.OnGhostAttempt(mind.Mind!, component.CanReturn);
}
@@ -193,7 +193,7 @@ namespace Content.Server.Ghost
private IEnumerable<string> GetLocationNames()
{
foreach (var warp in ComponentManager.EntityQuery<WarpPointComponent>())
foreach (var warp in EntityManager.EntityQuery<WarpPointComponent>())
{
if (warp.Location != null)
{
@@ -204,7 +204,7 @@ namespace Content.Server.Ghost
private WarpPointComponent? FindLocation(string name)
{
foreach (var warp in ComponentManager.EntityQuery<WarpPointComponent>(true))
foreach (var warp in EntityManager.EntityQuery<WarpPointComponent>(true))
{
if (warp.Location == name)
{