diff -r 0c94ea0cabec -r ecac723bb6e1 main.lua --- a/main.lua Sat Sep 05 23:24:15 2015 +0100 +++ b/main.lua Sat Sep 05 23:26:15 2015 +0100 @@ -17,12 +17,22 @@ print("Script defines "..c.." objects, and "..#script.actions.." actions"); -for _, action in pairs(script.actions) do - local object = script.objects[action.object_name]; - local handler = object.handler; - assert(handler[action.action], "Objects of type '"..object.type.."' do not support action '"..action.action.."'"); - - handler[action.action](object, action.extra); -end +local verse = require "verse"; +require "util.logger"; +local async = require "scansion.async"; + +local runner = async.runner(function () + print("f") + for _, action in pairs(script.actions) do + local object = script.objects[action.object_name]; + local handler = object.handler; + assert(handler[action.action], "Objects of type '"..object.type.."' do not support action '"..action.action.."'"); + print(object.name, action.action.."..."); + handler[action.action](object, action.extra); + end +end); + +runner:run(true); +print("runner paused") verse.loop()