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:
parent
1d4acc8e35
commit
ae29ad21e5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user