Merge pull request #159 from Niklp09/screwdriver_anvil

Allow TA3 screwdriver to get repaired by anvil
This commit is contained in:
Joachim Stolberg 2024-03-24 09:48:46 +01:00 committed by GitHub
commit 8b80ddab24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -113,6 +113,11 @@ end
local function on_place(itemstack, user, pointed_thing)
local res, pos, player_name, facedir, node, ndef = base_checks(user, pointed_thing)
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.on_rotate ~= screwdriver.rotate_simple then
if user:get_player_control().sneak then