summaryrefslogtreecommitdiffstats
path: root/src/scripting/luascript.h
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-02-20 22:46:55 +0100
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-02-21 07:29:13 +0100
commit4559ca444daacfd02ebb05f1657148a2b4cf3d8b (patch)
tree8410fe19f397e70d43a8542c6ba7339d61d9bc0e /src/scripting/luascript.h
parentad1d58b795681cad74642c0f4818b66a3f869794 (diff)
downloadmanaserv-4559ca444daacfd02ebb05f1657148a2b4cf3d8b.tar.gz
manaserv-4559ca444daacfd02ebb05f1657148a2b4cf3d8b.tar.xz
manaserv-4559ca444daacfd02ebb05f1657148a2b4cf3d8b.zip
Introduced Script::Context
This should allow to finally call functions to lua without having to care about working around situations where a lua call causes a c++ call which needs to call to lua again. Tested against the source of tales repository data.
Diffstat (limited to 'src/scripting/luascript.h')
-rw-r--r--src/scripting/luascript.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/scripting/luascript.h b/src/scripting/luascript.h
index 9515bf0..3bedbc2 100644
--- a/src/scripting/luascript.h
+++ b/src/scripting/luascript.h
@@ -44,7 +44,8 @@ class LuaScript : public Script
~LuaScript();
- void load(const char *prog, const char *name);
+ void load(const char *prog, const char *name,
+ const Context &context = Context());
Thread *newThread();
@@ -60,7 +61,7 @@ class LuaScript : public Script
void push(const std::list<InventoryItem> &itemList);
- int execute();
+ int execute(const Context &context = Context());
bool resume();