ChatManager murder (#7337)

This commit is contained in:
mirrorcult
2022-03-30 22:21:58 -07:00
committed by GitHub
parent a11e8b676c
commit 70f0fffed2
16 changed files with 587 additions and 512 deletions

View File

@@ -31,8 +31,7 @@ namespace Content.Server.Chat.Commands
if (string.IsNullOrEmpty(message))
return;
var chat = IoCManager.Resolve<IChatManager>();
chat.SendAdminChat(player, message);
IoCManager.Resolve<IChatManager>().TrySendOOCMessage(player, message, OOCChatType.Admin);
}
}
}

View File

@@ -24,6 +24,9 @@ namespace Content.Server.Chat.Commands
return;
}
if (player.AttachedEntity is not { Valid: true } entity)
return;
if (player.Status != SessionStatus.InGame)
return;
@@ -34,7 +37,7 @@ namespace Content.Server.Chat.Commands
if (string.IsNullOrEmpty(message))
return;
IoCManager.Resolve<IChatManager>().SendLOOC(player, message);
EntitySystem.Get<ChatSystem>().TrySendInGameOOCMessage(entity, message, InGameOOCChatType.Looc, false, shell, player);
}
}
}

View File

@@ -40,7 +40,7 @@ namespace Content.Server.Chat.Commands
if (string.IsNullOrEmpty(message))
return;
IoCManager.Resolve<IChatManager>().TryEmote(playerEntity, message, shell, player);
EntitySystem.Get<ChatSystem>().TrySendInGameICMessage(playerEntity, message, InGameICChatType.Emote, false, shell, player);
}
}
}

View File

@@ -29,7 +29,7 @@ namespace Content.Server.Chat.Commands
if (string.IsNullOrEmpty(message))
return;
IoCManager.Resolve<IChatManager>().SendOOC(player, message);
IoCManager.Resolve<IChatManager>().TrySendOOCMessage(player, message, OOCChatType.OOC);
}
}
}

View File

@@ -38,7 +38,7 @@ namespace Content.Server.Chat.Commands
if (string.IsNullOrEmpty(message))
return;
IoCManager.Resolve<IChatManager>().TrySpeak(playerEntity, message, false, shell, player);
EntitySystem.Get<ChatSystem>().TrySendInGameICMessage(playerEntity, message, InGameICChatType.Speak, false, shell, player);
}
}
}

View File

@@ -38,7 +38,7 @@ namespace Content.Server.Chat.Commands
if (string.IsNullOrEmpty(message))
return;
IoCManager.Resolve<IChatManager>().TrySpeak(playerEntity, message, true, shell, player);
EntitySystem.Get<ChatSystem>().TrySendInGameICMessage(playerEntity, message, InGameICChatType.Whisper, false, shell, player);
}
}
}