diff --git a/Content.Server/Mind/Mind.cs b/Content.Server/Mind/Mind.cs index 5e3cf282f9..c0ae7e8b5b 100644 --- a/Content.Server/Mind/Mind.cs +++ b/Content.Server/Mind/Mind.cs @@ -27,11 +27,11 @@ namespace Content.Server.Mind /// public sealed class Mind { - [Dependency] private readonly MobStateSystem _mobStateSystem = default!; + private readonly MobStateSystem _mobStateSystem = default!; + private readonly GameTicker _gameTickerSystem = default!; + private readonly MindSystem _mindSystem = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IEntityManager _entityManager = default!; - [Dependency] private readonly GameTicker _gameTickerSystem = default!; - [Dependency] private readonly MindSystem _mindSystem = default!; private readonly ISet _roles = new HashSet(); @@ -49,6 +49,9 @@ namespace Content.Server.Mind { OriginalOwnerUserId = userId; IoCManager.InjectDependencies(this); + _entityManager.EntitySysManager.Resolve(ref _mobStateSystem); + _entityManager.EntitySysManager.Resolve(ref _gameTickerSystem); + _entityManager.EntitySysManager.Resolve(ref _mindSystem); } // TODO: This session should be able to be changed, probably. diff --git a/Content.Server/Suspicion/SuspicionRoleComponent.cs b/Content.Server/Suspicion/SuspicionRoleComponent.cs index 85e781a30f..db22d76366 100644 --- a/Content.Server/Suspicion/SuspicionRoleComponent.cs +++ b/Content.Server/Suspicion/SuspicionRoleComponent.cs @@ -13,7 +13,6 @@ namespace Content.Server.Suspicion public sealed class SuspicionRoleComponent : SharedSuspicionRoleComponent { [Dependency] private readonly IEntityManager _entMan = default!; - [Dependency] private readonly MobStateSystem _mobStateSystem = default!; private Role? _role; [ViewVariables] @@ -54,7 +53,7 @@ namespace Content.Server.Suspicion public bool IsDead() { return _entMan.TryGetComponent(Owner, out MobStateComponent? state) && - _mobStateSystem.IsDead(Owner, state); + _entMan.EntitySysManager.GetEntitySystem().IsDead(Owner, state); } public bool IsInnocent()