summaryrefslogtreecommitdiffstatshomepage
path: root/plugins/cheat
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/cheat')
-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