add energy values for moreswords mod

This commit is contained in:
Leo Spratt 2021-12-30 22:33:28 +00:00
parent cf8eb65bee
commit d1531b32c1
2 changed files with 16 additions and 5 deletions

View File

@ -257,10 +257,19 @@ local energy_values = {
chest = 2, chest = 2,
chest_locked = 2, chest_locked = 2,
}, },
["moreswords"] = {
sword_ice = 10,
sword_lava = 10,
sword_pick = 14,
sword_smoke = 14,
sword_teleport = 20,
sword_water = 5,
},
} }
-- load energy values into known items -- load energy values into known items
for modname, itemlist in pairs(energy_values) do for modname, itemlist in pairs(energy_values) do
if minetest.get_modpath(modname) then
for itemname, energy_value in pairs(itemlist) do for itemname, energy_value in pairs(itemlist) do
minetest.override_item(modname..":"..itemname, { minetest.override_item(modname..":"..itemname, {
description = minetest.registered_items[modname..":"..itemname].description.."\nEnergy Value: "..energy_value, description = minetest.registered_items[modname..":"..itemname].description.."\nEnergy Value: "..energy_value,
@ -268,3 +277,4 @@ for modname, itemlist in pairs(energy_values) do
}) })
end end
end end
end

View File

@ -2,3 +2,4 @@ name = element_exchange
description = Exchange nodes into other nodes description = Exchange nodes into other nodes
min_minetest_version = 5.4 min_minetest_version = 5.4
depends=default depends=default
optional_depends=moreswords