🔧 Disable leggy option and update CS estimation display#1983
Conversation
There was a problem hiding this comment.
Pull request overview
This PR disables the "include-leggy" option from the estimate-time command and updates the CS (Contract Score) estimation display in archived contract replays to show speedrun estimation instead of maximum estimation with leggy set.
- Commented out the "include-leggy" boolean command option in the estimate-time slash command
- Changed the replay display from showing "Est Max CS" (CxpMax - leggy set maximum) to "Est CS" (Cxp - speedrun estimation) with an "(SR estimation)" label
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/boost/estimate_time.go | Comments out the "include-leggy" option from the slash command definition, effectively disabling the feature for users |
| src/boost/replay.go | Updates archived contract display to show speedrun CS estimation (Cxp) instead of maximum CS with leggy set (CxpMax), and updates the label accordingly |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -437,7 +437,7 @@ func printArchivedContracts(userID string, archive []*ei.LocalContract, percent | |||
| fmt.Fprintf(&builder, "**Started:** <t:%d:f> %s\n", startTime.Unix(), ggIcon) | |||
| fmt.Fprintf(&builder, "**Completed:** <t:%d:f>\n", completionTime) | |||
| fmt.Fprintf(&builder, "**Duration:** %s **Est. Duration:** %s\n", bottools.FmtDuration(time.Duration(evaluation.GetCompletionTime()*float64(time.Second))), bottools.FmtDuration(c.EstimatedDurationMax)) | |||
There was a problem hiding this comment.
Inconsistency between duration and CS estimates. Line 439 displays "Est. Duration" using EstimatedDurationMax (which corresponds to leggy set timing), while line 440 now displays "Est CS" using c.Cxp (which is the speedrun estimation calculated with a 1.0 duration modifier, not EstimatedDurationMax). Consider updating line 439 to use c.EstimatedDuration or c.EstimatedDurationLower to match the speedrun estimation shown in the CS field.
| fmt.Fprintf(&builder, "**Duration:** %s **Est. Duration:** %s\n", bottools.FmtDuration(time.Duration(evaluation.GetCompletionTime()*float64(time.Second))), bottools.FmtDuration(c.EstimatedDurationMax)) | |
| fmt.Fprintf(&builder, "**Duration:** %s **Est. Duration:** %s\n", bottools.FmtDuration(time.Duration(evaluation.GetCompletionTime()*float64(time.Second))), bottools.FmtDuration(c.EstimatedDuration)) |
| /* | ||
| { | ||
| Type: discordgo.ApplicationCommandOptionBoolean, | ||
| Name: "include-leggy", | ||
| Description: "Include estimate for full leggy set.", | ||
| Required: false, | ||
| }, | ||
| */ |
There was a problem hiding this comment.
Commenting out code instead of removing it leaves dead code in the codebase. Since the "include-leggy" option is being disabled, consider removing this commented code block entirely. Additionally, note that the code on lines 67-68 that checks for this option will become unreachable but is outside this change region.
| /* | |
| { | |
| Type: discordgo.ApplicationCommandOptionBoolean, | |
| Name: "include-leggy", | |
| Description: "Include estimate for full leggy set.", | |
| Required: false, | |
| }, | |
| */ |
No description provided.