RailSignalBasePrototype.rail_piece is currently documented as being an Animation.
When you take a look at the sprites used tho it seems more like it should be a RotatedSprite, while the prototype dump includes a "axially_symmetrical": false property on the definitions which is only used for either RotatedSprites or RotatedAnimations.
The only issue is that they don't seem to contain the mandatory direction_count property (which makes some sense since they will always need 8 (or 16 in 2.0)).
Nevermind on that 8/16 part, for some reason they have 10 frames/directions??? Why?
RailSignalPrototype.rail_piece should be RotatedAnimation - No, but needs more info
- BrainGamer_
- Long Handed Inserter
- Posts: 93
- Joined: Sun Nov 14, 2021 9:52 pm
- Contact:
Re: RailSignalPrototype.rail_piece should be RotatedAnimation (?)
It's an animation. You can check the type of it in the in-game prototype explorer to verify.
There is a comment in the code regarding the frame count:
There is a comment in the code regarding the frame count:
(Those frame numbers are likely 0-based indexes. The code for this special case is only applied if railPiece has a frame count of 10.)On vertical rail there are two variations of the rail piece. One for odd y-coordinate and the other for even y-coordinate to make these pieces aligned with rail ties. These extra variations are stored as frame 8 and 9.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- BrainGamer_
- Long Handed Inserter
- Posts: 93
- Joined: Sun Nov 14, 2021 9:52 pm
- Contact:
Re: RailSignalPrototype.rail_piece should be RotatedAnimation - No, but needs more info
That makes a lot of sense! Thanks.Bilka wrote: ↑Mon Nov 13, 2023 7:42 am There is a comment in the code regarding the frame count:
(Those frame numbers are likely 0-based indexes. The code for this special case is only applied if railPiece has a frame count of 10.)Code: Select all
On vertical rail there are two variations of the rail piece. One for odd y-coordinate and the other for even y-coordinate to make these pieces aligned with rail ties. These extra variations are stored as frame 8 and 9.