Ghost roles create new minds, better tracking of roles at round end screen (#5175)

* Ghost roles now get new Minds

* Some round start/end button stuff

* Mind tracking for better round end reports

* Make traitor kill objectives use mind CharacterName rather than actual occupied entity ("kill brain" prevention)

* Transition over to EntityUid for mind stuff because that's the only way to do it

* BrainSystem fix for PR rebase
This commit is contained in:
20kdc
2021-11-15 18:14:34 +00:00
committed by GitHub
parent c3a7548545
commit 4cce40bd9f
26 changed files with 229 additions and 68 deletions

View File

@@ -27,13 +27,10 @@ namespace Content.Server.Ghost.Roles.Components
if (mind.HasMind)
return false;
var sessionMind = session.ContentData()?.Mind;
var ghostRoleSystem = EntitySystem.Get<GhostRoleSystem>();
ghostRoleSystem.GhostRoleInternalCreateMindAndTransfer(session, OwnerUid, OwnerUid, this);
DebugTools.AssertNotNull(sessionMind);
sessionMind!.TransferTo(Owner);
EntitySystem.Get<GhostRoleSystem>().UnregisterGhostRole(this);
ghostRoleSystem.UnregisterGhostRole(this);
return true;
}