1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-30 04:30:58 +02:00

Remove extraneous 'else'

This commit is contained in:
Matthew Heguy 2018-11-27 06:24:21 -05:00
parent 1d4acc8e35
commit ae29ad21e5

View File

@ -69,13 +69,12 @@ end
table.get_random = function(t, sorted)
if sorted then
return t[math.random(#t)]
else
local target_index = math.random(1, table_size(t))
local count = 1
for _, v in pairs(t) do
if target_index == count then
return t[v]
end
end
local target_index = math.random(1, table_size(t))
local count = 1
for _, v in pairs(t) do
if target_index == count then
return t[v]
end
end
end