diff --git a/src/event.js b/src/event.js index 71276f0..46e6270 100644 --- a/src/event.js +++ b/src/event.js @@ -17,7 +17,6 @@ function isValid(event) { if(!type) { - console.trace(); console.log(event); throw `This event type is not allowed '${event.type}'\nAllowed events: ${EVENT_TYPES.values()}\n`; } @@ -26,13 +25,11 @@ function isValid(event) { const eval_size = Array.isArray(event.end_values) ? event.start_values.length : 1; if(sval_size != type) { - console.trace(); console.log(event); throw `Start value(s) given for the event of type '${event.type}' are not valid\n given: ${sval_size} -> required: ${type}\n`; } if(event.end_values && eval_size != type) { - console.trace(); throw `End value(s) given for the event of type '${event.type}' are not valid\n given: ${eval_size} -> required: ${type}\n`; } diff --git a/src/storyboard.js b/src/storyboard.js index 9fd7d98..83570a6 100644 --- a/src/storyboard.js +++ b/src/storyboard.js @@ -52,10 +52,10 @@ class Storyboard { return storyboard; } - write(file_path) { + write(file_path, quiet) { fs.writeFile(file_path, this.toString(), e => { if(e) throw e; - console.log('Successfuly generated storyboard!'); + if(!quiet) console.log('Successfuly generated storyboard!'); }); } } diff --git a/types/types.d.ts b/types/types.d.ts index 0eedc61..4ea3f72 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -3,7 +3,7 @@ declare module "dotosb" { private layers: Map>; createSprite(path: string, options?: Partial): Sprite; - write(file_path: string): void; + write(file_path: string, quiet?: boolean): void; addSprite(sprite: Sprite): void; toString(): string; }