Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated mods updater script to correctly process mod releases #557

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Victor9401
Copy link

The script should correctly process mod releases

The updated script goes through each version reverse sorted by release date, then performs some checks.
If the check fails, it continues to the next release until the correct release found. The logic is the same for the case, if no release was found.

First, it checks Factorio version vs mod Factorio version.

If Major version differs, it skips it.
If Minor version is less, also skips.

Then it goes through the optional dependencies element and checks it with game version, for base dependencies.
If the dependency rule is false, it skips it.

Checked script on my own modpack, and the jetpack mod was downgraded to the correct version for 2.0.21, everything else updated correctly. DLC mods also were ignored because they are for version 1.1


Disclaimer:

I am not proficient with bash scripting, so I made the changes with the help of ChatGPT.
Also, I haven't added any advanced logic to the main mod Factiorio version check.

So the updater won't correctly update mods for this case, leaving old versions:

Mods with the factorio_version "0.18" can also be loaded in 1.0 and the mod portal will return them when queried for factorio_version 1.0 mods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant