Add descriptions in LuaSchedule

robot256
Smart Inserter
Smart Inserter
Posts: 1269
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Add descriptions in LuaSchedule

Post by robot256 »

The following methods lack a description or need clarifications:
  • ScheduleRecordPosition parameters named "index" -- I believe this is only place in the API where a parameter with "index" in the name is not an integer. Can we please change the name of the parameter from "index" to "record_position", for example?
  • set_stopped(stopped) -- What is the "stopped" property of a LuaSchedule? How can we read it back? Is it only applicable to space platforms?
  • go_to_station(index) -- Should mention that it also sets the train/platform to automatic mode.
  • set_allow_unloading(_) -- Should mention that it only applies to space platforms.
  • current -- Should mention that this is the index in the main schedule of the current destination
  • ticks_in_station -- Should mention that this is a duration not a time
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Bilka
Factorio Staff
Factorio Staff
Posts: 3636
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: Add descriptions in LuaSchedule

Post by Bilka »

I can't change the index in AddRecordData because that would be a behaviour change in the api, but the rest of them have been renamed in the docs. set_stopped sets whether the train is in manual mode or the space platform is paused. Thanks for giving so much info to add, I've added it to the docs it for 2.0.67.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
robot256
Smart Inserter
Smart Inserter
Posts: 1269
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Add descriptions in LuaSchedule

Post by robot256 »

Thank you! This will be very helpful.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Post Reply

Return to “Resolved Requests”