mirror of
https://github.com/Burn-E99/TheArtificer.git
synced 2026-01-06 20:37:54 -05:00
rename entry to artigen.runCmd instead of parser
This commit is contained in:
@ -11,9 +11,9 @@ import { assertPrePostBalance } from 'artigen/utils/parenBalance.ts';
|
||||
import { compareTotalRolls, compareTotalRollsReverse } from 'artigen/utils/sortFuncs.ts';
|
||||
import { translateError } from 'artigen/utils/translateError.ts';
|
||||
|
||||
// parseRoll(fullCmd, modifiers)
|
||||
// parseRoll handles converting fullCmd into a computer readable format for processing, and finally executes the solving
|
||||
export const parseRoll = (fullCmd: string, modifiers: RollModifiers): SolvedRoll => {
|
||||
// runCmd(fullCmd, modifiers)
|
||||
// runCmd handles converting fullCmd into a computer readable format for processing, and finally executes the solving
|
||||
export const runCmd = (fullCmd: string, modifiers: RollModifiers): SolvedRoll => {
|
||||
const returnMsg: SolvedRoll = {
|
||||
error: false,
|
||||
errorCode: '',
|
||||
@ -1,6 +1,6 @@
|
||||
import { closeLog, initLog } from '@Log4Deno';
|
||||
|
||||
import { parseRoll } from 'artigen/parser.ts';
|
||||
import { runCmd } from 'artigen/artigen.ts';
|
||||
import { loggingEnabled } from 'artigen/utils/logFlag.ts';
|
||||
|
||||
loggingEnabled && initLog('logs/worker', loggingEnabled);
|
||||
@ -11,7 +11,7 @@ self.postMessage('ready');
|
||||
// Handle the roll
|
||||
self.onmessage = async (e) => {
|
||||
const payload = e.data;
|
||||
const returnMsg = parseRoll(payload.rollCmd, payload.modifiers) || {
|
||||
const returnMsg = runCmd(payload.rollCmd, payload.modifiers) || {
|
||||
error: true,
|
||||
errorCode: 'EmptyMessage',
|
||||
errorMsg: 'Error: Empty message',
|
||||
|
||||
Reference in New Issue
Block a user