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:
@@ -78,6 +78,24 @@ export function loadSettings() {
|
||||
}
|
||||
|
||||
updateExtensionSettings(savedSettings);
|
||||
|
||||
// Perform settings migrations based on version
|
||||
const currentVersion = extensionSettings.settingsVersion || 1;
|
||||
let settingsChanged = false;
|
||||
|
||||
// Migration to version 2: Enable dynamic weather for existing users
|
||||
if (currentVersion < 2) {
|
||||
console.log('[RPG Companion] Migrating settings to version 2 (enabling dynamic weather)');
|
||||
extensionSettings.enableDynamicWeather = true;
|
||||
extensionSettings.settingsVersion = 2;
|
||||
settingsChanged = true;
|
||||
}
|
||||
|
||||
// Save migrated settings
|
||||
if (settingsChanged) {
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
// console.log('[RPG Companion] Settings loaded:', extensionSettings);
|
||||
} else {
|
||||
// console.log('[RPG Companion] No saved settings found, using defaults');
|
||||
|
||||
Reference in New Issue
Block a user