diff options
author | ubq323 <ubq323@ubq323.website> | 2023-02-04 23:03:19 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2023-02-04 23:03:19 +0000 |
commit | 0dc1276df57aa16b4f0eaecf54fb5cd8f00115c6 (patch) | |
tree | 0d5672f6f05f56022ed834ad35c1c2b2df52c21c /common/class.lua | |
parent | 1ebd7d9b7b62c8e05d527611a1944ed1a876b890 (diff) |
many many optimizations and refactorings; introduction of Map to support multiple chunks, modify worldgen and client drawing to support multiple chunks
Diffstat (limited to 'common/class.lua')
-rw-r--r-- | common/class.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/class.lua b/common/class.lua index 37cf7bd..f5cd46e 100644 --- a/common/class.lua +++ b/common/class.lua @@ -1,3 +1,9 @@ +-- currently a class is a table T with T.__index = T +-- then to make an instance of this class, we do setmetatable(instance,T) +-- this should be fine for anything we wish to do. it is possible we will eventually +-- split this into two separate tables though, perhaps? i don't see why we would ever +-- do this though. + local function class() local T = {} T.__index = T @@ -13,6 +19,7 @@ local function extend(Base) end end setmetatable(T,{__index=Base}) + return T end return setmetatable({ |