bdd-creature/classes/beastfile.lua
2024-08-01 23:27:21 +02:00

22 lines
No EOL
499 B
Lua

local BeastFile = Object:extend()
local DataList = require "classes.datalist"
local parseFile = require "libs.filereader"
function BeastFile:new(folder, name)
self.filepath = folder .. "/" .. name
print("Loading " .. self.filepath)
self.datas = DataList()
self:readLines()
end
function BeastFile:readLines()
local lines = parseFile(self.filepath, function (line) print(line) end)
end
function BeastFile:prepareJson()
return self.datas:prepareJson()
end
return BeastFile