Improves MindComponent's description. Force ghost without body return when commiting suicide.

This commit is contained in:
Víctor Aguilera Puerto
2020-08-16 17:08:27 +02:00
parent d58d84096b
commit 83567c1bd9
3 changed files with 11 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ namespace Content.Server.Observer
public string Command => "ghost";
public string Description => "Give up on life and become a ghost.";
public string Help => "ghost";
public bool CanReturn { get; set; } = true;
public void Execute(IConsoleShell shell, IPlayerSession player, string[] args)
{
@@ -27,7 +28,7 @@ namespace Content.Server.Observer
}
var mind = player.ContentData().Mind;
var canReturn = player.AttachedEntity != null;
var canReturn = player.AttachedEntity != null && CanReturn;
var name = player.AttachedEntity?.Name ?? player.Name;
if (player.AttachedEntity != null && player.AttachedEntity.HasComponent<GhostComponent>())