Tell crawl to process a current macro delay. * @return boolean whether it will actually do so * @function process_command */
| 382 | * @function process_command |
| 383 | */ |
| 384 | static int crawl_process_command(lua_State *ls) |
| 385 | { |
| 386 | const bool will_process = |
| 387 | !you_are_delayed() || current_delay()->is_macro(); |
| 388 | |
| 389 | if (will_process) |
| 390 | { |
| 391 | // This should only be called from a macro delay, but run_macro |
| 392 | // may not have started the macro delay; do so now. |
| 393 | if (!you_are_delayed()) |
| 394 | start_delay<MacroDelay>(); |
| 395 | start_delay<MacroProcessKeyDelay>(); |
| 396 | } |
| 397 | |
| 398 | lua_pushboolean(ls, will_process); |
| 399 | return 1; |
| 400 | } |
| 401 | |
| 402 | static bool _check_can_do_command(lua_State *ls) |
| 403 | { |
nothing calls this directly
no test coverage detected