Mind fix (#13105)
This commit is contained in:
@@ -27,11 +27,11 @@ namespace Content.Server.Mind
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
public sealed class 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 IPlayerManager _playerManager = default!;
|
||||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||||
[Dependency] private readonly GameTicker _gameTickerSystem = default!;
|
|
||||||
[Dependency] private readonly MindSystem _mindSystem = default!;
|
|
||||||
|
|
||||||
private readonly ISet<Role> _roles = new HashSet<Role>();
|
private readonly ISet<Role> _roles = new HashSet<Role>();
|
||||||
|
|
||||||
@@ -49,6 +49,9 @@ namespace Content.Server.Mind
|
|||||||
{
|
{
|
||||||
OriginalOwnerUserId = userId;
|
OriginalOwnerUserId = userId;
|
||||||
IoCManager.InjectDependencies(this);
|
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.
|
// TODO: This session should be able to be changed, probably.
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ namespace Content.Server.Suspicion
|
|||||||
public sealed class SuspicionRoleComponent : SharedSuspicionRoleComponent
|
public sealed class SuspicionRoleComponent : SharedSuspicionRoleComponent
|
||||||
{
|
{
|
||||||
[Dependency] private readonly IEntityManager _entMan = default!;
|
[Dependency] private readonly IEntityManager _entMan = default!;
|
||||||
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
|
|
||||||
|
|
||||||
private Role? _role;
|
private Role? _role;
|
||||||
[ViewVariables]
|
[ViewVariables]
|
||||||
@@ -54,7 +53,7 @@ namespace Content.Server.Suspicion
|
|||||||
public bool IsDead()
|
public bool IsDead()
|
||||||
{
|
{
|
||||||
return _entMan.TryGetComponent(Owner, out MobStateComponent? state) &&
|
return _entMan.TryGetComponent(Owner, out MobStateComponent? state) &&
|
||||||
_mobStateSystem.IsDead(Owner, state);
|
_entMan.EntitySysManager.GetEntitySystem<MobStateSystem>().IsDead(Owner, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsInnocent()
|
public bool IsInnocent()
|
||||||
|
|||||||
Reference in New Issue
Block a user