[12.0.7] feat: fall back to a stock texture when a configured texture is missing#123
Draft
Krathe82 wants to merge 1 commit into
Draft
[12.0.7] feat: fall back to a stock texture when a configured texture is missing#123Krathe82 wants to merge 1 commit into
Krathe82 wants to merge 1 commit into
Conversation
…e is missing When a profile imported from another user references a 3rd-party or SharedMedia texture this client does not have (or the providing addon was removed), the affected bar/background rendered black/blank. Detect the missing asset with C_UIFileAsset.IsKnownFile (new in 12.0.7) and substitute DFs bundled default texture (DF_Minimalist), with a once-per-session notice. Adds DF:SafeSetStatusBarTexture / DF:SafeSetTexture and routes every user-configurable texture through them: health + missing-health bars, background, pet bar+bg, reduced-max overlay, and the absorb / overflow / heal-absorb / heal-prediction bars. Hardcoded/known Blizzard textures are left untouched. Feature-detected via pcall on C_UIFileAsset, so it is completely inert on clients without the namespace (pre-12.0.7) and self-activates on 12.0.7.
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.
What
When a profile imported from another user references a 3rd-party or shared-media texture this client doesn't have (or the providing addon was removed), the affected bar/background renders black/blank. This substitutes DandersFrames' bundled default (
DF_Minimalist) and shows a once-per-session notice instead.Detection uses
C_UIFileAsset.IsKnownFile, which is new in WoW 12.0.7 (verified:UIFileAssetAPIDocumentation.luais present in the 12.0.7 client and absent in 12.0.5). The code is feature-detected (pcall-guarded on the namespace), so on 12.0.5 it is completely inert — textures apply exactly as before, no behaviour change and no errors. It self-activates when 12.0.7 ships. Opened as a draft to flag that it should land with the 12.0.7 release.How
DF:SafeSetStatusBarTexture/DF:SafeSetTexturehelpers (Core.lua) substitute the stock texture only whenIsKnownFile(path) == false.DF_Minimalist, so the fallback itself can never be missing.Testing
C_UIFileAssetis nil → inert, no change.DF_Minimalistinstead of rendering black, with a one-time notice.