mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 13:03:27 +02:00
lua hotkeys system
This commit is contained in:
@@ -40,13 +40,17 @@ function table.find(t, value)
|
||||
end
|
||||
|
||||
function table.removevalue(t, value)
|
||||
local queue = {}
|
||||
for k,v in pairs(t) do
|
||||
if v == value then
|
||||
table.insert(queue, k)
|
||||
table.remove(t, k)
|
||||
end
|
||||
end
|
||||
for i,v in pairs(queue) do
|
||||
table.remove(t, i)
|
||||
end
|
||||
end
|
||||
|
||||
function table.compare(t, other)
|
||||
if #t ~= #other then return false end
|
||||
for k,v in pairs(t) do
|
||||
if v ~= other[k] then return false end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
Reference in New Issue
Block a user