Commit Graph

174 Commits (ebde2c209450552dffd82316e2cec14e2c25a8ab)

Author SHA1 Message Date
jj 6ad8d128ba use non-interactive console when calling dfhack.init in TEXT mode 2014-01-27 15:36:25 +01:00
jj 6b6164c099 call dfhack.init even in TEXT mode 2014-01-27 14:51:22 +01:00
expwnent 57fc0f3e89 Merge remote-tracking branch 'angavrilov/master' into 0.34.11-r4
Conflicts:
	NEWS
	library/xml
	plugins/CMakeLists.txt
	plugins/autoSyndrome.cpp
2013-10-19 20:19:29 -04:00
jj 84033bd586 ruby: dont list ruby scripts when ruby plugin is disabled 2013-10-07 14:32:47 +02:00
Alexander Gavrilov d7e35c2d23 Add built-in enable and disable commands. 2013-09-30 13:19:51 +04:00
jj 6f5c03b912 core: generate SC_WORLD_LOADED for arena too 2013-07-07 23:36:22 +02:00
expwnent 1b260fe549 Made the per save onLoad and onUnload script use the right separator character for different operating systems. 2013-06-10 15:55:54 -04:00
expwnent 9f6638432f When a save is loaded/unloaded, the script at raw/onLoad.init or raw/onUnload.init is run. They use the same format as dfhack.init. 2013-06-10 00:45:46 -04:00
Petr Mrázek 27f23746bd Do not use autocompletion to second-guess the user. 2013-03-14 06:43:38 +01:00
expwnent fa78d6ccfc Merge branch 'recent' into eventManager-unstable
Conflicts:
	library/modules/Job.cpp
2013-01-02 03:16:45 -05:00
expwnent cf619a519e EventManager: made event handlers unregister when plugins are unloaded. Also changed PluginManager so that plugins can call core.getPluginManager() during plugin_init. 2012-12-14 22:14:38 -05:00
expwnent 747723187f EventManager: first draft. 2012-12-14 21:05:38 -05:00
jj 662d3101c7 ruby: fix onupdate tick limiting + advmode, add pageprotect, add :script_finished 2012-12-11 17:25:51 +01:00
jj a1eeb02a1b autocomplete command names from the console 2012-12-07 01:34:04 +01:00
Quietust e2b9b703a0 Get rid of tabs 2012-11-16 15:33:36 -06:00
Alexander Gavrilov dc2805b1f3 Link the renderer vtable from libgraphics on linux. 2012-10-30 10:38:32 +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 fdaa2a35a1 Fix name ambiguity in MemoryPatcher constructor. 2012-10-28 09:34:50 +04:00
Alexander Gavrilov 92a3277777 Add a MemoryPatcher class as an optimization of scattered patchMemory.
This class can cache the set of memory regions during its lifetime,
and make them writable only once. This avoids e.g. re-reading
/proc/*/maps once for every modified vtable in interpose code.
2012-10-27 21:58:40 +04:00
Kelly Martin 8fd1dd04bb Display dfhack version number at end of baseline 'help' message. 2012-10-16 19:27:48 -05: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 627f036830 Implement a special command parsing mode with one verbatim argument.
Intended for script expressions, e.g. rb_eval.
2012-09-24 19:13:33 +04:00
Alexander Gavrilov 8a617edb10 Support "ls -a" to list scripts in subdirs. 2012-08-29 19:03:53 +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 b12b9fa91e Suspend DF around loading and unloading plugins.
This is necessary to improve safety of vtable interposing.
2012-08-23 19:51:55 +04:00
Alexander Gavrilov fd0bf2ef92 Extract the color enum from color_ostream to toplevel. 2012-08-19 09:21:25 +04:00
Alexander Gavrilov 24cc8b5c7a Expose an API to claim the suspend lock from the Core.
Previously it was hard-coded in Core::Update, but interposed
vmethods may need this feature too.
2012-08-18 11:52:38 +04:00
Alexander Gavrilov bcc41c081a Add a utility function for patching read-only memory. 2012-08-17 15:07:48 +04:00
jj 8e17ebbefc add SC_PAUSED / SC_UNPAUSED onStateChange events 2012-07-05 18:03:02 +02:00
jj a7a25b80a0 ruby: use the color_ostream argument from dfhack to output to dfhack-run 2012-07-03 16:13:15 +02:00
jj ccbebdafb0 fix error spam when using Zoom hotkeys 2012-06-28 15:05:00 +02:00
jj 552da8417e ruby: handle .rb files in df/hack/scripts/ 2012-06-24 20:24:46 +02:00
Petr Mrázek 59fb4daa9a Merge https://github.com/angavrilov/dfhack 2012-06-23 00:25:50 +02:00
Petr Mrázek 6199d6915c Nuke some error prints. 2012-06-23 00:25:30 +02:00
Alexander Gavrilov bbc1fb010e Fix TEXT mode support, even making it work somewhat.
- Initialize the global pointers before trying to use init.
- Print a message suggesting the use of dfhack-run.
- Don't start the console thread if there is no console.
- When console is disabled, print anything given to it to stderr.
2012-06-14 13:08:39 +04:00
Alexander Gavrilov 7eb4fc19de Make dfhack.run_script usable from other scripts, and document it. 2012-06-14 12:46:12 +04:00
Petr Mrázek 2781723f7b Linux build works again. 2012-06-14 02:25:15 +02:00
Petr Mrázek 316973c463 Re-add fake SDL headers, get rid of real SDL use. 2012-06-14 02:15:43 +02:00
Timothy Collett 7ec0fd6fc0 Trying to set up an autorelease pool, but not yet succeeding. 2012-05-26 16:08:15 -04:00
Timothy Collett 24d221052b Initial changes to get dfhack building on the Mac 2012-05-24 11:31:20 -04:00
Alexander Gavrilov 1b4a24c827 Support using focus strings to limit keybinding scope. 2012-05-19 21:31:42 +04:00
Alexander Gavrilov f37f708b37 Add a workaround for Planepacked bug in buildings constructed via API.
Buildings hanging in the air cause constructWithFilters to
exhibit the same behavior as a moody dwarf in a burrow excluding
the workshop, i.e. endlessly collecting the same type of reagent.

http://www.bay12games.com/dwarves/mantisbt/view.php?id=1416

The workaround monitors jobs and reclassifies the reagents on the fly.
2012-05-17 20:38:27 +04:00
Alexander Gavrilov e9ef9b87b5 Add central locations for onUpdate and onStateChange handling in core. 2012-05-17 20:04:09 +04:00
Alexander Gavrilov 68c5d9b86c Stop Shift-Enter from being handled as if it was Shift-M. 2012-05-16 18:10:07 +04:00
Alexander Gavrilov 7e01b004e9 Implement timeouts in the core lua context, and quicksave script. 2012-05-04 20:59:06 +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
Petr Mrázek 7946cafc86 Merge https://github.com/jaxad0127/dfhack 2012-04-16 22:37:07 +02:00
Alexander Gavrilov 14709e5d45 Add an official core lua context, and allow plugins to send events to it.
- This context requires core suspend lock and asserts it in a few places.
- Special 'event' objects are introduced. They can be invoked as
  functions, in which case they iterate all their fields and call
  them as functions. Errors are printed and consumed.
- When a plugin is opened by the core context, events registered in
  a special array are linked to it. The system is organized so as to
  avoid even trying to pass the event to lua if the module isn't loaded.
2012-04-15 19:09:25 +04:00