Refactor JunctionFiller logic to improve eligibility and rolling mechanics
ci / build-backend (push) Successful in 1m21s
ci / build-frontend (push) Successful in 40s
ci / tests (push) Successful in 1m27s
ci / sonar (push) Successful in 4m6s

Updated the JunctionFiller class to adjust the eligibility criteria for junction elements, ensuring that the roll for chance is determined after the selection of a variant. Enhanced the Passes method to exclude the rolling logic, which now occurs in a separate Rolls method. This change clarifies the flow of decision-making in junctions and ensures that the chance of the selected variant is accurately represented. Additionally, introduced new tests to validate the updated rolling behavior and its impact on junction processing.
This commit is contained in:
Leonid Pershin
2026-07-30 22:12:46 +03:00
parent 926a20020f
commit de48317f7d
7 changed files with 370 additions and 266 deletions
+2 -1
View File
@@ -777,6 +777,7 @@ export const ru = {
noSchedule: 'Расписание ещё не построено',
airToday: 'Сегодня',
airCount: 'Записей за сутки: {{count}}',
airHidePast: 'Скрывать прошедшее',
},
junctions: {
title: 'Стыки',
@@ -825,7 +826,7 @@ export const ru = {
onlyOnChange: 'Только при смене шоу',
chance: 'Вероятность, %',
chanceHint:
'Вероятность и интервал считаются по этой врезке отдельно; жребий берётся из seed генерации, поэтому пересборка не тасует врезки.',
'Интервал считается по этой врезке отдельно. У развилки жребий один на всех: бросает выбранный вариант, и его вероятность — вероятность всей развилки. Жребий берётся из seed генерации, поэтому пересборка не тасует врезки.',
minInterval: 'Не чаще, чем раз в, мин',
dayparts: 'Дейпарты',
daypartsHint: 'Ничего не выбрано — врезка идёт в любых дейпартах.',