If command not found, play game

This commit is contained in:
John Alanbrook 2024-04-26 17:06:43 -05:00
parent 5da74796d5
commit 32484ac4a0

View file

@ -455,8 +455,8 @@ function cmd_args(cmdargs)
if (cmds.length === 0) if (cmds.length === 0)
cmds[0] = "play"; cmds[0] = "play";
else if (!Cmdline.orders[cmds[0]]) { else if (!Cmdline.orders[cmds[0]]) {
console.warn(`Command ${cmds[0]} not found.`); cmds[0] = "play";
return; console.warn(`Command ${cmds[0]} not found. Playing instead.`);
} }
Cmdline.orders[cmds[0]](cmds.slice(1)); Cmdline.orders[cmds[0]](cmds.slice(1));