Warmist
0db873493a
Merge branch 'master' of https://github.com/angavrilov/dfhack into experimental-dontmerge
...
Conflicts:
dfhack.init-example
2012-09-07 17:24:38 +03:00
Alexander Gavrilov
d5ea05ebb8
Implement a pressure plate sensitive to machine power.
...
When built next to a gearbox, it will monitor its powered state.
2012-09-06 12:37:29 +04:00
Warmist
3dcaee7cb9
Merge branch 'master' of https://github.com/angavrilov/dfhack into experimental-dontmerge
2012-09-05 21:55:17 +03:00
Warmist
6fc10fc268
Fixed embark anywhere to use more sane code segment search
2012-09-05 21:52:54 +03:00
Alexander Gavrilov
8d876cc7d9
Support renaming some buildings, and arbitrary units, via gui script.
2012-09-05 21:27:42 +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
27f169e298
Provide a partial application utility function to lua.
...
Implemented in C++ for efficiency.
2012-09-05 17:37:36 +04:00
Warmist
532839a4d5
Embark anywhere ported
2012-09-01 10:54:45 +03:00
Warmist
7cabf1b843
Small bug fix
2012-09-01 10:13:08 +03:00
Warmist
d784d4bc40
Static code segment search for memscan.lua
2012-09-01 10:05:31 +03:00
Alexander Gavrilov
41ad42d0fd
Expose the liquids plugin engine to lua, and make a wrapper gui script.
2012-08-25 10:37:03 +04:00
Alexander Gavrilov
d52c54cc76
Pull some minor stuff from mechanisms into main libs.
2012-08-24 13:49:22 +04:00
Alexander Gavrilov
296f82b02f
Try using the Objective-C 'alloc + init' idiom for lua screen objects.
2012-08-24 13:28:34 +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
c6c5ad56c9
Track lua event listener count, and let the C++ host know.
...
This allows completely avoiding the call overhead if there
are none. The downside is that the event object now has to
be a userdata with lots of metamethods.
2012-08-23 19:27:28 +04:00
Alexander Gavrilov
cf4b8a0196
Improve viewport manipulation utilities and support scroll in mechanisms.
...
I.e. allow the user to scroll around with cursor keys,
provided that keeps the cursor still visible.
2012-08-22 22:29:01 +04:00
Alexander Gavrilov
7987ea9a98
Put some compatibility features into the base dfhack viewscreen.
2012-08-22 18:18:19 +04:00
Alexander Gavrilov
6e8b68fb29
Add yet one more frame style.
2012-08-22 13:06:06 +04:00
Alexander Gavrilov
2b79582e99
Implement a policy of marking DFHack-owned screens with a signature.
2012-08-22 12:28:01 +04:00
Alexander Gavrilov
15235cc938
More work on utilities for making lua viewscreens.
2012-08-21 19:40:37 +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
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
jj
c20951c30b
Merge branch 'master' of git://github.com/angavrilov/dfhack
2012-07-06 20:37:14 +02:00
jj
8e17ebbefc
add SC_PAUSED / SC_UNPAUSED onStateChange events
2012-07-05 18:03:02 +02:00
Alexander Gavrilov
9046fed648
Add documentation for some utility functions implemented in lua.
2012-06-24 12:51:19 +04:00
Alexander Gavrilov
bd37cc09c5
Update the Lua API document with info about scripts.
2012-06-22 20:17:55 +04:00
Alexander Gavrilov
65e82f7c12
Support controllable error presentation verbosity in lua code.
...
Use qerror to squash stack traces and location prefix.
2012-06-22 16:36:50 +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
f207714d42
Add finders for enabler, gps and init.
2012-06-21 21:08:36 +04:00
Alexander Gavrilov
ed4acbdedb
Add a searcher for current_weather, using a prepared save.
2012-06-20 10:12:26 +04:00
Alexander Gavrilov
bd5b675fa5
Add ui_menu_width finder, tweak instructions, and add a case for win exe.
2012-06-18 21:11:54 +04:00
Alexander Gavrilov
dc6cb61979
Add more offset finders to the script.
2012-06-17 18:44:59 +04:00
Alexander Gavrilov
67536da2fe
Add an interactive script finding a limited subset of linux offsets.
2012-06-16 19:51:15 +04:00
Alexander Gavrilov
7eb4fc19de
Make dfhack.run_script usable from other scripts, and document it.
2012-06-14 12:46:12 +04:00
Alexander Gavrilov
efdb709284
Support creating rollers and stops with dfhack.buildings.constructBuilding.
2012-05-17 00:19:29 +04:00
Alexander Gavrilov
642a625586
Support custom buildings in dfhack.buildings.getFiltersByType.
...
Also document it and constructBuilding in Lua API docs.
2012-05-13 18:39:00 +04:00
Alexander Gavrilov
87ec1de891
Improve lua api for tile biome access.
2012-05-13 13:58:41 +04:00
Alexander Gavrilov
d6813c7690
Change xml submodule pointer.
2012-05-08 19:08:34 +04:00
Alexander Gavrilov
191071beb6
Add more lua scripts.
2012-05-08 12:55:06 +04:00
Alexander Gavrilov
fca618ff1b
Support default building inputs in dfhack.buildings.constructBuilding.
2012-05-06 19:11:29 +04:00
Alexander Gavrilov
9ad8d767b4
Add code for adding abstract buildings and removing constructions.
2012-05-06 19:09:11 +04:00
Alexander Gavrilov
d4d6349f48
Expose builtin commands to dfhack-run, and add lua script support.
...
Move builtin command implementation to Core methods, and fall
back to hack/scripts/*.lua for otherwise unrecognized commands.
2012-05-04 19:47:18 +04:00
Alexander Gavrilov
4cffb6428d
Update building creation code with new knowledge, and fix zone.
...
Also, document new lua api, and add a more convenient wrapper.
2012-05-01 18:55:30 +04:00
Alexander Gavrilov
2303a25bde
Implement unconstructed building instance creation and linking into world.
...
For more flexibility, the base api is split into 3 phases:
alloc, setSize, and construct. No support for non-actual
buildings like stockpiles and activity zones at the moment.
2012-04-29 21:07:39 +04:00
Alexander Gavrilov
16ee049664
Split off the burrows api from Maps and Units.
2012-04-26 12:56:28 +04:00
Alexander Gavrilov
763a301b4f
Add a few more lua api functions, documentation, and unit sort orders.
...
Units::getProfessionName appears to work correctly for
everything except nobles.
2012-04-23 21:30:53 +04:00
Alexander Gavrilov
125cd6622a
Support sorting units in many more ui contexts.
2012-04-22 19:22:00 +04:00
Alexander Gavrilov
2ef321a208
Preserve the original lua global environment for modules.
...
The intent is to prevent accidental pollution of module namespaces
by globals defined from careless scripts running in the _G environment.
2012-04-21 20:15:57 +04:00