[2.0.21] Recycler - assigning direction attribute does nothing

Bugs that are actually features.
User avatar
hgschmie
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Tue Feb 06, 2024 5:18 am
Contact:

[2.0.21] Recycler - assigning direction attribute does nothing

Post by hgschmie »

Basically, what the label says. With most other entities, including oblong ones that technically can not be rotated, assigning the LuaEntity::direction attribute will rotate them around (it does so for all oblong combinators). Not so for the recycler. Assigning the direction attribute does nothing, it still is the old value.
Screenshot 2024-11-25 at 18.40.02.png
Screenshot 2024-11-25 at 18.40.02.png (83.37 KiB) Viewed 221 times

(at this point in the code, after assigning the value of move_event.rotate to entity.direction, those two fields should have the same value. They don't.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3191
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: [2.0.21] Recycler - assigning direction attribute does nothing

Post by boskid »

I am going to throw this to Not a bug.

Changing direction is an operation that changes quite a lot of the entity's state and each entity type has to implement a setDirection on its own. Some entities do not care about rotating them if bounding box is non square, but others will complain (Generators, AssemblingMachines). Some entities may not have a direction at all in which case writing to a direction will be rejected.
User avatar
hgschmie
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [2.0.21] Recycler - assigning direction attribute does nothing

Post by hgschmie »

Understood. But most other entities, that do not support rotating also do not support rotating when placing. When an entity supports rotating for placing (by having multiple images), it usually also supports assigning the direction. Recycler is one of the few exceptions.

I am ok, with "not a bug" but disappointed. ;-)
Post Reply

Return to “Not a bug”