feat(ltk_overlay): add support for layer filtering in mod metadata co…#137
Merged
feat(ltk_overlay): add support for layer filtering in mod metadata co…#137
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds optional per-mod layer filtering to the overlay build’s metadata collection, letting callers restrict which mod layers are processed (while keeping the previous “all layers” default).
Changes:
- Extend
EnabledModwithenabled_layersand add helper(s) for layer-activation + cache fingerprinting. - Apply layer filtering during pass-1 metadata collection and add a targeted unit test for it.
- Update fingerprinting/threading model (trait bounds + parallel fingerprint computation) and refresh docs/examples accordingly.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/ltk_overlay/src/builder/mod.rs | Adds enabled_layers, BASE_LAYER_NAME, and cache/layer helper methods on EnabledMod. |
| crates/ltk_overlay/src/builder/metadata.rs | Skips disabled layers during metadata collection; parallelizes fingerprint computation; adds tests. |
| crates/ltk_overlay/src/content.rs | Updates ModContentProvider bounds and content_fingerprint signature. |
| crates/ltk_overlay/src/modpkg_content.rs | Updates provider impl bounds/signature to match the trait changes. |
| crates/ltk_overlay/src/fantome_content.rs | Updates provider impl bounds/signature to match the trait changes. |
| crates/ltk_overlay/src/lib.rs | Updates public re-exports and doc example to include enabled_layers and BASE_LAYER_NAME. |
| crates/ltk_overlay/README.md | Updates usage example to the current API and includes enabled_layers. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| /// - **Hex-hash filenames** (e.g., `0123456789abcdef.bin`) are parsed directly as | ||
| /// `u64` values. This is used by packed WAD content where original paths are lost. | ||
| pub trait ModContentProvider: Send { | ||
| pub trait ModContentProvider: Send + Sync { |
…o ensure consistent hashing
… regarding thread safety and read-only operations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…llection
This update introduces an optional
enabled_layersfield in theEnabledModstruct, allowing users to specify which layers should be processed during overlay building. Ifenabled_layersis provided, only the layers listed will be included; otherwise, all layers are processed as before. This change enhances flexibility in mod management.anot