mirror of
https://github.com/Burn-E99/TheArtificer.git
synced 2026-01-06 20:37:54 -05:00
add default param
This commit is contained in:
@ -41,7 +41,7 @@ export const runCmd = (fullCmd: string, modifiers: RollModifiers): SolvedRoll =>
|
|||||||
assertPrePostBalance(sepCmds);
|
assertPrePostBalance(sepCmds);
|
||||||
|
|
||||||
// Send the split roll into the command tokenizer to get raw response data
|
// Send the split roll into the command tokenizer to get raw response data
|
||||||
const [tempReturnData, tempCountDetails] = tokenizeCmd(sepCmds, modifiers, true, []);
|
const [tempReturnData, tempCountDetails] = tokenizeCmd(sepCmds, modifiers, true);
|
||||||
loggingEnabled && log(LT.LOG, `Return data is back ${JSON.stringify(tempReturnData)}`);
|
loggingEnabled && log(LT.LOG, `Return data is back ${JSON.stringify(tempReturnData)}`);
|
||||||
|
|
||||||
// Remove any floating spaces from fullCmd
|
// Remove any floating spaces from fullCmd
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import { loggingEnabled } from 'artigen/utils/logFlag.ts';
|
|||||||
import { getMatchingInternalIdx, getMatchingPostfixIdx } from 'artigen/utils/parenBalance.ts';
|
import { getMatchingInternalIdx, getMatchingPostfixIdx } from 'artigen/utils/parenBalance.ts';
|
||||||
|
|
||||||
// tokenizeCmd expects a string[] of items that are either config.prefix/config.postfix or some text that contains math and/or dice rolls
|
// tokenizeCmd expects a string[] of items that are either config.prefix/config.postfix or some text that contains math and/or dice rolls
|
||||||
export const tokenizeCmd = (cmd: string[], modifiers: RollModifiers, topLevel: boolean, previousResults: number[]): [ReturnData[], CountDetails[]] => {
|
export const tokenizeCmd = (cmd: string[], modifiers: RollModifiers, topLevel: boolean, previousResults: number[] = []): [ReturnData[], CountDetails[]] => {
|
||||||
loggingEnabled && log(LT.LOG, `Tokenizing command ${JSON.stringify(cmd)}`);
|
loggingEnabled && log(LT.LOG, `Tokenizing command ${JSON.stringify(cmd)}`);
|
||||||
|
|
||||||
const returnData: ReturnData[] = [];
|
const returnData: ReturnData[] = [];
|
||||||
|
|||||||
Reference in New Issue
Block a user