Like this? (based on christmas2020.lua)
Code: Select all
local oldConvertEditorKeyToAction = Config.convertEditorKeyToAction
function Config:convertEditorKeyToAction(event_keyCode, event_modifiers)
local action = oldConvertEditorKeyToAction(self, event_keyCode, event_modifiers)
if event_keyCode == 89 and event_modifiers == 2 then
sys.restart{ "launchEditor" }
else
return action
end
end
Then we could compare event.key instead of event_keyCode.
Config:convertEditorKeyToAction() isn't defined in any of the umod files.
I know we shouldn't be greedy, because then Nuutti will punish us.
But if you want to give us Config.lua as a late Christmas present...
(we could add a key config entry for the console key, if the console is enabled in grimrock.cfg)
edit:
Now I understand the joke contained in "every character he types is doubled".
I'm slow
