Panakotta00 / FicsIt-Networks

Control, Monitor, Manage and Automate your Satisfactory.
https://ficsit.app/mod/FicsItNetworks
GNU General Public License v3.0
157 stars 51 forks source link

Train API: TimeTable:getStops() Returns single stop instead of list of stops #110

Closed NiclasSP closed 3 years ago

NiclasSP commented 3 years ago

Description

In the API documentation it's specified that I should be getting af list of stops in return from TimeTable:getStops() but instead I am receiving the last stop in the timetable

Code(Removed not relevant bits):

` trainstation = component.proxy("2A68C11C4646D7B016A0F4B0D5EA9A24") trackGraph = trainstation:getTrackGraph() stations = trackGraph:getStations() trains = trackGraph:getTrains()

print("\n###" .." Trains ".. "###") for key,value in pairs(trains) do print("Name: "..value:GetName()) print("HasTimeTable: "..tostring(value.hasTimeTable)) print("DockState: "..tostring(value.dockState)) print("IsDocked: "..tostring(value.isDocked)) print("SelfDrivingError: "..tostring(value:getSelfDrivingError())) tempTimeTable = value:getTimeTable() print("NumStops: "..tempTimeTable.numStops) tempTimeTableStops = tempTimeTable:getStops() print("list?: "..tostring(tempTimeTableStops)) print("Stop Station name: "..tempTimeTableStops.station.name) print("\n") end `

Code Result:

image

TimeTable:

image