feat(port): add sea port with quay, terminal, berths, and AI port master

Adds a new port district on the north-east coast with walkable quay, container yard, terminal, gantry cranes, and berths. Includes AI-driven port master (Capitão do Porto) and dock workers for ship dispatch, plus full frontend rendering of ships, boats, and trucks.
This commit is contained in:
2026-10-31 23:33:06 -03:00
parent e230c391ad
commit 580c830ffb
13 changed files with 1338 additions and 42 deletions
+6 -2
View File
@@ -9,6 +9,7 @@ use App\Models\Job;
use App\Models\Transaction;
use App\Models\User;
use App\Support\Beach;
use App\Support\Port;
use Database\Seeders\CityWorldSeeder;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
@@ -58,7 +59,8 @@ class CityActionsTest extends TestCase
/**
* Position updates clamp to the beach shoreline (past the road grid)
* and persist; other axes clamp to the city bounds.
* and persist; Z clamps to the port strip (opened for x >= 150, the
* north-east port/coast) or to the city bounds otherwise.
*/
public function test_position_persists_and_clamps(): void
{
@@ -67,8 +69,10 @@ class CityActionsTest extends TestCase
$this->character->refresh();
$city = $this->character->city;
// Clamped X lands on the shoreline/quay band (>= VISIT_MIN_X), so
// the deep north coast (port strip) is reachable.
$this->assertSame(Beach::sandTo($city) + 2, $this->character->pos_x);
$this->assertSame((float) $city->bounds_min_z, $this->character->pos_z);
$this->assertSame(Port::VISIT_MIN_Z, $this->character->pos_z);
}
/**