summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/cheat
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2016-04-28 21:17:09 -0500
committer cracyc <cracyc@users.noreply.github.com>2016-04-28 21:17:09 -0500
commit6bbd290d315b20be75fa52465803d7e76466736f (patch)
tree99b42c8325fb024d5bf2cbe9d51eda8f9dc6cec1 /plugins/cheat
parent7e394b5dbe91b30c689782908a3aeb3619fed988 (diff)
plugins/cheat*: indent the output (nw)
Diffstat (limited to 'plugins/cheat')
-rw-r--r--plugins/cheat/conv_cheat.lua2
-rw-r--r--plugins/cheat/init.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/cheat/conv_cheat.lua b/plugins/cheat/conv_cheat.lua
index afc87bc55b6..6f583a0178a 100644
--- a/plugins/cheat/conv_cheat.lua
+++ b/plugins/cheat/conv_cheat.lua
@@ -8,4 +8,4 @@ function readAll(file)
return content
end
-print(json.stringify(xml.conv_cheat(readAll(arg[1]))))
+print(json.stringify(xml.conv_cheat(readAll(arg[1])), {indent = true}))
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua
index 0e5abf447ab..4755d8106cd 100644
--- a/plugins/cheat/init.lua
+++ b/plugins/cheat/init.lua
@@ -477,7 +477,7 @@ function cheat.startplugin()
cheats = load_cheats()
local json = require("json")
local file = io.open(manager:machine():options().entries.cheatpath:value() .. "/output.json", "w")
- file:write(json.stringify(cheats))
+ file:write(json.stringify(cheats, {indent = true}))
file:close()
for num, cheat in pairs(cheats) do
parse_cheat(cheat)