feat: reports for settling - new village founded & valley occupied (#178) (#190)

This commit is contained in:
Ferywir
2026-06-09 15:47:29 +02:00
committed by GitHub
parent 20804d9182
commit dad574be1a
9 changed files with 101 additions and 1 deletions
+8
View File
@@ -2990,6 +2990,10 @@ class Automation {
}
$database->setVillageField($data['from'], $exp, $value);
// Report: new village founded (issue #178)
$ncoor = $database->getCoor($data['to']);
$database->addNotice($to['owner'], $data['to'], 0, 24, 'New village founded', ($ncoor['x'] ?? 0) . ',' . ($ncoor['y'] ?? 0), time());
}else{
// here must come movement from returning settlers
$types[] = 4;
@@ -2998,6 +3002,10 @@ class Automation {
$refs[] = $data['ref'];
$times[] = $time;
$endtimes[] = $time + ($time - $data['starttime']);
// Report: valley already occupied, settlers returning (issue #178)
$fcoor = $database->getCoor($data['to']);
$database->addNotice($to['owner'], $data['to'], 0, 25, 'Settlers returned - valley occupied', ($fcoor['x'] ?? 0) . ',' . ($fcoor['y'] ?? 0), time());
}
}