Danacus / node-factorio-api

Download and update mods from the Factorio Mod Portal
3 stars 2 forks source link

Function to get data about mods installed in folder #1

Closed Danielv123 closed 6 years ago

Danielv123 commented 6 years ago

Should either take a folder or use the folder specified when initializing. Should return an array of all the mods in that folder with their name and version.

Danacus commented 6 years ago

Is this a feature request, a bug or something you want be to change. I'm a little confused.

Danielv123 commented 6 years ago

This is a feature request. Currently you can only batch extract mod info from a savefile.

Danacus commented 6 years ago

I will probably add this tomorrow. You can use loadInstalledMods(), but it's probably too slow for what you want, because it reads all information about every single mod by opening the zip files. I'll add a simple function to get the name and version from every mod in a folder from the file name.

Danacus commented 6 years ago

Added in 5bf08a3950883cd207c05f23eb493587cc350755

Danacus commented 6 years ago

I didn't do a lot of testing, but it should be working.

Danielv123 commented 6 years ago

Works very well, thanks :)