| | 50 | bool CSimulation2Impl::LoadScripts(const VfsPath& path) |
| | 51 | { |
| | 52 | VfsPaths pathnames; |
| | 53 | if (fs_util::GetPathnames(g_VFS, path, L"*.js", pathnames) < 0) |
| | 54 | return false; |
| | 55 | |
| | 56 | bool ok = true; |
| | 57 | for (VfsPaths::iterator it = pathnames.begin(); it != pathnames.end(); ++it) |
| | 58 | { |
| | 59 | std::wstring filename = it->string(); |
| | 60 | m_LoadedScripts.insert(filename); |
| | 61 | LOGMESSAGE(L"Loading simulation script '%ls'", filename.c_str()); |
| | 62 | if (! m_ComponentManager.LoadScript(filename)) |
| | 63 | ok = false; |
| | 64 | } |
| | 65 | return ok; |
| | 66 | } |
| | 67 | |
| | 68 | |