mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2024-12-27 02:43:45 +02:00
Merge pull request #205 from OpenFactorioServerManager/fix/compatibility-check-for-mod-releases
fix compatibility check for mod releases
This commit is contained in:
commit
1f6ebbb992
@ -86,7 +86,7 @@ func (modInfoList *ModInfoList) listInstalledMods() error {
|
||||
// skip optional and incompatible dependencies
|
||||
parts := strings.Split(dep, " ")
|
||||
if len(parts) > 3 {
|
||||
log.Printf("skipping dependency '%s' in '%s': invalid format\n", dep, modInfo.Name)
|
||||
log.Printf("skipping dependency '%s' in '%s': optional dependency or invalid format\n", dep, modInfo.Name)
|
||||
continue
|
||||
}
|
||||
if parts[0] != "base" {
|
||||
|
@ -96,9 +96,7 @@ func ModPortalModDetails(modId string) (ModPortalStruct, error, int) {
|
||||
|
||||
for key, release := range mod.Releases {
|
||||
requiredVersion = release.InfoJSON.FactorioVersion
|
||||
areVersionIdentical := requiredVersion.Equals(installedBaseVersion)
|
||||
isException := installedBaseVersion.Equals(Version{1, 0, 0, 0}) && requiredVersion.Equals(Version{0, 18, 0, 0})
|
||||
release.Compatibility = areVersionIdentical || isException
|
||||
release.Compatibility = installedBaseVersion.GreaterC(requiredVersion)
|
||||
mod.Releases[key] = release
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user