v2.1: Add dynamic weather effects, clothing inventory, and bug fixes

Features:
- Add dynamic weather effects system (snow, rain, mist, sunshine, storm, wind, blizzard)
- Add separate Clothing tab in inventory system
- Weather effects auto-update based on Info Box weather field
- Combined effects for storm (rain+lightning) and blizzard (snow+wind)

Improvements:
- Settings migration system for automatic feature enablement
- Weather effects positioned behind chat interface (z-index: 1)
- Dynamic weather enabled by default for new users

Bug Fixes:
- Fix tab visibility issues (disabled tabs now properly hide)
- Fix theme-aware borders (remove hardcoded blue colors)
- Fix double scrollbar in Edit Trackers window
- Fix scroll position jumping when editing Present Characters
- Fix dynamic weather toggle hiding issue

Technical:
- Update inventory schema to v2.1 with clothing field
- Add automatic migration for existing v2 inventories
- Update parsers and prompts to handle clothing separately
- Add translations (EN/ZH-TW) for new features
This commit is contained in:
Spicy_Marinara
2026-01-02 13:58:43 +01:00
parent ddd59d124e
commit 62ed7ffb18
22 changed files with 1035 additions and 88 deletions
+14 -5
View File
@@ -311,6 +311,10 @@ export function renderThoughts() {
debugLog('[RPG Thoughts] showCharacterThoughts setting:', extensionSettings.showCharacterThoughts);
debugLog('[RPG Thoughts] Container exists:', !!$thoughtsContainer);
// Save scroll position before re-rendering
const scrollParent = $thoughtsContainer.closest('.rpg-content-box, .rpg-tab-content, .rpg-mobile-tab-content').filter(':visible').first();
const savedScrollTop = scrollParent.length > 0 ? scrollParent.scrollTop() : 0;
// Add updating class for animation
if (extensionSettings.enableAnimations) {
$thoughtsContainer.addClass('rpg-content-updating');
@@ -474,8 +478,8 @@ export function renderThoughts() {
const escapedDefaultName = escapeHtmlAttr(defaultName);
// Determine right-click action text based on auto-generate setting
const defaultAvatarRightClickAction = extensionSettings.autoGenerateAvatars
? 'Right-click to regenerate avatar'
const defaultAvatarRightClickAction = extensionSettings.autoGenerateAvatars
? 'Right-click to regenerate avatar'
: 'Right-click to delete avatar';
html += '<div class="rpg-thoughts-content">';
@@ -541,8 +545,8 @@ export function renderThoughts() {
const isCurrentlyGenerating = isGenerating(char.name);
// Determine right-click action text based on auto-generate setting
const avatarRightClickAction = extensionSettings.autoGenerateAvatars
? 'Right-click to regenerate avatar'
const avatarRightClickAction = extensionSettings.autoGenerateAvatars
? 'Right-click to regenerate avatar'
: 'Right-click to delete avatar';
html += `
@@ -609,6 +613,11 @@ export function renderThoughts() {
$thoughtsContainer.html(html);
// Restore scroll position to prevent UI jumping
if (scrollParent.length > 0 && savedScrollTop > 0) {
scrollParent.scrollTop(savedScrollTop);
}
debugLog('[RPG Thoughts] ✓ HTML rendered to container');
debugLog('[RPG Thoughts] =======================================================');
@@ -666,7 +675,7 @@ export function renderThoughts() {
try {
// Regenerate the avatar
const newUrl = await regenerateAvatar(characterName);
if (newUrl) {
console.log(`[RPG Companion] Successfully regenerated avatar for: ${characterName}`);
} else {