From d818313f8f75089ccf3bbf2697577ded9097c899 Mon Sep 17 00:00:00 2001 From: cracyc Date: Sun, 10 Apr 2016 21:42:33 -0500 Subject: plugins/cheatfind: preliminary support to inject cheats for testing (nw) --- plugins/cheat/init.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'plugins/cheat') diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index 0bd9427f8c0..2dee3677f34 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -462,6 +462,18 @@ function cheat.startplugin() end output = {} end) + + local ce = {} + + -- interface to script cheat engine + function ce.inject(newcheat) + cheats[#cheats + 1] = newcheat + parse_cheat(newcheat) + manager:machine():popmessage(newcheat.desc .. " added") + end + + _G.ce = ce + end return exports -- cgit v1.2.3