mirror of
https://github.com/enchant97/minetest_element_exchange.git
synced 2024-11-19 22:03:43 +01:00
add energy values for moreswords mod
This commit is contained in:
parent
cf8eb65bee
commit
d1531b32c1
20
energy.lua
20
energy.lua
@ -257,14 +257,24 @@ local energy_values = {
|
||||
chest = 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
|
||||
for modname, itemlist in pairs(energy_values) do
|
||||
for itemname, energy_value in pairs(itemlist) do
|
||||
minetest.override_item(modname..":"..itemname, {
|
||||
description = minetest.registered_items[modname..":"..itemname].description.."\nEnergy Value: "..energy_value,
|
||||
energy_value = energy_value,
|
||||
})
|
||||
if minetest.get_modpath(modname) then
|
||||
for itemname, energy_value in pairs(itemlist) do
|
||||
minetest.override_item(modname..":"..itemname, {
|
||||
description = minetest.registered_items[modname..":"..itemname].description.."\nEnergy Value: "..energy_value,
|
||||
energy_value = energy_value,
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
1
mod.conf
1
mod.conf
@ -2,3 +2,4 @@ name = element_exchange
|
||||
description = Exchange nodes into other nodes
|
||||
min_minetest_version = 5.4
|
||||
depends=default
|
||||
optional_depends=moreswords
|
||||
|
Loading…
Reference in New Issue
Block a user