mirror of
https://github.com/ZNixian/equivalent_exchange.git
synced 2024-12-26 06:57:28 +01:00
Actually completed previous commit (created working code)
This commit is contained in:
parent
83e65b9cd5
commit
81ba3a81f8
@ -1,5 +1,5 @@
|
||||
["default:"] = {
|
||||
-- Nodes --
|
||||
local emcs = {
|
||||
["default"] = {
|
||||
stone = 2,
|
||||
cobble = 1,
|
||||
desert_stone = 1,
|
||||
@ -34,7 +34,6 @@
|
||||
mossycobble = 1,
|
||||
mese=75978,
|
||||
obsidian = 64,
|
||||
-- Craft Items --
|
||||
stick = 2,
|
||||
paper = 96,
|
||||
book = 288,
|
||||
@ -71,12 +70,24 @@
|
||||
-- Precise Value: 47
|
||||
mese_crystal_fragment = 25,
|
||||
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
|
||||
minetest.override_item(modname..itemname, {
|
||||
description = minetest.registered_items[modname..itemname].description.."\nEMC: "..emcvalue,
|
||||
minetest.override_item(modname..":"..itemname, {
|
||||
-- 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,
|
||||
})
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user