fix: lint
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Zoltan Timar
2026-03-21 00:18:52 +01:00
parent 803ddc482b
commit fb8ae157b6

View File

@@ -163,21 +163,19 @@ Songs.custom_song = {
} }
]] ]]
--[[
function generate_sequence(model_data, length) function generate_sequence(model_data, length)
local order = model.order local order = model.order
local model_data = model_data.model local model_data = model_data.model
-- random start key
local model_keys = {} local model_keys = {}
for k,_ in pairs(model) do for k,_ in pairs(model) do
model_keys[#model_keys + 1] = k model_keys[#model_keys + 1] = k
end end
local start_key = model_keys[math.ceil(math.random() * #model_keys)] local start_key = model_keys[math.ceil(math.random() * #model_keys)]
-- sequence starts with the start key
local seq = unmake_key(start_key) local seq = unmake_key(start_key)
-- generation loop
while #seq < length do while #seq < length do
local current_key = table.concat({unpack(seq, #seq - order + 1, #seq)}, "|") local current_key = table.concat({unpack(seq, #seq - order + 1, #seq)}, "|")
@@ -195,10 +193,9 @@ function generate_sequence(model_data, length)
end end
end end
-- print(current_key .. " --> " .. chosen)
seq[#seq+1] = chosen seq[#seq+1] = chosen
end end
return seq return seq
end end
]]