GrandPrix.component
README.md
GrandPrix
Runs a kart racing cup on racingKit: kart select, a run of races, points and standings after each race, and the podium, then a new cup. Put it on a synced entity named GrandPrix next to racingKit's Race (RaceDirector) and MatchFlow's Match entities; require("grandPrixKit.api").setup{...} makes all three.
The machine in charge of the race runs the cup and writes the synced state (phase, race, entrants and their picks, the championship table); every machine applies the current race (track direction, mood), sets up the karts it owns (vehicle body, look, paint, class tuning), seats its own player and lets players without a kart watch.
Fields: cupName, format, points, tracks, moods, moodDriver, laps, karts, aiNames, selectSeconds, standingsSeconds, podiumSeconds, selectStyle, standingsStyle, trophyLook, podiumLook, autoStart, joinOnRequest. State: phase, raceIndex, cupNumber, secondsLeft, races, entrants, table, lastRace, joined.
Methods: getPhase(), isAuthority(), me(), getEntrants(), cupInfo(), currentRace(), getTable(), getLastRace(), selectView(), standingsView(), setPick(pick), setReady(bool), join(), hasJoined(), requestContinue(), startNow().