Skip to content

feat(ltk_overlay): add support for layer filtering in mod metadata co…#137

Merged
Crauzer merged 3 commits intomainfrom
enabled-layers
Mar 18, 2026
Merged

feat(ltk_overlay): add support for layer filtering in mod metadata co…#137
Crauzer merged 3 commits intomainfrom
enabled-layers

Conversation

@Crauzer
Copy link
Member

@Crauzer Crauzer commented Mar 18, 2026

…llection

This update introduces an optional enabled_layers field in the EnabledMod struct, allowing users to specify which layers should be processed during overlay building. If enabled_layers is provided, only the layers listed will be included; otherwise, all layers are processed as before. This change enhances flexibility in mod management.anot

@Crauzer Crauzer requested a review from Copilot March 18, 2026 14:02
@Crauzer Crauzer self-assigned this Mar 18, 2026
@Crauzer Crauzer added the overlay Issues related to WAD overlay builder (ltk_overlay) label Mar 18, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 EnabledMod with enabled_layers and 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 {
… regarding thread safety and read-only operations
@Crauzer Crauzer merged commit fce5d3c into main Mar 18, 2026
9 checks passed
@Crauzer Crauzer deleted the enabled-layers branch March 18, 2026 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

overlay Issues related to WAD overlay builder (ltk_overlay)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants