Merge lines.love

This commit is contained in:
Kartik K. Agaram 2023-05-30 00:31:34 -07:00
commit 074f4d9b0a

28
app.lua
View File

@ -316,16 +316,26 @@ end
-- fake files -- fake files
function App.open_for_writing(filename) function App.open_for_writing(filename)
App.filesystem[filename] = '' App.filesystem[filename] = ''
return { if Current_app == nil or Current_app == 'run' then
write = function(self, ...) return {
local args = {...} write = function(self, ...)
for i,s in ipairs(args) do local args = {...}
for i,s in ipairs(args) do
App.filesystem[filename] = App.filesystem[filename]..s
end
end,
close = function(self)
end,
}
elseif Current_app == 'source' then
return {
write = function(self, s)
App.filesystem[filename] = App.filesystem[filename]..s App.filesystem[filename] = App.filesystem[filename]..s
end end,
end, close = function(self)
close = function(self) end,
end, }
} end
end end
function App.open_for_reading(filename) function App.open_for_reading(filename)