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
|
|
@ -20,6 +20,81 @@ public sealed class RetailClientCommandCatalogTests
|
|||
Assert.Empty(match.Arguments);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("/marketplace", ClientCommandId.MarketplaceRecall)]
|
||||
[InlineData("@MAR", ClientCommandId.MarketplaceRecall)]
|
||||
[InlineData("/mp", ClientCommandId.MarketplaceRecall)]
|
||||
[InlineData("/pkarena", ClientCommandId.PkArenaRecall)]
|
||||
[InlineData("/pka", ClientCommandId.PkArenaRecall)]
|
||||
[InlineData("/pklarena", ClientCommandId.PkLiteArenaRecall)]
|
||||
[InlineData("/pla", ClientCommandId.PkLiteArenaRecall)]
|
||||
[InlineData("/hor", ClientCommandId.HouseRecall)]
|
||||
[InlineData("/hr", ClientCommandId.HouseRecall)]
|
||||
[InlineData("/hom", ClientCommandId.MansionRecall)]
|
||||
[InlineData("/hoa", ClientCommandId.MansionRecall)]
|
||||
[InlineData("/age", ClientCommandId.QueryAge)]
|
||||
[InlineData("/birth", ClientCommandId.QueryBirth)]
|
||||
[InlineData("/framerate", ClientCommandId.ToggleFrameRate)]
|
||||
[InlineData("/lockui", ClientCommandId.ToggleUiLock)]
|
||||
[InlineData("/version", ClientCommandId.ShowVersion)]
|
||||
[InlineData("/loc", ClientCommandId.ShowLocation)]
|
||||
[InlineData("/corpse", ClientCommandId.ShowLastCorpseLocation)]
|
||||
[InlineData("/cor", ClientCommandId.ShowLastCorpseLocation)]
|
||||
public void AdditionalRetailAliases_Resolve(string input, ClientCommandId expected)
|
||||
{
|
||||
Assert.True(RetailClientCommandCatalog.TryMatch(input, out var match));
|
||||
Assert.Equal(expected, match.Command);
|
||||
Assert.True(match.HasValidArguments);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("/clear all", ClientCommandId.ClearChat)]
|
||||
[InlineData("/saveui hunt", ClientCommandId.SaveUi)]
|
||||
[InlineData("/loadui hunt", ClientCommandId.LoadUi)]
|
||||
[InlineData("/saveautoui", ClientCommandId.SaveAutoUi)]
|
||||
[InlineData("/loadautoui", ClientCommandId.LoadAutoUi)]
|
||||
[InlineData("/afk msg lunch", ClientCommandId.Away)]
|
||||
[InlineData("/consent who", ClientCommandId.Consent)]
|
||||
[InlineData("/e waves", ClientCommandId.Emote)]
|
||||
[InlineData("/em waves", ClientCommandId.Emote)]
|
||||
[InlineData("/emote waves", ClientCommandId.Emote)]
|
||||
[InlineData("/me waves", ClientCommandId.Emote)]
|
||||
[InlineData("/emotes", ClientCommandId.ListEmotes)]
|
||||
[InlineData("/friends online", ClientCommandId.Friends)]
|
||||
[InlineData("/friends_add Alice", ClientCommandId.FriendsAdd)]
|
||||
[InlineData("/friends_remove Alice", ClientCommandId.FriendsRemove)]
|
||||
[InlineData("/squelch -tell Alice", ClientCommandId.Squelch)]
|
||||
[InlineData("/unsquelch Alice", ClientCommandId.Unsquelch)]
|
||||
[InlineData("/filter -combat", ClientCommandId.Filter)]
|
||||
[InlineData("/unfilter -combat", ClientCommandId.Unfilter)]
|
||||
[InlineData("/messagetypes", ClientCommandId.ListMessageTypes)]
|
||||
[InlineData("/fillcomps scarabs 500", ClientCommandId.FillComponents)]
|
||||
public void CommandFamilies_ResolveToTypedClientCommands(
|
||||
string input, ClientCommandId expected)
|
||||
{
|
||||
Assert.True(RetailClientCommandCatalog.TryMatch(input, out var match));
|
||||
Assert.Equal(expected, match.Command);
|
||||
Assert.True(match.HasValidArguments);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("/house recall", ClientCommandId.HouseRecall)]
|
||||
[InlineData("@house mansion_recall", ClientCommandId.MansionRecall)]
|
||||
[InlineData("/house alleg_recall", ClientCommandId.MansionRecall)]
|
||||
public void HouseRecallSubcommands_Resolve(string input, ClientCommandId expected)
|
||||
{
|
||||
Assert.True(RetailClientCommandCatalog.TryMatch(input, out var match));
|
||||
Assert.Equal(expected, match.Command);
|
||||
Assert.True(match.HasValidArguments);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void UnsupportedHouseSubcommand_RemainsClientOwnedAndShowsUsage()
|
||||
{
|
||||
Assert.True(RetailClientCommandCatalog.TryMatch("/house nope", out var match));
|
||||
Assert.False(match.HasValidArguments);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LifestoneArgument_IsRecognizedButInvalid()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue