(svn r15095) -Add [NoAI]: allow AI Libraries to be in .tar files (subdir required, as with AIs

-Add [NoAI]: allow multiple versions of the same AI co-exist
-Change [NoAI]: updated the whole method of AI (Library) finding and loading; it is now much more clear and transparent
-Change [NoAI]: the name of the AI is now the name used by CreateInstance()
-Change [NoAI]: make the AI finder a bit more clever, mostly related to version finding
This commit is contained in:
truebrain
2009-01-15 18:15:12 +00:00
parent a039ec0d21
commit ef62688522
8 changed files with 173 additions and 154 deletions

View File

@@ -84,14 +84,9 @@ public:
bool CanLoadFromVersion(int version);
/**
* Get the name of the dir this AI is in.
* Get the filename of the main.nut script.
*/
const char *GetDirName();
/**
* Get the complete script name of this AI.
*/
const char *GetScriptName();
const char *GetMainScript();
/**
* Check if a given method exists.
@@ -106,8 +101,7 @@ public:
private:
class Squirrel *engine;
HSQOBJECT *SQ_instance;
char *script_name;
char *dir_name;
char *main_script;
class AIScanner *base;
const char *author;
const char *name;
@@ -156,6 +150,7 @@ private:
class AILibrary : public AIFileInfo {
public:
AILibrary() : AIFileInfo(), category(NULL) {};
~AILibrary();
/**
* Create an AI, using this AIInfo as start-template.