diff options
| author | Alexander Pickering <alexandermpickering@gmail.com> | 2016-04-16 13:46:20 -0400 |
|---|---|---|
| committer | Alexander Pickering <alexandermpickering@gmail.com> | 2016-04-16 13:46:20 -0400 |
| commit | 88c8acfa90a71e50104b9c64b953eae939767f20 (patch) | |
| tree | 9b9fb3b066b7ef5a5c578ae04ff453796f2b7041 /gamemode/utility.lua | |
| parent | ae3407fe425a908344b281bd55e54a534445f20c (diff) | |
| download | gmstranded-88c8acfa90a71e50104b9c64b953eae939767f20.tar.gz gmstranded-88c8acfa90a71e50104b9c64b953eae939767f20.tar.bz2 gmstranded-88c8acfa90a71e50104b9c64b953eae939767f20.zip | |
Moved player-made combinations into their own file
Diffstat (limited to 'gamemode/utility.lua')
| -rw-r--r-- | gamemode/utility.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gamemode/utility.lua b/gamemode/utility.lua index 5346cdc..dd30345 100644 --- a/gamemode/utility.lua +++ b/gamemode/utility.lua @@ -1,16 +1,22 @@ //Helper functions to refactor the init function findRecursive(folderstring,recursive,dofunction) + print("Recursive called") local folderpath = "gamemodes/" .. GM.GAMEMODE_FOLDER_NAME .. "/gamemode/" .. folderstring .. "/" + print("Attempting to load folderpath " .. folderpath) local files, directories = file.Find(folderpath .. "*", "MOD") + print("Files:") + PrintTable(files) + print("Directories:") + PrintTable(directories) + for k,v in pairs(files) do + dofunction(folderstring .. "/".. v) + end if(recursive) then for k,v in pairs(directories) do addResourceFolder(folderstring..v,recursive) end end - for k,v in pairs(files) do - dofunction(folderstring .. "/".. v) - end end //Does AddCSLuaFile() on all files within a folderpath, optionally recursive |
