Fixed EID:ConcatTables() function causing errors in ab+

This commit is contained in:
Wofsauge committed 2025-09-30 10:53:49 +02:00
1 parent 1ec9bd8ba7
commit ce75ffbae9
1 file changed
+8 -6
+8 -6
View File
@@ -3146,14 +3146,16 @@ end
---Super simple table concatenation: https://www.tutorialspoint.com/concatenation-of-tables-in-lua-programming ---Super simple table concatenation: https://www.tutorialspoint.com/concatenation-of-tables-in-lua-programming
---@generic T ---@generic T
---@param t1 T[] ---@param table1 T[]
---@param t2 T[] ---@param table2 T[]
---@return T[] ---@return T[]
function EID:ConcatTables(t1, t2) function EID:ConcatTables(table1, table2)
for i = 1, #t2 do if table1 == nil then table1 = {} end
t1[#t1 + 1] = t2[i] if table2 == nil then table2 = {} end
for _, value in ipairs(table2) do
table.insert(table1, value)
end end
return t1 return table1
end end
---Thing to fix find/replace pairs with hyphens (like "1-2") or pluses (like +1 Health) breaking because of special characters ---Thing to fix find/replace pairs with hyphens (like "1-2") or pluses (like +1 Health) breaking because of special characters