You've already forked factorio-server-manager
mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-07-07 00:46:19 +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:
@ -86,7 +86,7 @@ func (modInfoList *ModInfoList) listInstalledMods() error {
|
|||||||
// skip optional and incompatible dependencies
|
// skip optional and incompatible dependencies
|
||||||
parts := strings.Split(dep, " ")
|
parts := strings.Split(dep, " ")
|
||||||
if len(parts) > 3 {
|
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
|
continue
|
||||||
}
|
}
|
||||||
if parts[0] != "base" {
|
if parts[0] != "base" {
|
||||||
|
@ -96,9 +96,7 @@ func ModPortalModDetails(modId string) (ModPortalStruct, error, int) {
|
|||||||
|
|
||||||
for key, release := range mod.Releases {
|
for key, release := range mod.Releases {
|
||||||
requiredVersion = release.InfoJSON.FactorioVersion
|
requiredVersion = release.InfoJSON.FactorioVersion
|
||||||
areVersionIdentical := requiredVersion.Equals(installedBaseVersion)
|
release.Compatibility = installedBaseVersion.GreaterC(requiredVersion)
|
||||||
isException := installedBaseVersion.Equals(Version{1, 0, 0, 0}) && requiredVersion.Equals(Version{0, 18, 0, 0})
|
|
||||||
release.Compatibility = areVersionIdentical || isException
|
|
||||||
mod.Releases[key] = release
|
mod.Releases[key] = release
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user