| 214 | } |
| 215 | |
| 216 | bool Game_Ineluki::ExecuteScriptList(std::string_view list_file) { |
| 217 | auto is = FileFinder::Game().OpenInputStream(ToString(list_file)); |
| 218 | assert(async_scripts.empty()); |
| 219 | |
| 220 | if (!is) { |
| 221 | return false; |
| 222 | } |
| 223 | |
| 224 | Output::Debug("Ineluki: Processing script list {}", FileFinder::GetPathInsideGamePath(ToString(list_file))); |
| 225 | |
| 226 | std::string line; |
| 227 | std::vector<FileRequestAsync*> requests; |
| 228 | while (Utils::ReadLine(is, line)) { |
| 229 | if (!line.empty()) { |
| 230 | FileRequestAsync* request = AsyncHandler::RequestFile(line); |
| 231 | auto binding = request->Bind(&Game_Ineluki::OnScriptFileReady, this); |
| 232 | async_scripts.emplace_back(binding, line); |
| 233 | requests.push_back(request); |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | for (auto& r: requests) { |
| 238 | r->SetImportantFile(true); |
| 239 | r->Start(); |
| 240 | } |
| 241 | |
| 242 | return true; |
| 243 | } |
| 244 | |
| 245 | bool Game_Ineluki::Parse(std::string_view ini_file) { |
| 246 | auto ini_file_s = ToString(ini_file); |
no test coverage detected