diff --git a/src/_bastion.lua b/src/_bastion.lua index 72ebe59..d17140f 100644 --- a/src/_bastion.lua +++ b/src/_bastion.lua @@ -39,7 +39,10 @@ local function Load(dir) for i = 1, #files do local file = files[i] - if file:sub(-4) == ".lua" or file:sub(-5) == '.luac' then + if (file == "ExampleDependency.lua") or (file == "ExampleDependencyError.lua") or (file == "ExampleLibrary.lua") or (file == "ExampleModule.lua") + then + -- Skip these files + elseif file:sub(-4) == ".lua" or file:sub(-5) == '.luac' then Bastion:Require(dir .. file:sub(1, -5)) end end @@ -372,19 +375,14 @@ end -- return -- end -function Bastion:OnTick() - for i = 1, #MODULES do - MODULES[i]:OnTick() - end -end local lastTick = 0 local timeElapsed = 0 local configTickRate = .01 -Bastion.tickRate = 0 + function Bastion:GetMinimumTickRate() - local fr = GetFrameRate() + local fr = GetFramerate() local minTick = 1/fr return minTick end @@ -394,6 +392,8 @@ function Bastion:GetTickRate() return math.max(min, configTickRate) end +Bastion.tickRate = Bastion:GetTickRate() + function Bastion:GetTick() return GetTime() end @@ -420,10 +420,14 @@ tickFrame:HookScript("OnUpdate", function(self, elapsed) timeElapsed = timeElapsed - Bastion.tickRate Bastion:Ticker() end + Bastion:Print("TickRate: " .. Bastion.tickRate) Bastion.tickRate = Bastion:GetTickRate() end) +Bastion._Unlocker = Tinkr +_G.Bastion = Bastion + Load("@Libraries/") Load("@Modules/") Load("@")