Any idea why the AI scripts aren't compiled? I think it's because they are a subclass of ScriptBase instead of Script, but when I changed it, it threw a shitload of errors at me when compiling them. I guess you've had them work Kryso, so any comments?
Code:
private void AnalyzeAssembly( Assembly assembly ) {
Log.WriteLine( "Analyzing assembly '" + assembly.FullName + "'" );
Type[] types = assembly.GetTypes();
Log.WriteLine( "\tFound " + types.Length + " types" );
Log.WriteLine();
lock ( SyncRoot ) {
foreach ( Type type in types ) {
if ( !type.IsClass || !type.IsSubclassOf( typeof( Script ) ) ) {
Log.WriteLine( "\tIgnoring '" + type.FullName + "'" );
continue;
}
toRegister.Enqueue( type );
}
}
while (toRegister.Count > 0)
Thread.Sleep(0);
Log.WriteLine();
Log.WriteLine( "Finished" );
}