Skip to content

feat: use max ELR for not min (fixes rate calc)#2307

Merged
mkmccarty merged 1 commit intomainfrom
mm-branch-1
Apr 2, 2026
Merged

feat: use max ELR for not min (fixes rate calc)#2307
mkmccarty merged 1 commit intomainfrom
mm-branch-1

Conversation

@mkmccarty
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings April 2, 2026 21:20
@mkmccarty mkmccarty merged commit 8152de5 into main Apr 2, 2026
8 checks passed
@mkmccarty mkmccarty deleted the mm-branch-1 branch April 2, 2026 21:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates ELR-based booster ordering to use the maximum of laying vs shipping rate, aligning the ordering logic with the intended “use max ELR” rate calculation behavior.

Changes:

  • Switch ELR sort key from min(LayRate, ShipRate) to max(LayRate, ShipRate) in reorderBoosters for ContractOrderELR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

elrPairs = append(elrPairs, ELRPair{
Name: el,
ELR: min(contract.Boosters[el].ArtifactSet.LayRate, contract.Boosters[el].ArtifactSet.ShipRate),
ELR: max(contract.Boosters[el].ArtifactSet.LayRate, contract.Boosters[el].ArtifactSet.ShipRate),
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

ContractOrderELR sorting now uses max(LayRate, ShipRate), but the UI still labels the value as "ELR" and (in boost_draw.go) formats/display it using min(LayRate, ShipRate). This will make the displayed ELR differ from the value actually used to order boosters, which can confuse users and make debugging ordering issues harder. Consider updating the displayed ELR calculation and/or the label/description to reflect the new metric (e.g., show both lay & ship, or rename the metric used for sorting).

Suggested change
ELR: max(contract.Boosters[el].ArtifactSet.LayRate, contract.Boosters[el].ArtifactSet.ShipRate),
ELR: min(contract.Boosters[el].ArtifactSet.LayRate, contract.Boosters[el].ArtifactSet.ShipRate),

Copilot uses AI. Check for mistakes.
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