Ticket #156 (new defect)
Opened 23 months ago
Clean up Lua 'class instance' methods
|Reported by:||knowknowledge||Owned by:|
The current Lua classes as defined in UI_Lua, AI_Lua, and Planet_Lua should be divided more cleanly by true class boundaries.
Nonsensical methods should not be attached to all class instances of the overly generic 'Widget' class. For example methods like SetText? should not be callable by a Frame Widget.
On the other hand, the Sprite classes should be more generally defined so that GetID or GetPosition? code is shared between Planets, Gates, AI, Players, etc.
I believe that this could be done by breaking up the shipMethods, uiMethods, and PlanetMethods? into smaller, more meaningful method tables.
Also, there are Sprites beyond Planets and Ships. The Gates, Effects, and Projectiles should support at least a minimum Lua interface.