Fix some Mind ECS bugs (#17480)

This commit is contained in:
Leon Friedrich
2023-06-20 16:29:26 +12:00
committed by GitHub
parent 41244b74aa
commit 9fc4fc6ac2
18 changed files with 767 additions and 248 deletions

View File

@@ -1,3 +1,4 @@
using Content.Server.Mind;
using Content.Server.Players;
using Robust.Server.Player;
using Robust.Shared.Console;
@@ -21,7 +22,9 @@ namespace Content.Server.GameTicking.Commands
}
var playerMgr = IoCManager.Resolve<IPlayerManager>();
var ticker = EntitySystem.Get<GameTicker>();
var sysMan = IoCManager.Resolve<EntitySystemManager>();
var ticker = sysMan.GetEntitySystem<GameTicker>();
var mind = sysMan.GetEntitySystem<MindSystem>();
NetUserId userId;
if (args.Length == 0)
@@ -48,7 +51,7 @@ namespace Content.Server.GameTicking.Commands
return;
}
data.ContentData()?.WipeMind();
mind.WipeMind(data.ContentData()?.Mind);
shell.WriteLine("Player is not currently online, but they will respawn if they come back online");
return;
}