mirror of
https://github.com/Keyslam-Group/Concord.git
synced 2025-09-02 12:24:11 -04:00
parent
bdfe2523b0
commit
8e1b14d53b
1 changed files with 1 additions and 4 deletions
|
@ -40,15 +40,12 @@ function Utils.loadNamespace(pathOrFiles, namespace)
|
|||
for _, file in ipairs(files) do
|
||||
local isFile = love.filesystem.getInfo(pathOrFiles .. "/" .. file).type == "file"
|
||||
|
||||
if isFile then
|
||||
if isFile and string.match(file, '%.lua$') ~= nil then
|
||||
local name = file:sub(1, #file - 4)
|
||||
local path = pathOrFiles.."."..name
|
||||
|
||||
local value = require(path)
|
||||
if namespace then namespace[name] = value end
|
||||
else
|
||||
local value = require(pathOrFiles.."."..file)
|
||||
if namespace then namespace[file] = value end
|
||||
end
|
||||
end
|
||||
elseif type(pathOrFiles) == "table" then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue