summaryrefslogtreecommitdiff
path: root/library/Core.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update license, add contributors file, bump release numberPetr Mrázek2012-09-301-1/+1
|
* Implement a special command parsing mode with one verbatim argument.Alexander Gavrilov2012-09-241-1/+27
| | | | Intended for script expressions, e.g. rb_eval.
* Support "ls -a" to list scripts in subdirs.Alexander Gavrilov2012-08-291-8/+17
|
* Tweak the API for current viewscreen, and dispatch show/dismiss from C++.Alexander Gavrilov2012-08-241-1/+1
|
* Suspend DF around loading and unloading plugins.Alexander Gavrilov2012-08-231-0/+1
| | | | This is necessary to improve safety of vtable interposing.
* Extract the color enum from color_ostream to toplevel.Alexander Gavrilov2012-08-191-3/+3
|
* Expose an API to claim the suspend lock from the Core.Alexander Gavrilov2012-08-181-27/+54
| | | | | Previously it was hard-coded in Core::Update, but interposed vmethods may need this feature too.
* Add a utility function for patching read-only memory.Alexander Gavrilov2012-08-171-0/+50
|
* add SC_PAUSED / SC_UNPAUSED onStateChange eventsjj2012-07-051-0/+10
|
* ruby: use the color_ostream argument from dfhack to output to dfhack-runjj2012-07-031-3/+3
|
* fix error spam when using Zoom hotkeysjj2012-06-281-2/+4
|
* ruby: handle .rb files in df/hack/scripts/jj2012-06-241-12/+38
|
* Merge https://github.com/angavrilov/dfhackPetr Mrázek2012-06-231-12/+15
|\
| * Fix TEXT mode support, even making it work somewhat.Alexander Gavrilov2012-06-141-5/+12
| | | | | | | | | | | | | | - 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.
| * Make dfhack.run_script usable from other scripts, and document it.Alexander Gavrilov2012-06-141-7/+3
| |
* | Nuke some error prints.Petr Mrázek2012-06-231-9/+0
|/
* Linux build works again.Petr Mrázek2012-06-141-2/+1
|
* Re-add fake SDL headers, get rid of real SDL use.Petr Mrázek2012-06-141-33/+38
|
* Trying to set up an autorelease pool, but not yet succeeding.Timothy Collett2012-05-261-0/+13
|
* Initial changes to get dfhack building on the MacTimothy Collett2012-05-241-32/+32
|
* Support using focus strings to limit keybinding scope.Alexander Gavrilov2012-05-191-14/+47
|
* Add a workaround for Planepacked bug in buildings constructed via API.Alexander Gavrilov2012-05-171-0/+13
| | | | | | | | | | 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.
* Add central locations for onUpdate and onStateChange handling in core.Alexander Gavrilov2012-05-171-11/+24
|
* Stop Shift-Enter from being handled as if it was Shift-M.Alexander Gavrilov2012-05-161-0/+12
|
* Implement timeouts in the core lua context, and quicksave script.Alexander Gavrilov2012-05-041-0/+4
|
* Expose builtin commands to dfhack-run, and add lua script support.Alexander Gavrilov2012-05-041-52/+166
| | | | | Move builtin command implementation to Core methods, and fall back to hack/scripts/*.lua for otherwise unrecognized commands.
* Merge https://github.com/jaxad0127/dfhackPetr Mrázek2012-04-161-3/+3
|\
| * Make tiletypes more usefulJared Adams2012-04-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Paint, filter, and brush state is now saved between calls. * Added 'all' paint option to set material, shape, special, and variant at the same time. * Added tiletypes-here (like liquids here, except is uses the saved brush settings) * Added tiletypes-here-point (like liquids here, always only the tile under the cursor) * Added tiletypes-command: runs tiletypes commands seperated by ';' tokens (affects saved state) * Make the internal workings match liquids a bit more * Give brush objects a descriptor string * Make Core::cheap_tokenise available
* | Add an official core lua context, and allow plugins to send events to it.Alexander Gavrilov2012-04-151-0/+17
|/ | | | | | | | | | - 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.
* Allow plugins to export functions to lua with safe reload support.Alexander Gavrilov2012-04-141-4/+16
| | | | | | | | | | | | | | | | | | - To ensure reload safety functions have to be wrapped. Every call checks the loaded state and locks a mutex in Plugin. If the plugin is unloaded, calling its functions throws a lua error. Therefore, plugins may not create closures or export yieldable functions. - The set of function argument and return types supported by LuaWrapper is severely limited when compared to being compiled inside the main library. Currently supported types: numbers, bool, std::string, df::foo, df::foo*, std::vector<bool>, std::vector<df::foo*>. - To facilitate postponing initialization until after all plugins have been loaded, the core sends a SC_CORE_INITIALIZED event. - As an example, the burrows plugin now exports its functions.
* Change SC_MAP_LOADED handling: only NULL/not NULL change is meaningful.Alexander Gavrilov2012-04-101-7/+12
|
* Make Core::Suspend safe in plugin_onupdate by pretending to hold the lock.Alexander Gavrilov2012-04-031-0/+17
| | | | | It is in essence true that OnUpdate owns the suspend lock, so expose it officially to the recursive suspend lock mechanics.
* Improve performance of the persistent data api, and wrap it for lua.Alexander Gavrilov2012-04-011-8/+7
| | | | | | Use an stl table for string keys to avoid linear cost of lookup. This uncovered a bug in the new luaL_getsubtable function.
* Track world and map changes separately for plugin_onstatechangePetr Mrázek2012-04-011-4/+30
|
* Pull console output support and REPL out of dfusion into core lib.Alexander Gavrilov2012-03-311-0/+10
|
* More fixesPetr Mrázek2012-03-291-6/+8
| | | | | | Include unistd.h in linux process file Fix assert in autolabor Don't print 'script missing' error on DF start
* Fix F keys in keybindings: they obviously don't have unicode symbols.Alexander Gavrilov2012-03-281-0/+1
|
* A number of interface tweaks in RemoteClient.Alexander Gavrilov2012-03-161-1/+1
| | | | | | | - Associate a default output stream with the whole connection. If not explicitly specified in the constructor, uses stdout. - Add methods that use this default stream to RemoteFunction. - Add easily usable wrappers for CoreSuspend and CoreResume.
* Rename "interface" to "interfacest" and just avoid all of these MSVC problemsQuietust2012-03-151-1/+1
|
* Merge https://github.com/angavrilov/dfhackPetr Mrázek2012-03-151-28/+67
|\
| * Make the DF suspend lock recursive, and add RPC calls for batch suspend.Alexander Gavrilov2012-03-151-28/+67
| | | | | | | | | | | | The idea is that if you have to execute many RPC calls, it is faster to suspend once. The service class takes care to auto-resume in the destructor in case the client just disappears.
* | Merge https://github.com/angavrilov/dfhackPetr Mrázek2012-03-151-7/+17
|\ \ | |/ | | | | | | Conflicts: plugins/workflow.cpp
| * Add support for exporting functions from plugins, with example in rename.Alexander Gavrilov2012-03-151-7/+7
| | | | | | | | TODO: test by actually calling them remotely.
| * Improve support for void RPC functions, dfhack-run, etc.Alexander Gavrilov2012-03-151-0/+2
| |
| * Implement trivial RPC interface for dfhack via TCP & protobufs.Alexander Gavrilov2012-03-141-0/+8
| | | | | | | | Use it to make an executable capable of calling commands remotely.
* | Merge https://github.com/ClaytonHughes/dfhackPetr Mrázek2012-03-141-11/+37
|\ \ | |/ |/| | | | | | | | | | | Conflicts: library/Core.cpp plugins/workflow.cpp Just had to fix a few minor things.
| * Fixed script loading improperly checking for errors.Clayton Hughes2012-03-121-9/+12
| | | | | | | | Also closed the file for good measure. I couldn't find any documentation that said that ~ifstream() did this.
| * Added 'script' command to load DFHack scripts from file. Syntax is the same ↵Clayton Hughes2012-03-111-5/+26
| | | | | | | | as dfhack.init / interactive.
* | Merge branch 'cleanups' of https://github.com/plaes/dfhackPetr Mrázek2012-03-121-1/+0
|\ \
| * | Don't compile Lua on UNIXPriit Laes2012-02-231-1/+0
| | |