Create

Create

86M Downloads

[CC Compat] setSchedule not working with schedules that have a progress value/progress value not always present or wrong in getSchedule

tobi-blackscale opened this issue ยท 0 comments

commented

Description

Steps to reproduce:
Create a schedule with multiple entries like

  • Limit Max Speed
  • Power Redstone Link
  • Travel To Station (wait for station powered)

If this schedule is assigned to a train, without changing the active entry or just resetting it, the schedule will have no "progress" entry when reading it with getSchedule at the station. If the schedule is taken off the train (after reaching the station), it will have the progress marker on the station.
Putting it into the train again and now reading the schedule with getSchedule will result in the schedule table containing a "progress" entry.
Trying to assign this schedule via setSchedule results in a "Not a valid schedule" error.
Caused by:


Because the schedule table has 3 entries (cyclic, entries, progress)

The other problem (progress not being present or wrong) seems to be caused by the progress being tracked in
(

) while driving and only being written to the schedule when turning it into an item.

Game Log

Debug Information

No response