Closed FeepingCreature closed 2 days ago
I have read the source code of that classes
global API, maybe they are now indexed by their name like classes['NetworkCard']
, but I'm not sure. I'll try this tonight.
It works:
classes is a list of all available classes. you can use it as a lua table by accessing with [] or by dot, if the name is c++ name compliant, that is, no special characters or dashes. Eg. classes.NetworkCard works too. We can not publish a complete list of what classes contains, as it depends on what mods you have installed.
I'll drop a link to the docs op mentioned, as pana is, afaik, the only one who can update the docs: https://docs.ficsit.app/ficsit-networks/latest/lua/examples/PCIDevices.html
Will be updated with next mod release.
On development, the docs for PCIDevices use
findClass("NetworkCard")
. But when you try that, you get a deprecation warning to "use 'classes' global library instead". The 'classes' API does not seem to be documented.