summaryrefslogtreecommitdiff
path: root/library/PluginManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update license, add contributors file, bump release numberPetr Mrázek2012-09-301-1/+1
|
* Fix a deadlock problem between suspend in (un)load, and onupdate.Alexander Gavrilov2012-08-261-7/+17
|
* Suspend DF around loading and unloading plugins.Alexander Gavrilov2012-08-231-0/+5
| | | | This is necessary to improve safety of vtable interposing.
* Track lua event listener count, and let the C++ host know.Alexander Gavrilov2012-08-231-3/+56
| | | | | | 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.
* Implement support for lua-backed viewscreens.Alexander Gavrilov2012-08-191-1/+1
|
* ruby: use the color_ostream argument from dfhack to output to dfhack-runjj2012-07-031-1/+1
|
* ruby: handle .rb files in df/hack/scripts/jj2012-06-241-1/+7
|
* Add central locations for onUpdate and onStateChange handling in core.Alexander Gavrilov2012-05-171-2/+0
|
* Move some things that won't work in dfhack-client to a separate file.Alexander Gavrilov2012-05-051-0/+1
|
* Implement timeouts in the core lua context, and quicksave script.Alexander Gavrilov2012-05-041-1/+1
|
* Expose builtin commands to dfhack-run, and add lua script support.Alexander Gavrilov2012-05-041-35/+2
| | | | | Move builtin command implementation to Core methods, and fall back to hack/scripts/*.lua for otherwise unrecognized commands.
* Export the onStateChange event to core lua context & add some docs.Alexander Gavrilov2012-04-171-0/+2
|
* Try working around some msvc problems.Alexander Gavrilov2012-04-161-1/+1
|
* Add an official core lua context, and allow plugins to send events to it.Alexander Gavrilov2012-04-151-11/+49
| | | | | | | | | | - 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/+108
| | | | | | | | | | | | | | | | | | - 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.
* Clear the command vector during plugin load and unload to avoid confusion.Alexander Gavrilov2012-03-281-0/+2
|
* 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.
* Add support for exporting functions from plugins, with example in rename.Alexander Gavrilov2012-03-151-17/+53
| | | | TODO: test by actually calling them remotely.
* Check for a valid plugin_shutdown function when unloading pluginsPetr Mrázek2012-03-111-2/+4
| | | | Fixes related segfault
* Make plugins accept explicit output stream references.Alexander Gavrilov2012-03-101-31/+28
| | | | | | | | This is an incompatible change to the plugin ABI. The Console is not thread-safe unless used indirectly via color_ostream_proxy, so everything should use their per-thread stream.
* Get rid of Simple namespace, Gui module is now a namespace.Petr Mrázek2012-03-031-1/+1
|
* Fix possible source of vile errors.Petr Mrázek2012-03-011-5/+5
|
* New plugin interfacePetr Mrázek2012-02-211-12/+21
|
* In all loops that iterate across a vector, use a size_t as the indexQuietust2012-01-311-10/+10
|
* Merge https://github.com/angavrilov/dfhackPetr Mrázek2011-12-311-14/+8
|\ | | | | | | | | | | | | | | | | | | Conflicts: library/Core.cpp library/PluginManager.cpp library/include/Core.h library/include/PluginManager.h library/modules/Gui.cpp plugins/stockpiles.cpp
| * Implement context-sensitive keybinding support.Alexander Gavrilov2011-12-311-13/+78
| | | | | | | | | | | | | | | | | | | | | | Allow defining commands with guard conditions, and binding one or more commands to alphabetic and function keys. When the relevant key is pressed, the first listed command with successfully evaluated guard is chosen. For consistency, the guard is also checked when the command is invoked from the console; this requires suspending the core inside PluginManager, before invoking plugin code.
* | Header changes/cleanup.Petr Mrázek2011-12-311-8/+7
| |
* | Implement context-sensitive keybinding support.Alexander Gavrilov2011-12-301-14/+82
|/ | | | | | | | | | | Allow defining commands with guard conditions, and binding one or more commands to alphabetic and function keys. When the relevant key is pressed, the first listed command with successfully evaluated guard is chosen. For consistency, the guard is also checked when the command is invoked from the console; this requires suspending the core inside PluginManager, before invoking plugin code.
* Notify plugins about game being loaded or unloaded.Alexander Gavrilov2011-12-301-0/+24
| | | | As a test, make seadwatch deactivate on these events.
* Fix plugin reloading.Alexander Gavrilov2011-12-291-1/+1
|
* Many tweaks to plugins, reorganized the build system and removed more cruft.Petr Mrázek2011-08-141-2/+2
|
* Fix problem with running interactive commands from hotkeys.Petr Mrázek2011-08-061-4/+8
|
* Linux-side of threading function rewrite. Windows=broken.Petr Mrázek2011-07-271-31/+27
|
* Make 'die' plugin a builtin, made the console interaction less confusing.Petr Mrázek2011-07-201-1/+3
|
* Added plugin loading/unloading/reloading. Many locks. Too many damn locks.Petr Mrázek2011-07-181-43/+231
|
* Fix for a bug in command history queue access. dfhack script can run valgrind.Petr Mrázek2011-07-141-3/+3
|
* Windows side of the Console rewritePetr Mrázek2011-07-141-3/+4
|
* Integrate linenoise into Console - Linux partPetr Mrázek2011-07-131-4/+3
|
* Hotkey UI for linux.Petr Mrázek2011-07-091-1/+1
|
* Fixed prospector, added the command list back, removed the plugin init ↵Petr Mrázek2011-06-271-2/+4
| | | | console spam.
* Added optional plugin_onupdate function, called each Core update.Petr Mrázek2011-06-271-0/+14
|
* Added destructor code for PluginManager, console color reset funstion.Petr Mrázek2011-06-251-14/+22
|
* Plugin manager, reworked kittens and reveal.Petr Mrázek2011-06-251-0/+181