detect armor/weapons and only repair it if mod enables
parent
aa199f90e4
commit
542d430537
|
@ -5,6 +5,7 @@ screwdriver = screwdriver or {}
|
|||
local min, ceil = math.min, math.ceil
|
||||
local S = xdecor.S
|
||||
local FS = function(...) return minetest.formspec_escape(S(...)) end
|
||||
local ar_api = minetest.get_modpath("3d_armor") or false
|
||||
|
||||
-- Nodes allowed to be cut
|
||||
-- Only the regular, solid blocks without metas or explosivity can be cut
|
||||
|
@ -34,7 +35,10 @@ workbench.defs = {
|
|||
{"stair_inner", 1, nil }
|
||||
}
|
||||
|
||||
local repairable_tools = {"pick", "axe", "shovel", "sword", "hoe", "armor", "shield"}
|
||||
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 custom_repairable = {}
|
||||
function xdecor:register_repairable(item)
|
||||
|
|
Loading…
Reference in New Issue