greatly optimized emcs.lua

This commit is contained in:
Yaman 2015-08-02 13:46:49 -04:00
parent d57f817a0c
commit f6df71136d

@ -83,15 +83,25 @@ local emcs = {
-- } -- }
} }
for type, emcset in pairs(emcs) do -- for type, emcset in pairs(emcs) do
for prefix, subs in pairs(emcset) do -- for prefix, subs in pairs(emcset) do
for name, emc in pairs(subs) do -- for name, emc in pairs(subs) do
local ornode = minetest.registered_items[prefix..name] -- local ornode = minetest.registered_items[prefix..name]
local node = {emc=emc} -- local node = {emc=emc}
for tagname, tagvalue in pairs(ornode) do -- for tagname, tagvalue in pairs(ornode) do
node[tagname] = tagvalue -- node[tagname] = tagvalue
end -- end
minetest["register_"..type](":"..prefix..name, node) -- minetest["register_"..type](":"..prefix..name, node)
-- end
-- end
-- end
for type, emctable in pairs(emcs) do
for modname, itemlist in pairs(emctable) do
for itemname, emcvalue in pairs(itemlist) do
minetest.override_item(modname..itemname, {
emc = emcvalue,
})
end end
end end
end end