Not files are saved in "export" and logs in "logs"
This commit is contained in:
parent
ef58a6e383
commit
7e134f7961
|
@ -0,0 +1,2 @@
|
||||||
|
logs*
|
||||||
|
export*
|
|
@ -1,8 +1,9 @@
|
||||||
function ExportLevel(levelname, filename)
|
function ExportLevel(levelname, filename)
|
||||||
|
os.execute( "mkdir \"./Mothback/export\"" )
|
||||||
filename = filename or "output.lua"
|
filename = filename or "output.lua"
|
||||||
|
filename = "Mothback/export/"..filename
|
||||||
exportFile = io.open(filename, "a+")
|
exportFile = io.open(filename, "a+")
|
||||||
local success, message = love.filesystem.write(filename, "")
|
if exportFile then
|
||||||
if success then
|
|
||||||
exportFile:write("return {")
|
exportFile:write("return {")
|
||||||
logPrint("Exporting level \"".. levelname .. "\"...")
|
logPrint("Exporting level \"".. levelname .. "\"...")
|
||||||
exportFile:write("\n name = \"" .. levelname .. "\",")
|
exportFile:write("\n name = \"" .. levelname .. "\",")
|
||||||
|
@ -56,4 +57,6 @@ return {
|
||||||
objects = {}
|
objects = {}
|
||||||
}
|
}
|
||||||
]]
|
]]
|
||||||
logFile = io.open("mothback_"..os.date("%Y-%m-%d_%H-%M-%S")..".log", "a+")
|
-- Make log stuff
|
||||||
|
os.execute( "mkdir \"./Mothback/logs\"" )
|
||||||
|
logFile = io.open("Mothback/logs/mothback_"..os.date("%Y-%m-%d_%H-%M-%S")..".log", "a+")
|
||||||
|
|
|
@ -59,7 +59,7 @@ function interfaceDialog:checkConfirm()
|
||||||
if love.mouse.isDown(1) then
|
if love.mouse.isDown(1) then
|
||||||
self.clicked = true
|
self.clicked = true
|
||||||
self.value = self.value + 1
|
self.value = self.value + 1
|
||||||
logPrint(self.value.." of "..self.target_value)
|
logPrint("Dialog: "..self.value.." of "..self.target_value)
|
||||||
self:updateContents()
|
self:updateContents()
|
||||||
end
|
end
|
||||||
elseif not love.mouse.isDown(1) then
|
elseif not love.mouse.isDown(1) then
|
||||||
|
|
Loading…
Reference in New Issue