diff --git a/Compile.html b/Compile.html index dc3440a65..d3559f4dd 100644 --- a/Compile.html +++ b/Compile.html @@ -353,18 +353,19 @@ ul.auto-toc {
  • Mac OS X
  • -
  • Windows @@ -3382,8 +3385,9 @@ plugin export a function it's recommended to use lua decorated function.

    1. name -- custom workshop id e.g. SOAPMAKER
    2. fix_impassible -- if true make impassible tiles impassible to liquids too
    3. -
    4. consume -- how much machine power is needed to work. Disables reactions if not supplied enough
    5. -
    6. produce -- how much machine power is produced. Use discouraged as there is no way to change this at runtime
    7. +
    8. consume -- how much machine power is needed to work. Disables reactions if not supplied enough and needs_power=1
    9. +
    10. produce -- how much machine power is produced.
    11. +
    12. needs_power -- if produced in network < consumed stop working, default true
    13. gears -- a table or {x=?,y=?} of connection points for machines
    14. action -- a table of number (how much ticks to skip) and a function which gets called on shop update
    15. animate -- a table of frames which can be a table of:
        @@ -3402,6 +3406,8 @@ plugin export a function it's recommended to use lua decorated function.

    +

    getPower(building) returns two number - produced and consumed power if building can be modified and returns nothing otherwise

    +

    setPower(building,produced,consumed) sets current productiona and consumption for a building.

    Examples

    @@ -3434,9 +3440,8 @@ do not clutter the ls command list; thus it is for obscure developer-oriented scripts and scripts used by tools. When calling such scripts, always use '/' as the separator for directories, e.g. devel/lua-example.

    -

    Scripts are re-read from disk every time they are used -(this may be changed later to check the file change time); however -the global variable values persist in memory between calls. +

    Scripts are re-read from disk if they have changed since the last time they were read. +Global variable values persist in memory between calls, unless the file has changed. Every script gets its own separate environment for global variables.

    Arguments are passed in to the scripts via the ... built-in diff --git a/Readme.html b/Readme.html index bf0217847..9df7c229d 100644 --- a/Readme.html +++ b/Readme.html @@ -343,10 +343,20 @@ ul.auto-toc {

    Introduction

    -

    DFHack is a Dwarf Fortress memory access library and a set of basic -tools that use it. Tools come in the form of plugins or (not yet) -external tools. It is an attempt to unite the various ways tools -access DF memory and allow for easier development of new tools.

    +

    DFHack is a Dwarf Fortress memory access library, distributed with scripts +and plugins implementing a wide variety of useful functions and tools.

    +

    For users, it provides a significant suite of bugfixes and interface +enhancements by default, and more can be enabled. There are also many tools +(such as workflow or autodump) which can make life easier. You can +even add third-party scripts and plugins to do almost anything!

    +

    For modders, DFHack makes many things possible. Custom reactions, new +interactions, magic creature abilities, and more can be set through scripts +and custom raws. Non-standard DFHack scripts and inits can be stored in the +raw directory, making raws or saves fully self-contained for distribution - +or for coexistence in a single DF install, even with incompatible components.

    +

    For developers, DFHack unites the various ways tools access DF memory and +allows easier development of new tools. As an open-source project under +various copyleft licences, contributions are welcome.

    Contents

  • -
  • Bugfixes