(svn r23612) -Add: allow importing libraries in the same way as AI does, only with GS prefix (and in game/library)

This commit is contained in:
truebrain
2011-12-19 20:56:59 +00:00
parent fb2f2a0285
commit ff7797c421
14 changed files with 214 additions and 27 deletions

View File

@@ -16,8 +16,6 @@
class GameScannerInfo : public ScriptScanner {
public:
GameScannerInfo();
/* virtual */ void Initialize();
/**
@@ -37,4 +35,25 @@ protected:
/* virtual */ void RegisterAPI(class Squirrel *engine);
};
class GameScannerLibrary : public ScriptScanner {
public:
/* virtual */ void Initialize();
/**
* Find a library in the pool.
* @param library The library name to find.
* @param version The version the library should have.
* @return The library if found, NULL otherwise.
*/
class GameLibrary *FindLibrary(const char *library, int version);
protected:
/* virtual */ void GetScriptName(ScriptInfo *info, char *name, int len);
/* virtual */ const char *GetFileName() const { return PATHSEP "library.nut"; }
/* virtual */ Subdirectory GetDirectory() const { return GAME_LIBRARY_DIR; }
/* virtual */ const char *GetScannerName() const { return "GS Libraries"; }
/* virtual */ void RegisterAPI(class Squirrel *engine);
};
#endif /* GAME_SCANNER_HPP */