Have all properties of type Animation or Animation4Way actually animate

Post Reply
Artentus
Filter Inserter
Filter Inserter
Posts: 307
Joined: Sat Sep 24, 2016 8:16 pm
Contact:

Have all properties of type Animation or Animation4Way actually animate

Post by Artentus »

I was experimenting with the Turret.base_picture property just now (which is of type Animation4Way) and I noticed the game only ever displays the first frame of the animation.
This is in my oppinion misleading, a property of type Animation4Way should support all features of the type Animation4Way. While I haven't tested this throughtout the entire API I think it highly possible this misleading behavior is also present in other locations.

If animation is not intended for this property it should have a different type instead that doesn't support animations to avoid actual behavior differing from expected behavior.
Although that is a valid solution personally I'd find it more useful to actually enable animations on the property because otherwise there is no way to get a continuos animation on the particular entity.

posila
Factorio Staff
Factorio Staff
Posts: 5201
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Have all properties of type Animation or Animation4Way actually animate

Post by posila »

Honestly, I don't remember why I made the base_picture to load as Animation4Way ... It used to be loaded as Sprite, we needed it to have 4 directions for fluid turret, that's when I changed it. If constant animation (basically frame_index = (tick * animation_speed + random offset based on position) % frame_count) is alright, I can do that.

Artentus
Filter Inserter
Filter Inserter
Posts: 307
Joined: Sat Sep 24, 2016 8:16 pm
Contact:

Re: Have all properties of type Animation or Animation4Way actually animate

Post by Artentus »

Yes just a simple animation running at all times is fine. Thank you!

Artentus
Filter Inserter
Filter Inserter
Posts: 307
Joined: Sat Sep 24, 2016 8:16 pm
Contact:

Re: Have all properties of type Animation or Animation4Way actually animate

Post by Artentus »

This does work in 1.0 now, thank you.
Can be moved to implemented.

Post Reply

Return to “Implemented mod requests”