апдейт удалений
This commit is contained in:
75450
agent/agent.log.1
75450
agent/agent.log.1
File diff suppressed because it is too large
Load Diff
@@ -7932,9 +7932,10 @@ function openTimerQuickEditor(focusActionId = "") {
|
|||||||
const event = board.penalties.find((item) => item.id === eventId);
|
const event = board.penalties.find((item) => item.id === eventId);
|
||||||
if (!event) return false;
|
if (!event) return false;
|
||||||
const now = performance.now();
|
const now = performance.now();
|
||||||
|
const wasStartedOnce = Boolean(event.startedOnce || event.running);
|
||||||
|
|
||||||
if (command === "toggle") {
|
if (command === "toggle") {
|
||||||
return controlHockeyPenalty(component, eventId, event.running ? "pause" : "start", rawValue);
|
return controlHockeyPenalty(component, eventId, event.running ? "pause" : "start", rawValue, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (command === "start") {
|
if (command === "start") {
|
||||||
@@ -8055,11 +8056,16 @@ function openTimerQuickEditor(focusActionId = "") {
|
|||||||
refreshHockeyBoardNodes(component);
|
refreshHockeyBoardNodes(component);
|
||||||
if (options.syncVmix !== false && ["start", "pause", "reset", "set_time"].includes(command)) {
|
if (options.syncVmix !== false && ["start", "pause", "reset", "set_time"].includes(command)) {
|
||||||
activateConfiguredPenaltyCountdowns();
|
activateConfiguredPenaltyCountdowns();
|
||||||
|
// A prepared penalty can already own a stopped vMix target before its first
|
||||||
|
// Start. Treat that first Start as an explicit seed, not as Resume, otherwise
|
||||||
|
// only StartCountdown is sent and vMix may run an old/empty native position.
|
||||||
|
const explicitCountdownSeed = ["reset", "set_time"].includes(command)
|
||||||
|
|| (command === "start" && !wasStartedOnce);
|
||||||
rebalanceVmixPenaltyTargets({
|
rebalanceVmixPenaltyTargets({
|
||||||
force: false,
|
force: false,
|
||||||
hideUnused: true,
|
hideUnused: true,
|
||||||
preservePausedCountdown: command === "pause",
|
preservePausedCountdown: command === "pause",
|
||||||
editedEventKey: ["reset", "set_time"].includes(command) ? penaltyMirrorKey(component, event) : "",
|
editedEventKey: explicitCountdownSeed ? penaltyMirrorKey(component, event) : "",
|
||||||
}).catch((error) => console.error("Penalty countdown state sync error", error));
|
}).catch((error) => console.error("Penalty countdown state sync error", error));
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -13455,7 +13461,7 @@ function renderHockeyPenaltyDashboard(node, component, runtime) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function hockeyPersistGameTimers(gameId, { keepalive = false, force = false } = {}) {
|
async function hockeyPersistGameTimers(gameId, { keepalive = false, force = false } = {}) {
|
||||||
if (!hockeyCanControl() || window.HockeyMatchAccess?.isPeriodPending?.()) return false;
|
if (!hockeyCanControl()) return false;
|
||||||
gameId = String(gameId || "").trim();
|
gameId = String(gameId || "").trim();
|
||||||
if (!gameId || (state.hockeyTimerHydrating && !force)) return null;
|
if (!gameId || (state.hockeyTimerHydrating && !force)) return null;
|
||||||
if (state.hockeyTimerSaveTimer) {
|
if (state.hockeyTimerSaveTimer) {
|
||||||
@@ -13495,7 +13501,12 @@ function renderHockeyPenaltyDashboard(node, component, runtime) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function hockeyScheduleTimerSave(force = false) {
|
function hockeyScheduleTimerSave(force = false) {
|
||||||
if (!hockeyCanControl() || window.HockeyMatchAccess?.isPeriodPending?.()) return false;
|
if (!hockeyCanControl()) return false;
|
||||||
|
// Do not drop timer/penalty state while a period mutation is queued.
|
||||||
|
// match-access.js serializes all control mutations and adds the current
|
||||||
|
// revision when each queued request actually runs, so this save is safe to
|
||||||
|
// queue behind /control/period. Dropping it here loses startedOnce/running,
|
||||||
|
// which also prevents the server strength recalculation and vMix Mapping.
|
||||||
if (state.hockeyTimerHydrating) return;
|
if (state.hockeyTimerHydrating) return;
|
||||||
const gameId = hockeyTimerSelectedGameId();
|
const gameId = hockeyTimerSelectedGameId();
|
||||||
if (!gameId) return;
|
if (!gameId) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user