feat: use max ELR for not min (fixes rate calc)#2307
Conversation
There was a problem hiding this comment.
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)tomax(LayRate, ShipRate)inreorderBoostersforContractOrderELR.
💡 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), |
There was a problem hiding this comment.
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).
| ELR: max(contract.Boosters[el].ArtifactSet.LayRate, contract.Boosters[el].ArtifactSet.ShipRate), | |
| ELR: min(contract.Boosters[el].ArtifactSet.LayRate, contract.Boosters[el].ArtifactSet.ShipRate), |
No description provided.