Modernize GhostComponent & Ghost API (#36858)
* Move CanReturnToBody to system * Move CanGhostInteract to system * Cleanup redundant datafields and viewvariables * Document datafields * Document component * Add SetTimeOfDeath Entity<T> overload, obsolete old version * Document public methods * Cleanup obsoleted method calls
This commit is contained in:
@@ -62,7 +62,7 @@ public sealed class MindSystem : SharedMindSystem
|
||||
{
|
||||
TransferTo(mindId, visiting, mind: mind);
|
||||
if (TryComp(visiting, out GhostComponent? ghostComp))
|
||||
_ghosts.SetCanReturnToBody(ghostComp, false);
|
||||
_ghosts.SetCanReturnToBody((visiting, ghostComp), false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ public sealed class MindSystem : SharedMindSystem
|
||||
entity = Spawn(GameTicker.ObserverPrototypeName, position);
|
||||
component = EnsureComp<MindContainerComponent>(entity.Value);
|
||||
var ghostComponent = Comp<GhostComponent>(entity.Value);
|
||||
_ghosts.SetCanReturnToBody(ghostComponent, false);
|
||||
_ghosts.SetCanReturnToBody((entity.Value, ghostComponent), false);
|
||||
}
|
||||
|
||||
var oldEntity = mind.OwnedEntity;
|
||||
|
||||
Reference in New Issue
Block a user