Created
October 24, 2016 01:07
-
-
Save SpencerSharkey/6b386fe804ee7ccd85cf9ae615bd6031 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function loader:AddResourceDirectory(Directory) | |
-- Msg("AddResourceDirectory: "..Directory.."...\n") | |
Msg("AddResourceDirectory: "..self.ContentPrefix.."/"..Directory.."/*\n") | |
local FoundDir = false | |
for k,v in pairs(file.Find(self.ContentPrefix.."/"..Directory.."/*", "MOD")) do | |
local File = Directory.."/"..v | |
if(file.IsDir(self.ContentPrefix.."/"..File, "MOD")) then | |
FoundDir = true | |
if(File != ".svn" or File != "unused")then | |
self:AddResourceDirectory(File) | |
end | |
else | |
local extension = string.Explode(".", File) | |
if(extension[#extension] != "bz2")then | |
//Msg("\tresource.AddFile "..File..":") | |
resource.AddSingleFile(File) | |
//Msg("Successful\n") | |
end | |
end | |
end | |
if(!FoundDir) then | |
//Msg("AddResourceDirectory: Successful\n") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment