sokoban.love/0111-populate_missing_handlers

14 lines
329 B
Plaintext

populate_missing_handlers = function()
for handler_name in pairs(love.handlers) do
if on[handler_name] == nil then
-- make it available to scripts
on[handler_name] = function(...)
if not Show_code then
if car[handler_name] then
call_protected(car[handler_name], ...)
end
end
end
end
end
end