Page 1 of 1

Train/Rail API Additions

Posted: Wed Aug 17, 2022 7:11 am
by SupplyDepoo
I'm thinking of making a mod for a new rail signal type, and some other train-related stuff, but looking at the modding API is not giving me much hope. I would like to have the following APIs:
  1. Find best rail path from A to B
  2. Optional list of rail pieces or signals to exclude from the path finding
  3. Promote the blocks concept to a proper data type and add appropriate APIs to LuaRailPath, path finding (above), etc
  4. Acquisition and release of rail signal (or block?) reservations
  5. Stopping point rail piece(s) on LuaTrain
Perhaps not all of these are necessary, but it seems currently impossible (or requiring a tremendous effort to replicate existing behavior on top of new behavior) to route a train and only that train via a custom path (without affecting other trains). Correct me if I'm wrong.

These APIs (especially #1 and #2) would open new possibilities and I would highly appreciate it. Thanks!