Map: mark Eltnen and Morheim as not yet available on our patch
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
4143472084
commit
2fbcf8cc2e
4 changed files with 45 additions and 0 deletions
|
|
@ -26,6 +26,7 @@
|
|||
<strong id="map-current-name">Lädt …</strong>
|
||||
<span class="map-picker-chevron" aria-hidden="true">▾</span>
|
||||
</button>
|
||||
<div id="map-unavailable" class="hidden">⚠️ Diese Karte ist auf unserem Patch noch nicht verfügbar.</div>
|
||||
</header>
|
||||
|
||||
<!-- Zoom controls -->
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@ const CONFIG = {
|
|||
'elthen': 'Eltnen',
|
||||
},
|
||||
|
||||
// Karten, die es auf unserem Patch noch nicht gibt - werden in der Auswahl und beim
|
||||
// Ansehen mit einem Hinweis versehen.
|
||||
MAP_UNAVAILABLE: ['elthen', 'morheim'],
|
||||
|
||||
// Gebiete der Kartenauswahl in dieser Reihenfolge, Karten darin ebenfalls sortiert.
|
||||
// Karten, die hier fehlen, landen unter "Weitere".
|
||||
MAP_ZONES: [
|
||||
|
|
|
|||
|
|
@ -137,6 +137,13 @@ class MapController {
|
|||
name.textContent = map.name;
|
||||
|
||||
card.append(img, name);
|
||||
if (CONFIG.MAP_UNAVAILABLE.includes(map.slug)) {
|
||||
card.classList.add('unavailable');
|
||||
const note = document.createElement('span');
|
||||
note.className = 'map-card-note';
|
||||
note.textContent = 'Auf unserem Patch noch nicht verfügbar';
|
||||
card.appendChild(note);
|
||||
}
|
||||
card.addEventListener('click', () => {
|
||||
this.closeMapPicker();
|
||||
if (map.slug !== this.mapData.currentMap?.slug) {
|
||||
|
|
@ -177,6 +184,7 @@ class MapController {
|
|||
|
||||
if (!mapInfo) throw new Error(`Map ${slug} not found`);
|
||||
this.mapCurrentName.textContent = mapInfo.name;
|
||||
document.getElementById('map-unavailable').classList.toggle('hidden', !CONFIG.MAP_UNAVAILABLE.includes(slug));
|
||||
try {
|
||||
localStorage.setItem('lumina_map', slug);
|
||||
} catch (e) {
|
||||
|
|
|
|||
|
|
@ -230,6 +230,38 @@ canvas:active {
|
|||
|
||||
.map-card.active .map-card-name { color: var(--accent-gold); }
|
||||
|
||||
/* Karten, die es auf unserem Patch noch nicht gibt */
|
||||
.map-card { position: relative; }
|
||||
|
||||
.map-card.unavailable img { filter: grayscale(0.6) brightness(0.8); }
|
||||
|
||||
.map-card-note {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
padding: 4px 8px;
|
||||
border-radius: 6px;
|
||||
background: rgba(20, 20, 30, 0.85);
|
||||
border: 1px solid rgba(240, 178, 50, 0.6);
|
||||
color: #f0c060;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
line-height: 1.3;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#map-unavailable {
|
||||
margin: 2px 4px 4px;
|
||||
padding: 6px 10px;
|
||||
border-radius: 6px;
|
||||
background: rgba(240, 178, 50, 0.12);
|
||||
border: 1px solid rgba(240, 178, 50, 0.5);
|
||||
color: #f0c060;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@keyframes map-picker-fade { from { opacity: 0; } to { opacity: 1; } }
|
||||
|
||||
/* Zoom controls */
|
||||
|
|
|
|||
Loading…
Reference in a new issue