From 5d1294acd2c83b256b14c4a1aedf50be5db5af3c Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Tue, 5 Jul 2022 16:13:02 +0700 Subject: [PATCH] Add command group support --- sources/Commands/ACommandDB.uc | 3 ++- sources/Commands/ACommandDosh.uc | 3 ++- sources/Commands/ACommandFeature.uc | 3 ++- sources/Commands/ACommandInventory.uc | 2 +- sources/Commands/ACommandNick.uc | 3 ++- sources/Commands/ACommandTrader.uc | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sources/Commands/ACommandDB.uc b/sources/Commands/ACommandDB.uc index 4711a30..19629ad 100644 --- a/sources/Commands/ACommandDB.uc +++ b/sources/Commands/ACommandDB.uc @@ -76,7 +76,8 @@ var protected const int TDB_CANNOT_BE_CREATED, TNO_DEFAULT_COMMAND, TBAD_DBLINK; protected function BuildData(CommandDataBuilder builder) { - builder.Name(P("db")).Summary(P("Read and edit data in your databases." + builder.Name(P("db")).Group(P("admin")) + .Summary(P("Read and edit data in your databases." @ "Databases' values are addressed with links:" @ "\":\"")); builder.SubCommand(T(TCREATE)) diff --git a/sources/Commands/ACommandDosh.uc b/sources/Commands/ACommandDosh.uc index 255761d..cc6a059 100644 --- a/sources/Commands/ACommandDosh.uc +++ b/sources/Commands/ACommandDosh.uc @@ -29,7 +29,8 @@ protected function Finalizer() protected function BuildData(CommandDataBuilder builder) { - builder.Name(P("dosh")).Summary(P("Changes amount of money.")); + builder.Name(P("dosh")).Group(P("gameplay")) + .Summary(P("Changes amount of money.")); builder.RequireTarget(); builder.ParamInteger(P("amount")) .Describe(P("Gives (or takes if negative) players a specified " diff --git a/sources/Commands/ACommandFeature.uc b/sources/Commands/ACommandFeature.uc index 0cac2e8..6448aa6 100644 --- a/sources/Commands/ACommandFeature.uc +++ b/sources/Commands/ACommandFeature.uc @@ -32,7 +32,8 @@ protected function Finalizer() protected function BuildData(CommandDataBuilder builder) { - builder.Name(P("feature")).Summary(P("Managing features.")) + builder.Name(P("feature")).Group(P("admin")) + .Summary(P("Managing features.")) .Describe(P("Command for displaying and enabling/disabling features.")); builder.SubCommand(P("enable")) .ParamText(P("feature")) diff --git a/sources/Commands/ACommandInventory.uc b/sources/Commands/ACommandInventory.uc index 04d75d4..f279d09 100644 --- a/sources/Commands/ACommandInventory.uc +++ b/sources/Commands/ACommandInventory.uc @@ -34,7 +34,7 @@ var protected const int TLISTS_SKIPPED; protected function BuildData(CommandDataBuilder builder) { - builder.Name(T(TINVENTORY)) + builder.Name(T(TINVENTORY)).Group(P("gameplay")) .Summary(P("Manages player's inventory.")) .Describe(P("Command for displaying and editing players' inventories." @ "If called without specifying subcommand - simply displays" diff --git a/sources/Commands/ACommandNick.uc b/sources/Commands/ACommandNick.uc index 853a80a..6f9d999 100644 --- a/sources/Commands/ACommandNick.uc +++ b/sources/Commands/ACommandNick.uc @@ -34,7 +34,8 @@ protected function Finalizer() protected function BuildData(CommandDataBuilder builder) { - builder.Name(P("nick")).Summary(P("Changes nickname.")); + builder.Name(P("nick")).Group(P("gameplay")) + .Summary(P("Changes nickname.")); builder.RequireTarget(); builder.ParamRemainder(P("nick")) .Describe(P("Changes nickname of targeted players to .")); diff --git a/sources/Commands/ACommandTrader.uc b/sources/Commands/ACommandTrader.uc index d0a7088..f0ab5de 100644 --- a/sources/Commands/ACommandTrader.uc +++ b/sources/Commands/ACommandTrader.uc @@ -38,7 +38,7 @@ protected function Finalizer() protected function BuildData(CommandDataBuilder builder) { - builder.Name(T(TTRADER)) + builder.Name(T(TTRADER)).Group(P("gameplay")) .Summary(P("Manages trader time and available traders.")) .Describe(P("Enables of disables trading.")) .ParamBoolean(T(TENABLE));