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

View File

@ -41,6 +41,12 @@ function homedecor.register(name, original_def)
def.after_unexpand = nil def.after_unexpand = nil
if expand then 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) def.on_place = def.on_place or function(itemstack, placer, pointed_thing)
if expand.top then if expand.top then
return homedecor.stack_vertically(itemstack, placer, pointed_thing, itemstack:get_name(), expand.top) return homedecor.stack_vertically(itemstack, placer, pointed_thing, itemstack:get_name(), expand.top)