MCPcopy Create free account
hub / github.com/EasyRPG/Player / ExecuteScriptList

Method ExecuteScriptList

src/game_ineluki.cpp:216–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216bool 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
245bool Game_Ineluki::Parse(std::string_view ini_file) {
246 auto ini_file_s = ToString(ini_file);

Callers 2

ContinueMethod · 0.80
CreateGameObjectsMethod · 0.80

Calls 6

GameClass · 0.85
OpenInputStreamMethod · 0.80
SetImportantFileMethod · 0.80
emptyMethod · 0.45
BindMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected