mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-08-20 04:54:11 +02:00
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 |
||
---|---|---|
.. | ||
textures | ||
depends.txt | ||
init.lua |