feat(chat): port retail client command families
Expand the typed client-command boundary across travel, character queries, local UI and layout controls, AFK and consent, emotes, friends, squelch and filters, and fill-components. Preserve retail packet layouts and queue ownership, import the confirmation dialog, and keep authoritative social state in Core. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
5a45a7ac7f
commit
9ea579bdd0
47 changed files with 6659 additions and 99 deletions
|
|
@ -70,7 +70,7 @@ public sealed class ChatPanelInputTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void Submit_FramerateCommand_PrintsFpsAndDoesNotPublish()
|
||||
public void Submit_FramerateCommand_PublishesTypedClientCommand()
|
||||
{
|
||||
var log = new ChatLog();
|
||||
var vm = new ChatVM(log) { FpsProvider = () => 60f };
|
||||
|
|
@ -84,13 +84,13 @@ public sealed class ChatPanelInputTests
|
|||
|
||||
panel.Render(new PanelContext(0.016f, bus), renderer);
|
||||
|
||||
Assert.Empty(bus.Published);
|
||||
var entry = Assert.Single(log.Snapshot());
|
||||
Assert.Contains("60.0 FPS", entry.Text);
|
||||
var command = Assert.IsType<ExecuteClientCommandCmd>(Assert.Single(bus.Published));
|
||||
Assert.Equal(ClientCommandId.ToggleFrameRate, command.Command);
|
||||
Assert.Empty(log.Snapshot());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Submit_LocCommand_PrintsPositionAndDoesNotPublish()
|
||||
public void Submit_LocCommand_PublishesTypedClientCommand()
|
||||
{
|
||||
var log = new ChatLog();
|
||||
var vm = new ChatVM(log)
|
||||
|
|
@ -107,14 +107,13 @@ public sealed class ChatPanelInputTests
|
|||
|
||||
panel.Render(new PanelContext(0.016f, bus), renderer);
|
||||
|
||||
Assert.Empty(bus.Published);
|
||||
var entry = Assert.Single(log.Snapshot());
|
||||
Assert.Contains("(10.0, 20.0, 30.0)", entry.Text);
|
||||
var command = Assert.IsType<ExecuteClientCommandCmd>(Assert.Single(bus.Published));
|
||||
Assert.Equal(ClientCommandId.ShowLocation, command.Command);
|
||||
Assert.Empty(log.Snapshot());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("/foo", "@foo")]
|
||||
[InlineData("/mp /tools/script.py", "@mp /tools/script.py")]
|
||||
[InlineData("/genio public", "@genio public")]
|
||||
public void Submit_UnknownSlashCommand_RoutesToExplicitServerCommand(string raw, string expectedText)
|
||||
{
|
||||
|
|
@ -213,7 +212,7 @@ public sealed class ChatPanelInputTests
|
|||
}
|
||||
|
||||
[Fact]
|
||||
public void Submit_ClearCommand_DrainsLog_AndDoesNotPublish()
|
||||
public void Submit_ClearCommand_PublishesTypedClientCommand()
|
||||
{
|
||||
var log = new ChatLog();
|
||||
log.OnSystemMessage("seed line", chatType: 0);
|
||||
|
|
@ -228,8 +227,9 @@ public sealed class ChatPanelInputTests
|
|||
|
||||
panel.Render(new PanelContext(0.016f, bus), renderer);
|
||||
|
||||
Assert.Empty(bus.Published);
|
||||
Assert.Empty(log.Snapshot());
|
||||
var command = Assert.IsType<ExecuteClientCommandCmd>(Assert.Single(bus.Published));
|
||||
Assert.Equal(ClientCommandId.ClearChat, command.Command);
|
||||
Assert.Single(log.Snapshot());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue