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>
Internal Package: openttd
This directory contains the core implementation of the OpenTTD network client.
Modules
__init__.py: Exposes the high-levelOpenTTDClientAPI.client.py: Implementation of theOpenTTDClientclass. Manages the connection lifecycle, PAKE state, map synchronization, and keep-alive.protocol.py: Implementation of theOpenTTDProtocolclass. Handles low-level binary packet serialization, AEAD stream encryption, and static packet parsing.
Design Goals
- Encapsulation: The user should never need to manually handle bytes or encryption keys.
- Robustness: Gracefully handle server errors and unknown packet types.
- Efficiency: Use
asynciofor non-blocking I/O andmonocypherfor fast cryptographic operations.