Goes in-game now
This commit is contained in:
@@ -24,7 +24,7 @@ namespace Content.Server.Chat.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.Status != SessionStatus.InGame || player.AttachedEntity == default)
|
||||
if (player.Status != SessionStatus.InGame || player.AttachedEntity == null)
|
||||
return;
|
||||
|
||||
if (args.Length < 1)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -306,7 +306,7 @@ namespace Content.Server.Chat.Managers
|
||||
msg.MessageWrap = Loc.GetString("chat-manager-send-dead-chat-wrap-message",
|
||||
("deadChannelName", Loc.GetString("chat-manager-dead-channel-name")),
|
||||
("playerName", (playerName)));
|
||||
msg.SenderEntity = player.AttachedEntity;
|
||||
msg.SenderEntity = player.AttachedEntity.GetValueOrDefault();
|
||||
_netManager.ServerSendToMany(msg, clients.ToList());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user