Refactor inventory lock logic to use item names

Updated inventory lock management and rendering to match items by name instead of index, improving reliability and consistency. Also adjusted quest rendering and parsing to handle locked quest objects with a value property.
This commit is contained in:
Spicy_Marinara
2026-01-23 09:17:40 +01:00
parent e82918004e
commit 6fc35e50a1
4 changed files with 29 additions and 21 deletions
+2
View File
@@ -617,6 +617,8 @@ export function parseUserStats(statsText) {
if (!quest) return '';
if (typeof quest === 'string') return quest;
if (typeof quest === 'object') {
// Check for locked format: {value, locked}
if (quest.value !== undefined) return String(quest.value);
// v3 format: {title, description, status}
return quest.title || quest.description || JSON.stringify(quest);
}