Actually completed previous commit (created working code)

This commit is contained in:
Yaman 2015-08-02 20:38:27 -04:00
parent 83e65b9cd5
commit 81ba3a81f8

@ -1,5 +1,5 @@
["default:"] = { local emcs = {
-- Nodes -- ["default"] = {
stone = 2, stone = 2,
cobble = 1, cobble = 1,
desert_stone = 1, desert_stone = 1,
@ -34,7 +34,6 @@
mossycobble = 1, mossycobble = 1,
mese=75978, mese=75978,
obsidian = 64, obsidian = 64,
-- Craft Items --
stick = 2, stick = 2,
paper = 96, paper = 96,
book = 288, book = 288,
@ -72,11 +71,23 @@
mese_crystal_fragment = 25, mese_crystal_fragment = 25,
clay_brick = 16, clay_brick = 16,
} }
}
-- block = {
-- ["default:"] = {
-- }
-- }
for modname, itemlist in pairs(emctable) do
for modname, itemlist in emcs 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: "..emcvalue, -- Weird bug or whatever
-- From IRC <kaeza>
-- are you running that at load time or runtime?
-- if the latter, you can't redefine items at runtime.
-- if the former, that may be a bug in the engine
-- description = minetest.registered_items[itemname].description.."\nEMC = "..tostring(emcvalue),
emc = emcvalue, emc = emcvalue,
}) })
end end