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:
Tayrtahn
2025-04-23 14:28:10 -04:00
committed by GitHub
parent a7b9694d10
commit 6d88dd910d
5 changed files with 92 additions and 47 deletions

View File

@@ -489,10 +489,10 @@ namespace Content.Server.Ghost
if (mind.Comp.TimeOfDeath.HasValue)
{
SetTimeOfDeath(ghost, mind.Comp.TimeOfDeath!.Value, ghostComponent);
SetTimeOfDeath((ghost, ghostComponent), mind.Comp.TimeOfDeath!.Value);
}
SetCanReturnToBody(ghostComponent, canReturn);
SetCanReturnToBody((ghost, ghostComponent), canReturn);
if (canReturn)
_minds.Visit(mind.Owner, ghost, mind.Comp);