Add ability to prevent ghosting (#12906)
* add ability to prevent ghosting to MindComponent.cs * make minds preserve properties in certain transfer scenarios * Revert "make minds preserve properties in certain transfer scenarios" This reverts commit 333cae0db0faf4ef81767b93332271d944c90a0e. * move PreventGhosting to the actual mind
This commit is contained in:
@@ -156,6 +156,14 @@ namespace Content.Server.GameTicking
|
||||
if (handleEv.Handled)
|
||||
return handleEv.Result;
|
||||
|
||||
if (mind.PreventGhosting)
|
||||
{
|
||||
if (mind.Session != null)
|
||||
// Logging is suppressed to prevent spam from ghost attempts caused by movement attempts
|
||||
_chatManager.DispatchServerMessage(mind.Session, Loc.GetString("comp-mind-ghosting-prevented"), true);
|
||||
return false;
|
||||
}
|
||||
|
||||
var playerEntity = mind.CurrentEntity;
|
||||
|
||||
var entities = IoCManager.Resolve<IEntityManager>();
|
||||
|
||||
Reference in New Issue
Block a user