[1.0.0] idle_animation does not draw when assembling machine is idle

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
Post Reply
User avatar
kirazy
Filter Inserter
Filter Inserter
Posts: 416
Joined: Tue Mar 06, 2018 12:18 am
Contact:

[1.0.0] idle_animation does not draw when assembling machine is idle

Post by kirazy »

I have a modded entity of type assembling-machine, with definitions for animation and idle_animation. It originally used layers and had working_visualisations defined as well, but for the sake of trying to get the idle_animation to work, I have stripped it down to its most basic:

Code: Select all

entity.animation = {
    filename = reskins.angels.directory.."/graphics/entity/smelting/strand-casting-machine/strand-casting-machine-base.png",
    priority = "high",
    width = 167,
    height = 197,
    line_length = 6,
    frame_count = 24,
    animation_speed = 0.5,
    shift = util.by_pixel(0, -16.5),
    hr_version = {
        filename = reskins.angels.directory.."/graphics/entity/smelting/strand-casting-machine/hr-strand-casting-machine-base.png",
        priority = "high",
        width = 329,
        height = 392,
        line_length = 6,
        frame_count = 24,
        animation_speed = 0.5,
        shift = util.by_pixel(0, -16.5),
        scale = 0.5,
    }
}

entity.idle_animation = {
    filename = reskins.angels.directory.."/graphics/entity/smelting/strand-casting-machine/strand-casting-machine-idle-base.png",
    priority = "high",
    width = 167,
    height = 197,
    repeat_count = 24,
    animation_speed = 0.5,
    shift = util.by_pixel(0, -16.5),
    hr_version = {
        filename = reskins.angels.directory.."/graphics/entity/smelting/strand-casting-machine/hr-strand-casting-machine-idle-base.png",
        priority = "high",
        width = 329,
        height = 392,
        repeat_count = 24,
        animation_speed = 0.5,
        shift = util.by_pixel(0, -16.5),
        scale = 0.5,
    }
}
The expected result here is that when the machine is idle, the hr-strand-casting-machine-idle-base.png is drawn. However, the actual result is that I still have the hr-strand-casting-machine-base.png.

Based on my understanding of how this is coded and works, it should work the way I've done it. It shows on the property inspector in game, and I can see the image that should show up there, but it doesn't.

Which would suggest something is bugged?

Unless I'm missing something.

Edit: I've included the mods that aren't yet on the portal, and save that will pull the relevant mods.
Attachments
Bug - Non-functional idle_animation.zip
(3.91 MiB) Downloaded 79 times
reskins-angels_1.0.0.zip
(6.44 MiB) Downloaded 92 times
reskins-library_1.0.5.zip
(289.17 KiB) Downloaded 84 times

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

Re: [1.0.0] idle_animation does not draw when assembling machine is idle

Post by posila »

The problem is the assembler has fluidboxes on it, so it doesn't go to sleep, and therefore the rendering doesn't consider the machine to be "idle".
It is definitelly an issue, I'll think about performance implications of making more expensive checks for being idle in rendering.

User avatar
kirazy
Filter Inserter
Filter Inserter
Posts: 416
Joined: Tue Mar 06, 2018 12:18 am
Contact:

Re: [1.0.0] idle_animation does not draw when assembling machine is idle

Post by kirazy »

Possible to use the same logic that determines whether working_visualisations is drawn? Unless you set always_draw = true with those, they do not draw on the machine in question when it is idle, so there's at least something detecting it's idle correctly.

Edit: I've moved everything into working_visualisations as a workaround:

Post Reply

Return to “Minor issues”