Skip to content

Plan a daily, weekly or special race in a few clicks, with the race's own rules - #310

Open
kratofl wants to merge 1 commit into
mainfrom
feat/planner-race-types
Open

kratofl wants to merge 1 commit into
mainfrom
feat/planner-race-types

Conversation

@kratofl

@kratofl kratofl commented Dec 6, 2026

Copy link
Copy Markdown
Owner

The planner made a daily race slow: car and track sat in long dropdowns, and nothing knew LMU's race formats or their rules.

New plan (replaces Quick plan; the old sheet now only edits a plan)

  • Starts with the kind of race: Daily, Weekly, Special event or Custom. Each kind offers its usual lengths (15–60 min, 1–2 h, 4–24 h; Custom takes any length, by time or laps). A race the driver is already in starts on its own length.
  • Car and track as tiles: the last pairings as one click, the classes as their own badges (the picked one ringed in its colour), cars with the maker's logo, circuits with their flag, driven ones first with the driver's laps; a circuit with several layouts asks which, starting on the one driven most. The detected (else last) car and track start picked.
  • Every car and track the game has is offered, driven or not (GameCarCatalog, new and hand-kept; GameTrackCatalog.Offered, now with short circuit names). A driven car or layout is offered under the name its laps are filed under, so a plan always joins its laps.
  • The race's rules: a tank limit and the virtual energy share (100 / 75 / 70 %). Shown on the Race card, editable later.

Fuel

  • A tank limit holds the stint tank down and stands in for an unknown tank.
  • A stint now also ends where the car's virtual energy runs out (median energy per lap from the driver's laps against the allowed share); the card says "Energy runs out first · N laps a stint". This applies to existing plans too.
  • Fuel calculator in the toolbar: the same sums, nothing saved.

The plan list shows each plan's kind as a chip. The LMU schedule is not read: racecontrol.gg lists only daily races without classes, race length or rules (docs/internals/lmu-schedule-feed.md).

Not done

  • Fixed setup and tyre allocation are not stored as rules: they would change no figure.
  • Not run in the real app; checked in the preview harness, light and dark.
  • GameCarCatalog is hand-kept: a make spelled unlike the game's model would plan an undriven car under a name its later laps do not join (once driven, the tile takes the recorded name).

Checks

dotnet build app/Sprint.Desktop.slnx -warnaserror; desktop and host test suites (one environment test fails while LMU is running locally: GameSourceFactoryTests expects no game); desktop type-check and tests; New plan, Fuel calculator and the edit sheet shot in the preview harness. Reviewed in a fresh context; its four findings (detected length, editable rules, percent-scale energy, layout pick) are fixed.

🤖 Generated with Claude Code

… own rules

Quick plan and the long New plan sheet asked for car and track in long
dropdowns and knew nothing about LMU's race formats. New plan now starts
with the kind of race (daily, weekly, special event, custom), offers every
car and track the game has as tiles with the driver's laps on them, the
kind's usual lengths, and the race's rules: a tank limit and the share of
virtual energy allowed. Both shape the stints: the limit holds the tank
down, and a stint ends where the car's energy runs out before its fuel.
A fuel calculator does the same sums without making a plan, and the rules
can be changed when editing a plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kratofl kratofl added the type/feature Feature request or capability work label Dec 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/feature Feature request or capability work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant