big-refactor #106
1 changed files with 9 additions and 0 deletions
9
sonic-radiance.love/birb/utils/enum.lua
Normal file
9
sonic-radiance.love/birb/utils/enum.lua
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
return function(tbl)
|
||||||
|
local length = #tbl
|
||||||
|
for i = 1, length do
|
||||||
|
local v = tbl[i]
|
||||||
|
tbl[v] = i
|
||||||
|
end
|
||||||
|
|
||||||
|
return tbl
|
||||||
|
end
|
Loading…
Reference in a new issue