Skip to content

[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
DanderBot:mainfrom
Krathe82:pr/texture-fallback
Draft

[12.0.7] feat: fall back to a stock texture when a configured texture is missing#123
Krathe82 wants to merge 1 commit into
DanderBot:mainfrom
Krathe82:pr/texture-fallback

Conversation

@Krathe82
Copy link
Copy Markdown
Contributor

@Krathe82 Krathe82 commented Jun 4, 2026

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.

⚠️ Targeting 12.0.7 — please hold until then

Detection uses C_UIFileAsset.IsKnownFile, which is new in WoW 12.0.7 (verified: UIFileAssetAPIDocumentation.lua is 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

  • New DF:SafeSetStatusBarTexture / DF:SafeSetTexture helpers (Core.lua) substitute the stock texture only when IsKnownFile(path) == false.
  • Routed every user-configurable texture through them: health + missing-health bars, background, pet bar + background, reduced-max overlay, and the absorb / overflow / heal-absorb / heal-prediction bars.
  • Hardcoded/known Blizzard textures are intentionally left untouched.
  • Stock fallback is the bundled DF_Minimalist, so the fallback itself can never be missing.

Testing

  • 12.0.5 (live): C_UIFileAsset is nil → inert, no change.
  • 12.0.7: set a bad texture path → the bar falls back to DF_Minimalist instead of rendering black, with a one-time notice.

…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant