Page 1 of 1

`LuaEntity::supports_mirroring` and `on_player_flipped_entity`

Posted: Fri Sep 19, 2025 1:46 am
by The_LORD_thy_GOD
(Spawned from a discord discussion beginning here: https://discord.com/channels/1396775903 ... 7954515989)

In order of difficulty level:

1) By analogy with https://lua-api.factorio.com/latest/cla ... _direction I would like to request that `LuaEntity.supports_mirroring` be added.

2) The documentation for https://lua-api.factorio.com/latest/eve ... ped_entity claims that the event only fires when `entity.mirroring` changes. This appears to not be the case: placing a `SimpleEntityWithOwner` facing North and performing a horizontal flip on it by pressing H causes this event to fire, even though neither the `mirroring` nor the `direction` of the entity have changed.

Something is definitely not right about this. Under the current status quo, I think it should be treated as a misdocumentation rather than a bug; those of us wanting to emulate mirroring for custom compound entities still need to know the fact that the user tried to flip the entity, i.e. the event should still fire.

However, if request #3 could also be filled, then #2 could be treated as an outright bug instead.

3) It would be nice to have access to some species of generic entity that supports mirroring without climbing the complexity ladder all the way up to a full assembling machine. (Perhaps `CraftingMachinePrototype.forced_symmetry` could be moved up to `SimpleEntityWithOwner` in order to allow modders to opt into mirroring support for individual custom entities?)

In this case, behavior #2 could be fixed and mods would have first-class abilities to create novel mirrorable entities that aren't necessarily assembling machines.