Commit Graph

92 Commits (e65a99f2522daa09b175e1211e6129d63cb6cea6)

Author SHA1 Message Date
lethosor ef69522d93 Merge branch 'develop' into filesystem-module-pr 2014-06-18 15:45:42 -04:00
lethosor fb922fab37 Handle invalid arguments to runCommand 2014-06-16 11:40:26 -04:00
lethosor d538e13450 Allow runCommand arguments to be passed as a table internally 2014-06-16 11:16:35 -04:00
lethosor 6fa478de22 Filesystem module
Implements a handful of filesystem-related functions (e.g. chdir, mkdir)
in C++ and Lua.
2014-06-15 22:38:17 -04:00
lethosor 2a01259192 Fix runCommand crash, return output and result 2014-06-10 21:38:21 -04:00
lethosor 143b1e3469 Lua runCommand improvements
* Return error codes (e.g. CR_FAILURE) when a command fails instead of output
* Make dfhack.runCommand() take a list of arguments as well
2014-06-10 13:41:01 -04:00
lethosor 2242d42c9c Implement runCommand in Lua API 2014-06-07 20:15:49 -04:00
Quietust 0f4684f29d Add Items::getItemBaseValue and Items::getValue, available from Lua 2014-04-25 11:04:21 -05:00
Quietust c3d45c3a1e Add Job::getName(job *), also available from Lua 2014-04-23 08:03:10 -05:00
Alexander Gavrilov c27c38e4c0 Remove tired or hungry siege operators from duty when at peace.
The threshold is set at the level when they start to blink - normally
they would continue on with the job until they get a thirsty/hungry
thought, but immediately run off to eat if they lose the job (thus
refusing to load the engine after firing it). The code checks for
active sieges and whether there is a free replacement unit.
2014-04-15 21:52:39 +04:00
Alexander Gavrilov fc9826389b Account for meandering movement when predicting unit path in siege engine.
The movement is random, but there is an average slowdown coefficient.
2014-04-15 19:50:23 +04:00
Alexander Gavrilov 7844907204 Add new API functions for creating announcements and combat reports.
Allow specifying the announcement flags directly, and adding unit
combat reports. Also, make announcement functions write the message
to the game log.
2014-04-15 19:50:23 +04:00
Warmist b030548156 Added directory listing to lua api (internal category).
added mod manager and updated readme/news
2014-03-04 18:01:44 +02:00
Alexander Gavrilov 36b09c950d Actually export to lua a few functions that are documented as available. 2014-02-28 09:41:04 +04:00
Alexander Gavrilov 8800cf6f40 Export functions for converting between UTF-8 and CP437 to lua. 2014-02-10 18:54:52 +04:00
Alexander Gavrilov b2819ea869 Fix wrong argument iteration bounds in dfhack.matinfo.find(). 2013-11-07 11:40:26 +04:00
Alexander Gavrilov e175efa689 Implement a template-based classical Perlin noise generator.
The mask argument of the Impl template is there because apparently
an inner template cannot be fully specialized, so there needs to be
some argument besides i.
2013-10-01 18:58:04 +04:00
Alexander Gavrilov 9e81d27cd1 Implement the same random generator as DF uses for DFHack. 2013-09-30 19:46:39 +04:00
Alexander Gavrilov 2401be1b3b Add an api function to retrieve unit skill experience. 2012-11-16 22:48:49 +04:00
Alexander Gavrilov b4dcc7e7ad Add more native api functions for finding general and specific refs. 2012-11-12 19:17:32 +04:00
Alexander Gavrilov f657c20a1d Add an internal API for converting between file and memory offsets. 2012-11-11 15:56:31 +04:00
Alexander Gavrilov 9598316855 Add a native pen object for lua with a more checked behavior. 2012-11-03 20:06:33 +04:00
Alexander Gavrilov 3ff5d38a5c Add a few utility functions to the main library. 2012-10-30 12:40:26 +04:00
Alexander Gavrilov 4aa1999347 Add a lua api function for patching multiple individual bytes. 2012-10-28 11:50:28 +04:00
Alexander Gavrilov 09f8e8e419 Start working on gui for workflow. 2012-10-23 21:42:03 +04:00
Alexander Gavrilov 2b1d856214 Add a few utility functions to the lua api. 2012-10-20 17:06:33 +04:00
Alexander Gavrilov 2d4935bc17 Add lua API functions for verifying item and material vs job_item flags. 2012-10-17 19:16:18 +04:00
Alexander Gavrilov 2865e1373a Experimental API for associating tile bitmasks with persistent data.
Use block_square_event_world_constructionst objects with the same
bogus negative id as the matching historical figure object.
2012-10-11 17:34:34 +04:00
Alexander Gavrilov 459c69046b Dissolve the World module class into a namespace.
It made accessing persistent data way too cumbersome.
2012-10-06 13:46:20 +04:00
Alexander Gavrilov 7440e80e6c Add an API function to retrieve interface key bindings for display. 2012-10-02 13:49:31 +04:00
Petr Mrázek 8812238bf6 Update license, add contributors file, bump release number 2012-09-30 04:03:37 +02:00
Alexander Gavrilov 48da06ec37 Add an API function for reading the nominal skill level. 2012-09-29 15:18:04 +04:00
Alexander Gavrilov 7ce772ae0e Add an API function that returns the selected building. 2012-09-20 10:41:03 +04:00
Alexander Gavrilov a4799a384b Catch C++ exceptions in dfhack.buildings.setSize 2012-09-18 20:45:59 +04:00
Alexander Gavrilov 24772f4dbc Add an api function for destroying items. 2012-09-14 18:49:02 +04:00
Alexander Gavrilov 7c71aeab5f Add function for making item projectiles. 2012-09-12 18:17:42 +04:00
Alexander Gavrilov 9679b7729c Clean up the movement speed calculation function and move into the core. 2012-09-09 17:04:58 +04:00
Alexander Gavrilov a36fe25e72 Finish the effective skill computation function, and move to core. 2012-09-09 12:27:40 +04:00
Alexander Gavrilov e925d8f4d9 Add an API function for reading tiles from the screen buffers. 2012-09-07 11:36:45 +04:00
Alexander Gavrilov c971a819de Experimental creation of map blocks in gui/liquids script. 2012-09-06 22:45:19 +04:00
Alexander Gavrilov 57086ac56e Add stock MessageBox and InputBox dialog screens for lua scripts. 2012-09-05 19:45:45 +04:00
Alexander Gavrilov 3713c5ea9e Add some APIs required by steam engine to the core. 2012-09-02 14:10:58 +04:00
Alexander Gavrilov f1915915b4 Follow change in xml again. 2012-08-27 23:03:02 +04:00
Alexander Gavrilov 8359e80b23 Expose a few API functions to lua, and implement a room browser overlay. 2012-08-24 18:26:18 +04:00
Alexander Gavrilov e825dc5ddb Tweak the API for current viewscreen, and dispatch show/dismiss from C++. 2012-08-24 13:20:08 +04:00
Alexander Gavrilov 7987ea9a98 Put some compatibility features into the base dfhack viewscreen. 2012-08-22 18:18:19 +04:00
Alexander Gavrilov 451e965936 Add a Painter class for lua viewscreens, and extract other utilities.
Painter clips to an arbitrary rectangle window, and
tracks current cursor and color state.
2012-08-21 11:35:39 +04:00
Alexander Gavrilov 601a3a7927 Add a script that implements a linked mechanism browser. 2012-08-20 23:04:01 +04:00
Alexander Gavrilov 38a07a4ca5 Export the tile finder function to lua, and improve mouse event reporting. 2012-08-19 20:00:10 +04:00
Alexander Gavrilov cacb082416 Add a stupid example of a lua-controlled viewscreen. 2012-08-19 17:53:25 +04:00