daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sorenkai = {}
  2. function Sorenkai:LoadFiles(path)
  3.     local filename = path:GetFileFromFilename()
  4.     filename = filename ~= "" and filename or path
  5.     print("[SORENKAI LIB] getfilefrompathname: "..path)
  6.     local flagCL = filename:StartWith("cl_")
  7.     local flagSV = filename:StartWith("sv_")
  8.     local flagSH = filename:StartWith("sh_")
  9.  
  10.     if(SERVER) then
  11.         if(flagCL or flagSH) then
  12.             AddCSLuaFile(path)
  13.             print("[SORENKAI LIB] Loaded: "..path)
  14.         end
  15.         if(flagSV or flagSH) then
  16.             include(path)
  17.             print("[SORENKAI LIB] Loaded: "..path)
  18.         end
  19.     elseif(flagCL or flagSH) then
  20.         include(path)
  21.         print("[SORENKAI LIB] Loaded: "..path)
  22.     end
  23. end
  24.  
  25. function Sorenkai:LoadDirectory(dir)
  26.     print("[SORENKAI LIB] LoadDirectory called  ")
  27.     local files, folders = file.Find(dir .."/*","LUA")
  28.     for _, v in ipairs(files) do
  29.         print("[SORENKAI LIB] ipair files")
  30.         Sorenkai:LoadFiles(dir.. "/"..v)
  31.     end
  32.     for _, v in ipairs(folders) do
  33.         Sorenkai:LoadDirectory(dir.."/"..v)
  34.         print("[SORENKAI LIB] ipair folders")
  35.     end
  36. end
  37.  
  38. Sorenkai:LoadDirectory("beer")
  39. SBrew = {}
  40. SBrew.Config = {}
  41. include("beer/brewing_config.lua")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top