[command] Add ignoringDisable decorator (#4305)

This commit is contained in:
Starlight220
2022-06-24 20:52:53 +03:00
committed by GitHub
parent aa221597bc
commit fe3c24b1ee
8 changed files with 286 additions and 0 deletions

View File

@@ -229,6 +229,14 @@ class Command {
*/
virtual ConditionalCommand Unless(std::function<bool()> condition) &&;
/**
* Decorates this command to run or stop when disabled.
*
* @param doesRunWhenDisabled true to run when disabled.
* @return the decorated command
*/
virtual std::unique_ptr<Command> IgnoringDisable(bool doesRunWhenDisabled) &&;
/**
* Schedules this command.
*