ECS MindComponent (#5917)
This commit is contained in:
committed by
GitHub
parent
b0ee574c70
commit
675a29ed33
@@ -2,6 +2,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Server.GameTicking;
|
||||
using Content.Server.Ghost.Components;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.Players;
|
||||
using Content.Server.Visible;
|
||||
@@ -27,6 +28,7 @@ namespace Content.Server.Ghost
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly IPlayerManager _playerManager = default!;
|
||||
[Dependency] private readonly GameTicker _ticker = default!;
|
||||
[Dependency] private readonly MindSystem _mindSystem = default!;
|
||||
[Dependency] private readonly VisibilitySystem _visibilitySystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
@@ -185,7 +187,7 @@ namespace Content.Server.Ghost
|
||||
return;
|
||||
|
||||
if (EntityManager.TryGetComponent<MindComponent?>(uid, out var mind))
|
||||
mind.GhostOnShutdown = false;
|
||||
_mindSystem.SetGhostOnShutdown(uid, false, mind);
|
||||
EntityManager.DeleteEntity(uid);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user