Skip to content

Commit

Permalink
changing logs
Browse files Browse the repository at this point in the history
  • Loading branch information
S-Traut committed Mar 27, 2022
1 parent 2e65efa commit f5cb0c1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
}
Expand All @@ -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`;
}

Expand Down
4 changes: 2 additions & 2 deletions src/storyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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!');
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion types/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ declare module "dotosb" {
private layers: Map<string, Array<Sprite>>;

createSprite(path: string, options?: Partial<SpriteOptions>): Sprite;
write(file_path: string): void;
write(file_path: string, quiet?: boolean): void;
addSprite(sprite: Sprite): void;
toString(): string;
}
Expand Down

0 comments on commit f5cb0c1

Please sign in to comment.