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

Use ProgressTrack in progress renderer #30

Merged
merged 2 commits into from
May 20, 2024

Conversation

cwegrzyn
Copy link
Collaborator

Switches the progress node renderer to use the ProgressTrack class for progress calculations.

This fixes cases where steps could take tracks past 10 boxes.

Also adds support for unbounded tracks (like the legacy tracks) with an optional unbounded boolean property.

@cwegrzyn cwegrzyn self-assigned this May 20, 2024
@cwegrzyn cwegrzyn requested a review from zkat May 20, 2024 02:17
node.properties.from ??
((node.properties["from-boxes"] as number) ?? 0) * 4 +
((node.properties["from-ticks"] as number) ?? 0),
difficulty: node.properties.level,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is was meaning to change this: the correct name for this, I believe, is "rank", so maybe we can make that change right here, too. We'll want to fall back to "level" for backwards compat, though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yeah, you are right. I think Difficulty came from the original Forged in Obsidian track format, and I kept it for backwards compatibility, but I, too, had intended to change the name. I'll make that change in this PR in both spots.

Maintains backwards compatability with old `level` and `difficulty` terms.
@cwegrzyn cwegrzyn merged commit 657b45d into main May 20, 2024
2 checks passed
@cwegrzyn cwegrzyn deleted the cwegrzyn/use-progresstrack-in-render branch May 20, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants