Avoid recalculating operation names repeatedly. #1

Merged
pyrex merged 1 commits from kistaro/chameleonic:adhoc-cleanup into main 2022-12-17 22:58:56 +00:00

View File

@ -12,11 +12,21 @@ function _update()
function _draw()
_doall("draw") end
mnames={}
function names(root)
local n=mnames[root]
if(n)return all(n)
n={root.."0", root, root.."2", root.."3"}
mnames[root]=n
return all(n)
end
function _doall(x)
for x2 in all(split"0,,2,3") do
for n in names(x) do
for mod in all(modules) do
local f=mod[x..x2]
if (f != nil) f(mod)
local f=mod[n]
if (f) f(mod)
end
end
end