From 26a874d919ad4df8830a1d648f4ac5f7de33d7ee Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 8 Sep 2015 09:10:25 +0200 Subject: [PATCH] set defaults for limiting rotations on expanded nodes --- homedecor/handlers/registration.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/homedecor/handlers/registration.lua b/homedecor/handlers/registration.lua index 5e06e3c..a140252 100644 --- a/homedecor/handlers/registration.lua +++ b/homedecor/handlers/registration.lua @@ -41,6 +41,12 @@ function homedecor.register(name, original_def) def.after_unexpand = nil if expand then + -- dissallow rotating only half the expanded node by default + -- unless we know better + def.on_rotate = def.on_rotate + or (def.mesh and expand.top and screwdriver.rotate_simple) + or screwdriver.disallow + def.on_place = def.on_place or function(itemstack, placer, pointed_thing) if expand.top then return homedecor.stack_vertically(itemstack, placer, pointed_thing, itemstack:get_name(), expand.top)