Patcher: ledsaver and credit mods, beat jump needs the hot cue engine

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Thiemo TizianiandClaude Opus 5.5 committed 2026-10-18 23:29:42 +02:00
1 parent bbe784aad2
commit 7dbb4ec6f8
3 files changed
+68 -14

No files matched your search

+12 -5
View File
@@ -40,10 +40,11 @@ import upd # noqa: E402
DEFAULT_REPO = os.path.join(os.path.dirname(HERE), 'CDJ900NXSVirtual')
UPSTREAM_MODS = ('code', 'utility', 'overview')
NEEDS = {'utility': 'code', # the PHASE METER switch chooses the code mod's meter
'hotcuekeys': 'cuecolours'} # the hot cues the keys play are read by cuecolours
'hotcuekeys': 'cuecolours', # the hot cues the keys play are read by cuecolours
'beatjump': 'hotcuekeys'} # hotcuekeys' engine makes the jumps
LABEL = '1.32'
# not ticked at the start of the list, and why
KNOWN_FAULTS = {'beatjump': 'known faults on a player (jumps off the grid, "file corrupted" after a few jumps)'}
KNOWN_FAULTS = {}
def load_repo(repo):
@@ -114,13 +115,19 @@ def _toggle(chosen, name, mods):
"""Tick or untick one mod: ticking one ticks what it needs, unticking
one unticks what needs it (so every mod can be unticked)."""
if name in chosen:
chosen.discard(name)
chosen.difference_update(n for n, need in NEEDS.items() if need == name)
drop = {name}
while True:
more = {n for n, need in NEEDS.items() if need in drop} - drop
if not more:
break
drop |= more
chosen.difference_update(drop)
else:
chosen.add(name)
need = NEEDS.get(name)
if need and any(m[0] == need and m[2] for m in mods):
while need and any(m[0] == need and m[2] for m in mods):
chosen.add(need)
need = NEEDS.get(need)
def choose(mods):