Got first token modules working, and a bunch of bugfixes throughout

This commit is contained in:
Nathan Schneider committed 2021-12-26 23:03:57 -07:00
1 parent 0c59767ef7
commit 286d131839
13 files changed
+182 -19

No files matched your search

+9 -2
View File
@@ -1,11 +1,18 @@
modpol.util = {}
--- @function modpol.copy_table
-- @param t table
-- Returns a copy of the table inputted
function modpol.util.copy_table(t)
local t2 = {}
for k,v in pairs(t) do
t2[k] = v
if ipairs(t) then
for i,v in ipairs(t) do
t2[i] = v
end
elseif pairs(t) then
for k,v in pairs(t) do
t2[k] = v
end
end
return t2
end