summaryrefslogtreecommitdiff
path: root/src/LuaTask.cc
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2012-04-03 08:32:34 -0700
committerPixel <pixel@nobis-crew.org>2012-04-03 08:32:34 -0700
commit7d5f246ae7310055d39ea13ff395d830e3c27a60 (patch)
tree71ca074922cebb539d6c97c035abbf59b8975d55 /src/LuaTask.cc
parent33defc102694ea3af83d7f20fd525f08cc7d174d (diff)
Opening all libraries in the LuaMainTask, and adding the LuaExecFile class.
Diffstat (limited to 'src/LuaTask.cc')
-rw-r--r--src/LuaTask.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/LuaTask.cc b/src/LuaTask.cc
index d722847..9a7e978 100644
--- a/src/LuaTask.cc
+++ b/src/LuaTask.cc
@@ -2,6 +2,16 @@
#include "Main.h"
#include "TaskMan.h"
+Balau::LuaMainTask::LuaMainTask() : m_stopping(false) {
+ L.open_base();
+ L.open_table();
+ L.open_string();
+ L.open_math();
+ L.open_debug();
+ L.open_bit();
+ L.open_jit();
+}
+
void Balau::LuaMainTask::exec(LuaExecCell * cell) {
m_queue.push(cell);
m_queueEvent.trigger();
@@ -43,3 +53,7 @@ void Balau::LuaExecCell::exec(LuaMainTask * mainTask) {
void Balau::LuaExecString::run(Lua & L) {
L.load(m_str);
}
+
+void Balau::LuaExecFile::run(Lua & L) {
+ L.load(m_file);
+}