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

Method OnScriptFileReady

src/game_ineluki.cpp:406–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

404}
405
406void Game_Ineluki::OnScriptFileReady(FileRequestResult* result) {
407 auto it = std::find_if(async_scripts.begin(), async_scripts.end(), [&](const auto& a) {
408 return a.script_name == result->file;
409 });
410 assert(it != async_scripts.end());
411 it->invoked = true;
412
413 if (std::all_of(async_scripts.begin(), async_scripts.end(), [](const auto& a) {
414 return a.invoked;
415 })) {
416 std::for_each(async_scripts.begin(), async_scripts.end(), [this](const auto& a) {
417 Execute(FileFinder::Game().FindFile(a.script_name));
418 });
419 async_scripts.clear();
420 }
421}
422
423Game_Ineluki::CheatItem::CheatItem(const std::string& code, int value) : value(value) {
424 for (char c: code) {

Callers

nothing calls this directly

Calls 5

GameClass · 0.85
beginMethod · 0.45
endMethod · 0.45
FindFileMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected