feat(inventory): wire up v2 system to main panel with full interactivity
- Add inventory section to template.html between Thoughts and bottom controls - Wire up renderInventory() to all event handlers (message received, character changed, swipes) - Initialize inventory container reference and event listeners in index.js - Add showInventory toggle checkbox to settings with visibility control - Update layout.js to handle inventory section and divider visibility - Add renderInventory parameter to updateRPGData for separate mode support - Update state.js and config.js with inventory container and showInventory setting Inventory is now fully integrated as a visible, interactive panel section that persists across all user interactions.
This commit is contained in:
+3
-1
@@ -29,6 +29,7 @@ export const defaultSettings = {
|
||||
showUserStats: true,
|
||||
showInfoBox: true,
|
||||
showCharacterThoughts: true,
|
||||
showInventory: true, // Show inventory section (v2 system)
|
||||
showThoughtsInChat: true, // Show thoughts overlay in chat
|
||||
enableHtmlPrompt: false, // Enable immersive HTML prompt injection
|
||||
enablePlotButtons: true, // Show plot progression buttons above chat input
|
||||
@@ -71,5 +72,6 @@ export const defaultSettings = {
|
||||
wis: 10,
|
||||
cha: 10
|
||||
},
|
||||
lastDiceRoll: null // Store last dice roll result
|
||||
lastDiceRoll: null, // Store last dice roll result
|
||||
collapsedInventoryLocations: [] // Array of collapsed storage location names
|
||||
};
|
||||
|
||||
+8
-1
@@ -17,6 +17,7 @@ export let extensionSettings = {
|
||||
showUserStats: true,
|
||||
showInfoBox: true,
|
||||
showCharacterThoughts: true,
|
||||
showInventory: true, // Show inventory section (v2 system)
|
||||
showThoughtsInChat: true, // Show thoughts overlay in chat
|
||||
enableHtmlPrompt: false, // Enable immersive HTML prompt injection
|
||||
enablePlotButtons: true, // Show plot progression buttons above chat input
|
||||
@@ -59,7 +60,8 @@ export let extensionSettings = {
|
||||
wis: 10,
|
||||
cha: 10
|
||||
},
|
||||
lastDiceRoll: null // Store last dice roll result
|
||||
lastDiceRoll: null, // Store last dice roll result
|
||||
collapsedInventoryLocations: [] // Array of collapsed storage location names
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -123,6 +125,7 @@ export let $panelContainer = null;
|
||||
export let $userStatsContainer = null;
|
||||
export let $infoBoxContainer = null;
|
||||
export let $thoughtsContainer = null;
|
||||
export let $inventoryContainer = null;
|
||||
|
||||
/**
|
||||
* State setters - provide controlled mutation of state variables
|
||||
@@ -186,3 +189,7 @@ export function setInfoBoxContainer($element) {
|
||||
export function setThoughtsContainer($element) {
|
||||
$thoughtsContainer = $element;
|
||||
}
|
||||
|
||||
export function setInventoryContainer($element) {
|
||||
$inventoryContainer = $element;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user