Alpha 2.0a
This commit is contained in:
parent
7cbd76580f
commit
e91ca9b8c9
@ -191,13 +191,3 @@ td {
|
|||||||
padding: 10px;
|
padding: 10px;
|
||||||
border-bottom: 1px solid var(--nord-1);
|
border-bottom: 1px solid var(--nord-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes blink {
|
|
||||||
0% { opacity: 1; }
|
|
||||||
50% { opacity: 0.3; }
|
|
||||||
100% { opacity: 1; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.blink-effect {
|
|
||||||
animation: blink 1.5s infinite ease-in-out;
|
|
||||||
}
|
|
||||||
|
|||||||
@ -297,16 +297,13 @@ if ($view === 'sector') {
|
|||||||
$p['terrestrial_controls'] = [];
|
$p['terrestrial_controls'] = [];
|
||||||
$p['cities'] = isset($city_counts[$p['id']]) ? array_fill(0, $city_counts[$p['id']], []) : [];
|
$p['cities'] = isset($city_counts[$p['id']]) ? array_fill(0, $city_counts[$p['id']], []) : [];
|
||||||
|
|
||||||
$dynamic_status = (!empty($p['status']) && $p['status'] !== 'sta_auto') ? $p['status'] : 'sta_inhabited';
|
$dynamic_status = calculateCelestialStatus($p, $db, $statuses_map);
|
||||||
$sector_data[$p['sector_id']][$p['slot']] = ['status' => $dynamic_status, 'type' => $p['type']];
|
$sector_data[$p['sector_id']][$p['slot']] = ['status' => $dynamic_status, 'type' => $p['type']];
|
||||||
if (!in_array($p['sector_id'], $active_sectors)) { $active_sectors[] = (int)$p['sector_id']; }
|
if (!in_array($p['sector_id'], $active_sectors)) { $active_sectors[] = (int)$p['sector_id']; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function getStatusColor($status, $type, $statuses_map, $object_types_map) {
|
function getStatusColor($status, $type, $statuses_map, $object_types_map) {
|
||||||
function getStatusBlink($status, $statuses_map) {
|
|
||||||
return (strpos($statuses_map[$status]['color'] ?? '', 'blink') !== false) ? 'blink-effect' : '';
|
|
||||||
}
|
|
||||||
if ($type === 'empty') return 'rgba(255,255,255,0.05)';
|
if ($type === 'empty') return 'rgba(255,255,255,0.05)';
|
||||||
$c = $statuses_map[$status]['color'] ?? 'rgba(255,255,255,0.05)'; return str_replace(';blink', '', $c);
|
$c = $statuses_map[$status]['color'] ?? 'rgba(255,255,255,0.05)'; return str_replace(';blink', '', $c);
|
||||||
}
|
}
|
||||||
@ -480,7 +477,7 @@ function getStatusBlink($status, $statuses_map) {
|
|||||||
$dotColor = 'rgba(255,255,255,0.05)';
|
$dotColor = 'rgba(255,255,255,0.05)';
|
||||||
if (isset($sector_data[$s][$p])) { $dotColor = getStatusColor($sector_data[$s][$p]['status'], $sector_data[$s][$p]['type'], $statuses_map, $object_types_map); }
|
if (isset($sector_data[$s][$p])) { $dotColor = getStatusColor($sector_data[$s][$p]['status'], $sector_data[$s][$p]['type'], $statuses_map, $object_types_map); }
|
||||||
?>
|
?>
|
||||||
<div class="mini-dot <?php echo getStatusBlink($sector_data[$s][$p]["status"], $statuses_map); ?>" style="background-color: <?php echo $dotColor; ?>;"></div>
|
<div class="mini-dot" style="background-color: <?php echo $dotColor; ?>;"></div>
|
||||||
<?php endfor; ?>
|
<?php endfor; ?>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 14px; font-weight: bold; margin-top: 5px;">SECTEUR <?php echo $s; ?></div>
|
<div style="font-size: 14px; font-weight: bold; margin-top: 5px;">SECTEUR <?php echo $s; ?></div>
|
||||||
|
|||||||
@ -167,7 +167,7 @@ if ($view === 'sector') {
|
|||||||
$p['terrestrial_controls'] = []; // Simplified
|
$p['terrestrial_controls'] = []; // Simplified
|
||||||
$p['cities'] = isset($city_counts[$p['id']]) ? array_fill(0, $city_counts[$p['id']], []) : [];
|
$p['cities'] = isset($city_counts[$p['id']]) ? array_fill(0, $city_counts[$p['id']], []) : [];
|
||||||
|
|
||||||
$dynamic_status = (!empty($p['status']) && $p['status'] !== 'sta_auto') ? $p['status'] : 'sta_inhabited';
|
$dynamic_status = calculateCelestialStatus($p, $db, $statuses_map);
|
||||||
$sector_data[$p['sector_id']][$p['slot']] = ['status' => $dynamic_status, 'type' => $p['type']];
|
$sector_data[$p['sector_id']][$p['slot']] = ['status' => $dynamic_status, 'type' => $p['type']];
|
||||||
if (!in_array($p['sector_id'], $active_sectors)) { $active_sectors[] = (int)$p['sector_id']; }
|
if (!in_array($p['sector_id'], $active_sectors)) { $active_sectors[] = (int)$p['sector_id']; }
|
||||||
}
|
}
|
||||||
@ -175,9 +175,6 @@ if ($view === 'sector') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getStatusColor($status, $statuses_map) {
|
function getStatusColor($status, $statuses_map) {
|
||||||
function getStatusBlink($status, $statuses_map) {
|
|
||||||
return (strpos($statuses_map[$status]['color'] ?? '', 'blink') !== false) ? 'blink-effect' : '';
|
|
||||||
}
|
|
||||||
$c = $statuses_map[$status]['color'] ?? 'rgba(255,255,255,0.05)'; return str_replace(';blink', '', $c);
|
$c = $statuses_map[$status]['color'] ?? 'rgba(255,255,255,0.05)'; return str_replace(';blink', '', $c);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
@ -651,7 +648,7 @@ function getStatusBlink($status, $statuses_map) {
|
|||||||
$dotColor = 'rgba(255,255,255,0.05)';
|
$dotColor = 'rgba(255,255,255,0.05)';
|
||||||
if (isset($sector_data[$s][$p])) { $dotColor = getStatusColor($sector_data[$s][$p]['status'], $statuses_map); }
|
if (isset($sector_data[$s][$p])) { $dotColor = getStatusColor($sector_data[$s][$p]['status'], $statuses_map); }
|
||||||
?>
|
?>
|
||||||
<div class="mini-dot <?php echo getStatusBlink($sector_data[$s][$p]["status"], $statuses_map); ?>" style="background-color: <?php echo $dotColor; ?>;"></div>
|
<div class="mini-dot" style="background-color: <?php echo $dotColor; ?>;"></div>
|
||||||
<?php endfor; ?>
|
<?php endfor; ?>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-size: 10px; color: #88c0d0;">SECTEUR</div>
|
<div style="font-size: 10px; color: #88c0d0;">SECTEUR</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user