mckaygerhard 2023-06-11 19:56:30 -04:00
parent dab09dfd32
commit 13a6891758
4 changed files with 30 additions and 14 deletions

View File

@ -33,7 +33,7 @@ Most of those mods have mirror at http://git.mirror.org
| walls | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/c7cb79422ba19c696966472942db6177c934838d | | | walls | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/c7cb79422ba19c696966472942db6177c934838d | |
| wool | https://codeberg.org/minenux/minetest-mod-wool | https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a | [wool/README.md](wool/README.md) | | wool | https://codeberg.org/minenux/minetest-mod-wool | https://codeberg.org/minenux/minetest-mod-wool/commit/de642a08e80bfd7a4a1e5629e50458a609dbda3a | [wool/README.md](wool/README.md) |
| xpanes | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/c7cb79422ba19c696966472942db6177c934838d | | | xpanes | https://codeberg.org/minenux/minetest-game-minetest | https://codeberg.org/minenux/minetest-game-minetest/commit/c7cb79422ba19c696966472942db6177c934838d | |
| xdecor | https://codeberg.org/minenux/minetest-game-xdecor | https://codeberg.org/minenux/minetest-game-xdecor/commit/f6d0f0b2a5c1d435217bb3409a76da9eb36fe889 | [xdecor/README.md](xdecor/README.md) | | xdecor | https://codeberg.org/minenux/minetest-game-xdecor | https://codeberg.org/minenux/minetest-game-xdecor/commit/cd0c35b8c58153f7c353b5dbfac35e524fa0ea18 | [xdecor/README.md](xdecor/README.md) |
The default mod provides sethome and player_api call ones, binoculars from v5 are The default mod provides sethome and player_api call ones, binoculars from v5 are
just separate privilegies for zoom, butterflies and fireflies from v5 can be set just separate privilegies for zoom, butterflies and fireflies from v5 can be set

View File

@ -2,6 +2,7 @@
xdecor = {} xdecor = {}
local modpath = minetest.get_modpath("xdecor") local modpath = minetest.get_modpath("xdecor")
local ar_api = minetest.get_modpath("3d_armor")
-- Intllib -- Intllib
local S local S
@ -27,7 +28,7 @@ else
end end
xdecor.S = S xdecor.S = S
xdecor.reparaible_tools = {"pick", "axe", "shovel", "sword"} xdecor.reparaible_tools = {"pick", "axe", "shovel", "hoe"}
dofile(modpath .. "/handlers/animations.lua") dofile(modpath .. "/handlers/animations.lua")
dofile(modpath .. "/handlers/helpers.lua") dofile(modpath .. "/handlers/helpers.lua")

View File

@ -108,6 +108,7 @@ function enchanting.fields(pos, _, fields, sender)
local tool = inv:get_stack("tool", 1) local tool = inv:get_stack("tool", 1)
local mese = inv:get_stack("mese", 1) local mese = inv:get_stack("mese", 1)
local orig_wear = tool:get_wear() local orig_wear = tool:get_wear()
if tool and tool:get_name() and allowed_tools[tool:get_name()] then
local mod, name = tool:get_name():match("(.*):(.*)") local mod, name = tool:get_name():match("(.*):(.*)")
local enchanted_tool = (mod or "") .. ":enchanted_" .. (name or "") .. "_" .. next(fields) local enchanted_tool = (mod or "") .. ":enchanted_" .. (name or "") .. "_" .. next(fields)
@ -123,6 +124,8 @@ function enchanting.fields(pos, _, fields, sender)
inv:set_stack("mese", 1, mese) inv:set_stack("mese", 1, mese)
inv:set_stack("tool", 1, tool) inv:set_stack("tool", 1, tool)
end end
enchanting.formspec(pos)
end
end end
function enchanting.dig(pos) function enchanting.dig(pos)

View File

@ -46,6 +46,18 @@ end
function workbench:repairable(stack) function workbench:repairable(stack)
if custom_repairable[stack] then return true end if custom_repairable[stack] then return true end
if ar_api then
for _, t in ipairs({
"armor_head",
"armor_torso",
"armor_legs",
"armor_feet",
"armor_shield",
}) do
if minetest.get_item_group(stack, t) then return true end
end
end
for _, t in ipairs(repairable_tools) do for _, t in ipairs(repairable_tools) do
if stack:find(t) then if stack:find(t) then
return true return true