mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
18 lines
430 B
Lua
18 lines
430 B
Lua
local create_step = require("create_step")
|
|
|
|
--- Add a new step to the list
|
|
---@param steps Step[] Array of steps
|
|
---@return Step[] Updated steps array
|
|
---@return Step New step that was added
|
|
local function add_step(steps)
|
|
local newStep = create_step()
|
|
local result = {}
|
|
for i, step in ipairs(steps) do
|
|
result[i] = step
|
|
end
|
|
result[#result + 1] = newStep
|
|
return result, newStep
|
|
end
|
|
|
|
return add_step
|