summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/cheat/init.lua
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2016-04-10 21:42:33 -0500
committer cracyc <cracyc@users.noreply.github.com>2016-04-10 21:42:33 -0500
commitd818313f8f75089ccf3bbf2697577ded9097c899 (patch)
treecdb972f48000ab19e0ce84fbf5af8e11d761a5f1 /plugins/cheat/init.lua
parent5d8e00ae584833cd994168e0738f757e06e7cb7c (diff)
plugins/cheatfind: preliminary support to inject cheats for testing (nw)
Diffstat (limited to 'plugins/cheat/init.lua')
-rw-r--r--plugins/cheat/init.lua12
1 files changed, 12 insertions, 0 deletions
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