diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..44e52e9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +logs* +export* diff --git a/data/scripts/in_out.lua b/data/scripts/in_out.lua index b9bef63..2315281 100644 --- a/data/scripts/in_out.lua +++ b/data/scripts/in_out.lua @@ -1,8 +1,9 @@ function ExportLevel(levelname, filename) + os.execute( "mkdir \"./Mothback/export\"" ) filename = filename or "output.lua" + filename = "Mothback/export/"..filename exportFile = io.open(filename, "a+") - local success, message = love.filesystem.write(filename, "") - if success then + if exportFile then exportFile:write("return {") logPrint("Exporting level \"".. levelname .. "\"...") exportFile:write("\n name = \"" .. levelname .. "\",") @@ -56,4 +57,6 @@ return { 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+") diff --git a/data/scripts/ui/dialog.lua b/data/scripts/ui/dialog.lua index 91d2afa..a03604a 100644 --- a/data/scripts/ui/dialog.lua +++ b/data/scripts/ui/dialog.lua @@ -59,7 +59,7 @@ function interfaceDialog:checkConfirm() if love.mouse.isDown(1) then self.clicked = true self.value = self.value + 1 - logPrint(self.value.." of "..self.target_value) + logPrint("Dialog: "..self.value.." of "..self.target_value) self:updateContents() end elseif not love.mouse.isDown(1) then