Skip to content

Round tool stats display to 1 decimal#2872

Open
GasSpace630 wants to merge 5 commits intoPixelGuys:masterfrom
GasSpace630:round-tool-stats
Open

Round tool stats display to 1 decimal#2872
GasSpace630 wants to merge 5 commits intoPixelGuys:masterfrom
GasSpace630:round-tool-stats

Conversation

@GasSpace630
Copy link
Copy Markdown
Contributor

This PR replaces #2871 which fixes #2696
The previous PR contained unrelated changes, so it was closed.
This version only includes the formatting changes.

@Wunka Wunka moved this to Easy to Review in PRs to review Apr 11, 2026
Copy link
Copy Markdown
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

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

Also please rebase, there was a refactor that affects this.

Comment thread src/items.zig Outdated
Comment thread src/items.zig
proceduralItem.getProperty(property.destination orelse continue).* += sum;
}
if (proceduralItem.damage < 1) proceduralItem.damage = 1/(2 - proceduralItem.damage);
if (proceduralItem.swingSpeed < 1) proceduralItem.swingSpeed = 1/(2 - proceduralItem.swingSpeed);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why did you remove this? This is required to prevent negative values.

@IntegratedQuantum
Copy link
Copy Markdown
Member

also CI failed, please run the formatter

@IntegratedQuantum IntegratedQuantum moved this from Easy to Review to In review in PRs to review Apr 12, 2026
Copy link
Copy Markdown
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

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

Now you are only applying rounding to small and negative values, and they remain negative.

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Apply rounding to tool damage numbers (?)

3 participants