diff --git a/game_api.txt b/game_api.txt index 581d76cc..2f0715f8 100644 --- a/game_api.txt +++ b/game_api.txt @@ -348,7 +348,7 @@ To use it, add the `on_screwdriver` function to the node definition. * `new_param2` the new value of param2 that would have been set if on_rotate wasn't there * return value: false to disallow rotation, nil to keep default behaviour, true to allow it but to indicate that changed have already been made (so the screwdriver will wear out) - * use `on_rotate = screwdriver.disallow` to always disallow rotation + * use `on_rotate = false` to always disallow rotation * use `on_rotate = screwdriver.rotate_simple` to allow only face rotation diff --git a/mods/screwdriver/init.lua b/mods/screwdriver/init.lua index 5e6df62f..e73b618f 100644 --- a/mods/screwdriver/init.lua +++ b/mods/screwdriver/init.lua @@ -64,6 +64,7 @@ screwdriver.handler = function(itemstack, user, pointed_thing, mode, uses) end else if not ndef or not ndef.paramtype2 == "facedir" or + ndef.on_rotate == false or (ndef.drawtype == "nodebox" and not ndef.node_box.type == "fixed") or node.param2 == nil then