@@ -24,7 +24,6 @@ public class InstallCheck : MonoBehaviour
2424 // not required, but if they exist then verify the version number
2525 static readonly Dependency [ ] optionalMods = new Dependency [ ]
2626 {
27- new Dependency { assemblyName = "EVEManager" , minVersion = new Version ( 1 , 11 , 7 , 1 ) } ,
2827 new Dependency { assemblyName = "TUFX" , minVersion = new Version ( 1 , 0 , 5 ) } ,
2928 new Dependency { assemblyName = "AvionicsSystems" , minVersion = new Version ( 1 , 3 , 6 ) } ,
3029 new Dependency { assemblyName = "RasterPropMonitor" , minVersion = new Version ( 0 , 31 , 10 , 2 ) } ,
@@ -47,6 +46,7 @@ public void Awake()
4746 CheckDependencies ( ) ;
4847 CheckOptionalMods ( ) ;
4948 CheckScatterer ( ) ;
49+ CheckEVE ( ) ;
5050 CheckRequiredFiles ( ) ;
5151 }
5252
@@ -122,6 +122,16 @@ private static void CheckOptionalMods()
122122 }
123123 }
124124
125+ static bool CompareVersions ( Version required , Version actual )
126+ {
127+ if ( required . Major != actual . Major ) return false ;
128+ if ( required . Minor != actual . Minor ) return false ;
129+ if ( required . Build != - 1 && required . Build != actual . Build ) return false ;
130+ if ( required . Revision != - 1 && required . Revision != actual . Revision ) return false ;
131+
132+ return true ;
133+ }
134+
125135 // If a given mod exists, checks it against a list of known good versions.
126136 // If it's not there, looks up a specific error message for the given version, or else a generic "unsupported" one
127137 private static void CheckComplexMappings ( string assemblyName , Version [ ] goodVersions , Dictionary < Version , string > errorMessages )
@@ -131,8 +141,7 @@ private static void CheckComplexMappings(string assemblyName, Version[] goodVers
131141
132142 var assemblyVersion = assembly . assembly . GetName ( ) . Version ;
133143
134- // note: not using contains because this is a class and apparently it doesn't compare equal
135- if ( goodVersions . IndexOf ( assemblyVersion ) != - 1 )
144+ if ( goodVersions . Any ( v => CompareVersions ( v , assemblyVersion ) ) )
136145 {
137146 return ;
138147 }
@@ -167,6 +176,23 @@ private static void CheckScatterer()
167176 } ) ;
168177 }
169178
179+ private static void CheckEVE ( )
180+ {
181+ CheckComplexMappings ( "Atmosphere" ,
182+ new Version [ ]
183+ {
184+ new Version ( 1 , 11 , 7 , 1 ) , // public version
185+ new Version ( 2 , 0 , 1 , 0 ) , // volclouds v1
186+ new Version ( 2 , 1 ) , // volclouds v2
187+ new Version ( 2 , 2 , 1 , 0 ) , // volclouds v3
188+ new Version ( 2 , 3 , 3 , 1 ) , // VR patch on volclouds v4
189+ } ,
190+ new Dictionary < Version , string > ( )
191+ {
192+ { new Version ( 2 , 3 , 3 , 0 ) , "Install the files from Optional Mods/VolumetricClouds-v4" } ,
193+ } ) ;
194+ }
195+
170196 private static void CheckRequiredFiles ( )
171197 {
172198 string errorMessage = string . Empty ;
0 commit comments