| 516 | } |
| 517 | |
| 518 | static wzapi::scripting_instance* loadPlayerScriptByBackend(const WzString& path, int player, int realDifficulty) |
| 519 | { |
| 520 | // JS scripts: |
| 521 | switch (war_getJSBackend()) |
| 522 | { |
| 523 | case JS_BACKEND::quickjs: |
| 524 | return createQuickJSScriptInstance(path, player, realDifficulty); |
| 525 | case JS_BACKEND::num_backends: |
| 526 | debug(LOG_ERROR, "Invalid js backend value"); // should not happen |
| 527 | } |
| 528 | return nullptr; |
| 529 | } |
| 530 | |
| 531 | wzapi::scripting_instance* scripting_engine::loadPlayerScript(const WzString& path, int player, AIDifficulty difficulty) |
| 532 | { |
no test coverage detected