Max Cahill
9f65e1150b
modified :camelCase to capitalise class names and fully capitalise known acronyms. __name changed to __type, used for :type() calls
...
fixes #29
2021-07-21 19:50:12 +10:00
Max Cahill
453f00d82f
updated class docs about super construction
2021-07-16 19:39:24 +10:00
Max Cahill
7813bf35a1
fixed stack overflow for 3-or-deeper hierarchies on super construction
2021-07-16 19:33:47 +10:00
Max Cahill
3cc177a0c0
BREAKING class interface refactor - all classes will need a minor update, see class.lua
...
tl;dr is that new no longer needs to call init, calling :new() directly in user code is not allowed, properties are copied, metamethods work, and a config table is needed rather than a class to extend from, so use {extends = superclass} if you want a minimal fix
2021-07-15 16:15:27 +10:00
M. Dietrich
a4e677466a
fix super_call to call in the next higher class
2021-06-07 16:44:39 +02:00
Max Cahill
348653a6dd
[modified] moved away from assert for consistency in super_call
2020-05-22 16:29:01 +10:00
Max Cahill
fff1474c37
[fixed] super call in case where subclass called from doesn't have implementation - hurts runtime performance but the previous impl was a potential infinite loop!
2020-05-22 15:50:23 +10:00
Max Cahill
700c7bc957
[added] cleaner super call functionality to class
2020-05-19 15:17:55 +10:00
Max Cahill
19c21bf308
[modified] class supports inheriting from classes/apis without a new method - in that case the super ctor wont be called automatically as part of init()
2020-05-14 15:27:24 +10:00
Max Cahill
12e48d72ac
[added] call metamethod for classes so eg vec2:new(...) can be written as vec2(...)
2020-05-12 09:26:11 +10:00
Max Cahill
74a04423bb
[removed] class.lua dependency on table.overlay - fixed #1
2020-03-24 14:57:42 +11:00
Max Cahill
ad2fc71e7a
[fixed] non-global compatible
2020-03-15 21:22:22 +11:00
Max Cahill
66a9f41474
[modified] renamed to batteries, added global export suppression and more documentation
2020-03-15 20:28:50 +11:00