| 322 | } |
| 323 | |
| 324 | bool DoesScriptFunctionExistInModule(const String &script_module, const String &fn_name) |
| 325 | { |
| 326 | if (script_module.IsEmpty() || script_module == gamescript->GetScriptName()) |
| 327 | return DoesScriptFunctionExist(gamescript.get(), fn_name); |
| 328 | |
| 329 | for (size_t i = 0; i < numScriptModules; ++i) |
| 330 | { |
| 331 | if (script_module == scriptModules[i]->GetScriptName()) |
| 332 | return DoesScriptFunctionExist(scriptModules[i].get(), fn_name); |
| 333 | } |
| 334 | return false; |
| 335 | } |
| 336 | |
| 337 | void TryRunScriptHandler(ScriptType sc_type, const String &script_module, |
| 338 | const ScriptEventHandler &handler, size_t param_count, const RuntimeScriptValue *params) |