summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/cheat/init.lua
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2016-04-30 20:58:47 -0500
committer cracyc <cracyc@users.noreply.github.com>2016-04-30 20:58:47 -0500
commitdf88aa07dc76b9dc673ab6ec67e2a61f89e971f3 (patch)
treefd2e2e838697841e6fcc2a5ff5ba1d2e41437182 /plugins/cheat/init.lua
parentd1b88f133c0ea8e4fde1369c41f55ac4fa87aa26 (diff)
plugins/cheatfind: reverse operator order and add value comparison (nw)
Diffstat (limited to 'plugins/cheat/init.lua')
-rw-r--r--plugins/cheat/init.lua13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua
index dedbea9b2f9..05242e96d0d 100644
--- a/plugins/cheat/init.lua
+++ b/plugins/cheat/init.lua
@@ -531,19 +531,16 @@ function cheat.startplugin()
manager:machine():popmessage(newcheat.desc .. " added")
end
- function ce.dump(index)
- cheat = cheats[index]
- if cheat then
- for k, v in pairs(cheat.cheat_env) do
- emu.print_verbose(k, v)
- end
- end
+ function ce.get(index)
+ return cheats[index]
end
function ce.list()
+ local list = {}
for num, cheat in pairs(cheats) do
- emu.print_verbose(num, cheat.desc)
+ list[num] = cheat.desc
end
+ return list
end
_G.ce = ce