Code format

This commit is contained in:
2025-05-15 20:37:50 +02:00
parent 9e6432d0b0
commit 69d1f9fd93
105 changed files with 24069 additions and 28084 deletions

View File

@@ -6,7 +6,7 @@ aura_env.Stack = {
---@return Stack
new = function(maxSize)
local self = setmetatable({}, {
__index = aura_env.Stack
__index = aura_env.Stack,
})
self.maxSize = maxSize
self.values = {}
@@ -16,9 +16,7 @@ aura_env.Stack = {
---@param value number
Push = function(self, value)
table.insert(self.values, 0, value)
if #self.values > self.maxSize then
table.remove(self.values, #self.values)
end
if #self.values > self.maxSize then table.remove(self.values, #self.values) end
end,
---@param self Stack
---@return number
@@ -26,9 +24,7 @@ aura_env.Stack = {
local first = self.values[#self.values]
local last = time()
if first and last then
return #self.values / (math.max(last - first, 1))
end
if first and last then return #self.values / (math.max(last - first, 1)) end
return 0
end,
---@param self Stack
@@ -37,9 +33,7 @@ aura_env.Stack = {
local timeThresh = time() - (threshold or aura_env.config.combatMemoryTime)
-- print(string.format("Clean %d %d", #self.values, timeThresh))
for i = #self.values, 1, -1 do
if self.values[i] < timeThresh then
table.remove(self.values, i)
end
if self.values[i] < timeThresh then table.remove(self.values, i) end
end
-- print(string.format("Clean after %d", #self.values))
end,