diff options
author | 2018-08-27 20:43:33 -0500 | |
---|---|---|
committer | 2018-08-27 20:43:33 -0500 | |
commit | 9f12058484b71d21abceffa147aa89f72f19774b (patch) | |
tree | 673c76f61330ab93480e300a3d7bdd2c53e66d6a /plugins/cheat/init.lua | |
parent | 6be0b400ae28c4d7022226cfcc76260b116927db (diff) |
plugins/cheat[find]: fix memshares (nw)
Diffstat (limited to 'plugins/cheat/init.lua')
-rw-r--r-- | plugins/cheat/init.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index 9495cfc689b..0f9f4a99e1e 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -37,6 +37,10 @@ -- "varname": "tag", -- ... -- }, +-- "share": { +-- "varname": "tag", +-- ... +-- }, -- "script": { -- "on|off|run|change": "script", -- ... @@ -481,6 +485,16 @@ function cheat.startplugin() cheat.cheat_env[name] = emu.item(ram.items["0/m_pointer"]) end end + if cheat.share then + for name, tag in pairs(cheat.share) do + local share = manager:machine():memory().shares[tag] + if not share then + cheat_error(cheat, "missing share " .. share) + return + end + cheat.cheat_env[name] = share + end + end local param = cheat.parameter if not param then return |