Skip to content

Fix: unlock_clothing no longer forces wardrobe open#20

Merged
narayan24 merged 1 commit into
masterfrom
fix/unlock-clothing-opens-wardrobe
May 14, 2026
Merged

Fix: unlock_clothing no longer forces wardrobe open#20
narayan24 merged 1 commit into
masterfrom
fix/unlock-clothing-opens-wardrobe

Conversation

@narayan24
Copy link
Copy Markdown
Owner

Problem

UnlockClothing() called ShowWardrobe() unconditionally with the comment "harmless if closed". But ShowWardrobe() always sets wardrobeOverlay.Visibility = Visible, so buying any clothing item immediately opened the wardrobe overlay.

Fix

Check wardrobeOverlay.Visibility == Visibility.Visible first — only refresh if it is already open (e.g. player is browsing the wardrobe while a template runs). Otherwise do nothing.

Test plan

  • Buy an item in the clothing store → wardrobe does not open
  • Open wardrobe manually, then trigger unlock_clothing via template → wardrobe refreshes in place
  • Wardrobe still works normally when opened via the Change clothes link

🤖 Generated with Claude Code

ShowWardrobe() unconditionally sets wardrobeOverlay Visibility=Visible.
The "harmless if closed" comment was wrong — it always opened it.
Now only refreshes if the wardrobe is already visible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@narayan24 narayan24 merged commit 039a734 into master May 14, 2026
@narayan24 narayan24 deleted the fix/unlock-clothing-opens-wardrobe branch May 14, 2026 23:39
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