Commit Graph
19 Commits
Author SHA1 Message Date
kovagoadi e4dd22157b Merge branch 'main' into renovate/debian-trixie-slim
Continuous Integration / lint-and-security (pull_request) Successful in 51s
Continuous Integration / tests-and-coverage (pull_request) Successful in 1m19s
2026-09-21 14:37:11 +02:00
renovate-bot 355bef9d25 Update debian:trixie-slim Docker digest to a99cfc5
Continuous Integration / lint-and-security (pull_request) Successful in 20s
Continuous Integration / tests-and-coverage (pull_request) Successful in 25s
2026-09-20 02:22:56 +00:00
renovate-bot b2fa14b7ff Update debian:13 Docker digest to 9cc0800
Continuous Integration / lint-and-security (pull_request) Successful in 1m13s
Continuous Integration / tests-and-coverage (pull_request) Successful in 26s
2026-09-20 02:22:49 +00:00
kovagoadiandClaude f7ca395a4f Put the AdminBridge GameScript under version control
Continuous Integration / lint-and-security (pull_request) Failing after 19s
Continuous Integration / tests-and-coverage (pull_request) Successful in 24s
The last commit noted in passing that the server-side half of the admin
GameScript channel "is not in this repo -- docker/config is gitignored --
so it has to be updated separately for any of this to work." That was true
of all nine features the README documents: list_vehicles, list_stations,
list_cargo, get_timetable, get_station, get_station_cargo, get_dispatch and
the event stream all answer from 705 lines of Squirrel that no clone could
reproduce, no reviewer could see, and CI never touched.

The bridge now lives in gamescript/AdminBridge/ with its own README, the
same arrangement docker/patches/ uses for the local JGRPP patches, and
docker-compose.yml bind-mounts it read-only over the container's
game/AdminBridge. docker/config stays ignored -- it also holds savegames,
downloaded content and generated config -- so the copy under it is now
shadowed and can be deleted. main.nut is byte-identical to what was running,
apart from the version work below.

Adds a version handshake, because the channel gives no way to tell a stale
bridge from a hung one: a bridge that does not recognise a command drops it
silently, so a client ahead of the server sees nothing but timeouts. The
bridge now answers get_version with its protocol version plus its command
and event catalogues, and get_bridge_version() raises when that is below
GS_BRIDGE_VERSION. It is opt-in rather than checked on connect: GameScripts
do not tick while the game is paused, so an automatic check would refuse to
connect to a paused server. A bridge older than 4 predates get_version
itself and can only fail by timing out, so the E2E test catches that and
reports it by name instead.

tests/test_gamescript.py gives CI a foothold on the GameScript without a
Squirrel toolchain: it parses the .nut files and pins the protocol version
across info.nut, main.nut and protocol.py, the event catalogue against
GameEventType, and the command table against the commands client.py sends.
The version has to be declared three times because a GameScript cannot read
its own info.nut at runtime -- GSController.GetVersion() returns the OpenTTD
version, not the script's.

info.nut also gains MinVersionToLoad() { return 1; }. The engine defaults it
to GetVersion(), so without it this bump would orphan every savegame pinned
to version 3: the scanner finds no compatible script and falls back with a
warning. The bridge keeps no savegame state, so any version can take over.

HandleCommand now dispatches through the same table get_version reports,
rather than an if/else chain, so the catalogue a client feature-detects
against cannot drift from what is implemented.

