настройки удалений в отдельный файл
This commit is contained in:
@@ -5322,6 +5322,7 @@ function startCustomTooltips() {
|
||||
player_id: String(playerIds.externalId || ""),
|
||||
player_db_id: String(playerIds.dbId || ""),
|
||||
team_penalty: Boolean(event.teamPenalty),
|
||||
time_type: String(event.preset || ""),
|
||||
side: String(side || event.player?.side || event.side || ""),
|
||||
};
|
||||
}
|
||||
@@ -5333,15 +5334,24 @@ function startCustomTooltips() {
|
||||
|
||||
const home = hockeyPenaltySideMappingDetail(sortedPenaltyEntries("home", { includePrepared: true })[0] || null, "home");
|
||||
const away = hockeyPenaltySideMappingDetail(sortedPenaltyEntries("away", { includePrepared: true })[0] || null, "away");
|
||||
const boardComponent = hockeyPenaltyBoardComponent();
|
||||
const selectedEvent = boardComponent ? selectedHockeyEvent(boardComponent) : null;
|
||||
const selectedTimeType = String(selectedEvent?.preset || "");
|
||||
const values = {
|
||||
active_home_penalty_id: home?.penalty_id || "",
|
||||
active_home_penalty_player_id: home?.player_id || "",
|
||||
active_home_penalty_player_db_id: home?.player_db_id || "",
|
||||
active_home_penalty_team_penalty: home ? (home.team_penalty ? "1" : "0") : "",
|
||||
active_home_penalty_time_type: home?.time_type || "",
|
||||
active_away_penalty_id: away?.penalty_id || "",
|
||||
active_away_penalty_player_id: away?.player_id || "",
|
||||
active_away_penalty_player_db_id: away?.player_db_id || "",
|
||||
active_away_penalty_team_penalty: away ? (away.team_penalty ? "1" : "0") : "",
|
||||
active_away_penalty_time_type: away?.time_type || "",
|
||||
// Keep the currently highlighted Game-tab penalty type ready before
|
||||
// penalty_ready/penalty_assigned invokes any vMix trigger.
|
||||
selected_penalty_preset_id: selectedTimeType,
|
||||
selected_penalty_time_type: selectedTimeType,
|
||||
};
|
||||
const signature = JSON.stringify([gameId, values]);
|
||||
if (!force && signature === state.hockeyPenaltyMappingContextSignature) return false;
|
||||
@@ -7655,6 +7665,7 @@ function openTimerQuickEditor(focusActionId = "") {
|
||||
team_penalty: Boolean(event.teamPenalty),
|
||||
infraction: event.infraction ? clone(event.infraction) : null,
|
||||
preset: event.preset,
|
||||
time_type: String(event.preset || ""),
|
||||
remaining_ms: Math.round(event.remainingMs),
|
||||
duration_ms: Math.round(event.durationMs),
|
||||
running: event.running,
|
||||
@@ -8758,12 +8769,14 @@ async function hockeyClearSelectedPenaltyMappingContext(side, { clearCommon = fa
|
||||
selected_home_penalty_player_id: "",
|
||||
selected_home_penalty_player_db_id: "",
|
||||
selected_home_penalty_team_penalty: "",
|
||||
selected_home_penalty_time_type: "",
|
||||
}
|
||||
: {
|
||||
selected_away_penalty_id: "",
|
||||
selected_away_penalty_player_id: "",
|
||||
selected_away_penalty_player_db_id: "",
|
||||
selected_away_penalty_team_penalty: "",
|
||||
selected_away_penalty_time_type: "",
|
||||
};
|
||||
if (clearCommon) Object.assign(values, {
|
||||
selected_penalty_id: "",
|
||||
@@ -8773,6 +8786,7 @@ async function hockeyClearSelectedPenaltyMappingContext(side, { clearCommon = fa
|
||||
selected_penalty_team_id: "",
|
||||
selected_penalty_infraction_id: "",
|
||||
selected_penalty_preset_id: "",
|
||||
selected_penalty_time_type: "",
|
||||
selected_penalty_side: "",
|
||||
selected_penalty_event_time: "",
|
||||
selected_penalty_status: "",
|
||||
@@ -8833,6 +8847,7 @@ async function hockeySelectPenaltyForPreview(component, event) {
|
||||
team_penalty: Boolean(event.teamPenalty),
|
||||
infraction_id: String(event.infraction?.id || ""),
|
||||
preset_id: String(event.preset || ""),
|
||||
time_type: String(event.preset || ""),
|
||||
side,
|
||||
event_time: String(event.eventTime || ""),
|
||||
remaining_ms: Math.max(0, Number(event.remainingMs || 0)),
|
||||
@@ -8864,6 +8879,7 @@ async function hockeySelectPenaltyForPreview(component, event) {
|
||||
selected_penalty_team_id: detail.team_id,
|
||||
selected_penalty_infraction_id: detail.infraction_id,
|
||||
selected_penalty_preset_id: detail.preset_id,
|
||||
selected_penalty_time_type: detail.time_type,
|
||||
selected_penalty_side: detail.side,
|
||||
selected_penalty_event_time: detail.event_time,
|
||||
selected_penalty_status: detail.status,
|
||||
@@ -8878,6 +8894,7 @@ async function hockeySelectPenaltyForPreview(component, event) {
|
||||
selected_home_penalty_player_id: detail.player_id,
|
||||
selected_home_penalty_player_db_id: detail.player_db_id,
|
||||
selected_home_penalty_team_penalty: detail.team_penalty ? "1" : "0",
|
||||
selected_home_penalty_time_type: detail.time_type,
|
||||
});
|
||||
} else if (side === "away") {
|
||||
Object.assign(values, {
|
||||
@@ -8885,6 +8902,7 @@ async function hockeySelectPenaltyForPreview(component, event) {
|
||||
selected_away_penalty_player_id: detail.player_id,
|
||||
selected_away_penalty_player_db_id: detail.player_db_id,
|
||||
selected_away_penalty_team_penalty: detail.team_penalty ? "1" : "0",
|
||||
selected_away_penalty_time_type: detail.time_type,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user