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

@@ -58,7 +58,7 @@ namespace Content.Server.Atmos.EntitySystems
private void OnCollideEvent(EntityUid uid, FlammableComponent flammable, StartCollideEvent args)
{
var otherUid = args.OtherFixture.Body.Owner.Uid;
if (!ComponentManager.TryGetComponent(otherUid, out FlammableComponent? otherFlammable))
if (!EntityManager.TryGetComponent(otherUid, out FlammableComponent? otherFlammable))
return;
if (!flammable.FireSpread || !otherFlammable.FireSpread)
@@ -179,7 +179,7 @@ namespace Content.Server.Atmos.EntitySystems
_timer -= UpdateTime;
// TODO: This needs cleanup to take off the crust from TemperatureComponent and shit.
foreach (var (flammable, physics, transform) in ComponentManager.EntityQuery<FlammableComponent, PhysicsComponent, ITransformComponent>())
foreach (var (flammable, physics, transform) in EntityManager.EntityQuery<FlammableComponent, PhysicsComponent, ITransformComponent>())
{
var uid = flammable.Owner.Uid;
@@ -237,7 +237,7 @@ namespace Content.Server.Atmos.EntitySystems
continue;
}
var otherPhysics = ComponentManager.GetComponent<IPhysBody>(uid);
var otherPhysics = EntityManager.GetComponent<IPhysBody>(uid);
// TODO: Sloth, please save our souls!
if (!physics.GetWorldAABB().Intersects(otherPhysics.GetWorldAABB()))