ID:2803715
 
Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
Mainly a QOL thing, and basically what it says on the tin. i.e. flick uses an icon state with 3 frames with a delay of 2 byond ticks each, flick returns a value of 6.

Flick is commonly used to visually show some change in behavior of an object or whatever (i.e. a door opens, and is !dense after the open animation finishes)

Currently you need to use sleep() or a timer etc if you want to try syncronise the code change with the icon_state change, which works perfectly fine, but can get a bit messy in some cases.

I.e. when (to use the door example) you have a whole bunch of child objects that have flick animations of different lengths, you need to manually adjust each one to make sure the sleep delay lines up with the duration of the flick animation.

With this change you could instead just do something to the effect of:

var/duration = flick(animation)
sleep(duration)
do_stuff

icon_duration(ICON/STATE,OBJECT)


Having a seperate function to calculate the duration/delay would make more sense.

Would be epic if we could do src.icon[frame].duration or src.icon.duration for the total duration of the animation.