Prevent entity from being rotated when placed.

Place to get help with not working mods / modding interface.
Post Reply
Daid
Fast Inserter
Fast Inserter
Posts: 163
Joined: Sun Jul 03, 2016 7:42 am
Contact:

Prevent entity from being rotated when placed.

Post 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.

Post Reply

Return to “Modding help”