aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-23 13:22:36 +1000
committerDavid Walter Seikel2014-05-23 13:22:36 +1000
commitf97c73bd1e43a0eb32ad8dc43fc28f6e40b28f38 (patch)
treedf45770acc4a26d56e45bc7ae3420cddb6522d15 /lib
parentTODO-- (diff)
downloadSledjHamr-f97c73bd1e43a0eb32ad8dc43fc28f6e40b28f38.zip
SledjHamr-f97c73bd1e43a0eb32ad8dc43fc28f6e40b28f38.tar.gz
SledjHamr-f97c73bd1e43a0eb32ad8dc43fc28f6e40b28f38.tar.bz2
SledjHamr-f97c73bd1e43a0eb32ad8dc43fc28f6e40b28f38.tar.xz
Rewrite the LuaSL script running stuff (twice lol), plus much related tweakage and cleanups.
Diffstat (limited to 'lib')
-rw-r--r--lib/LSL.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/LSL.lua b/lib/LSL.lua
index 6306045..a95ead3 100644
--- a/lib/LSL.lua
+++ b/lib/LSL.lua
@@ -199,7 +199,7 @@ function args2string(doType, ...)
199end 199end
200 200
201function mt.callAndReturn(name, ...) 201function mt.callAndReturn(name, ...)
202 luaproc.sendback(name .. "(" .. args2string(true, ...) .. ")") 202 Runnr.send(nil, name .. "(" .. args2string(true, ...) .. ")")
203end 203end
204 204
205function mt.callAndWait(name, ...) 205function mt.callAndWait(name, ...)
@@ -952,8 +952,9 @@ function waitAndProcess(returnWanted)
952 952
953 if returnWanted then Type = "result" end 953 if returnWanted then Type = "result" end
954 while running do 954 while running do
955 local message = luaproc.receive(SID) 955 local message = Runnr.receive()
956 if message then 956 if message then
957--print('GOT MESSAGE for script ' .. scriptName .. ' - "' .. message .. '"')
957 -- TODO - should we be discarding return values while paused? I don't think so, so we need to process those, 958 -- TODO - should we be discarding return values while paused? I don't think so, so we need to process those,
958 if paused then 959 if paused then
959 if "start()" == message then paused = false end 960 if "start()" == message then paused = false end
@@ -977,7 +978,7 @@ function waitAndProcess(returnWanted)
977 end 978 end
978 -- Otherwise, just run it and keep looping. 979 -- Otherwise, just run it and keep looping.
979 -- TODO - Not sure why I had this here. "sid" is not set anywhere, and SID would just send it to ourselves. 980 -- TODO - Not sure why I had this here. "sid" is not set anywhere, and SID would just send it to ourselves.
980-- status, errorMsg = luaproc.send(sid, result1) 981-- status, errorMsg = Runnr.send(nil, result1)
981-- if not status then 982-- if not status then
982-- msg("Error sending results from " .. Type .. ": " .. message .. " ERROR MESSAGE: " .. errorMsg) 983-- msg("Error sending results from " .. Type .. ": " .. message .. " ERROR MESSAGE: " .. errorMsg)
983-- end 984-- end