scenery = {stack={}}
function scenery.load(sceneFile, sceneName)
if scenery.stack[table.getn(scenery.stack)] ~= sceneFile then
scenery.stack[table.getn(scenery.stack)+1] = sceneFile end
local sceneryChunk = love.filesystem.load(sceneFile..".lua")
sceneryChunk()
scenery.scene = sceneName or s
scenery.scene.load()
end
function scenery.exit()
table.remove(scenery.stack,table.getn(scenery.stack))
scenery.load(scenery.stack[table.getn(scenery.stack)])
end
Not bad, but table.getn is deprecated though, you should use # instead.
Me and my stuff True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.