Module Globals

Pre-defined globals.

Note: this is not a real module. All names described here are defined in the global clua namespace.

Functions

dofile (filename) Load and execute the named luafile, returning the result.
loadfile (filename) Load the named lua file as a chunk.
pmatch (pat, s) Match a string with a pattern.
require (filename) Load and execute the named lua file.

Tables

options Named lua options.


Functions

dofile (filename)
Load and execute the named luafile, returning the result. Differs from require in that the file is run for a result. Errors come back on the lua stack and can be handled by the caller.

Parameters:

  • filename string

Returns:

    whatever is left on the lua stack by filename
loadfile (filename)
Load the named lua file as a chunk.

Parameters:

  • filename string

Returns:

    function chunk or nil,error
pmatch (pat, s)
Match a string with a pattern.

Parameters:

  • pat string the pattern
  • s string

Returns:

    boolean
require (filename)
Load and execute the named lua file. Differs from dofile in that the file is run for its side effects. If the execution has an error we raise that error and exit.

Parameters:

  • filename string

Returns:

    boolean or nil

Tables

options
Named lua options. To set options with the same processing as .crawlrc or init.txt, use crawl.setopt.

This table provides access to the following crawl options: autoswitch, travel_open_doors, easy_armour, easy_unequip, note_skill_max, clear_messages, blink_brightens_background, bold_brightens_foreground, best_effort_brighten_background, best_effort_brighten_foreground, allow_extended_colours, pickup_thrown, easy_exit_menu, dos_use_background_intensity, autopickup_on; documented in docs/options_guide.txt.

It can also be used for global configuration of clua extensions.

generated by LDoc 1.4.6 Last updated 2018-08-21 11:24:55