Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Be able to show the individual rolls #8

Closed
anoldguy opened this issue Apr 19, 2018 · 3 comments
Closed

Feature Request: Be able to show the individual rolls #8

anoldguy opened this issue Apr 19, 2018 · 3 comments

Comments

@anoldguy
Copy link

Showing the total works great, it'd be nice to also be able to show the individual results, or a populated expression: 4d10dl2 + 5 would give you [1*,7,4*,5] + 5.

Maybe a renderedExpression property on Result?

I tried looking at this, but typescript/javascript are not my forte, and I got lost in the AST/Expressions.

Really cool project, even cooler when I saw the 5th ed e-tools you've put together!

@tom-wolfe
Copy link
Owner

Thanks for the feedback! That makes a lot of sense. There's currently an empty printer.ts file that I was going to use for rendering an expression! I'll see when I can get some time to look into it.

@tom-wolfe
Copy link
Owner

This is now in 1.4.0 (52d958f), which is available in NPM. Hopefully it works as you expect! It will certainly work for simple expressions, but lengthier dice rolls will probably get complex rather quickly.

@anoldguy
Copy link
Author

Awesome! Works great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants