Toolasha

Toolasha - Enhanced tools for Milky Way Idle.

Dette er versjoner av dette scriptet hvor koden ble oppdatert. Vis alle versjoner.

  • v0.4.952 19.01.2026

    Fix action queue stats showing wrong action during party interrupts

    Issue: When party leader pauses/resumes combat, the DOM updates instantly but WebSocket cache is stale. This caused action time display to match against queued actions instead of current action, showing wrong stats (e.g., '276 queued' from Crafting when actually doing party combat).

    Root cause: Code used .find() to search ALL cached actions (current + queue), which could match queued actions when DOM showed current action name.

    Fix: Only check cachedActions0. If DOM doesn't match current action, display nothing until cache updates.

    Prevents race condition between DOM update and WebSocket update.

  • v0.4.952 19.01.2026

    Fix enhancement protection items not being used

    CRITICAL BUG FIX: Protection items like Black Bear Fluff were never being added to protection options, causing the simulator to use the expensive base item as protection instead.

    Root cause: Code treated protectionItemHrids as array of arrays, but game data shows it's a flat array of strings. Array.isArray() check on string values always returned false, skipping all protection items.

    Fix: Directly spread protectionItemHrids into options array.

    Example impact:

    • Before: Black Bear Shoes +16 used 1220.5x Black Bear Shoes as protect
    • After: Will use Black Bear Fluff (WAY cheaper)

    v0.4.952

  • v0.4.951 19.01.2026

    Add Top Order Age column to My Listings

    • Shows estimated age of top competing order for each listing
    • Uses shared cache from estimated-listing-age module
    • Handles race condition with setTimeout delay
    • Supports non-enhanceable items (enhancement level 0)
    • Only active when market_showTopOrderAge setting enabled
    • Displays ~elapsed time format (e.g., ~3h 45m)
    • Shows 'N/A' when order book data unavailable
    • Shows 'None' when no competing orders exist

    v0.4.951

  • v0.4.950 18.01.2026

    v0.4.950 - Fix tea efficiency: Apply skill level buffs to effective player level

    • Added parseTeaSkillLevelBonus() to tea-parser.js
    • Fixed alchemy-profit.js, action-calculator.js, profit-calculator.js, gathering-profit.js
    • Tea skill level bonuses (e.g., +8 Cheesesmithing) now boost effective level
    • Restores correct total efficiency (60.3% vs broken 51.3%)
    • Fixes level efficiency calculation for all production and gathering skills
  • v0.4.947 18.01.2026

    v0.4.948: Enhanced alchemy profit calculator with detailed modifier breakdowns

    • Added comprehensive modifier breakdowns showing all sources:
      • Success Rate: base rate + tea bonus (Catalytic Tea 5% ratio boost)
      • Efficiency: level + house + tea + equipment + community buff (Production Efficiency)
      • Action Speed: equipment + tea bonuses
      • Rare Find: equipment + achievement bonuses
      • Essence Find: equipment bonuses
    • Fixed essence drop rate extraction by matching items via HRID instead of index position
    • Implemented Rare Find bonus application to rare drops with full calculation visibility
    • Split revenue display into Normal Drops, Essence Drops, and Rare Drops sections
    • Added collapsible sections for all modifier details with state preservation across updates
    • Added Production Efficiency community buff support (14% base + 0.3% per level)

    🤖 Generated with Claude Code

    Co-Authored-By: Claude Sonnet 4.5 [email protected]

  • v0.4.946 17.01.2026

    Make trade history character-specific

    • Add character ID suffix to storage key (tradeHistory_{characterId})
    • Load/save data separately for each character
    • Handle character switches by clearing old data and reloading new
    • Prevents trade history from being shared across characters

    Fix reversed buy price color logic

    • Current price HIGHER than last buy → RED (worse deal now)
    • Current price LOWER than last buy → GREEN (better deal now)
    • Sell logic was already correct

    Fix sell price color logic to match buy logic

    Both colors now indicate current market opportunity:

    • BUY: Current ask HIGHER → RED (worse), LOWER → GREEN (better)
    • SELL: Current bid HIGHER → GREEN (better), LOWER → RED (worse)

    Colors show whether NOW is a good time to trade compared to your last price

  • v0.4.946 17.01.2026

    Fix trade history color comparison to use current top orders

    • Extract ask/bid prices from DOM instead of 24-hour API averages
    • Properly compare against visible market prices (82K/52K not 640K/620K)
    • Add parsePrice() helper to handle K/M/B suffixes
    • Colors now correctly show grey when prices match current market
  • v0.4.946 17.01.2026

    Add personal trade history feature (v0.4.946)

    • Track buy/sell prices when market orders complete
    • Display last traded prices when viewing items in marketplace
    • Store history in IndexedDB (character-specific)
    • Position display above item icon without overlay
    • WebSocket hook for market_listings_updated events
    • New setting: market_tradeHistory (default: true)
  • v0.4.945 17.01.2026

    Fix config settings not loading with character data (v0.4.944)

    Root cause: Race condition where config.initialize() ran before character data loaded, resulting in empty settingsMap. Features checking getSetting() received false, causing them to skip initialization.

    Impact: ALL features that check config.getSetting() failed to initialize, including Estimated Listing Age, network alerts, and others.

    Changes:

    • main.js: Added config.loadSettings() and config.applyColorSettings() in character_initialized handler before feature initialization
    • Matches existing pattern from character_switched handler in feature-registry

    Flow:

    1. config.initialize() runs early (loads defaults, characterId undefined)
    2. character_initialized fires when character data available
    3. config.loadSettings() reloads settings with character-specific data
    4. config.applyColorSettings() applies user color customizations
    5. Features initialize with correct user settings

    Result: Features now properly initialize with user settings on both initial load and character switch.

    v0.4.945: Fix reactive colors & Milkonomy export

    • Fix config API bug: Changed config.on() to config.onSettingChange()

      • Fixed 5 files using non-existent config.on() method
      • ability-book-calculator, inventory-sort, house-cost-display, task-profit-display, combat-score
    • Implement reactive Script Accent Color for all features

      • All 10 features using COLOR_ACCENT now update immediately when color changes
      • No page refresh required for color customization
      • Added setupSettingListener() and refresh() methods to all affected features
    • Fix Milkonomy export ownership check

      • Simplified logic: reject any external profile ID
      • Added defensive storage clearing to prevent stale data blocking exports
      • Now works correctly when exporting your own profile
    • Market data refactoring (Phase 2)

      • Centralized price access in utils/market-data.js
      • Eliminated ~200 lines of duplicated pricing mode logic
      • Fixed console spam with input validation and warning deduplication
  • v0.4.943 17.01.2026

    Fix settings tab disappearing on character switch (v0.4.943)

    Root cause: Duplicate event listener accumulation causing race conditions and timing mismatches between cleanup and re-initialization.

    Changes:

    • settings-ui.js: Added characterSwitchHandler property to prevent duplicate listeners
    • settings-ui.js: Switched from 'character_switching' to 'character_initialized' event
    • settings-ui.js: Created handleCharacterSwitch() method with 500ms stabilization delay
    • settings-ui.js: Split cleanup into cleanupDOM() (character switch) and cleanup() (full shutdown)
    • feature-registry.js: Removed redundant settingsUI.initialize() call (now self-managed)

    Pattern: Follows action-time-display.js proven working pattern for character switch handling.

    Result: Settings tab now persists correctly through multiple character switches.

  • v0.4.942 17.01.2026

    v0.4.942 - Fix material limit calculation for crafting and alchemy actions

    • Fixed material limit showing efficiency-multiplied totals instead of actual attempts
    • Added action type check to separate alchemy (primaryItemHash) from crafting logic
    • Crafting now correctly calculates limits based on input items + upgrade items
    • Alchemy now correctly uses primaryItemHash for item-specific decompose/coinify
    • Material limit now shows max attempts possible, not total items produced
    • Time calculations updated to handle attempts vs items correctly
  • v0.4.941 17.01.2026

    v0.4.941 - Fix dungeon tracker UI persistence on character selection screen

    • Added MutationObserver to detect 'Select Character' heading
    • Hides dungeon UI when returning to character selection screen
    • Added offUpdate() method to dungeon-tracker.js for proper callback cleanup
    • Improved listener lifecycle management to prevent memory leaks
    • Stores callback/handler references for proper unregistration
  • v0.4.940 17.01.2026

    v0.4.940 - Character switch fixes and console cleanup

    Fixes:

    • Settings UI observer now restarts after character switch
    • Storage flushAll() now actually saves pending data
    • Flush storage before character switch cleanup
    • Non-blocking feature re-initialization with requestIdleCallback

    Cleanup:

    • Removed unnecessary console.log statements (kept errors/warnings)
    • Cleaned up initialization, cleanup, and progress logging
    • Improved code readability by removing verbose announcements
  • v0.4.939 17.01.2026

    v0.4.939 - Version bump before settings/performance fixes

    Clean baseline before implementing:

    • Fix 1: Settings UI observer restart after character switch
    • Fix 2: Storage flushAll() to actually save pending data
    • Fix 3: Flush storage before character switch cleanup
    • Fix 4: Non-blocking re-initialization with requestIdleCallback
  • v0.4.938 17.01.2026

    v0.4.938 - Swap inventory badge positions

    UI Changes:

    • Ask price badges now on LEFT (instant-buy - primary price)
    • Bid price badges now on RIGHT (instant-sell - secondary price)

    Added:

    • FEATURES.txt - Comprehensive feature list

    🤖 Generated with Claude Code

  • v0.4.937 17.01.2026

    v0.4.937 - Rolling averages, settings fixes, combat exclusions

    Bug Fixes:

    • Fixed actions to level calculator treating attempts as outputs (efficiency bug)
    • Fixed dungeon chat rolling averages resetting on new messages (persistent counter)
    • Fixed quick input buttons appearing on combat tiles (exclude combat actions)
    • Fixed inventory badge price settings descriptions (per-item vs stack, Ask/Bid terminology)

    Features:

    • Dungeon chat now shows cumulative rolling averages (each message = avg up to that point)
    • Corrected market terminology: Ask (instant-buy), Bid (instant-sell)

    🤖 Generated with Claude Code

  • v0.4.936 16.01.2026

    v0.4.936 - Fix tooltip prices for enhanced items

    • Fixed tooltip price display to show enhancement-level specific prices
    • Previously showed base item (+0) price for all enhancement levels
    • Now correctly shows market price for +1 to +20 enhanced items
    • Shows 'No market data' when enhanced item has no market listings

    Changes:

    • Reordered enhancement level extraction before price fetch
    • Changed marketAPI.getPrice() to use actual enhancement level
    • Updated version to 0.4.936 in package.json, main.js, and userscript-header.txt
  • v0.4.935 16.01.2026

    v0.4.935 - Fix Enhancement Tracker visibility detection

    • Fixed class name detection: EnhancingPanel_enhancingPanel (not SkillActionDetail_enhancingComponent)
    • Fixed boolean coercion bug in setting check (showOnlyOnEnhancingScreen !== true)
    • Added polling to detect both screen navigation and setting changes (500ms interval)
    • Removed debounce for immediate panel detection
    • Integrated formatPercentage utility from modularization work
  • v0.4.934 16.01.2026

    v0.4.934 - Character switch fixes and hybrid dungeon average calculation

    • Fixed character switch cleanup and re-initialization

      • Dungeon tracker properly cleans up WebSocket handlers, UI, and state
      • All features re-initialize after character switch with reloaded config
      • Dungeon UI now appears immediately when switching back to character in dungeon
    • Fixed settings disappearing on character switch

      • Config settings now reload before feature re-initialization
    • Implemented hybrid average calculation for dungeon chat annotations

      • Averages now appear immediately from visible chat messages (in-memory)
      • Automatically aligns with backfilled data when backfill is done
      • No automatic saving - respects manual backfill workflow
  • v0.4.933 16.01.2026

    Fix task dungeon icons with dynamic sizing and right-to-left layout

    • Fixed dungeon icon detection using correct game data structure
    • Added dynamic icon sizing: 30%/25%/20% based on total icon count (1-5)
    • Implemented right-to-left layout: Monster always on right, dungeons to its left
    • Added countDungeonsForMonster() to determine icon count before positioning
    • Updated addIconOverlay() to accept width parameter
    • Version bump to 0.4.933
  • v0.4.932 15.01.2026

    Fix Settings tab not appearing - revert to polling MutationObserver

    • Reverted settings-ui.js to use direct MutationObserver with polling approach
    • Class name corrected to SettingsPanel_tabsComponentContainer
    • Removed domObserver import (settings tab is special case, needs polling)
    • Removed settings tab health check from main.js (tab only appears when user opens Settings)
    • Version bump to 0.4.932
  • v0.4.931 15.01.2026

    v0.4.931 - Action Panel Utilities & Bug Fixes

    Features:

    • Created action-panel-helper.js utility (#3 from modularization plan)
      • findActionInput() - Standardized input detection
      • attachInputListeners() - Unified event listener setup
      • performInitialUpdate() - Initial value check
    • Refactored required-materials.js and output-totals.js to use new utility
    • Lines saved: ~50 immediately (2 files refactored)

    Bug Fixes:

    • Fixed required-materials upgrade item calculations
    • Fixed required-materials display positioning (now below container)
    • Fixed required-materials inventory reading (now uses Item_count)
    • Fixed dungeon tracker UI showing when not in dungeon (added initial hide)
    • Removed dead code from required-materials.js

    🤖 Generated with Claude Code

    Co-Authored-By: Claude Sonnet 4.5 [email protected]

  • v0.4.930 14.01.2026

    v0.4.930 - React Input Utility, hours calc fix, dungeon tracker position constraints

    • Extract React Input Utility into reusable module (Modularization #2)
    • Fix hours calculation to account for efficiency multiplier
    • Add position boundaries to dungeon tracker (prevent dragging off-screen)
    • Add Ctrl+Shift+D shortcut to reset dungeon tracker position
    • Refactor quick-input-buttons.js and combat-sim-integration.js to use utility
  • v0.4.929 14.01.2026

    v0.4.929 - Add black borders to all icon numbers and Greasyfork URLs

    • Added text shadow borders to equipment level display (bottom left)
    • Added text shadow borders to inventory total value (top right)
    • Added Greasyfork @downloadURL and @updateURL to script header
    • Consistent readability for all numeric overlays on item icons
  • v0.4.928 14.01.2026

    Add independent inventory badge prices feature

    Implements Option A from badge price display proposal: fully independent price badge display that works without requiring inventory sorting.

    New Features:

    • Show ask/bid price badges on inventory item icons
    • Independent UI controls (Ask/Bid/None buttons)
    • Works completely separately from inventory sorting feature
    • Persistent user preferences across sessions
    • Smart pricing using enhancement costs for highly enhanced items

    Files Created:

    • src/features/inventory/inventory-badge-prices.js (606 lines)
    • INVENTORY_BADGE_PRICES.md (feature documentation)

    Files Modified:

    • src/features/settings/settings-config.js (added invBadgePrices settings)
    • src/core/config.js (added feature to registry)
    • src/core/feature-registry.js (imported and initialized feature)

    Also includes modularization of dungeon tracker UI from previous session:

    • Extracted state management (dungeon-tracker-ui-state.js)
    • Extracted chart rendering (dungeon-tracker-ui-chart.js)
    • Extracted history display (dungeon-tracker-ui-history.js)
    • Extracted interactions (dungeon-tracker-ui-interactions.js)
    • Reduced dungeon-tracker-ui.js from 1,930 to 659 lines (66% reduction)

    🤖 Generated with Claude Code (https://claude.com/claude-code)

    Co-Authored-By: Claude Sonnet 4.5 [email protected]

    Improve inventory badge prices setting label

    Changed from technical jargon to user-friendly description:

    • Before: 'Show price badges on item icons (independent of sorting)'
    • After: 'Show bid/ask prices on item icons'

    Focus on what the feature does rather than implementation details. The help text still mentions independence from sorting for clarity.

    🤖 Generated with Claude Code (https://claude.com/claude-code)

    Co-Authored-By: Claude Sonnet 4.5 [email protected]

    v0.4.928 - Inventory badge pricing: per-item display with market-only prices

    • Changed badges to show per-item prices instead of stack totals
    • Updated text shadow to simple black outline for better readability
    • Removed production cost fallbacks (crafting/enhancement costs)
    • Now shows only actual market prices from market API
    • Enhanced items +13 still use enhancement cost when configured
  • v0.4.927 14.01.2026 Imported from URL