1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-03-25 21:29:06 +02:00

Fix raffle function insert calls

This commit is contained in:
danielmartin0 2024-10-08 20:04:13 +01:00
parent bb088f780d
commit ffdc8091a9

View File

@ -21,8 +21,8 @@ function Public.raffle(arg1, arg2)
options = {}
weights_table = {}
for option, weight in pairs(arg1) do
arg1.insert(options, option)
arg1.insert(weights_table, weight)
table.insert(options, option)
table.insert(weights_table, weight)
if weight > 0 then
total_weight = total_weight + weight
end