refactor: split auto-rules into modpack/ vs curated/ provenance subdirs
The previous flat data/rules/ flattened a real distinction:
- data/rules/modpack/ mirrors of upstream modpack-author-bundled
sorting_rules.txt (HellDrinx). Update when
upstream publishes; don't unilaterally edit.
- data/rules/curated/ sortof-operator-authored rules for individual
mods whose authors didn't declare load order
in their mod.info (RV Interior Expansion).
The loader stays provenance-agnostic; trigger values in _RULES_TRIGGERS
are paths relative to data/rules/ ("modpack/helldrinx.txt" etc.).
File headers in each rules file declare the provenance category and
edit policy.
This commit is contained in:
30
api/app.py
30
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
|
# parse_sorting_rules runs. User-supplied rules come last so they override
|
||||||
# auto-injected defaults on conflicting keys.
|
# auto-injected defaults on conflicting keys.
|
||||||
#
|
#
|
||||||
# Use cases vary — modpacks (HellDrinx) shipping their own load order,
|
# Provenance is encoded in the subdirectory:
|
||||||
# individual mods (RV Interior Expansion) whose authors didn't declare
|
# data/rules/modpack/ — mirrors of upstream modpack-author-bundled rules
|
||||||
# loadAfter in mod.info, or any other wsid whose presence implies a
|
# (HellDrinx etc.). Update when upstream changes.
|
||||||
# specific sort constraint. The mechanism is generic; each rules file
|
# data/rules/curated/ — sortof-operator-authored rules for individual
|
||||||
# describes its own scope in its header.
|
# 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_DIR = Path(__file__).resolve().parent.parent / "data" / "rules"
|
||||||
_RULES_TRIGGERS: Dict[str, str] = {
|
_RULES_TRIGGERS: Dict[str, str] = {
|
||||||
# HellDrinx FULL + LITE both bundle the same sorting rules.
|
# HellDrinx FULL + LITE share one upstream-mirrored modpack rules file.
|
||||||
"3672556207": "helldrinx.txt", # HellDrinx FULL
|
"3672556207": "modpack/helldrinx.txt", # HellDrinx FULL
|
||||||
"3662909244": "helldrinx.txt", # HellDrinx LITE
|
"3662909244": "modpack/helldrinx.txt", # HellDrinx LITE
|
||||||
# RVInteriorExpansion + Part2 chain after PROJECTRVInterior42.
|
# RVInteriorExpansion + Part2 chain after PROJECTRVInterior42 — sortof
|
||||||
# Expansion authors didn't declare loadAfter in their mod.info; without
|
# operator-curated; expansion authors didn't declare loadAfter in
|
||||||
# these rules sortof has no signal to chain the cluster.
|
# their mod.info, so sortof has no other signal to chain the cluster.
|
||||||
"3618427553": "rv_expansion.txt", # RVInteriorExpansion (rvupdate)
|
"3618427553": "curated/rv_expansion.txt", # RVInteriorExpansion (rvupdate)
|
||||||
"3622163276": "rv_expansion.txt", # RVInteriorExpansionPart2 (rv2)
|
"3622163276": "curated/rv_expansion.txt", # RVInteriorExpansionPart2 (rv2)
|
||||||
}
|
}
|
||||||
# Human-readable trigger labels for the warning message.
|
# Human-readable trigger labels for the warning message.
|
||||||
_RULES_LABELS: Dict[str, str] = {
|
_RULES_LABELS: Dict[str, str] = {
|
||||||
|
|||||||
@@ -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:
|
; Triggers:
|
||||||
; - 3618427553 (RVInteriorExpansion, map folder rvupdate)
|
; - 3618427553 (RVInteriorExpansion, map folder rvupdate)
|
||||||
; - 3622163276 (RVInteriorExpansionPart2, map folder rv2)
|
; - 3622163276 (RVInteriorExpansionPart2, map folder rv2)
|
||||||
@@ -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).
|
; Triggers: HellDrinx FULL (3672556207), HellDrinx LITE (3662909244).
|
||||||
; Auto-injected by app.py:_auto_rules_for() when either trigger wsid is in
|
; 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
|
; the user's input. User-supplied rules are appended afterward and override
|
||||||
; these on conflicting keys.
|
; 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]
|
[PROJECTRVInterior42]
|
||||||
loadFirst=on
|
loadFirst=on
|
||||||
Reference in New Issue
Block a user