Co-Authored-By: Claude <[email protected]>
2026-08-31 19:06:33 +02:00
kovagoadi 28f247799e Merge pull request 'Update debian:trixie-slim Docker digest to d7e1218' (#26) from renovate/debian-trixie-slim into main
Continuous Integration / lint-and-security (push) Successful in 19s
Continuous Integration / tests-and-coverage (push) Successful in 24s
Reviewed-on: #26
2026-08-26 21:08:13 +02:00
renovate-bot c5876b270a Update debian:trixie-slim Docker digest to d7e1218
Continuous Integration / lint-and-security (pull_request) Failing after 17s
Continuous Integration / tests-and-coverage (pull_request) Successful in 24s
2026-08-26 02:21:55 +00:00
renovate-bot 1a2ea538e8 Update debian:13 Docker digest to f324c7f
Continuous Integration / lint-and-security (pull_request) Failing after 4m2s
Continuous Integration / tests-and-coverage (pull_request) Successful in 37s
2026-08-26 02:21:51 +00:00
kovagoadi 7fdd5f2fca Merge branch 'main' into renovate/debian-13
Continuous Integration / lint-and-security (pull_request) Successful in 23s
Continuous Integration / tests-and-coverage (pull_request) Successful in 27s
2026-08-06 17:38:42 +02:00
renovate-bot e925659e28 Update debian:trixie-slim Docker digest to 3a39a05
Continuous Integration / lint-and-security (pull_request) Successful in 21s
Continuous Integration / tests-and-coverage (pull_request) Successful in 25s
2026-08-06 02:22:05 +00:00
renovate-bot 846d085e1a Update debian:13 Docker digest to 34cd9e9
Continuous Integration / lint-and-security (pull_request) Successful in 1m0s
Continuous Integration / tests-and-coverage (pull_request) Successful in 28s
2026-08-06 02:22:00 +00:00
kovagoadiandClaude Opus 4.8 2eea541158 Add scheduled dispatch support (edit + authoritative view)
Continuous Integration / lint-and-security (pull_request) Successful in 22s
Continuous Integration / tests-and-coverage (pull_request) Successful in 24s
Editing (game port, OpenTTDClient): a core of JGRPP's scheduled dispatch
DoCommands — set_scheduled_dispatch (enable/disable), add/remove schedule,
add/remove/clear slots, and set duration/start date. Adds the command IDs
to protocol.py.

Viewing (admin, OpenTTDAdminClient.get_dispatch): the GameScript API has no
dispatch support, so a new server patch (docker/patches/0002-*) adds
read-only GSOrder.GetScheduledDispatch* / IsScheduledDispatchEnabled
getters, an AdminBridge GameScript get_dispatch handler exposes them, and
get_dispatch() returns the live schedules and slots (mirrors get_timetable).

Note: set_dispatch_start_date values are normalised by the engine relative
to current game time, so they read back offset from the requested value.

Includes unit + e2e tests, a demo in main.py, and protocol/timetable docs.
The AdminBridge GameScript and the patched OpenTTD-patches clone live
outside this repo; the 0002 patch file is the durable source for the latter.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-07-24 22:56:37 +02:00
kovagoadi 3b54a722d6 Added real timetable support
Continuous Integration / lint-and-security (pull_request) Successful in 33s
Continuous Integration / tests-and-coverage (pull_request) Successful in 26s
2026-07-23 20:59:28 +02:00
kovagoadi 2526b8aec4 Merge branch 'main' into renovate/debian-13.x
Continuous Integration / lint-and-security (pull_request) Successful in 21s
Continuous Integration / tests-and-coverage (pull_request) Successful in 23s
2026-07-15 09:13:54 +02:00
renovate-bot d87f26a8ef Update debian Docker tag to trixie-20260713
Continuous Integration / lint-and-security (pull_request) Successful in 20s
Continuous Integration / tests-and-coverage (pull_request) Successful in 23s
2026-07-15 02:22:08 +00:00
renovate-bot d0c4d9218d Update debian:bookworm-slim Docker digest to 7b140f3
Continuous Integration / lint-and-security (pull_request) Successful in 48s
Continuous Integration / tests-and-coverage (pull_request) Successful in 26s
2026-07-15 02:22:04 +00:00
renovate-bot eb507b9f11 Update debian Docker tag to v13
Continuous Integration / lint-and-security (pull_request) Successful in 23s
Continuous Integration / tests-and-coverage (pull_request) Successful in 22s
2026-07-02 02:22:50 +00:00
renovate-bot aea5cf124c Update debian Docker tag to bookworm-20260623
Continuous Integration / lint-and-security (pull_request) Successful in 21s
Continuous Integration / tests-and-coverage (pull_request) Successful in 23s
2026-07-01 02:22:45 +00:00
renovate-bot 17d68fa984 Pin dependencies
Continuous Integration / lint-and-security (pull_request) Successful in 20s
Continuous Integration / tests-and-coverage (pull_request) Successful in 23s
2026-06-30 02:22:41 +00:00
kovagoadi aebd5f4ef5 Add admin port support with other major refactorations
Continuous Integration / lint-and-security (pull_request) Failing after 39s
Continuous Integration / tests-and-coverage (pull_request) Successful in 24s
2026-06-29 19:47:48 +02:00