implemented daily double, adding/removing players, fixed font sizes, completed multiple choice
This commit is contained in:
+6
-6
@@ -6,17 +6,17 @@ function loader:new(path_or_file)
|
||||
local c = {}
|
||||
setmetatable(c, loader)
|
||||
c.source = path_or_file
|
||||
local file = io.open(path_or_file .. "/index.yaml","r")
|
||||
local file = love.filesystem.read(path_or_file .. "/index.yml")
|
||||
if not file then
|
||||
error("Unable to load file: ".. path_or_file .."/index.yaml")
|
||||
error("Unable to load file: ".. path_or_file .."/index.yml")
|
||||
end
|
||||
c.index = yaml.parse(file:read("*a"))
|
||||
c.index = yaml.parse(file)
|
||||
for i,v in pairs(c.index.categories) do
|
||||
local link = io.open(path_or_file .. "/" .. v.name .. ".yaml")
|
||||
local link = love.filesystem.read(path_or_file .. "/" .. v.name .. ".yml")
|
||||
if not link then
|
||||
print("Error! Cannot find file: " .. path_or_file .."/" .. v.name .. ".yaml")
|
||||
print("Error! Cannot find file: " .. path_or_file .."/" .. v.name .. ".yml")
|
||||
else
|
||||
local category = yaml.parse(link:read("*a"))
|
||||
local category = yaml.parse(link)
|
||||
c.index.categories[i].questions = category.questions
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user