Basic export system (press S to display level in terminal)
This commit is contained in:
parent
6b089e4e43
commit
ce76188407
|
@ -21,6 +21,7 @@ function update_keyboard()
|
|||
local buffer = k_s
|
||||
k_s = love.keyboard.isDown("s")
|
||||
if k_s and not buffer then
|
||||
print(save())
|
||||
end
|
||||
local buffer = k_o
|
||||
k_o = love.keyboard.isDown("o")
|
||||
|
|
1
main.lua
1
main.lua
|
@ -5,4 +5,5 @@ function love.load()
|
|||
require("mouse")
|
||||
require("keyboard")
|
||||
require("tiles")
|
||||
require("save")
|
||||
end
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
function save()
|
||||
output = "\n-"
|
||||
for i = 1, 28, 1 do output = "-"..output end
|
||||
for i = 1, #selected_screen, 1 do
|
||||
output = output..selected_screen:sub(i, i)
|
||||
if i % 26 == 0 then output = output.."-\n-" end
|
||||
end
|
||||
for i = 1, 26, 1 do output = output.."-" end
|
||||
return output
|
||||
end
|
||||
|
||||
function load()
|
||||
end
|
Loading…
Reference in New Issue