File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,7 +88,12 @@ func (modInfoList *ModInfoList) listInstalledMods() error {
8888 return err
8989 }
9090 } else {
91- modInfo .Compatibility = true
91+ log .Println ("error finding basemodDependency. Using FactorioVersion..." )
92+ modInfo .Compatibility , err = checkModCompatibility (modInfo .FactorioVersion + ".0" )
93+ if err != nil {
94+ log .Printf ("error checking Compatibility with FactorioVersion: %s" , err )
95+ return err
96+ }
9297 }
9398
9499 modInfoList .Mods = append (modInfoList .Mods , modInfo )
Original file line number Diff line number Diff line change @@ -348,8 +348,9 @@ func modStartUp() {
348348
349349func checkModCompatibility (modVersion string ) (compatible bool , err error ) {
350350 compatible = false
351- if ! strings .HasPrefix (modVersion , "^" ) {
352- modVersion = "^" + modVersion
351+ modVersion = strings .TrimSpace (modVersion )
352+ if ! strings .HasPrefix (modVersion , "~" ) {
353+ modVersion = "~" + modVersion
353354 }
354355
355356 constraint , err := semver .NewConstraint (modVersion )
You can’t perform that action at this time.
0 commit comments