From 786d1c0792d0a9b0e39f6e88d1a17310e5a59582 Mon Sep 17 00:00:00 2001 From: HikeMap User Date: Wed, 7 Jan 2026 22:30:19 -0600 Subject: [PATCH] Fix: Only apply name prefix to 'anywhere' monsters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Location-specific monsters (like grocery-only spawns) don't need the "Cart Wranglin'" prefix since they're already themed for that location. The prefix now only applies to monsters that can spawn anywhere but happen to be near a special location. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- index.html | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 31b984a..03947d6 100644 --- a/index.html +++ b/index.html @@ -13477,15 +13477,19 @@ }; // Check if spawning near a special location and set name prefix - const spawnPos = L.latLng(monster.position.lat, monster.position.lng); - for (const cache of geocaches) { - // Use tags if available, fall back to icon check for backwards compatibility - const isGrocery = (cache.tags && cache.tags.includes('grocery')) || cache.icon === 'cart'; - if (isGrocery) { - const dist = spawnPos.distanceTo(L.latLng(cache.lat, cache.lng)); - if (dist <= 400) { - monster.namePrefix = "Cart Wranglin' "; - break; + // Only apply prefix to "anywhere" monsters - location-specific monsters don't need it + const monsterSpawnLoc = monsterType.spawnLocation || 'anywhere'; + if (monsterSpawnLoc === 'anywhere') { + const spawnPos = L.latLng(monster.position.lat, monster.position.lng); + for (const cache of geocaches) { + // Use tags if available, fall back to icon check for backwards compatibility + const isGrocery = (cache.tags && cache.tags.includes('grocery')) || cache.icon === 'cart'; + if (isGrocery) { + const dist = spawnPos.distanceTo(L.latLng(cache.lat, cache.lng)); + if (dist <= 400) { + monster.namePrefix = "Cart Wranglin' "; + break; + } } } }