hv-unified/scripts/build.sh
GaboGG 166539e845 v0.14.33 - In-game gear analysis module
New src/gear-analysis.js — ports analyze_gear.py scoring to JS:
- gearScoreArmor() / gearScoreWeapon() — same weights as Python
- gearDetectSlot() / gearIsTwoHandWeapon() / gearUsable()
- analyzeGear() — scores equipped vs armory vs buy per slot

UI on Armory pages (above equiplist):
- 🔍 Analyze Gear — rescrapes current page, shows per-slot panel
  with top 4 candidates, scores, prices, and upgrade highlights
- 🔄 Clear Buy + Rescan — wipes stale buy data, rescrapes, analyzes

scrapeBuyPage() now also scavenges the full dynjs_eqstore for items
not visible in the current filter tab — one Purchase visit captures
the entire store (429+ items), no need to click through tabs.

Console API: HV.analyzeGear(), HV.gearPanel(), HV.clearBuy()
2026-07-31 07:07:38 -04:00

67 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
# Build HV Unified from src/* into a single hv-unified.user.js
# Usage: ./scripts/build.sh [--watch]
# No dependencies — pure cat concatenation.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"
SRC_DIR="$PROJECT_DIR/src"
OUTPUT="$PROJECT_DIR/scripts/hv-unified.user.js"
# Ordered list of source files
FILES=(
header.user.js
config.js
state.js
utils.js
page-detector.js
battle-parser.js
items.js
knowledge-base.js
strategy-engine.js
action-executor.js
hover-system.js
keybindings.js
ui-overlays.js
settings-panel.js
out-of-battle.js
guidance.js
progress-tracker.js
abilities.js
armory.js
gear-scraper.js
gear-analysis.js
battle-logger.js
re-timer.js
settings-page.js
public-api.js
init.js
)
echo "🛡️ Building HV Unified..."
echo " Source: $SRC_DIR"
echo " Output: $OUTPUT"
echo ""
# Clear output
> "$OUTPUT"
# Concatenate with clear separators
for file in "${FILES[@]}"; do
src_path="$SRC_DIR/$file"
if [ ! -f "$src_path" ]; then
echo " ⚠️ MISSING: $file (skipping)"
continue
fi
echo " ├── $file"
cat "$src_path" >> "$OUTPUT"
echo "" >> "$OUTPUT"
done
# Count lines
LINES=$(wc -l < "$OUTPUT")
SIZE=$(du -h "$OUTPUT" | cut -f1)
echo ""
echo " ✅ Built: $LINES lines, $SIZE"