BUILD119 — ручной счёт + SQL + составы

This commit is contained in:
2026-08-26 13:54:47 +03:00
parent c5b25c23e2
commit fb422d5bf8
10 changed files with 544 additions and 16 deletions

View File

@@ -337,7 +337,7 @@ class UIBuilderManager:
"active_tab", "inactive_tab",
}
valid_step_types = {
"timer_command", "hockey_penalties_command", "vmix_command",
"timer_command", "hockey_penalties_command", "hockey_score_command", "vmix_command",
"hockey_vmix_timers_start", "delay", "dispatch_event",
}
for sequence_index, sequence in enumerate(shortcut_sequences):
@@ -372,7 +372,7 @@ class UIBuilderManager:
"id": str(item.get("id") or f"penalty-target-{index + 1}"),
"input": str(item.get("input") or ""),
"selected_name": str(item.get("selected_name") or item.get("selectedName") or ""),
"overlay": str(item.get("overlay") or "2") if str(item.get("overlay") or "2") in {"1", "2", "3", "4"} else "2",
"overlay": str(item.get("overlay") or "2") if str(item.get("overlay") or "2") in {"1", "2", "3", "4", "5", "6", "7", "8"} else "2",
"auto_hide_on_finish": bool(item.get("auto_hide_on_finish", True)),
} for index, item in enumerate(targets[:8])]
@@ -387,7 +387,7 @@ class UIBuilderManager:
if source not in {"game", "any_penalty", "home_penalty", "away_penalty"}:
source = "game"
overlay = str(action.get("overlay") or "1")
if overlay not in {"1", "2", "3", "4"}:
if overlay not in {"1", "2", "3", "4", "5", "6", "7", "8"}:
overlay = "1"
try:
duration_ms = int(float(action.get("duration_ms") or 3000))
@@ -423,6 +423,7 @@ class UIBuilderManager:
"timer_command": str(step.get("timer_command") or "start"),
"timer_value": step.get("timer_value", ""),
"penalty_command": str(step.get("penalty_command") or "start"),
"score_command": str(step.get("score_command") or "home_plus") if str(step.get("score_command") or "home_plus") in {"home_plus", "home_minus", "away_plus", "away_minus", "sync"} else "home_plus",
"function": str(step.get("function") or ""),
"input": str(step.get("input") or ""),
"value": step.get("value", ""),
@@ -472,6 +473,12 @@ class UIBuilderManager:
"prevent_default": bool(sequence.get("prevent_default", True)),
"allow_in_inputs": bool(sequence.get("allow_in_inputs", False)),
"toggle_all_overlays_on_repeat": bool(sequence.get("toggle_all_overlays_on_repeat", False)),
"repeat_overlay_outs": [
value for value in dict.fromkeys(
int(item) for item in (sequence.get("repeat_overlay_outs") if isinstance(sequence.get("repeat_overlay_outs"), list) else [1, 2, 3])
if str(item).isdigit() and 1 <= int(item) <= 8
)
] or [1, 2, 3],
"sync_hockey_team_states": bool(sequence.get("sync_hockey_team_states", sequence.get("toggle_all_overlays_on_repeat", False))),
"is_scoreboard_sequence": bool(sequence.get("is_scoreboard_sequence", sequence.get("sync_hockey_team_states", sequence.get("toggle_all_overlays_on_repeat", False)))),
"scope": "all" if sequence.get("scope") == "all" else "runtime",