Page 1 of 1

Prevent entity from being rotated when placed.

Posted: Sun May 28, 2017 9:08 am
by Daid
I have an "furnace" type entity. And I have a fluidbox in it. I don't want the user to rotate the entity when placing it. Currently I "fix" this by using the on_built_entity event and then set the rotation and prevent rotation.

Code: Select all

    entity.rotatable = false
    entity.direction = defines.direction.north
However, this feels ugly. As you can still rotate it in your cursor, and the rotation gets "fixed" when you place it. I've tried searching but I cannot find a flag that prevents rotation, but I cannot seem to find it.