поправлены в какой то раз удаления для верхнего счета
This commit is contained in:
@@ -5537,23 +5537,13 @@ class HockeyDataService:
|
||||
elif state_key not in {"5x5", ""}:
|
||||
state_label = state_key.replace("x", " on " if language_key == "en" else " на ")
|
||||
|
||||
coincidental_penalties = bool(
|
||||
home_penalties > 0
|
||||
and away_penalties > 0
|
||||
and home_skaters == away_skaters
|
||||
)
|
||||
complex_mixed_penalties = bool(
|
||||
home_penalties > 0
|
||||
and away_penalties > 0
|
||||
and home_skaters != away_skaters
|
||||
)
|
||||
# BUILD88: numerical strength can already be 4x3/3x4 while both benches
|
||||
# still have active penalties. Keep advantage_side truthful for stats and
|
||||
# Mapping, but do not output the PP caption until one bench is completely
|
||||
# clear. Equal coincidental states (4x4/3x3) still show the configured
|
||||
# value on both sides as requested in BUILD81.
|
||||
home_label = state_label if coincidental_penalties or (advantage_side == "home" and not complex_mixed_penalties) else ""
|
||||
away_label = state_label if coincidental_penalties or (advantage_side == "away" and not complex_mixed_penalties) else ""
|
||||
# BUILD89: television output has only one power-play plate. Equal
|
||||
# coincidental strength never gets a side caption. As soon as a real
|
||||
# numerical advantage exists (including 4x3 / 3x4 with penalties on both
|
||||
# benches), expose the configured state label only on the advantage side.
|
||||
# `state_label` itself remains available in Mapping for custom graphics.
|
||||
home_label = state_label if advantage_side == "home" else ""
|
||||
away_label = state_label if advantage_side == "away" else ""
|
||||
phase_labels = {
|
||||
"regulation": ("Основное время", "Regulation"),
|
||||
"regular_overtime": ("Овертайм регулярки", "Regular OT"),
|
||||
|
||||
Reference in New Issue
Block a user