mirror of
https://codeberg.org/minenux/minetest-mod-xdecor
synced 2023-10-20 21:43:39 -07:00
Clarify some variables and lower a bit Speed enchant
This commit is contained in:
parent
daa9d480b5
commit
1306ff8ee5
@ -187,20 +187,20 @@ for _, ench in pairs(tooldef[3]) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
if mod == "3d_armor" then
|
if mod == "3d_armor" then
|
||||||
local original_protect_groups = original_tool.groups
|
local original_armor_groups = original_tool.groups
|
||||||
local protectcaps = table.copy(original_protect_groups)
|
local armorcaps = table.copy(original_armor_groups)
|
||||||
local protectcaps = {}
|
local armorcaps = {}
|
||||||
protectcaps.not_in_creative_inventory=1
|
armorcaps.not_in_creative_inventory=1
|
||||||
|
|
||||||
if enchant == "strong" then
|
if enchant == "strong" then
|
||||||
for protect_group, value in pairs(original_protect_groups) do
|
for armor_group, value in pairs(original_armor_groups) do
|
||||||
protectcaps[protect_group] = math.ceil(value * 1.2)
|
armorcaps[armor_group] = math.ceil(value * 1.2)
|
||||||
end
|
end
|
||||||
elseif enchant == "speed" then
|
elseif enchant == "speed" then
|
||||||
for protect_group, value in pairs(original_protect_groups) do
|
for armor_group, value in pairs(original_armor_groups) do
|
||||||
protectcaps[protect_group] = value
|
armorcaps[armor_group] = value
|
||||||
protectcaps.physics_speed = 0.8
|
armorcaps.physics_speed = 0.5
|
||||||
protectcaps.physics_jump = 0.3
|
armorcaps.physics_jump = 0.3
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ for _, ench in pairs(tooldef[3]) do
|
|||||||
description = string.format("Enchanted %s %s (%s)", cap(material), cap(tool), cap(enchant)),
|
description = string.format("Enchanted %s %s (%s)", cap(material), cap(tool), cap(enchant)),
|
||||||
inventory_image = original_tool.inventory_image.."^[colorize:blue:20",
|
inventory_image = original_tool.inventory_image.."^[colorize:blue:20",
|
||||||
wield_image = original_tool.wield_image,
|
wield_image = original_tool.wield_image,
|
||||||
groups = protectcaps,
|
groups = armorcaps,
|
||||||
wear = 0
|
wear = 0
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user