diff options
| author | Alexander Gavrilov | 2012-04-05 11:59:39 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-04-05 11:59:39 +0400 |
| commit | 3afed43cdb435c788964d983a358d97ee291c2fc (patch) | |
| tree | 231d57551e1d9ff3ef8dedf7d29a265e23adf6ec /library/LuaTools.cpp | |
| parent | d1b27418a6a39aa15d51465e61975c5230dcc9d6 (diff) | |
| download | dfhack-3afed43cdb435c788964d983a358d97ee291c2fc.tar.gz dfhack-3afed43cdb435c788964d983a358d97ee291c2fc.tar.bz2 dfhack-3afed43cdb435c788964d983a358d97ee291c2fc.tar.xz | |
Experimental: try wrapping a dfhack api function.
Diffstat (limited to 'library/LuaTools.cpp')
| -rw-r--r-- | library/LuaTools.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/library/LuaTools.cpp b/library/LuaTools.cpp index 5a50d0dd..16c60457 100644 --- a/library/LuaTools.cpp +++ b/library/LuaTools.cpp @@ -35,14 +35,18 @@ distribution. // must be last due to MS stupidity #include "DataDefs.h" #include "DataIdentity.h" +#include "DataFuncs.h" #include "modules/World.h" +#include "modules/Gui.h" #include "LuaWrapper.h" #include "LuaTools.h" #include "MiscUtils.h" +#include "df/job.h" + #include <lua.h> #include <lauxlib.h> #include <lualib.h> @@ -868,6 +872,8 @@ lua_State *DFHack::Lua::Open(color_ostream &out, lua_State *state) OpenPersistent(state); + LuaWrapper::AddMethodWrapper(state, 0, -1, "getSelectedJob", df::wrap_function(&Gui::getSelectedJob)); + lua_setglobal(state, "dfhack"); // load dfhack.lua |
