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

Fix bug for rune unlock height #3

Merged
merged 4 commits into from
Nov 22, 2024

Conversation

t4t5
Copy link

@t4t5 t4t5 commented Nov 22, 2024

This fixes the issue where the height calculation is too high at certain intervals for a given rune name length.

The crucial difference in this implementation is in what it considers to be the number from where the progress starts.

Depending on where the progress starts, the interval value will be different. So if there's an error here, the step boundaries also become wrong (which probably explains the bugs at specific intervals like 0/4, 1/4, 2/4 etc).

Previous version (with bug)

"ZZZ" and "AAA" are considered to have different starting points even though they're of the same length, and get different interval values.

CleanShot 2024-11-22 at 10 11 32@2x

New version

"ZZZ" and "AAA" have the same starting point (and therefore the same interval), with ZZZ having the minimum progress and AAA having the maximum progress.

CleanShot 2024-11-22 at 10 12 19@2x

@casey casey merged commit e68ed50 into casey:rune-unlock-height Nov 22, 2024
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