diff options
| author | Petr Mrázek | 2012-04-05 02:39:38 +0200 |
|---|---|---|
| committer | Petr Mrázek | 2012-04-05 02:39:38 +0200 |
| commit | 7fa4ffeb9eec9924698560669c24d44bac790938 (patch) | |
| tree | 4e11c668a803408c817e422e82d3cc4104cfa9d6 | |
| parent | aaffdd56d8c2684667082372ea4effd02d3f4b2a (diff) | |
| download | dfhack-7fa4ffeb9eec9924698560669c24d44bac790938.tar.gz dfhack-7fa4ffeb9eec9924698560669c24d44bac790938.tar.bz2 dfhack-7fa4ffeb9eec9924698560669c24d44bac790938.tar.xz | |
Add a html version of the LUA API doc, package it.
| -rw-r--r-- | CMakeLists.txt | 2 | ||||
| -rw-r--r-- | Lua API.html | 580 | ||||
| -rw-r--r-- | Readme.html | 94 | ||||
| -rwxr-xr-x | fixTexts.sh | 1 |
4 files changed, 634 insertions, 43 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 60286c92..3cbbe6a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,7 +140,7 @@ add_subdirectory(depends) IF(BUILD_LIBRARY) add_subdirectory (library) ## install the default documentation files - install(FILES LICENSE Readme.html Compile.html DESTINATION ${DFHACK_USERDOC_DESTINATION}) + install(FILES LICENSE Readme.html Compile.html Lua\ API.html DESTINATION ${DFHACK_USERDOC_DESTINATION}) endif() #build the plugins diff --git a/Lua API.html b/Lua API.html new file mode 100644 index 00000000..86b9c00c --- /dev/null +++ b/Lua API.html @@ -0,0 +1,580 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> +<meta name="generator" content="Docutils 0.8.1: http://docutils.sourceforge.net/" /> +<title>DFHack Lua API</title> +<style type="text/css"> + +/* +:Author: David Goodger (goodger@python.org) +:Id: $Id: html4css1.css 7056 2011-06-17 10:50:48Z milde $ +:Copyright: This stylesheet has been placed in the public domain. + +Default cascading style sheet for the HTML output of Docutils. + +See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to +customize this style sheet. +*/ + +/* used to remove borders from tables and images */ +.borderless, table.borderless td, table.borderless th { + border: 0 } + +table.borderless td, table.borderless th { + /* Override padding for "table.docutils td" with "! important". + The right padding separates the table cells. */ + padding: 0 0.5em 0 0 ! important } + +.first { + /* Override more specific margin styles with "! important". */ + margin-top: 0 ! important } + +.last, .with-subtitle { + margin-bottom: 0 ! important } + +.hidden { + display: none } + +a.toc-backref { + text-decoration: none ; + color: black } + +blockquote.epigraph { + margin: 2em 5em ; } + +dl.docutils dd { + margin-bottom: 0.5em } + +object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] { + overflow: hidden; +} + +/* Uncomment (and remove this text!) to get bold-faced definition list terms +dl.docutils dt { + font-weight: bold } +*/ + +div.abstract { + margin: 2em 5em } + +div.abstract p.topic-title { + font-weight: bold ; + text-align: center } + +div.admonition, div.attention, div.caution, div.danger, div.error, +div.hint, div.important, div.note, div.tip, div.warning { + margin: 2em ; + border: medium outset ; + padding: 1em } + +div.admonition p.admonition-title, div.hint p.admonition-title, +div.important p.admonition-title, div.note p.admonition-title, +div.tip p.admonition-title { + font-weight: bold ; + font-family: sans-serif } + +div.attention p.admonition-title, div.caution p.admonition-title, +div.danger p.admonition-title, div.error p.admonition-title, +div.warning p.admonition-title { + color: red ; + font-weight: bold ; + font-family: sans-serif } + +/* Uncomment (and remove this text!) to get reduced vertical space in + compound paragraphs. +div.compound .compound-first, div.compound .compound-middle { + margin-bottom: 0.5em } + +div.compound .compound-last, div.compound .compound-middle { + margin-top: 0.5em } +*/ + +div.dedication { + margin: 2em 5em ; + text-align: center ; + font-style: italic } + +div.dedication p.topic-title { + font-weight: bold ; + font-style: normal } + +div.figure { + margin-left: 2em ; + margin-right: 2em } + +div.footer, div.header { + clear: both; + font-size: smaller } + +div.line-block { + display: block ; + margin-top: 1em ; + margin-bottom: 1em } + +div.line-block div.line-block { + margin-top: 0 ; + margin-bottom: 0 ; + margin-left: 1.5em } + +div.sidebar { + margin: 0 0 0.5em 1em ; + border: medium outset ; + padding: 1em ; + background-color: #ffffee ; + width: 40% ; + float: right ; + clear: right } + +div.sidebar p.rubric { + font-family: sans-serif ; + font-size: medium } + +div.system-messages { + margin: 5em } + +div.system-messages h1 { + color: red } + +div.system-message { + border: medium outset ; + padding: 1em } + +div.system-message p.system-message-title { + color: red ; + font-weight: bold } + +div.topic { + margin: 2em } + +h1.section-subtitle, h2.section-subtitle, h3.section-subtitle, +h4.section-subtitle, h5.section-subtitle, h6.section-subtitle { + margin-top: 0.4em } + +h1.title { + text-align: center } + +h2.subtitle { + text-align: center } + +hr.docutils { + width: 75% } + +img.align-left, .figure.align-left, object.align-left { + clear: left ; + float: left ; + margin-right: 1em } + +img.align-right, .figure.align-right, object.align-right { + clear: right ; + float: right ; + margin-left: 1em } + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left } + +.align-center { + clear: both ; + text-align: center } + +.align-right { + text-align: right } + +/* reset inner alignment in figures */ +div.align-right { + text-align: inherit } + +/* div.align-center * { */ +/* text-align: left } */ + +ol.simple, ul.simple { + margin-bottom: 1em } + +ol.arabic { + list-style: decimal } + +ol.loweralpha { + list-style: lower-alpha } + +ol.upperalpha { + list-style: upper-alpha } + +ol.lowerroman { + list-style: lower-roman } + +ol.upperroman { + list-style: upper-roman } + +p.attribution { + text-align: right ; + margin-left: 50% } + +p.caption { + font-style: italic } + +p.credits { + font-style: italic ; + font-size: smaller } + +p.label { + white-space: nowrap } + +p.rubric { + font-weight: bold ; + font-size: larger ; + color: maroon ; + text-align: center } + +p.sidebar-title { + font-family: sans-serif ; + font-weight: bold ; + font-size: larger } + +p.sidebar-subtitle { + font-family: sans-serif ; + font-weight: bold } + +p.topic-title { + font-weight: bold } + +pre.address { + margin-bottom: 0 ; + margin-top: 0 ; + font: inherit } + +pre.literal-block, pre.doctest-block, pre.math { + margin-left: 2em ; + margin-right: 2em } + +span.classifier { + font-family: sans-serif ; + font-style: oblique } + +span.classifier-delimiter { + font-family: sans-serif ; + font-weight: bold } + +span.interpreted { + font-family: sans-serif } + +span.option { + white-space: nowrap } + +span.pre { + white-space: pre } + +span.problematic { + color: red } + +span.section-subtitle { + /* font-size relative to parent (h1..h6 element) */ + font-size: 80% } + +table.citation { + border-left: solid 1px gray; + margin-left: 1px } + +table.docinfo { + margin: 2em 4em } + +table.docutils { + margin-top: 0.5em ; + margin-bottom: 0.5em } + +table.footnote { + border-left: solid 1px black; + margin-left: 1px } + +table.docutils td, table.docutils th, +table.docinfo td, table.docinfo th { + padding-left: 0.5em ; + padding-right: 0.5em ; + vertical-align: top } + +table.docutils th.field-name, table.docinfo th.docinfo-name { + font-weight: bold ; + text-align: left ; + white-space: nowrap ; + padding-left: 0 } + +h1 tt.docutils, h2 tt.docutils, h3 tt.docutils, +h4 tt.docutils, h5 tt.docutils, h6 tt.docutils { + font-size: 100% } + +ul.auto-toc { + list-style-type: none } + +</style> +</head> +<body> +<div class="document" id="dfhack-lua-api"> +<h1 class="title">DFHack Lua API</h1> + +<div class="contents topic" id="contents"> +<p class="topic-title first">Contents</p> +<ul class="simple"> +<li><a class="reference internal" href="#df-structure-wrapper" id="id1">DF structure wrapper</a><ul> +<li><a class="reference internal" href="#typed-object-references" id="id2">Typed object references</a><ul> +<li><a class="reference internal" href="#primitive-references" id="id3">Primitive references</a></li> +<li><a class="reference internal" href="#struct-references" id="id4">Struct references</a></li> +<li><a class="reference internal" href="#container-references" id="id5">Container references</a></li> +<li><a class="reference internal" href="#bitfield-references" id="id6">Bitfield references</a></li> +</ul> +</li> +<li><a class="reference internal" href="#named-types" id="id7">Named types</a></li> +<li><a class="reference internal" href="#global-functions" id="id8">Global functions</a></li> +</ul> +</li> +</ul> +</div> +<div class="section" id="df-structure-wrapper"> +<h1><a class="toc-backref" href="#id1">DF structure wrapper</a></h1> +<p>DF structures described by the xml files in library/xml are exported +to lua code as a tree of objects and functions under the <tt class="docutils literal">df</tt> global, +which broadly maps to the <tt class="docutils literal">df</tt> namespace in C++.</p> +<p><strong>WARNING</strong>: The wrapper provides almost raw access to the memory +of the game, so mistakes in manipulating objects are as likely to +crash the game as equivalent plain C++ code would be. E.g. NULL +pointer access is safely detected, but dangling pointers aren't.</p> +<p>Objects managed by the wrapper can be broadly classified into the following groups:</p> +<ol class="arabic"> +<li><p class="first">Typed object pointers (references).</p> +<p>References represent objects in DF memory with a known type.</p> +<p>In addition to fields and methods defined by the wrapped type, +every reference has some built-in properties and methods.</p> +</li> +<li><p class="first">Untyped pointers</p> +<p>Represented as lightuserdata.</p> +<p>In assignment to a pointer NULL can be represented either as +<tt class="docutils literal">nil</tt>, or a NULL lightuserdata; reading a NULL pointer field +returns <tt class="docutils literal">nil</tt>.</p> +</li> +<li><p class="first">Named types</p> +<p>Objects in the <tt class="docutils literal">df</tt> tree that represent identity of struct, class, +enum and bitfield types. They host nested named types, static +methods, builtin properties & methods, and, for enums and bitfields, +the bi-directional mapping between key names and values.</p> +</li> +<li><p class="first">The <tt class="docutils literal">global</tt> object</p> +<p><tt class="docutils literal">df.global</tt> corresponds to the <tt class="docutils literal"><span class="pre">df::global</span></tt> namespace, and +behaves as a mix between a named type and a reference, containing +both nested types and fields corresponding to global symbols.</p> +</li> +</ol> +<p>In addition to the <tt class="docutils literal">global</tt> object and top-level types the <tt class="docutils literal">df</tt> +global also contains a few global builtin utility functions.</p> +<div class="section" id="typed-object-references"> +<h2><a class="toc-backref" href="#id2">Typed object references</a></h2> +<p>The underlying primitive lua object is userdata with a metatable. +Every structured field access produces a new userdata instance.</p> +<p>All typed objects have the following built-in features:</p> +<ul> +<li><p class="first"><tt class="docutils literal">ref1 == ref2</tt>, <tt class="docutils literal">tostring(ref)</tt></p> +<p>References implement equality by type & pointer value, and string conversion.</p> +</li> +<li><p class="first"><tt class="docutils literal">pairs(ref)</tt></p> +<p>Returns an iterator for the sequence of actual C++ field names +and values. Fields are enumerated in memory order. Methods and +lua wrapper properties are not included in the iteration.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref._kind</tt></p> +<p>Returns one of: <tt class="docutils literal">primitive</tt>, <tt class="docutils literal">struct</tt>, <tt class="docutils literal">container</tt>, +or <tt class="docutils literal">bitfield</tt>, as appropriate for the referenced object.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref._type</tt></p> +<p>Returns the named type object or a string that represents +the referenced object type.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref:sizeof()</tt></p> +<p>Returns <em>size, address</em></p> +</li> +<li><p class="first"><tt class="docutils literal">ref:new()</tt></p> +<p>Allocates a new instance of the same type, and copies data +from the current object.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref:delete()</tt></p> +<p>Destroys the object with the C++ <tt class="docutils literal">delete</tt> operator. +If destructor is not available, returns <em>false</em>.</p> +<p><strong>WARNING</strong>: the lua reference object remains as a dangling +pointer, like a raw C++ pointer would.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref:assign(object)</tt></p> +<p>Assigns data from object to ref. Object must either be another +ref of a compatible type, or a lua table; in the latter case +special recursive assignment rules are applied.</p> +</li> +<li><p class="first"><tt class="docutils literal"><span class="pre">ref:_displace(index[,step])</span></tt></p> +<p>Returns a new reference with the pointer adjusted by index*step. +Step defaults to the natural object size.</p> +</li> +</ul> +<div class="section" id="primitive-references"> +<h3><a class="toc-backref" href="#id3">Primitive references</a></h3> +<p>References of the <em>_kind</em> <tt class="docutils literal">'primitive'</tt> are used for objects +that don't fit any of the other reference types. Such +references can only appear as a value of a pointer field, +or as a result of calling the <tt class="docutils literal">_field()</tt> method.</p> +<p>They behave as structs with one field <tt class="docutils literal">value</tt> of the right type.</p> +</div> +<div class="section" id="struct-references"> +<h3><a class="toc-backref" href="#id4">Struct references</a></h3> +<p>Struct references are used for class and struct objects.</p> +<p>They implement the following features:</p> +<ul> +<li><p class="first"><tt class="docutils literal">ref.field</tt>, <tt class="docutils literal">ref.field = value</tt></p> +<p>Valid fields of the structure may be accessed by subscript.</p> +<p>In case of inheritance, <em>superclass</em> fields have precedence +over the subclass, but fields shadowed in this way can still +be accessed as <tt class="docutils literal"><span class="pre">ref['subclasstype.field']</span></tt>.</p> +<p>This shadowing order is necessary because vtable-based classes +are automatically exposed in their exact type, and the reverse +rule would make access to superclass fields unreliable.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref._field(field)</tt></p> +<p>Returns a reference to a valid field. That is, unlike regular +subscript, it returns a pointer reference even for primitive +typed fields.</p> +</li> +<li><p class="first"><tt class="docutils literal"><span class="pre">ref:vmethod(args...)</span></tt></p> +<p>Named virtual methods are also exposed, subject to the same +shadowing rules.</p> +</li> +<li><p class="first"><tt class="docutils literal">pairs(ref)</tt></p> +<p>Enumerates all real fields (but not methods) in memory +(= declaration) order.</p> +</li> +</ul> +</div> +<div class="section" id="container-references"> +<h3><a class="toc-backref" href="#id5">Container references</a></h3> +<p>Containers represent vectors and arrays, possibly resizable.</p> +<p>A container field can associate an enum to the container +reference, which allows accessing elements using string keys +instead of numerical indices.</p> +<p>Implemented features:</p> +<ul> +<li><p class="first"><tt class="docutils literal">ref._enum</tt></p> +<p>If the container has an associated enum, returns the matching +named type object.</p> +</li> +<li><p class="first"><tt class="docutils literal">#ref</tt></p> +<p>Returns the <em>length</em> of the container.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref[index]</tt></p> +<p>Accesses the container element, using either a <em>0-based</em> numerical +index, or, if an enum is associated, a valid enum key string.</p> +<p>Accessing an invalid index is an error, but some container types +may return a default value, or auto-resize instead for convenience. +Currently this relaxed mode is implemented by df-flagarray aka BitArray.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref._field(index)</tt></p> +<p>Like with structs, returns a pointer to the array element, if possible. +Flag and bit arrays cannot return such pointer, so it fails with an error.</p> +</li> +<li><p class="first"><tt class="docutils literal">pairs(ref)</tt>, <tt class="docutils literal">ipairs(ref)</tt></p> +<p>If the container has no associated enum, both behave identically, +iterating over numerical indices in order. Otherwise, ipairs still +uses numbers, while pairs tries to substitute enum keys whenever +possible.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref:resize(new_size)</tt></p> +<p>Resizes the container if supported, or fails with an error.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref:insert(index,item)</tt></p> +<p>Inserts a new item at the specified index. To add at the end, +use <tt class="docutils literal">#ref</tt> as index.</p> +</li> +<li><p class="first"><tt class="docutils literal">ref:erase(index)</tt></p> +<p>Removes the element at the given valid index.</p> +</li> +</ul> +</div> +<div class="section" id="bitfield-references"> +<h3><a class="toc-backref" href="#id6">Bitfield references</a></h3> +<p>Bitfields behave like special fixed-size containers. +The <tt class="docutils literal">_enum</tt> property points to the bitfield type.</p> +<p>Numerical indices correspond to the shift value, +and if a subfield occupies multiple bits, the +<tt class="docutils literal">ipairs</tt> order would have a gap.</p> +</div> +</div> +<div class="section" id="named-types"> +<h2><a class="toc-backref" href="#id7">Named types</a></h2> +<p>Named types are exposed in the <tt class="docutils literal">df</tt> tree with names identical +to the C++ version, except for the <tt class="docutils literal">::</tt> vs <tt class="docutils literal">.</tt> difference.</p> +<p>All types and the global object have the following features:</p> +<ul> +<li><p class="first"><tt class="docutils literal">type._kind</tt></p> +<p>Evaluates to one of <tt class="docutils literal"><span class="pre">struct-type</span></tt>, <tt class="docutils literal"><span class="pre">class-type</span></tt>, <tt class="docutils literal"><span class="pre">enum-type</span></tt>, +<tt class="docutils literal"><span class="pre">bitfield-type</span></tt> or <tt class="docutils literal">global</tt>.</p> +</li> +<li><p class="first"><tt class="docutils literal">type._identity</tt></p> +<p>Contains a lightuserdata pointing to the underlying +DFHack::type_instance object.</p> +</li> +</ul> +<p>Types excluding the global object also support:</p> +<ul> +<li><p class="first"><tt class="docutils literal">type:sizeof()</tt></p> +<p>Returns the size of an object of the type.</p> +</li> +<li><p class="first"><tt class="docutils literal">type:new()</tt></p> +<p>Creates a new instance of an object of the type.</p> +</li> +<li><p class="first"><tt class="docutils literal">type:is_instance(object)</tt></p> +<p>Returns true if object is same or subclass type, or a reference +to an object of same or subclass type. It is permissible to pass +nil, NULL or non-wrapper value as object; in this case the +method returns nil.</p> +</li> +</ul> +<p>In addition to this, enum and bitfield types contain a +bi-directional mapping between key strings and values, and +also map <tt class="docutils literal">_first_item</tt> and <tt class="docutils literal">_last_item</tt> to the min and +max values.</p> +<p>Struct and class types with instance-vector attribute in the +xml have a <tt class="docutils literal">type.find(key)</tt> function that wraps the find +method provided in C++.</p> +</div> +<div class="section" id="global-functions"> +<h2><a class="toc-backref" href="#id8">Global functions</a></h2> +<p>The <tt class="docutils literal">df</tt> table itself contains the following functions and values:</p> +<ul> +<li><p class="first"><tt class="docutils literal">NULL</tt>, <tt class="docutils literal">df.NULL</tt></p> +<p>Contains the NULL lightuserdata.</p> +</li> +<li><p class="first"><tt class="docutils literal">df.isnull(obj)</tt></p> +<p>Evaluates to true if obj is nil or NULL; false otherwise.</p> +</li> +<li><p class="first"><tt class="docutils literal"><span class="pre">df.isvalid(obj[,allow_null])</span></tt></p> +<p>For supported objects returns one of <tt class="docutils literal">type</tt>, <tt class="docutils literal">voidptr</tt>, <tt class="docutils literal">ref</tt>.</p> +<p>If <em>allow_null</em> is true, and obj is nil or NULL, returns <tt class="docutils literal">null</tt>.</p> +<p>Otherwise returns <em>nil</em>.</p> +</li> +<li><p class="first"><tt class="docutils literal">df.sizeof(obj)</tt></p> +<p>For types and refs identical to <tt class="docutils literal">obj:sizeof()</tt>. +For lightuserdata returns <em>nil, address</em></p> +</li> +<li><p class="first"><tt class="docutils literal">df.new(obj)</tt>, <tt class="docutils literal">df.delete(obj)</tt>, <tt class="docutils literal">df.assign(obj, obj2)</tt></p> +<p>Equivalent to using the matching methods of obj.</p> +</li> +<li><p class="first"><tt class="docutils literal"><span class="pre">df._displace(obj,index[,step])</span></tt></p> +<p>For refs equivalent to the method, but also works with +lightuserdata (step is mandatory then).</p> +</li> +<li><p class="first"><tt class="docutils literal">df.is_instance(type,obj)</tt></p> +<p>Equivalent to the method, but also allows a reference as proxy for its type.</p> +</li> +</ul> +</div> +</div> +</div> +</body> +</html> diff --git a/Readme.html b/Readme.html index 3fc8f27a..4e1a06eb 100644 --- a/Readme.html +++ b/Readme.html @@ -467,33 +467,35 @@ access DF memory and allow for easier development of new tools.</p> </ul> </li> <li><a class="reference internal" href="#tubefill" id="id125">tubefill</a></li> -<li><a class="reference internal" href="#vdig" id="id126">vdig</a></li> -<li><a class="reference internal" href="#vdigx" id="id127">vdigx</a></li> -<li><a class="reference internal" href="#expdig" id="id128">expdig</a><ul> -<li><a class="reference internal" href="#patterns" id="id129">Patterns:</a></li> -<li><a class="reference internal" href="#filters" id="id130">Filters:</a></li> -<li><a class="reference internal" href="#id23" id="id131">Examples:</a></li> +<li><a class="reference internal" href="#digv" id="id126">digv</a></li> +<li><a class="reference internal" href="#digvx" id="id127">digvx</a></li> +<li><a class="reference internal" href="#digl" id="id128">digl</a></li> +<li><a class="reference internal" href="#diglx" id="id129">diglx</a></li> +<li><a class="reference internal" href="#digexp" id="id130">digexp</a><ul> +<li><a class="reference internal" href="#patterns" id="id131">Patterns:</a></li> +<li><a class="reference internal" href="#filters" id="id132">Filters:</a></li> +<li><a class="reference internal" href="#id23" id="id133">Examples:</a></li> </ul> </li> -<li><a class="reference internal" href="#digcircle" id="id132">digcircle</a><ul> -<li><a class="reference internal" href="#shape" id="id133">Shape:</a></li> -<li><a class="reference internal" href="#action" id="id134">Action:</a></li> -<li><a class="reference internal" href="#designation-types" id="id135">Designation types:</a></li> -<li><a class="reference internal" href="#id24" id="id136">Examples:</a></li> +<li><a class="reference internal" href="#digcircle" id="id134">digcircle</a><ul> +<li><a class="reference internal" href="#shape" id="id135">Shape:</a></li> +<li><a class="reference internal" href="#action" id="id136">Action:</a></li> +<li><a class="reference internal" href="#designation-types" id="id137">Designation types:</a></li> +<li><a class="reference internal" href="#id24" id="id138">Examples:</a></li> </ul> </li> -<li><a class="reference internal" href="#weather" id="id137">weather</a><ul> -<li><a class="reference internal" href="#id25" id="id138">Options:</a></li> +<li><a class="reference internal" href="#weather" id="id139">weather</a><ul> +<li><a class="reference internal" href="#id25" id="id140">Options:</a></li> </ul> </li> -<li><a class="reference internal" href="#workflow" id="id139">workflow</a><ul> -<li><a class="reference internal" href="#id26" id="id140">Usage</a></li> -<li><a class="reference internal" href="#function" id="id141">Function</a></li> -<li><a class="reference internal" href="#constraint-examples" id="id142">Constraint examples</a></li> +<li><a class="reference internal" href="#workflow" id="id141">workflow</a><ul> +<li><a class="reference internal" href="#id26" id="id142">Usage</a></li> +<li><a class="reference internal" href="#function" id="id143">Function</a></li> +<li><a class="reference internal" href="#constraint-examples" id="id144">Constraint examples</a></li> </ul> </li> -<li><a class="reference internal" href="#mapexport" id="id143">mapexport</a></li> -<li><a class="reference internal" href="#dwarfexport" id="id144">dwarfexport</a></li> +<li><a class="reference internal" href="#mapexport" id="id145">mapexport</a></li> +<li><a class="reference internal" href="#dwarfexport" id="id146">dwarfexport</a></li> </ul> </li> </ul> @@ -1330,21 +1332,29 @@ You can also paint only over tiles that match a set of properties (filter)</p> <h2><a class="toc-backref" href="#id125">tubefill</a></h2> <p>Fills all the adamantine veins again. Veins that were empty will be filled in too, but might still trigger a demon invasion (this is a known bug).</p> </div> -<div class="section" id="vdig"> -<h2><a class="toc-backref" href="#id126">vdig</a></h2> +<div class="section" id="digv"> +<h2><a class="toc-backref" href="#id126">digv</a></h2> <p>Designates a whole vein for digging. Requires an active in-game cursor placed over a vein tile. With the 'x' option, it will traverse z-levels (putting stairs between the same-material tiles).</p> </div> -<div class="section" id="vdigx"> -<h2><a class="toc-backref" href="#id127">vdigx</a></h2> -<p>A permanent alias for 'vdig x'.</p> +<div class="section" id="digvx"> +<h2><a class="toc-backref" href="#id127">digvx</a></h2> +<p>A permanent alias for 'digv x'.</p> </div> -<div class="section" id="expdig"> -<h2><a class="toc-backref" href="#id128">expdig</a></h2> +<div class="section" id="digl"> +<h2><a class="toc-backref" href="#id128">digl</a></h2> +<p>Designates layer stone for digging. Requires an active in-game cursor placed over a layer stone tile. With the 'x' option, it will traverse z-levels (putting stairs between the same-material tiles). With the 'undo' option it will remove the dig designation instead (if you realize that digging out a 50 z-level deep layer was not such a good idea after all).</p> +</div> +<div class="section" id="diglx"> +<h2><a class="toc-backref" href="#id129">diglx</a></h2> +<p>A permanent alias for 'digl x'.</p> +</div> +<div class="section" id="digexp"> +<h2><a class="toc-backref" href="#id130">digexp</a></h2> <p>This command can be used for exploratory mining.</p> <p>See: <a class="reference external" href="http://df.magmawiki.com/index.php/DF2010:Exploratory_mining">http://df.magmawiki.com/index.php/DF2010:Exploratory_mining</a></p> <p>There are two variables that can be set: pattern and filter.</p> <div class="section" id="patterns"> -<h3><a class="toc-backref" href="#id129">Patterns:</a></h3> +<h3><a class="toc-backref" href="#id131">Patterns:</a></h3> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> @@ -1365,7 +1375,7 @@ You can also paint only over tiles that match a set of properties (filter)</p> </table> </div> <div class="section" id="filters"> -<h3><a class="toc-backref" href="#id130">Filters:</a></h3> +<h3><a class="toc-backref" href="#id132">Filters:</a></h3> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> @@ -1381,7 +1391,7 @@ You can also paint only over tiles that match a set of properties (filter)</p> <p>After you have a pattern set, you can use 'expdig' to apply it again.</p> </div> <div class="section" id="id23"> -<h3><a class="toc-backref" href="#id131">Examples:</a></h3> +<h3><a class="toc-backref" href="#id133">Examples:</a></h3> <dl class="docutils"> <dt>designate the diagonal 5 patter over all hidden tiles:</dt> <dd><ul class="first last simple"> @@ -1402,11 +1412,11 @@ You can also paint only over tiles that match a set of properties (filter)</p> </div> </div> <div class="section" id="digcircle"> -<h2><a class="toc-backref" href="#id132">digcircle</a></h2> +<h2><a class="toc-backref" href="#id134">digcircle</a></h2> <p>A command for easy designation of filled and hollow circles. It has several types of options.</p> <div class="section" id="shape"> -<h3><a class="toc-backref" href="#id133">Shape:</a></h3> +<h3><a class="toc-backref" href="#id135">Shape:</a></h3> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> @@ -1421,7 +1431,7 @@ It has several types of options.</p> </table> </div> <div class="section" id="action"> -<h3><a class="toc-backref" href="#id134">Action:</a></h3> +<h3><a class="toc-backref" href="#id136">Action:</a></h3> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> @@ -1436,7 +1446,7 @@ It has several types of options.</p> </table> </div> <div class="section" id="designation-types"> -<h3><a class="toc-backref" href="#id135">Designation types:</a></h3> +<h3><a class="toc-backref" href="#id137">Designation types:</a></h3> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> @@ -1459,7 +1469,7 @@ It has several types of options.</p> repeats with the last selected parameters.</p> </div> <div class="section" id="id24"> -<h3><a class="toc-backref" href="#id136">Examples:</a></h3> +<h3><a class="toc-backref" href="#id138">Examples:</a></h3> <ul class="simple"> <li>'digcircle filled 3' = Dig a filled circle with radius = 3.</li> <li>'digcircle' = Do it again.</li> @@ -1467,11 +1477,11 @@ repeats with the last selected parameters.</p> </div> </div> <div class="section" id="weather"> -<h2><a class="toc-backref" href="#id137">weather</a></h2> +<h2><a class="toc-backref" href="#id139">weather</a></h2> <p>Prints the current weather map by default.</p> <p>Also lets you change the current weather to 'clear sky', 'rainy' or 'snowing'.</p> <div class="section" id="id25"> -<h3><a class="toc-backref" href="#id138">Options:</a></h3> +<h3><a class="toc-backref" href="#id140">Options:</a></h3> <table class="docutils field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> @@ -1487,10 +1497,10 @@ repeats with the last selected parameters.</p> </div> </div> <div class="section" id="workflow"> -<h2><a class="toc-backref" href="#id139">workflow</a></h2> +<h2><a class="toc-backref" href="#id141">workflow</a></h2> <p>Manage control of repeat jobs.</p> <div class="section" id="id26"> -<h3><a class="toc-backref" href="#id140">Usage</a></h3> +<h3><a class="toc-backref" href="#id142">Usage</a></h3> <dl class="docutils"> <dt><tt class="docutils literal">workflow enable <span class="pre">[option...],</span> workflow disable <span class="pre">[option...]</span></tt></dt> <dd><p class="first">If no options are specified, enables or disables the plugin. @@ -1511,7 +1521,7 @@ Otherwise, enables or disables any of the following options:</p> </dl> </div> <div class="section" id="function"> -<h3><a class="toc-backref" href="#id141">Function</a></h3> +<h3><a class="toc-backref" href="#id143">Function</a></h3> <p>When the plugin is enabled, it protects all repeat jobs from removal. If they do disappear due to any cause, they are immediately re-added to their workshop and suspended.</p> @@ -1522,7 +1532,7 @@ the amount has to drop before jobs are resumed; this is intended to reduce the frequency of jobs being toggled.</p> </div> <div class="section" id="constraint-examples"> -<h3><a class="toc-backref" href="#id142">Constraint examples</a></h3> +<h3><a class="toc-backref" href="#id144">Constraint examples</a></h3> <p>Keep metal bolts within 900-1000, and wood/bone within 150-200.</p> <pre class="literal-block"> workflow amount AMMO:ITEM_AMMO_BOLTS/METAL 1000 100 @@ -1559,11 +1569,11 @@ the Mill Plants job to MUSHROOM_CUP_DIMPLE using the 'job item-material' command </div> </div> <div class="section" id="mapexport"> -<h2><a class="toc-backref" href="#id143">mapexport</a></h2> +<h2><a class="toc-backref" href="#id145">mapexport</a></h2> <p>Export the current loaded map as a file. This will be eventually usable with visualizers.</p> </div> <div class="section" id="dwarfexport"> -<h2><a class="toc-backref" href="#id144">dwarfexport</a></h2> +<h2><a class="toc-backref" href="#id146">dwarfexport</a></h2> <p>Export dwarves to RuneSmith-compatible XML.</p> </div> </div> diff --git a/fixTexts.sh b/fixTexts.sh index 09689c8d..669fa068 100755 --- a/fixTexts.sh +++ b/fixTexts.sh @@ -2,3 +2,4 @@ rst2html README.rst > Readme.html rst2html COMPILE.rst > Compile.html rst2html DEVEL.rst > Devel.html +rst2html LUA_API.rst > Lua\ API.html |
