feat: add base script for new puzzles

This commit is contained in:
2025-11-28 16:54:37 +01:00
parent fcf9820f9a
commit c75a882e2c
2 changed files with 28 additions and 14 deletions

View File

@@ -41,6 +41,21 @@ function utils.readFile(path)
return data
end
function utils.writeFile(path, content, overwrite)
overwrite = overwrite or false
if not overwrite and fs.exists(path) then
return true
end
local f = fs.open(path, "w")
if not f then
printError("Could not open file " .. path)
return false
end
f.write(content)
f.close()
return true
end
function utils.waitForKey(targetKey)
if targetKey then
print("Press " .. keys.getName(targetKey):upper() .. " to continue")