Danacus / node-factorio-api

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

Seems to download the oldest version of mod available #8

Closed Danielv123 closed 6 years ago

Danielv123 commented 6 years ago
factorioAPI.searchMods("clusterio").then(body => {
    console.log("Im gonna download: "+body[0].name);
    factorioAPI.downloadMod(body[0]).then(()=>{
        console.log("Mod downloaded");
    });
});

This downloads the oldest version of clusterio available, from 0.14. Does not sound like intended behaviour.

Danacus commented 6 years ago

After taking a quick look I noticed that they decided to invert the order of the releases. I will fix this very soon.

Danielv123 commented 6 years ago

Heh, thats a weird thing to do on their behalf.

Danacus commented 6 years ago

It is, no idea why they would do that

Danacus commented 6 years ago

Fixed in 2393410562cb64c3439c9feca634b59f18b643ba

Danacus commented 6 years ago

Oh, and btw, you can just use this:

factorioAPI.downloadMod({name: 'clusterio'}).then(()=>{
    console.log("Mod downloaded");
});

So you don't have to search for the mod.

Danielv123 commented 6 years ago

The search is to allow me to use partial mod names, thanks for fixing 👍