Lua
Self in Lua
Declaring a function as t:test instead than t.test will automatically set a variable named self that refers to t. If that is a table, it’ll be possible to use self.a to refer to the value of object a in table t (like table = {a=1})
Coroutines
coroutine.create(f)= wherefis a functioncoroutine.resume(c, [ares])= resume a coroutine, optionally passing an argumentcoroutine.running()= to obtain a reference to the currently running coroutinecoroutine.status(c)= returns strings “running”, “suspended”, “normal”, “dead” according to the status of the coroutinecoroutine.yield(...)= suspends the current coroutine and returns its argumentscoroutine.wrap(f)= wrap a normal function so it can be used likecoroutine.yield()on it, like it were a coroutine