- changed status to open
Command Groups
Add a system to Quantum Console that allows commands to be declared as part of a group. These groups can then be manipulated at runtime (hidden, disabled etc) and can also be exposed for other usages (such as “all-commands-in-group“)
Original request
Feature request
#1: I would like the ability to dynamically enable and disable commands. The way I would envision this working is that you can add an attribute to a command, or a whole static class containing commands, called something like CommandGroup("Advanced"). That will assign a group name to the commands which will be used later.Then on QuantumConsoleProcessor you add a method like EnableCommandGroup("Advanced", false) which will take all commands in the specified group and enable/disable them. This will rebuild the command table so that the specified commands are prevented from running, and also don't display for help, it is like they don't exist. This can be used to eliminate commands that don't apply to the current context (e.g. don't work in the current game mode), and also to enable/disable debug/developer commands.
Feature request
#2: I would like to be able to hide commands. Add another method to QuantumConsoleProcessor, HideCommandGroup("Unlock", true) which simply prevents the command from showing in auto-complete and the help. You can still execute the command though. You can use this to add secret commands for debugging, and also combining it with#1, to unlock a group of commands e.g. make a command called "unlock" that you can call with "unlock debug" and it unlocks those commands - you could also give it a password or whatever.
Comments (6)
-
reporter -
reporter -
assigned issue to
-
assigned issue to
-
reporter Design Ideas
Usage
There will be a
[CommandGroup]
attribute that can be applied to individual methods or to entire classes.This will allow you to add individual commands or entire groups of commands to a CommandGroup easily
Note: if multiple
[Command]
s are on the same method, they will be locked into the same groups. A dummy method could be used to avoid this. Perhaps there is a better design refinement to allow for thisImplementation
There will be methods available to the QuantumConsoleProcessor that allow for setting the visibility and activity of a group. The GetCommands method will be modified to take a
CommandHideState
flag enum: this will containShowDisabled
ShowHidden
The suggestions system therefore will not enable either of these flags, whereas the internal command parser will enable the ShowHidden flag, enabling hidden but disabled commands to be invoked
Current Issues
If a command is under two groups, and one of those groups is hidden but the other is visible, will this command be classed as visible or hidden (i.e union vs intersection)
-
reporter - marked as major
-
reporter - changed status to resolved
Completed for V2.4.1 No hover state yet
-
reporter - changed status to open
Re-opening as I resolved the wrong issue
- Log in to comment
Development has begun, ETA V2.3.0