Spicy_Marinara
|
62ed7ffb18
|
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
|
2026-01-02 13:58:43 +01:00 |
|
Lucas 'Paperboy' Rose-Winters
|
b00bae905f
|
feat(inventory): add v2 parsing and generation support
Add full AI integration for inventory v2 format:
**Parsing (NEW: inventoryParser.js, 125 lines):**
- extractInventoryData() - Parse multi-line v2 format from AI responses
- Extracts "On Person: ..." section
- Extracts multiple "Stored - [Location]: ..." sections
- Extracts "Assets: ..." section
- Returns InventoryV2 object
- extractLegacyInventory() - Fallback parser for old v1 format
- extractInventory() - Main function that tries v2 first, falls back to v1
**Parsing Integration (parser.js):**
- Import extractInventory() from inventoryParser
- Replace old single-line regex with v2-aware extraction
- Use feature flag to switch between v1/v2 parsing modes
- Maintains backward compatibility with FEATURE_FLAGS.useNewInventory
**Generation (promptBuilder.js, 60 lines changed):**
- NEW: buildInventorySummary() - Converts v2 object to multi-line text
- Formats "On Person: ..." line
- Formats multiple "Stored - [Location]: ..." lines
- Formats "Assets: ..." line
- Handles legacy v1 string format for backward compat
- Update generateTrackerInstructions() with v2 format spec:
- Shows AI how to format inventory in multi-line v2 structure
- Includes note about multiple storage locations
- Falls back to v1 format when feature flag disabled
- Update generateContextualSummary() to use buildInventorySummary()
- Converts v2 inventory to readable context for separate mode
**Format Examples:**
AI Output (v2 format):
```
On Person: Sword (equipped), 3x Health Potions, Leather Armor
Stored - Home: Spare clothes, Tools, 50 gold coins
Stored - Bank: Family heirloom, Important documents
Assets: Motorcycle (garage), Downtown apartment (owned)
```
Parsed Result:
```js
{
version: 2,
onPerson: "Sword (equipped), 3x Health Potions, Leather Armor",
stored: {
"Home": "Spare clothes, Tools, 50 gold coins",
"Bank": "Family heirloom, Important documents"
},
assets: "Motorcycle (garage), Downtown apartment (owned)"
}
```
Changes:
- NEW: src/systems/generation/inventoryParser.js (125 lines)
- MODIFIED: src/systems/generation/parser.js (+14 lines)
- MODIFIED: src/systems/generation/promptBuilder.js (+60 lines)
Part of inventory system v2 implementation
Dependencies: v2 types, migration utility, persistence integration
|
2025-10-17 15:10:31 +11:00 |
|