| 219 | } |
| 220 | |
| 221 | bool CScriptEngine::LookupScript(string_path& fname, const char* base) |
| 222 | { |
| 223 | string_path lc_base; |
| 224 | if (xray_scripts.empty()) |
| 225 | { |
| 226 | FS.update_path(lc_base, "$game_scripts$", ""); |
| 227 | CollectScriptFiles(lc_base); |
| 228 | } |
| 229 | strcpy_s(lc_base, base); |
| 230 | _strlwr_s(lc_base); |
| 231 | auto it = xray_scripts.find(lc_base); |
| 232 | if (it != xray_scripts.end()) |
| 233 | { |
| 234 | strcpy_s(fname, it->second.c_str()); |
| 235 | return true; |
| 236 | } |
| 237 | return false; |
| 238 | } |
| 239 | |
| 240 | bool CScriptEngine::process_file_if_exists(const char* file_name, bool warn_if_not_exist) // KRodin: Функция проверяет существует ли скрипт на диске. Если существует - отправляет |
| 241 | // его в do_file. Вызывается из process_file, auto_load и не только. |
nothing calls this directly
no test coverage detected