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

getDocked function doesn't work on truck stations #160

Closed ghost closed 2 years ago

ghost commented 3 years ago

When calling the getDocked function on a truck station, it returns a value of the type userdata, instead of a WheeledVehicle object.

To Reproduce:

You need:

How to reproduce:

  1. Spawn vehicle in the station
  2. Run the code

Code:

truckStation = component.proxy(component.findComponent(findClass('Build_TruckStation_C'))[1])

print(type(truckStation:getDocked()))

Debug files: SMMDebug.zip

yackimoff commented 3 years ago

Confirming this issue. print(truckStation:getDocked()) (without type) when a vehicle is at station throws "bad argument ##1 to '?' (Instance is invalid)".