summaryrefslogtreecommitdiff
path: root/mesecons_noteblock
diff options
context:
space:
mode:
authorCiaran Gultnieks <ciaran@ciarang.com>2014-03-11 22:42:59 +0000
committerCiaran Gultnieks <ciaran@ciarang.com>2014-03-11 22:50:48 +0000
commit9eda62df7b45659ff704db9a63a633a6bc4f70a7 (patch)
treebd686fcb12838c1fd95d7c3fe3be0585cc4c82e1 /mesecons_noteblock
parenta59f53d71aa580e03adce238158d7852866f922c (diff)
downloadmesecons-9eda62df7b45659ff704db9a63a633a6bc4f70a7.tar
mesecons-9eda62df7b45659ff704db9a63a633a6bc4f70a7.tar.gz
mesecons-9eda62df7b45659ff704db9a63a633a6bc4f70a7.tar.bz2
mesecons-9eda62df7b45659ff704db9a63a633a6bc4f70a7.tar.xz
mesecons-9eda62df7b45659ff704db9a63a633a6bc4f70a7.zip
Add timer() function/event (node timer based) to luacontroller
This adds a timer(<seconds>) function, which causes an event of type "timer" to be fired after that many seconds has elapsed. Because it's node timer based, it works properly across server restarts and block unloading. Thus, simplest example, a blinky plant replacement with a 10 second period: if event.type == "program" then timer(10) elseif event.type == "timer" then port.a = not port.a timer(10) end
Diffstat (limited to 'mesecons_noteblock')
0 files changed, 0 insertions, 0 deletions