From 7a06c949c7d3404dc78f7a5d3c561eb2d3023e2f Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Fri, 21 Sep 2012 15:21:04 +0400 Subject: Document the lua class module. --- Lua API.html | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 81 insertions(+), 8 deletions(-) (limited to 'Lua API.html') diff --git a/Lua API.html b/Lua API.html index 0da65b5f..f30bb6ec 100644 --- a/Lua API.html +++ b/Lua API.html @@ -366,14 +366,15 @@ ul.auto-toc {
  • Global environment
  • utils
  • dumper
  • +
  • class
  • -
  • Plugins

    The current version of DFHack has extensive support for @@ -1930,16 +1931,88 @@ the other arguments see the original documentation link above.

  • +
    +

    class

    +

    Implements a trivial single-inheritance class system.

    + +

    Predefined instance methods:

    + +

    To avoid confusion, these methods cannot be redefined.

    +
    -

    Plugins

    +

    Plugins

    DFHack plugins may export native functions and events to lua contexts. They are automatically imported by mkmodule('plugins.<name>'); this means that a lua module file is still necessary for require to read.

    The following plugins have lua support.

    -

    burrows

    +

    burrows

    Implements extended burrow manipulations.

    Events:

    -

    sort

    +

    sort

    Does not export any native functions as of now. Instead, it calls lua code to perform the actual ordering of list items.

    -

    Scripts

    +

    Scripts

    Any files with the .lua extension placed into hack/scripts/* are automatically used by the DFHack core as commands. The matching command name consists of the name of the file sans -- cgit v1.2.1