fix possible bad array on enchanting code, related to some bugs
* maybe related to https://github.com/minetest-mods/xdecor/issues/81
* pending 85b023cfe7
* pending track https://github.com/MT-Eurythmia/xdecor/commits/master
master
parent
542d430537
commit
ff1a3ca619
4
init.lua
4
init.lua
|
@ -27,12 +27,16 @@ else
|
|||
end
|
||||
|
||||
xdecor.S = S
|
||||
xdecor.reparaible_tools = {"pick", "axe", "shovel", "sword"}
|
||||
|
||||
dofile(modpath .. "/handlers/animations.lua")
|
||||
dofile(modpath .. "/handlers/helpers.lua")
|
||||
dofile(modpath .. "/handlers/nodeboxes.lua")
|
||||
dofile(modpath .. "/handlers/registration.lua")
|
||||
|
||||
if ar_api then xdecor.repairable_tools = {"pick", "axe", "shovel", "sword", "hoe", "armor", "shield"}
|
||||
else xdecor.repairable_tools = {"pick", "axe", "shovel", "hoe"} end
|
||||
|
||||
dofile(modpath .. "/src/nodes.lua")
|
||||
dofile(modpath .. "/src/recipes.lua")
|
||||
|
||||
|
|
|
@ -92,10 +92,7 @@ end
|
|||
function enchanting.on_put(pos, listname, _, stack)
|
||||
if listname == "tool" then
|
||||
local stackname = stack:get_name()
|
||||
local tool_groups = {
|
||||
"axe, pick, shovel",
|
||||
"sword",
|
||||
}
|
||||
local tool_groups = xdecor.reparaible_tools
|
||||
|
||||
for idx, tools in ipairs(tool_groups) do
|
||||
if tools:find(stackname:match(":(%w+)")) then
|
||||
|
|
|
@ -35,10 +35,7 @@ workbench.defs = {
|
|||
{"stair_inner", 1, nil }
|
||||
}
|
||||
|
||||
local repairable_tools = {"pick", "axe", "shovel"}
|
||||
|
||||
if ar_api then repairable_tools = {"pick", "axe", "shovel", "sword", "hoe", "armor", "shield"}
|
||||
else repairable_tools = {"pick", "axe", "shovel", "hoe"} end
|
||||
local repairable_tools = xdecor.reparaible_tools
|
||||
|
||||
local custom_repairable = {}
|
||||
function xdecor:register_repairable(item)
|
||||
|
|
Loading…
Reference in New Issue