feat(chat): route retail lifestone commands
Separate retail client actions, ACE server commands, and ordinary chat at the shared router. Port lifestone/lif/ls from the named retail registry through a typed App controller to game action 0x0063, keep unknown verbs on ACE Talk, and cover both UI backends plus exact outbound bytes. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
5090aa7217
commit
5a45a7ac7f
19 changed files with 604 additions and 78 deletions
|
|
@ -0,0 +1,38 @@
|
|||
using AcDream.UI.Abstractions;
|
||||
using AcDream.UI.Abstractions.Panels.Chat;
|
||||
|
||||
namespace AcDream.UI.Abstractions.Tests.Panels.Chat;
|
||||
|
||||
public sealed class RetailClientCommandCatalogTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData("/lifestone")]
|
||||
[InlineData("@lifestone")]
|
||||
[InlineData("/lif")]
|
||||
[InlineData("@LIF")]
|
||||
[InlineData("/ls")]
|
||||
[InlineData("@LS")]
|
||||
public void RetailAliases_ResolveCaseInsensitively(string input)
|
||||
{
|
||||
Assert.True(RetailClientCommandCatalog.TryMatch(input, out var match));
|
||||
Assert.Equal(ClientCommandId.LifestoneRecall, match.Command);
|
||||
Assert.True(match.HasValidArguments);
|
||||
Assert.Empty(match.Arguments);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LifestoneArgument_IsRecognizedButInvalid()
|
||||
{
|
||||
Assert.True(RetailClientCommandCatalog.TryMatch("/ls now", out var match));
|
||||
Assert.Equal("now", match.Arguments);
|
||||
Assert.False(match.HasValidArguments);
|
||||
Assert.Equal("/lifestone", match.Usage);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("/ci 629")]
|
||||
[InlineData("@acehelp")]
|
||||
[InlineData("ordinary speech")]
|
||||
public void NonClientCommands_DoNotMatch(string input)
|
||||
=> Assert.False(RetailClientCommandCatalog.TryMatch(input, out _));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue