From 229d81b86cbd4faf695a437fff80ec1f0342c187 Mon Sep 17 00:00:00 2001 From: GaboGG Date: Mon, 27 Jul 2026 20:54:16 -0400 Subject: [PATCH] v0.14.21 - Show purchasable (buy) items in gearSummary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - logGearSummary() now shows 3 sources: 🟢 equipped, 📦 stored, 🛒 purchasable - Highlights buy items NOT already in armory inventory - Summary: Gear DB: 746 total (7 🟢 equipped, 305 📦 stored, 434 🛒 purchasable) - Works with manual HV.scrapeGear() call on Purchase page --- scripts/hv-unified.user.js | 20 +++++++++++++------- scripts/latest.user.js | 20 +++++++++++++------- src/config.js | 2 +- src/gear-scraper.js | 16 +++++++++++----- src/header.user.js | 2 +- 5 files changed, 39 insertions(+), 21 deletions(-) diff --git a/scripts/hv-unified.user.js b/scripts/hv-unified.user.js index 4a1f99f..1d9a8b0 100644 --- a/scripts/hv-unified.user.js +++ b/scripts/hv-unified.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.20 +// @version 0.14.21 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* @@ -17,7 +17,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.14.20'; +const VERSION = '0.14.21'; const CFG = { // — Battle automation @@ -3312,13 +3312,19 @@ function logGearSummary() { const db = getGearDB(); const equipped = db.filter(e => e.source === 'character'); const armory = db.filter(e => e.source === 'armory'); - console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} equipped, ${armory.length} armory)`, 'color:#0f0'); + const buy = db.filter(e => e.source === 'buy'); + console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} 🟢 equipped, ${armory.length} 📦 stored, ${buy.length} 🛒 purchasable)`, 'color:#0f0'); equipped.forEach(item => { - console.log(` 🗡 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); - }); - armory.forEach(item => { - console.log(` 📦 [${item.category}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); + console.log(` 🟢 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); }); + if (buy.length > 0) { + const used = new Set(armory.map(i => i.id).concat(equipped.filter(i => i.id).map(i => i.id))); + const newOnly = buy.filter(i => !used.has(i.id)); + console.log(`%c 🛒 ${buy.length} purchasable (${newOnly.length} not in armory)`, 'color:#0f0'); + newOnly.slice(0, 5).forEach(item => { + console.log(` 💰 ${item.name} — ${item.price || '?'}${item.stats ? ' (' + Object.keys(item.stats).length + ' stats)' : ''}`); + }); + } } // ── Parse tooltip HTML string into structured stats ── diff --git a/scripts/latest.user.js b/scripts/latest.user.js index 4a1f99f..1d9a8b0 100644 --- a/scripts/latest.user.js +++ b/scripts/latest.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.20 +// @version 0.14.21 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/* @@ -17,7 +17,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.14.20'; +const VERSION = '0.14.21'; const CFG = { // — Battle automation @@ -3312,13 +3312,19 @@ function logGearSummary() { const db = getGearDB(); const equipped = db.filter(e => e.source === 'character'); const armory = db.filter(e => e.source === 'armory'); - console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} equipped, ${armory.length} armory)`, 'color:#0f0'); + const buy = db.filter(e => e.source === 'buy'); + console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} 🟢 equipped, ${armory.length} 📦 stored, ${buy.length} 🛒 purchasable)`, 'color:#0f0'); equipped.forEach(item => { - console.log(` 🗡 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); - }); - armory.forEach(item => { - console.log(` 📦 [${item.category}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); + console.log(` 🟢 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); }); + if (buy.length > 0) { + const used = new Set(armory.map(i => i.id).concat(equipped.filter(i => i.id).map(i => i.id))); + const newOnly = buy.filter(i => !used.has(i.id)); + console.log(`%c 🛒 ${buy.length} purchasable (${newOnly.length} not in armory)`, 'color:#0f0'); + newOnly.slice(0, 5).forEach(item => { + console.log(` 💰 ${item.name} — ${item.price || '?'}${item.stats ? ' (' + Object.keys(item.stats).length + ' stats)' : ''}`); + }); + } } // ── Parse tooltip HTML string into structured stats ── diff --git a/src/config.js b/src/config.js index f9ecd48..56a5ae8 100644 --- a/src/config.js +++ b/src/config.js @@ -2,7 +2,7 @@ // CONFIG — default settings // ═══════════════════════════════════════════════════════════════════════ -const VERSION = '0.14.20'; +const VERSION = '0.14.21'; const CFG = { // — Battle automation diff --git a/src/gear-scraper.js b/src/gear-scraper.js index 62398f8..7012e7e 100644 --- a/src/gear-scraper.js +++ b/src/gear-scraper.js @@ -41,13 +41,19 @@ function logGearSummary() { const db = getGearDB(); const equipped = db.filter(e => e.source === 'character'); const armory = db.filter(e => e.source === 'armory'); - console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} equipped, ${armory.length} armory)`, 'color:#0f0'); + const buy = db.filter(e => e.source === 'buy'); + console.log(`%c[HV] 📦 Gear DB: ${db.length} total (${equipped.length} 🟢 equipped, ${armory.length} 📦 stored, ${buy.length} 🛒 purchasable)`, 'color:#0f0'); equipped.forEach(item => { - console.log(` 🗡 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); - }); - armory.forEach(item => { - console.log(` 📦 [${item.category}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); + console.log(` 🟢 [${item.slotType}] ${item.name} (ID: ${item.id}) — ${item.stats ? Object.keys(item.stats).length + ' stats' : 'no stats'}`); }); + if (buy.length > 0) { + const used = new Set(armory.map(i => i.id).concat(equipped.filter(i => i.id).map(i => i.id))); + const newOnly = buy.filter(i => !used.has(i.id)); + console.log(`%c 🛒 ${buy.length} purchasable (${newOnly.length} not in armory)`, 'color:#0f0'); + newOnly.slice(0, 5).forEach(item => { + console.log(` 💰 ${item.name} — ${item.price || '?'}${item.stats ? ' (' + Object.keys(item.stats).length + ' stats)' : ''}`); + }); + } } // ── Parse tooltip HTML string into structured stats ── diff --git a/src/header.user.js b/src/header.user.js index f164bea..51fda58 100644 --- a/src/header.user.js +++ b/src/header.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name HV Unified // @namespace hvunified -// @version 0.14.20 +// @version 0.14.21 // @description HV Unified — battle automation, guidance, and UI enhancements for HentaiVerse // @author GaboGG + Hermes // @match *://*.hentaiverse.org/*