| 464 | } |
| 465 | |
| 466 | bool 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 | } |
no test coverage detected