1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-16 02:47:48 +02:00

Fix raffle function insert calls

This commit is contained in:
danielmartin0 2024-10-08 20:04:13 +01:00 committed by Gerkiz
parent e690d5cba5
commit 1462c07956

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