Browse Source

Add command group support

feature_improvement
Anton Tarasenko 2 years ago
parent
commit
5d1294acd2
  1. 3
      sources/Commands/ACommandDB.uc
  2. 3
      sources/Commands/ACommandDosh.uc
  3. 3
      sources/Commands/ACommandFeature.uc
  4. 2
      sources/Commands/ACommandInventory.uc
  5. 3
      sources/Commands/ACommandNick.uc
  6. 2
      sources/Commands/ACommandTrader.uc

3
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:"
@ "\"<db_name>:<json_path>\""));
builder.SubCommand(T(TCREATE))

3
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 <amount>"

3
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"))

2
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"

3
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 <nick>."));

2
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));

Loading…
Cancel
Save