Give scheduled "Practice" sessions the real start ceremony too
A "practice" session used as a scheduled slot in a structured race/sponsor event's session plan silently skipped the entire countdown/lights/start-tone ceremony and jumped straight to running, unlike qualifying/heat/final. Narrowed the ceremony-skip check to only the standalone "Quick Open Practice" shortcut and free_practice (both rolling/best-lap ranked with no fixed roster) - "practice" is already ranked like a real timed session in every other respect and now gets the same start sequence. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
10
src/app.js
10
src/app.js
@@ -199,11 +199,17 @@ const announceRaceClockEvent = (eventKey, session) => triggerRaceAudio(eventKey,
|
||||
const handleSessionTimerTick = () => handleSessionTimerTickHelper({ getActiveSession, isUntimedSession, getSessionTiming, saveState, getLastFinishAnnouncementSessionId: () => lastFinishAnnouncementSessionId, setLastFinishAnnouncementSessionId: (value) => { lastFinishAnnouncementSessionId = value; }, announceRaceFinished, announceRaceClockEvent });
|
||||
const cancelRaceStart = () => raceAudioEngine.cancelStartSequence();
|
||||
const startSessionWithAudio = (session, callbacks) => {
|
||||
const practice = ["open_practice", "free_practice", "practice"].includes(String(session?.type || ""));
|
||||
// Only the casual, come-and-go practice modes (open_practice - the standalone "Quick
|
||||
// Open Practice" shortcut - and free_practice, both rolling/best-lap ranked with no
|
||||
// fixed roster) skip the race-start ceremony. "practice" is a proper scheduled slot in
|
||||
// a structured event's session plan (built by the Race Setup wizard alongside
|
||||
// qualifying/finals, and already ranked like a real timed session, not rolling) and
|
||||
// gets the same countdown/lights/start-tone ceremony as qualifying/heat/final.
|
||||
const skipCeremony = ["open_practice", "free_practice"].includes(String(session?.type || ""));
|
||||
const staggerOrder = getSessionGridOrder(session)
|
||||
.map((driverId) => state.drivers.find((driver) => driver.id === driverId)?.transponder)
|
||||
.filter(Boolean);
|
||||
return raceAudioEngine.runStartSequence(session, { ...callbacks, skipAudio: practice, staggerOrder });
|
||||
return raceAudioEngine.runStartSequence(session, { ...callbacks, skipAudio: skipCeremony, staggerOrder });
|
||||
};
|
||||
const tickClock = () => tickClockHelper({ dom, currentLanguage, handleSessionTimerTick, getActiveSession, getCurrentView: () => currentView, getOverlayMode: () => overlayMode, renderView, refreshTimingDynamics, updateHeaderState });
|
||||
const buildTeamRaceResultsHtml = (event) => buildTeamRaceResultsHtmlHelper(event, { t, escapeHtml, resolveEventBranding, getClassName, buildPrintBrandBlock, buildTeamRaceStandings, renderTable, formatLap, renderTeamStintLog, renderSessionChannelAnalysis });
|
||||
|
||||
Reference in New Issue
Block a user