Merge pull request #120 from Klowner/skin-directory-option

Add option for skin.directory specification in skin registration
This commit is contained in:
Kenny Shields 2014-05-07 16:10:07 -04:00
commit a02fafd902

View File

@ -38,7 +38,7 @@ function loveframes.skins.Register(skin)
loveframes.util.Error("Skin registration error: A skin with the name '" ..name.. "' already exists.") loveframes.util.Error("Skin registration error: A skin with the name '" ..name.. "' already exists.")
end end
local dir = loveframes.config["DIRECTORY"] .. "/skins/" ..name local dir = skin.directory or loveframes.config["DIRECTORY"] .. "/skins/" ..name
local dircheck = love.filesystem.isDirectory(dir) local dircheck = love.filesystem.isDirectory(dir)
if not dircheck then if not dircheck then
loveframes.util.Error("Skin registration error: Could not find a directory for skin '" ..name.. "'.") loveframes.util.Error("Skin registration error: Could not find a directory for skin '" ..name.. "'.")