diff --git a/api/app.py b/api/app.py index cf0d106..72a1ecf 100644 --- a/api/app.py +++ b/api/app.py @@ -338,21 +338,25 @@ MANUAL_BUILD_PAIRS: Dict[str, str] = { # parse_sorting_rules runs. User-supplied rules come last so they override # auto-injected defaults on conflicting keys. # -# Use cases vary — modpacks (HellDrinx) shipping their own load order, -# individual mods (RV Interior Expansion) whose authors didn't declare -# loadAfter in mod.info, or any other wsid whose presence implies a -# specific sort constraint. The mechanism is generic; each rules file -# describes its own scope in its header. +# Provenance is encoded in the subdirectory: +# data/rules/modpack/ — mirrors of upstream modpack-author-bundled rules +# (HellDrinx etc.). Update when upstream changes. +# data/rules/curated/ — sortof-operator-authored rules for individual +# mods whose authors didn't declare load order +# in their mod.info (RV Interior Expansion etc.). +# +# The loader is provenance-agnostic; trigger values are paths relative to +# data/rules/. _RULES_DIR = Path(__file__).resolve().parent.parent / "data" / "rules" _RULES_TRIGGERS: Dict[str, str] = { - # HellDrinx FULL + LITE both bundle the same sorting rules. - "3672556207": "helldrinx.txt", # HellDrinx FULL - "3662909244": "helldrinx.txt", # HellDrinx LITE - # RVInteriorExpansion + Part2 chain after PROJECTRVInterior42. - # Expansion authors didn't declare loadAfter in their mod.info; without - # these rules sortof has no signal to chain the cluster. - "3618427553": "rv_expansion.txt", # RVInteriorExpansion (rvupdate) - "3622163276": "rv_expansion.txt", # RVInteriorExpansionPart2 (rv2) + # HellDrinx FULL + LITE share one upstream-mirrored modpack rules file. + "3672556207": "modpack/helldrinx.txt", # HellDrinx FULL + "3662909244": "modpack/helldrinx.txt", # HellDrinx LITE + # RVInteriorExpansion + Part2 chain after PROJECTRVInterior42 — sortof + # operator-curated; expansion authors didn't declare loadAfter in + # their mod.info, so sortof has no other signal to chain the cluster. + "3618427553": "curated/rv_expansion.txt", # RVInteriorExpansion (rvupdate) + "3622163276": "curated/rv_expansion.txt", # RVInteriorExpansionPart2 (rv2) } # Human-readable trigger labels for the warning message. _RULES_LABELS: Dict[str, str] = { diff --git a/data/rules/rv_expansion.txt b/data/rules/curated/rv_expansion.txt similarity index 78% rename from data/rules/rv_expansion.txt rename to data/rules/curated/rv_expansion.txt index 4631c52..b3f4b70 100644 --- a/data/rules/rv_expansion.txt +++ b/data/rules/curated/rv_expansion.txt @@ -1,4 +1,7 @@ -; RV Interior Expansion (B42) — sorting rules +; RV Interior Expansion (B42) — sortof-operator-curated sorting rules. +; Provenance: data/rules/curated/. Edit freely when authoring new +; load-order constraints for mods whose authors didn't declare them. +; ; Triggers: ; - 3618427553 (RVInteriorExpansion, map folder rvupdate) ; - 3622163276 (RVInteriorExpansionPart2, map folder rv2) diff --git a/data/rules/helldrinx.txt b/data/rules/modpack/helldrinx.txt similarity index 93% rename from data/rules/helldrinx.txt rename to data/rules/modpack/helldrinx.txt index 3a39760..5750f2d 100644 --- a/data/rules/helldrinx.txt +++ b/data/rules/modpack/helldrinx.txt @@ -1,11 +1,11 @@ -; HellDrinx modpack — bundled sorting rules +; HellDrinx — modpack-author-bundled sorting rules (mirror of upstream). +; Provenance: data/rules/modpack/. Update when the modpack publishes a +; new sorting_rules.txt; do not edit unilaterally. +; ; Triggers: HellDrinx FULL (3672556207), HellDrinx LITE (3662909244). ; Auto-injected by app.py:_auto_rules_for() when either trigger wsid is in ; the user's input. User-supplied rules are appended afterward and override ; these on conflicting keys. -; -; Source: HellDrinx FULL/LITE — keep this file in sync with the modpack's -; upstream sorting_rules.txt when it updates. [PROJECTRVInterior42] loadFirst=on