fixed emcs.lua

This commit is contained in:
Yaman 2015-08-03 00:02:05 -04:00
parent f6df71136d
commit 69e7c0bc05

@ -1,7 +1,6 @@
local emcs = { local emcs = {
node = { ["default"] = {
["default:"] = { stone = 4,
stone = 2,
cobble = 1, cobble = 1,
desert_stone = 1, desert_stone = 1,
stonebrick = 1, stonebrick = 1,
@ -35,10 +34,6 @@ local emcs = {
mossycobble = 1, mossycobble = 1,
mese=75978, mese=75978,
obsidian = 64, obsidian = 64,
}
},
craftitem = {
["default:"] = {
stick = 2, stick = 2,
paper = 96, paper = 96,
book = 288, book = 288,
@ -76,32 +71,13 @@ local emcs = {
mese_crystal_fragment = 25, mese_crystal_fragment = 25,
clay_brick = 16, clay_brick = 16,
} }
}
-- block = {
-- ["default:"] = {
-- }
-- }
} }
-- for type, emcset in pairs(emcs) do for modname, itemlist in pairs(emcs) do
-- for prefix, subs in pairs(emcset) do
-- for name, emc in pairs(subs) do
-- local ornode = minetest.registered_items[prefix..name]
-- local node = {emc=emc}
-- for tagname, tagvalue in pairs(ornode) do
-- node[tagname] = tagvalue
-- end
-- 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 for itemname, emcvalue in pairs(itemlist) do
minetest.override_item(modname..itemname, { minetest.override_item(modname..":"..itemname, {
description = minetest.registered_items[modname..":"..itemname].description.."\nEMC = "..tostring(emcvalue),
emc = emcvalue, emc = emcvalue,
}) })
end end
end
end end