dfhack/plugins/lua
Josh Cooper bc32d15bea [Release] cxxrandom v2.0
Major Revision
update v2.0
=-=-=-=-=
Native functions(exported to lua):
-GenerateEngine:  returns engine id              (args: seed)
-DestroyEngine:   destroys corresponding engine  (args: rngID)
-NewSeed          re-seeds engine                (args: rngID, seed)
-rollInt          generates random integer       (args: rngID, min, max)
-rollDouble       generates random double        (args: rngID, min, max)
-rollNormal       generates random normal[gaus.] (args: rngID, avg, stddev)
-rollBool         generates random boolean       (args: rngID, chance)
-MakeNumSequence  returns sequence id            (args: start, end)
-AddToSequence    adds a number to the sequence  (args: seqID, num)
-ShuffleSequence  shuffles the number sequence   (args: rngID, seqID)
-NextInSequence   returns the next number in seq.(args: seqID)

Lua plugin functions:
-MakeNewEngine    returns engine id              (args: seed)

Lua plugin classes:
-crng
    methods:
        -init(id, df, dist)     :: constructor
            id                           - Reference ID of engine to use in RNGenerations
            df (optional)                - bool indicating whether to destroy the Engine when the crng object is garbage collected
            dist (optional)              - lua number distribution to use
        -__gc()                 :: destructor
        -changeSeed(seed)       :: alters engine's seed value
        -setNumDistrib(distrib) :: set's the number distribution crng object should use
            distrib                      - number distribution object to use in RNGenerations
        -next()                 :: returns the next number in the distribution
        -shuffle()              :: effectively shuffles the number distribution
-normal_distribution
    methods:
        -init(avg, stddev)      :: constructor
        -next(id)               :: returns next number in the distribution
            id                           - engine ID to pass to native function
-real_distribution
    methods:
        -init(min, max)         :: constructor
        -next(id)               :: returns next number in the distribution
            id                           - engine ID to pass to native function
-int_distribution
    methods:
        -init(min, max)         :: constructor
        -next(id)               :: returns next number in the distribution
            id                           - engine ID to pass to native function
-bool_distribution
    methods:
        -init(min, max)         :: constructor
        -next(id)               :: returns next boolean in the distribution
            id                           - engine ID to pass to native function
-num_sequence
    methods:
        -init(a, b)             :: constructor
        -add(num)               :: adds num to the end of the number sequence
        -shuffle()              :: shuffles the sequence of numbers
        -next()                 :: returns next number in the sequence

Adds missing function exports.

Fixes numerous problems I won't go into
2018-04-29 21:08:44 -07:00
..
sort follow rename unit.military.squad_index to squad_id in df-structures 2012-10-20 22:35:39 +02:00
building-hacks.lua Fix building-hacks color for auto_gears option 2016-04-10 16:55:08 +03:00
burrows.lua Split off the burrows api from Maps and Units. 2012-04-26 12:56:28 +04:00
confirm.lua Disable confirm note-delete in name entry 2016-02-11 22:56:33 -05:00
cxxrandom.lua [Release] cxxrandom v2.0 2018-04-29 21:08:44 -07:00
dwarfmonitor.lua dwarfmonitor: Add mouse cursor widget 2015-06-15 13:42:29 -04:00
eventful.lua Show sidebar when moving from screen to screen 2016-04-10 16:51:58 +03:00
liquids.lua Expose the liquids plugin engine to lua, and make a wrapper gui script. 2012-08-25 10:37:03 +04:00
luasocket.lua Fix luasocket receive with byte count 2017-08-12 15:42:56 +03:00
pathable.lua Add new "pathable" plugin 2017-07-05 23:54:55 -04:00
power-meter.lua Implement a pressure plate sensitive to machine power. 2012-09-06 12:37:29 +04:00
rename.lua Support renaming some buildings, and arbitrary units, via gui script. 2012-09-05 21:27:42 +04:00
rendermax.lua Another file forgotten 2014-03-07 19:58:27 +02:00
siege-engine.lua Adjust siege engine targeting weights. 2014-04-17 22:10:43 +04:00
sort.lua Support sorting items in the trade screens. 2012-05-18 19:18:49 +04:00
stockflow.lua Many build fixes 2018-03-10 16:53:45 -05:00
stockpiles.lua stockpiles: Restrict characters in filenames when saving 2015-07-29 14:17:14 -04:00
workflow.lua Many build fixes 2018-03-10 16:53:45 -05:00
zone.lua Added lua GUI front-end for autobutcher. 2013-04-24 23:37:05 +12:00