Goes in-game now

This commit is contained in:
Vera Aguilera Puerto
2021-12-06 15:34:46 +01:00
parent af4eb3c7cd
commit c57b07a4d0
43 changed files with 129 additions and 130 deletions

View File

@@ -25,9 +25,15 @@ namespace Content.Server.Chat.Commands
return;
}
if (player.Status != SessionStatus.InGame || player.AttachedEntity == default)
if (player.Status != SessionStatus.InGame)
return;
if (player.AttachedEntity is not {} playerEntity)
{
shell.WriteLine("You don't have an entity!");
return;
}
if (args.Length < 1)
return;
@@ -38,12 +44,6 @@ namespace Content.Server.Chat.Commands
var chat = IoCManager.Resolve<IChatManager>();
var chatSanitizer = IoCManager.Resolve<IChatSanitizationManager>();
if (player.AttachedEntity is not {Valid: true} playerEntity)
{
shell.WriteLine("You don't have an entity!");
return;
}
if (IoCManager.Resolve<IEntityManager>().HasComponent<GhostComponent>(playerEntity))
chat.SendDeadChat(player, message);
else