diff --git a/gm_console.php b/gm_console.php index 34ec132..3cacda8 100644 --- a/gm_console.php +++ b/gm_console.php @@ -38,6 +38,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' $slot_num = (int)($_POST['slot_num'] ?? 0); $name = $_POST['name'] ?? 'Inconnu'; $type = $_POST['type'] ?? 'empty'; + $manual_status = $_POST['manual_status'] ?? ''; // Orbital control is now detailed by faction $orbital_controls = $_POST['orbital_controls'] ?? []; @@ -51,7 +52,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' } // Derive Status and Faction from Settlements - $status = 'sta_empty'; + $status = 'sta_inhabited'; $faction_id = null; $total_non_aucun = 0; $active_factions = []; @@ -93,10 +94,15 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST[' } } } else if ($type !== 'empty') { - $status = 'sta_empty'; + $status = 'sta_inhabited'; $faction_id = null; } + // Manual status override + if (!empty($manual_status)) { + $status = $manual_status; + } + if ($type === 'empty') { if ($slot_id > 0) { $db->prepare("DELETE FROM cities WHERE planet_id = ?")->execute([$slot_id]); @@ -420,6 +426,11 @@ function getStatusColor($status, $type, $statuses_map, $object_types_map) {