если верхний счет выдан, и появляется удаление, то оно проигрывается сразу

This commit is contained in:
2026-08-20 11:23:54 +03:00
parent 4453e23248
commit a28b0fc062
2 changed files with 42 additions and 0 deletions

View File

@@ -4539,6 +4539,24 @@ function startCustomTooltips() {
commands.push({ Function: "SetText", Input: target.input, SelectedName: target.selected_name, Value: value });
if (mirror) mirror.lastValue = value;
}
// If the scoreboard is already on air and this penalty target was not
// previously assigned, bring the penalty plate on air immediately.
// Previously the text was updated here, but OverlayIn happened only
// when the whole scoreboard shortcut was executed again.
if (hockeyScoreboardIsLive()) {
const overlay = ["1", "2", "3", "4"].includes(String(target.overlay || "")) ? String(target.overlay) : "2";
const targetWasVisible = Boolean(previous?.input)
&& String(previous.input) === String(target.input)
&& String(previous.overlay || overlay) === overlay;
if (!targetWasVisible) {
if (previous?.input && (String(previous.input) !== String(target.input) || String(previous.overlay || overlay) !== overlay)) {
const previousOverlay = ["1", "2", "3", "4"].includes(String(previous.overlay || "")) ? String(previous.overlay) : overlay;
commands.push({ Function: `OverlayInput${previousOverlay}Out`, Input: previous.input });
}
commands.push({ Function: `OverlayInput${overlay}In`, Input: target.input });
}
}
} else {
if (previous && hideUnused && target.auto_hide_on_finish !== false && target.input) {
const overlay = ["1", "2", "3", "4"].includes(String(target.overlay || "")) ? String(target.overlay) : "2";