From df88aa07dc76b9dc673ab6ec67e2a61f89e971f3 Mon Sep 17 00:00:00 2001 From: cracyc Date: Sat, 30 Apr 2016 20:58:47 -0500 Subject: plugins/cheatfind: reverse operator order and add value comparison (nw) --- plugins/cheat/init.lua | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'plugins/cheat/init.lua') 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 -- cgit v1.2.3-70-g09d2