- Welcome to the Kancolle Wiki!
- If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord
Difference between revisions of "Module:BaseData"
Jump to navigation
Jump to search
com>Ckwng (Separate data formatting from *Data) |
m (8 revisions imported) |
||
(One intermediate revision by one other user not shown) | |||
Line 5: | Line 5: | ||
setmetatable(data, data) | setmetatable(data, data) | ||
data.__index = self | data.__index = self | ||
+ | data.__call = self.__call | ||
return data | return data | ||
end | end |
Latest revision as of 11:51, 12 May 2021
Documentation for this module may be created at Module:BaseData/doc
local BaseData = {}
function BaseData:create(data)
data = data or {}
setmetatable(data, data)
data.__index = self
data.__call = self.__call
return data
end
BaseData.__call = function (table, ...)
return table:create(...)
end
setmetatable(BaseData, BaseData)
return BaseData