From f49937c93573f8e36b7dec96a3c646a89e70d8c9 Mon Sep 17 00:00:00 2001 From: Peter Cottle Date: Sat, 9 Mar 2013 19:26:22 -0800 Subject: [PATCH] ok awesome third levle --- src/js/intl/strings.js | 5 +++++ src/js/level/sandboxCommands.js | 13 +++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/js/intl/strings.js b/src/js/intl/strings.js index e489e448..f67680e6 100644 --- a/src/js/intl/strings.js +++ b/src/js/intl/strings.js @@ -244,6 +244,11 @@ exports.strings = { 'zh_CN': '语言重置为默认的 {locale}' }, /////////////////////////////////////////////////////////////////////////// + 'show-command': { + '__desc__': 'command output from "show"', + 'en_US': 'Please one of the following commands for more info:' + }, + /////////////////////////////////////////////////////////////////////////// 'cd-command': { '__desc__': 'dummy command output for the command in the key', 'en_US': 'Directory changed to "/directories/dont/matter/in/this/demo"', diff --git a/src/js/level/sandboxCommands.js b/src/js/level/sandboxCommands.js index a84343d4..8e000a13 100644 --- a/src/js/level/sandboxCommands.js +++ b/src/js/level/sandboxCommands.js @@ -32,6 +32,19 @@ var instantCommands = [ ) }); }], + [/^show$/, function(bits) { + + lines = [ + intl.str('show-command'), + 'show commands', + 'show solution', + 'show goal' + ]; + + throw new CommandResult({ + msg: lines.join('\n') + }); + }], [/^locale (\w+)$/, function(bits) { constants.GLOBAL.locale = bits[1];