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
@@ -782,6 +782,7 @@ export const en = {
noSchedule: 'Schedule not built yet',
airToday: 'Today',
airCount: 'Entries for the day: {{count}}',
airHidePast: 'Hide past entries',
},
junctions: {
title: 'Junctions',
@@ -830,7 +831,7 @@ export const en = {
onlyOnChange: 'Only on show change',
chance: 'Chance, %',
chanceHint:
'Chance and interval are per break; the roll comes from the generation seed, so rebuilds do not reshuffle breaks.',
'The interval is per break. A fork rolls once for all its options: the picked variant rolls, and its chance is the chance of the whole fork. The roll comes from the generation seed, so rebuilds do not reshuffle breaks.',
minInterval: 'No more often than once per, min',
dayparts: 'Dayparts',
daypartsHint: 'Nothing selected — the break plays in any daypart.',