Bugfix on copy_table and added refresh command to CLI

This commit is contained in:
Nathan Schneider
2021-12-28 14:39:34 -07:00
parent 18a29d674c
commit 1b0335c069
4 changed files with 17 additions and 12 deletions

View File

@ -5,11 +5,7 @@ modpol.util = {}
-- Returns a copy of the table inputted
function modpol.util.copy_table(t)
local t2 = {}
if ipairs(t) then
for i,v in ipairs(t) do
t2[i] = v
end
elseif pairs(t) then
if pairs(t) then
for k,v in pairs(t) do
t2[k] = v
end