Files
openttd-client/lib/openttd
kovagoadi 0a8271d57c
All checks were successful
Continuous Integration / lint-and-security (pull_request) Successful in 31s
Continuous Integration / tests-and-coverage (pull_request) Successful in 25s
Add vehicle listing support to admin client
The Admin Network has no native packet for listing individual vehicles,
so list_vehicles() sends a "list_vehicles" command over the existing
GameScript JSON channel and relies on a companion server-side script to
reply with vehicle data via ServerGamescript. Requires subscribing to
Gamescript updates (documented in docs/PROTOCOL.md) to receive the reply.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-16 20:44:44 +02:00
..
2026-06-29 19:58:16 +02:00
2026-06-05 23:18:09 +02:00

Internal Package: openttd

This directory contains the core implementation of the OpenTTD network client.

Modules

  • __init__.py: Exposes the high-level OpenTTDClient API.
  • client.py: Implementation of the OpenTTDClient class. Manages the connection lifecycle, PAKE state, map synchronization, and keep-alive.
  • protocol.py: Implementation of the OpenTTDProtocol class. Handles low-level binary packet serialization, AEAD stream encryption, and static packet parsing.

Design Goals

  1. Encapsulation: The user should never need to manually handle bytes or encryption keys.
  2. Robustness: Gracefully handle server errors and unknown packet types.
  3. Efficiency: Use asyncio for non-blocking I/O and monocypher for fast cryptographic operations.