| 560 | } |
| 561 | |
| 562 | void LuaScript::RegisterCommand(LuaCommand *command) |
| 563 | { |
| 564 | for (auto macro : macros) { |
| 565 | if (macro->name() == command->name()) { |
| 566 | error(L, "A macro named '%s' is already defined in script '%s'", |
| 567 | command->StrDisplay(nullptr).utf8_str().data(), name.c_str()); |
| 568 | } |
| 569 | } |
| 570 | macros.push_back(command); |
| 571 | } |
| 572 | |
| 573 | void LuaScript::UnregisterCommand(LuaCommand *command) |
| 574 | { |
no test coverage detected