@php
$seoBaseTitle = (string) ($meta['name'] ?? $meta['title'] ?? 'Map');
$seoTitle = $seoBaseTitle . ' • Vortex Sky X Wiki';
$gameName = $game ?? 'Vortex Sky X';
$seoDescription = 'Map details, entry levels, factions, and monsters for ' . $seoBaseTitle . ' in ' . $gameName . '.';
$image = (string) ($meta['image'] ?? $meta['map'] ?? '');
$seoImage = $image !== ''
? (str_starts_with($image, 'http') ? $image : url($image))
: asset('images/WebLogo.png');
@endphp
{{ $seoTitle }}
@include('wiki.partials.seo', [
'title' => $seoTitle,
'description' => $seoDescription,
'image' => $seoImage,
'type' => 'article',
'game' => $game ?? null,
])
@vite(['resources/css/app.css', 'resources/js/app.js'])
@include('wiki.partials.header', ['databaseMenu' => $databaseMenu])
@php
$name = (string) ($meta['name'] ?? $meta['title'] ?? 'Map');
$icon = (string) ($meta['icon'] ?? '');
$fallbackIcon = $game === 'Twelve Sky 1' ? '/images/home/ts1/maps.jpg' : '/images/home/ts2/maps.jpg';
$iconSrc = $icon !== '' ? $icon : $fallbackIcon;
$faction = (string) ($meta['faction'] ?? 'All Factions');
$facClass = 'wk-f-' . strtolower(trim(preg_replace('/\s+/', '-', $faction)));
$factionKey = strtolower(trim($faction));
$isPvp = filter_var($meta['pvp'] ?? ($meta['is_pvp'] ?? false), FILTER_VALIDATE_BOOLEAN)
|| in_array($factionKey, ['pvp', 'war'], true);
$minLv = $meta['min_entrance_level'] ?? null;
$maxLv = $meta['max_entrance_level'] ?? null;
$desc = $meta['description'] ?? null;
$descLines = [];
if (is_array($desc)) {
$descLines = array_values(array_filter(array_map('trim', $desc)));
} elseif (is_string($desc) && trim($desc) !== '') {
$descLines = [trim($desc)];
}
$spawnMonstersRaw = $meta['spawn_monsters'] ?? [];
$spawnMonsters = [];
if (is_array($spawnMonstersRaw)) {
if (!array_is_list($spawnMonstersRaw)) {
$spawnMonstersRaw = [$spawnMonstersRaw];
}
foreach ($spawnMonstersRaw as $entry) {
if (!is_array($entry)) {
continue;
}
$monsterName = trim((string) ($entry['name'] ?? $entry['title'] ?? $entry['monster'] ?? ''));
if ($monsterName === '') {
continue;
}
$monsterIdRaw = $entry['id'] ?? null;
$monsterId = null;
if (is_int($monsterIdRaw) || is_float($monsterIdRaw) || (is_string($monsterIdRaw) && trim($monsterIdRaw) !== '' && is_numeric(trim($monsterIdRaw)))) {
$monsterId = (int) $monsterIdRaw;
}
$levelRaw = $entry['level'] ?? ($entry['lv'] ?? ($entry['min_level'] ?? null));
$monsterLevel = null;
if (is_int($levelRaw) || is_float($levelRaw) || (is_string($levelRaw) && trim($levelRaw) !== '' && is_numeric(trim($levelRaw)))) {
$monsterLevel = (int) $levelRaw;
}
$monsterHref = null;
if ($monsterId !== null && $monsterId > 0) {
$monsterGame = $monsterId > 10000 ? 'Twelve Sky 1' : 'Twelve Sky 2';
$monsterHref = url('/wiki/' . rawurlencode($monsterGame) . '/monsters/' . rawurlencode((string) $monsterId));
}
$spawnMonsters[] = [
'name' => $monsterName,
'level' => $monsterLevel,
'href' => $monsterHref,
];
}
}
$hasSpawnMonsters = count($spawnMonsters) > 0;
@endphp
{{ $name }}
@if($hasSpawnMonsters)
Monsters In This Area
@foreach($spawnMonsters as $monster)
[Lv.{{ $monster['level'] !== null ? $monster['level'] : '---' }}]
@if(!empty($monster['href']))
{{ $monster['name'] }}
@else
{{ $monster['name'] }}
@endif
@endforeach
@endif
@if(count($descLines))
Description
@foreach($descLines as $line)
{{ $line }}
@endforeach
@endif
@if(!empty($html))
@endif
{{ $name }} - Inspect
Drag to move • Pinch or mouse wheel to zoom