moonbase.main function - Protovision/moonbase GitHub Wiki
After the engine loads config.lua and main.lua. The engine will execute moonbase.main(). While moonbase.main is running, callbacks to moonbase.event functions will be disabled.
Calling moonbase.yield() will suspend moonbase.main and enable moonbase.event functions to execute. A moonbase.event function may call moonbase.resume() to resume execution of moonbase.main and disable moonbase.event callbacks.
When moonbase.main returns, moonbase.event callbacks will automatically be enabled.