fix(bgm): resolve include patterns relative to package dir
The default include matched every yaml across the games root, so a package could absorb a sibling game's defs (e.g. two game#main setups). Resolve patterns against the package declaration's directory instead; a leading slash marks a pattern as root-relative.
This commit is contained in:
@@ -104,6 +104,13 @@ package. **Defaults to `./**/*.yaml`**, so all yaml in the same and sub
|
||||
folders is discovered with no configuration. This also matches the package
|
||||
declaration itself, which is fine — it's the package, not a part.
|
||||
|
||||
Patterns are resolved **relative to the package declaration's own directory**,
|
||||
not the games root. So a package declared in `carcassonne/carcassonne.md`
|
||||
with the default `./**/*.yaml` only picks up yaml under `carcassonne/` — it
|
||||
never absorbs defs from a sibling game. To reach outside its folder, a
|
||||
package can use a `../`-relative pattern or an absolute-from-root pattern
|
||||
(e.g. `**/shared/*.yaml`).
|
||||
|
||||
---
|
||||
|
||||
## 3. Roles
|
||||
|
||||
Reference in New Issue
Block a user