MCPcopy Create free account
hub / github.com/crawl/crawl / crawl_process_command

Function crawl_process_command

crawl-ref/source/l-crawl.cc:384–400  ·  view source on GitHub ↗

Tell crawl to process a current macro delay. * @return boolean whether it will actually do so * @function process_command */

Source from the content-addressed store, hash-verified

382 * @function process_command
383 */
384static 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
402static bool _check_can_do_command(lua_State *ls)
403{

Callers

nothing calls this directly

Calls 3

you_are_delayedFunction · 0.85
current_delayFunction · 0.85
is_macroMethod · 0.45

Tested by

no test coverage detected