mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-01-03 11:57:34 +01:00
terminal parses boolean exactly.
This commit is contained in:
parent
13b08d7cc8
commit
0b92f706ad
@ -99,6 +99,7 @@ export function ParseCommand(command: string): (string | number | boolean)[] {
|
||||
const arg = command.substr(start, i - start);
|
||||
|
||||
// If this is a number, convert it from a string to number
|
||||
console.log(arg);
|
||||
if (isNumber(arg)) {
|
||||
args.push(parseFloat(arg));
|
||||
} else if (arg === "true") {
|
||||
@ -119,8 +120,13 @@ export function ParseCommand(command: string): (string | number | boolean)[] {
|
||||
const arg = command.substr(start, i - start);
|
||||
|
||||
// If this is a number, convert it from string to number
|
||||
console.log(arg);
|
||||
if (isNumber(arg)) {
|
||||
args.push(parseFloat(arg));
|
||||
} else if (arg === "true") {
|
||||
args.push(true);
|
||||
} else if (arg === "false") {
|
||||
args.push(false);
|
||||
} else {
|
||||
args.push(arg);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user