set defaults for limiting rotations on expanded nodes

This commit is contained in:
Tim 2015-09-08 09:10:25 +02:00
parent 98c10fb18f
commit 26a874d919
1 changed files with 6 additions and 0 deletions

View File

@ -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)