Skip to content

Commit

Permalink
(Experimental) random command improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 10, 2017
1 parent ad4eaab commit 7a3eb84
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Expand Up @@ -2927,7 +2927,7 @@ public void registerCoreMembers() {
// - narrate "It is a nice day."
// -->
registerCoreMember(RandomCommand.class,
"RANDOM", "random [<#>/<commands>]", 1);
"RANDOM", "random [<#>/<commands>]", 0);


// <--[command]
Expand Down
Expand Up @@ -19,10 +19,15 @@ public class RandomCommand extends BracedCommand {
@Override
public void parseArgs(ScriptEntry scriptEntry) throws InvalidArgumentsException {

List<BracedData> bdat = getBracedCommands(scriptEntry);

if (bdat != null && bdat.size() > 0) {
scriptEntry.addObject("braces", bdat);
}

for (aH.Argument arg : aH.interpret(scriptEntry.getArguments())) {

if (arg.matches("{")) {
scriptEntry.addObject("braces", getBracedCommands(scriptEntry));
break;
}

Expand Down

0 comments on commit 7a3eb84

Please sign in to comment.