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
Alexander Gavrilov
30f71ff510
Implement support for lua-backed viewscreens.
2012-08-19 14:27:44 +04:00
Alexander Gavrilov
bcc41c081a
Add a utility function for patching read-only memory.
2012-08-17 15:07:48 +04:00
Alexander Gavrilov
752da9ced5
Move formatting newly-found globals for symbols.xml to lua code.
2012-06-21 21:26:25 +04:00
Alexander Gavrilov
e687a07f2e
Fix getRebaseDelta: should be signed int.
2012-06-19 21:02:27 +04:00
Alexander Gavrilov
50bd758876
Replace dfhack.internal.getBase with getRebaseDelta.
...
Also, when printing found offsets, subtract the delta.
2012-06-19 18:48:22 +04:00
Alexander Gavrilov
fa41a27f26
Add an api function to get vtable address from version info.
2012-06-17 14:26:27 +04:00
Alexander Gavrilov
927ce6ce5a
Fix a problem with number to address cast for high-half addresses.
...
If the address is out of the signed int range, lua_tointeger produces
unspecified result. lua_tounsigned is guaranteed to wrap.
2012-06-16 17:09:58 +04:00
Alexander Gavrilov
dc5bef2cb8
Add lua internal api functions needed for scanning memory.
2012-06-16 13:33:49 +04:00
Alexander Gavrilov
94dfdb486d
Change the field names returned from dfhack.internal.getMemRanges()
...
'end' is a lua keyword, so it cannot be used conveniently.
2012-06-14 20:32:23 +04:00
Alexander Gavrilov
8d7cf092fd
Add Lua API for access to some contextual and low-level info.
2012-06-13 21:12:36 +04:00
Alexander Gavrilov
9adf310d7f
Update Units::isCitizen after looking at game-over detection code.
2012-05-22 12:31:37 +04:00
Alexander Gavrilov
b992b04f0b
Remove stuff that shouldn't be in the core, and expose to lua what's left.
...
Specifically, any "if (verbose) { Core::printerr("blah") }" kind
of stuff definitely doesn't belong in the common API functions.
Also, ref->getUnit() is very expensive.
On the other hand, checks for crash-inducing conflicts with the
ui should be in the core api, and not in client plugins.
2012-05-20 21:57:45 +04:00
Alexander Gavrilov
7774f5f2c1
Add a mechanism converting ui focus to a string representation.
...
The idea is to make ui handling more modular, dispensing with
huge functions that switch or if/else on lots of variables.
For now, used to split up functions in the sort plugin.
2012-05-19 19:50:36 +04:00