diff options
| author | 2024-03-28 09:35:30 +1300 | |
|---|---|---|
| committer | 2024-03-27 15:35:30 -0500 | |
| commit | 662bc48d9a7b6c9cca95b0079d913e0830086614 (patch) | |
| tree | 6785053b8b92876a1d6a38f8a7ea2d066c57b4f2 /plugins | |
| parent | 39cd5d6f0225e6e41428e03363e1b690e8b7cdf1 (diff) | |
cheat: Make string.char and string.format available to cheats (#12183)
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/cheat/init.lua | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/plugins/cheat/init.lua b/plugins/cheat/init.lua index f2418fed7b6..302b86beeed 100644 --- a/plugins/cheat/init.lua +++ b/plugins/cheat/init.lua @@ -453,21 +453,22 @@ function cheat.startplugin() end local function parse_cheat(cheat) - cheat.cheat_env = { draw_text = draw_text, - draw_line = draw_line, - draw_box = draw_box, - tobcd = tobcd, - frombcd = frombcd, - pairs = pairs, - ipairs = ipairs, - outputs = manager.machine.output, - time = time, - input_trans = input_trans, - input_run = function(list) input_run(cheat, list) end, - os = { time = os.time, date = os.date, difftime = os.difftime }, - table = - { insert = table.insert, - remove = table.remove } } + cheat.cheat_env = { + draw_text = draw_text, + draw_line = draw_line, + draw_box = draw_box, + tobcd = tobcd, + frombcd = frombcd, + pairs = pairs, + ipairs = ipairs, + outputs = manager.machine.output, + time = time, + input_trans = input_trans, + input_run = function(list) input_run(cheat, list) end, + os = { time = os.time, date = os.date, difftime = os.difftime }, + table = { insert = table.insert, remove = table.remove }, + string = { format = string.format, char = string.char } + } cheat.enabled = false cheat.set_enabled = set_enabled; cheat.get_enabled = function(cheat) return cheat.enabled end |
