pioneerspacesim/pioneer — pull request #1312 by robn (2012-06-26 09:07:48+00:00)
Title: Lua attribute methods

Reworks magic attributes so they are stored as regular methods in the method table. With this the attribute `foo` is actually implemented by a method called `__attribute_foo`. Because it appears as a regular function in the method table, it can be overridden/wrapped/replaced from Lua itself, and new attributes can be added in the same way.

Includes hacks to `LuaConsole` to make it do the right thing when it finds anything beginning with `__attribute_`.