Allow TA3 screwdriver to get repaired by anvil

This commit is contained in:
Niklp 2024-03-16 21:41:38 +01:00
parent 77ee9928b7
commit 66a3977c9f
No known key found for this signature in database
GPG Key ID: 05D6F5035E66267A

View File

@ -113,6 +113,11 @@ end
local function on_place(itemstack, user, pointed_thing) local function on_place(itemstack, user, pointed_thing)
local res, pos, player_name, facedir, node, ndef = base_checks(user, pointed_thing) local res, pos, player_name, facedir, node, ndef = base_checks(user, pointed_thing)
if res then if res then
-- Support for anvil
if node.name == "anvil:anvil" then
return screwdriver.handler(itemstack, user, pointed_thing, screwdriver.ROTATE_AXIS, USES)
end
if ndef.paramtype2 == "facedir" then if ndef.paramtype2 == "facedir" then
if ndef.on_rotate ~= screwdriver.rotate_simple then if ndef.on_rotate ~= screwdriver.rotate_simple then
if user:get_player_control().sneak then if user:get_player_control().sneak then