fluid things

This commit is contained in:
Crispy 2025-05-25 03:02:48 +02:00
parent 7694798ad0
commit ad6af0fa35
21 changed files with 608 additions and 183 deletions

View file

@ -8,6 +8,7 @@ function read_recipe(file)
base = nil
intermediate = nil
repeats = 1
yield = 1
while 1 do
line = file.readLine()
if string.sub(line, 1, 5) == "base " then
@ -16,6 +17,8 @@ function read_recipe(file)
intermediate = string.sub(line, 14)
elseif string.sub(line, 1, 7) == "repeat " then
repeats = tonumber(string.sub(line, 8))
elseif string.sub(line, 1, 6) == "yield " then
yield = tonumber(string.sub(line, 7))
elseif line == "steps:" then
break
end
@ -44,6 +47,7 @@ function read_recipe(file)
return {
product = product,
base = base,
yield = yield,
intermediate = intermediate or base,
repeats = repeats,
steps = steps