Code: Select all
-- conf.lua
function love.conf(t)
t.title = "hacking-flappylove"
t.author = "Inny"
t.version = "0.9.0"
-- I don't need to paste the rest of this
end
Code: Select all
-- main.lua
local function mydump(mydump, f, t, i, sp)
if i <= 0 then return end
for k, v in pairs(t) do
f:write(sp.."K:"..k.."\n")
if type(v) == "table" then
mydump(mydump, f, v, i-1, sp..' ')
else
f:write(sp.."V:"..tostring(v)..'\n')
end
end
end
local function watchme(f)
love.filesystem.mount("Flappy Love.love", "themark", true)
local old_require = require
_G.require = function(m)
old_require('themark.'..m)
end
pcall(require, 'main')
mydump(mydump, f, _G, 10, '')
end
local f = io.open("example.txt", 'w')
setfenv(watchme, setmetatable({}, { __index = _G }))
print(pcall(watchme, f))
io.close(f)
Anyway, this was my lazy half-hour attempt. I ran out of pizza and lost the will to continue with this.