diff options
author | 2016-04-30 20:58:47 -0500 | |
---|---|---|
committer | 2016-04-30 20:58:47 -0500 | |
commit | df88aa07dc76b9dc673ab6ec67e2a61f89e971f3 (patch) | |
tree | fd2e2e838697841e6fcc2a5ff5ba1d2e41437182 /plugins/cheat/init.lua | |
parent | d1b88f133c0ea8e4fde1369c41f55ac4fa87aa26 (diff) |
plugins/cheatfind: reverse operator order and add value comparison (nw)
Diffstat (limited to 'plugins/cheat/init.lua')
-rw-r--r-- | plugins/cheat/init.lua | 13 |
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 |