feat: add Equipment tab with slot-type validation
Add a new Equipment tab to manage player gear and stat bonuses. Features: - 19 equipment slots across 8 categories (helmet, necklace, body armor, gloves, pants, shoes, rings, accessories) - Type-to-slot validation: each type has max equipped limits (1 helmet, 10 rings, 3 accessories, etc.) - Auto-slot assignment: equipping a ring fills the first available ring slot - Stat bonuses from equipped items display on RPG attributes (e.g. STR 10 +2) - Create/edit modal with stat checkboxes per RPG attribute - Inventory list for unequipped items Architecture: - Shared constants in src/systems/equipment/constants.js - Category-based types (Ring, Accessory) with auto-slot assignment - v7 migration converts legacy slot-specific types to generic categories - Full i18n support for all UI strings Files: - New: src/systems/equipment/constants.js - New: src/systems/interaction/equipmentActions.js - New: src/systems/rendering/equipment.js - Modified: state.js, persistence.js, template.html, index.js - Modified: userStats.js, desktop.js, mobile.js, layout.js, modals.js - Modified: apiClient.js, sillytavern.js, style.css, en.json
This commit is contained in:
@@ -96,6 +96,14 @@
|
||||
<!-- Divider after Inventory -->
|
||||
<div id="rpg-divider-inventory" class="rpg-divider"></div>
|
||||
|
||||
<!-- Equipment Section -->
|
||||
<div id="rpg-equipment" class="rpg-section rpg-equipment-section">
|
||||
<!-- Content will be populated by JavaScript -->
|
||||
</div>
|
||||
|
||||
<!-- Divider after Equipment -->
|
||||
<div id="rpg-divider-equipment" class="rpg-divider"></div>
|
||||
|
||||
<!-- Quests Section -->
|
||||
<div id="rpg-quests" class="rpg-section rpg-quests-section">
|
||||
<!-- Content will be populated by JavaScript -->
|
||||
@@ -448,6 +456,15 @@
|
||||
Track items carried, clothing worn, stored items, and assets.
|
||||
</small>
|
||||
|
||||
<label class="checkbox_label">
|
||||
<input type="checkbox" id="rpg-toggle-equipment" />
|
||||
<span data-i18n-key="template.settingsModal.display.showEquipment">Show Equipment</span>
|
||||
</label>
|
||||
<small style="display: block; margin-left: 24px; margin-top: -8px; color: #888; font-size: 11px;"
|
||||
data-i18n-key="template.settingsModal.display.showEquipmentNote">
|
||||
Manage equipped gear and stat bonuses from items.
|
||||
</small>
|
||||
|
||||
<label class="checkbox_label">
|
||||
<input type="checkbox" id="rpg-toggle-quests" />
|
||||
<span data-i18n-key="template.settingsModal.display.showQuests">Show Quests</span>
|
||||
|
||||
Reference in New Issue
Block a user