Conflicted only on the README feature list, where main's list_cargo() bullet and this branch's bridge bullet were added at the same spot. Kept both: list_cargo() with the other cargo queries, and the bridge one last, since it is about what all of them run against. list_cargo() landing also makes tests/test_gamescript.py's command check meaningful in the other direction -- the bridge has answered list_cargo all along with nothing sending it, which is exactly the asymmetry that check tolerates on purpose. Co-Authored-By: Claude <[email protected]>
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.