directional
- class DirectionalMixin(name: str, similar_entities: list[str], tile_position: list | dict = [0, 0], **kwargs: dict)
Allows the Entity to be rotated in the 4 cardinal directions. Sets the
rotatable
attribute toTrue
.See also
- property direction: Direction
The direction that the Entity is facing. An Entity’s “front” is usually the direction of it’s outputs, if it has any.
For some entities, this attribute may be redundant; for example, the direction value for an
AssemblingMachine
only matters if the machine has a fluid input or output.Raises
DirectionWarning
if set to a diagonal direction. For 8-way rotations, ensure that the Entity inheritsEightwayDirectionalMixin
.- Getter:
Gets the direction that the Entity is facing.
- Setter:
Sets the direction of the Entity. Defaults to
Direction.NORTH
if set toNone
.- Type:
- Raises:
DraftsmanError – If the direction is set while inside an Collection, which is forbidden.
ValueError – If set to anything other than a
Direction
, or its equivalentint
.