Removed EntityManager member variable from Components and EntitySystems (#2502)

* Removed EntityManager member variable from Components and EntitySystems

* Removed EntityManager with minor corecctions

* Update PathfindingSystem.cs

* Update InteractionSystem.cs

* Update Content.Server/GameObjects/EntitySystems/Click/ExamineSystem.cs

Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>

* Update Content.Client/GameObjects/Components/Suspicion/SuspicionRoleComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Client/GameObjects/Components/Suspicion/TraitorOverlay.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/PDA/PDAComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/Singularity/SingularityComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/Singularity/SingularityComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/EntitySystems/AI/Pathfinding/PathfindingSystem.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/EntitySystems/Click/ExamineSystem.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

* Update Content.Server/GameObjects/Components/Stack/StackComponent.cs

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
Co-authored-by: Clyybber <darkmine956@gmail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
This commit is contained in:
ColdAutumnRain
2020-11-18 15:45:53 +01:00
committed by GitHub
parent 87e74c4494
commit f5dc62b533
42 changed files with 66 additions and 118 deletions

View File

@@ -17,8 +17,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
[RegisterComponent]
public class CursedEntityStorageComponent : EntityStorageComponent
{
[Dependency] private IEntityManager _entityManager = default!;
[Dependency] private IRobustRandom _robustRandom = default!;
[Dependency] private IRobustRandom _robustRandom = default!;
public override string Name => "CursedEntityStorage";
@@ -29,7 +28,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
// No contents, we do nothing
if (Contents.ContainedEntities.Count == 0) return;
var lockers = _entityManager.GetEntities(new TypeEntityQuery(typeof(EntityStorageComponent))).ToList();
var lockers = Owner.EntityManager.GetEntities(new TypeEntityQuery(typeof(EntityStorageComponent))).ToList();
if (lockers.Contains(Owner))
lockers.Remove(Owner);