bot: added support for loading from custom folders (ref #498)

This commit is contained in:
jeefo 2023-12-20 00:06:45 +03:00
commit a904f49231
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
7 changed files with 59 additions and 19 deletions

View file

@ -807,8 +807,8 @@ bool Game::postload () {
game.print (msg);
});
auto ensureBotPathExists = [this] (StringRef dir1, StringRef dir2) {
File::makePath (strings.joinPath (getRunningModName (), folders.addons, folders.bot, dir1, dir2).chars ());
auto ensureBotPathExists = [] (StringRef dir1, StringRef dir2) {
File::makePath (strings.joinPath (bstor.getRunningPath (), dir1, dir2).chars ());
};
// ensure we're have all needed directories