Drop support for 3d_armor's enchanted stuff
This commit is contained in:
parent
787ba258d2
commit
85b023cfe7
@ -3,6 +3,5 @@ bucket
|
|||||||
doors
|
doors
|
||||||
stairs
|
stairs
|
||||||
xpanes
|
xpanes
|
||||||
3d_armor?
|
|
||||||
fire?
|
fire?
|
||||||
oresplus?
|
oresplus?
|
||||||
|
@ -273,32 +273,6 @@ function enchanting:register_tools(mod, def)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
if mod == "3d_armor" then
|
|
||||||
local original_armor_groups = original_tool.groups
|
|
||||||
local armorcaps = {}
|
|
||||||
armorcaps.not_in_creative_inventory = 1
|
|
||||||
|
|
||||||
for armor_group, value in pairs(original_armor_groups) do
|
|
||||||
if enchant == "strong" then
|
|
||||||
armorcaps[armor_group] = ceil(value * enchanting.strength)
|
|
||||||
elseif enchant == "speed" then
|
|
||||||
armorcaps[armor_group] = value
|
|
||||||
armorcaps.physics_speed = enchanting.speed
|
|
||||||
armorcaps.physics_jump = enchanting.jump
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_tool(":"..mod..":enchanted_"..tool.."_"..material.."_"..enchant, {
|
|
||||||
description = "Enchanted "..cap(material).." "..cap(tool)..
|
|
||||||
self:get_tooltip(enchant),
|
|
||||||
inventory_image = original_tool.inventory_image,
|
|
||||||
texture = "3d_armor_"..tool.."_"..material,
|
|
||||||
wield_image = original_tool.wield_image,
|
|
||||||
groups = armorcaps,
|
|
||||||
wear = 0
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -313,14 +287,3 @@ enchanting:register_tools("default", {
|
|||||||
sword = {enchants = "sharp"}
|
sword = {enchants = "sharp"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
enchanting:register_tools("3d_armor", {
|
|
||||||
materials = "steel, bronze, gold, diamond",
|
|
||||||
tools = {
|
|
||||||
boots = {enchants = "strong, speed"},
|
|
||||||
chestplate = {enchants = "strong"},
|
|
||||||
helmet = {enchants = "strong"},
|
|
||||||
leggings = {enchants = "strong"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user