Gets rid of all ComponentManager usages. (#4707)
This commit is contained in:
committed by
GitHub
parent
7953e5b962
commit
0be5ff829b
@@ -250,7 +250,7 @@ namespace Content.Server.GameTicking
|
||||
|
||||
_possiblePositions.Clear();
|
||||
|
||||
foreach (var (point, transform) in ComponentManager.EntityQuery<SpawnPointComponent, ITransformComponent>())
|
||||
foreach (var (point, transform) in EntityManager.EntityQuery<SpawnPointComponent, ITransformComponent>())
|
||||
{
|
||||
if (point.SpawnType == SpawnPointType.Job && point.Job?.ID == jobId)
|
||||
_possiblePositions.Add(transform.Coordinates);
|
||||
@@ -268,7 +268,7 @@ namespace Content.Server.GameTicking
|
||||
|
||||
_possiblePositions.Clear();
|
||||
|
||||
foreach (var (point, transform) in ComponentManager.EntityQuery<SpawnPointComponent, ITransformComponent>())
|
||||
foreach (var (point, transform) in EntityManager.EntityQuery<SpawnPointComponent, ITransformComponent>())
|
||||
{
|
||||
if (point.SpawnType == SpawnPointType.LateJoin) _possiblePositions.Add(transform.Coordinates);
|
||||
}
|
||||
@@ -286,7 +286,7 @@ namespace Content.Server.GameTicking
|
||||
|
||||
_possiblePositions.Clear();
|
||||
|
||||
foreach (var (point, transform) in ComponentManager.EntityQuery<SpawnPointComponent, ITransformComponent>())
|
||||
foreach (var (point, transform) in EntityManager.EntityQuery<SpawnPointComponent, ITransformComponent>())
|
||||
{
|
||||
if (point.SpawnType == SpawnPointType.Observer)
|
||||
_possiblePositions.Add(transform.Coordinates);
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace Content.Server.GameTicking.Presets
|
||||
// On failure, the returned target is the location that we're already at.
|
||||
var bestTargetDistanceFromNearest = -1.0f;
|
||||
// Need the random shuffle or it stuffs the first person into Atmospherics pretty reliably
|
||||
var ents = _entityManager.ComponentManager.EntityQuery<SpawnPointComponent>().Select(x => x.Owner).ToList();
|
||||
var ents = _entityManager.EntityQuery<SpawnPointComponent>().Select(x => x.Owner).ToList();
|
||||
_robustRandom.Shuffle(ents);
|
||||
var foundATarget = false;
|
||||
bestTarget = EntityCoordinates.Invalid;
|
||||
@@ -197,7 +197,7 @@ namespace Content.Server.GameTicking.Presets
|
||||
// TODO BODY SYSTEM KILL
|
||||
var damage = new DamageSpecifier(_prototypeManager.Index<DamageTypePrototype>("Asphyxiation"), 100);
|
||||
EntitySystem.Get<DamageableSystem>().TryChangeDamage(entity.Uid, damage, true);
|
||||
}
|
||||
}
|
||||
else if (!mobState.IsDead())
|
||||
{
|
||||
if (entity.HasComponent<HandsComponent>())
|
||||
@@ -217,7 +217,7 @@ namespace Content.Server.GameTicking.Presets
|
||||
{
|
||||
var lines = new List<string>();
|
||||
lines.Add("traitor-death-match-end-round-description-first-line");
|
||||
foreach (var pda in _entityManager.ComponentManager.EntityQuery<PDAComponent>())
|
||||
foreach (var pda in _entityManager.EntityQuery<PDAComponent>())
|
||||
{
|
||||
var uplink = pda.SyndicateUplinkAccount;
|
||||
if (uplink != null && _allOriginalNames.ContainsKey(uplink))
|
||||
|
||||
Reference in New Issue
Block a user