MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Run

Method Run

Source/ScriptingEngine.cpp:466–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466bool cScriptingEngine::Run(const std::string& pScript) {
467
468 dukglue_register_global(mContext, this, "Engine");
469
470 auto path = g_ResourceMan->GetScriptPath(pScript);
471 auto script = g_ResourceMan->FileReadStr(path);
472
473 if (!script.size() || (scriptRun(script, pScript) == false)) {
474 g_Debugger->Error(path + " Failed to execute: " + pScript);
475 return false;
476 }
477
478 return true;
479}

Callers 1

CreateRandomMethod · 0.80

Calls 5

dukglue_register_globalFunction · 0.85
GetScriptPathMethod · 0.80
FileReadStrMethod · 0.80
ErrorMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected