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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user