Page 1 of 1

[1.1.76] .animations ignores render_layer

Posted: Sun Jan 22, 2023 12:22 pm
by lyvgbfh
Case
An electric-energy-source using the .animations graphic specification appears to ignore render_layer
Illustrated example
Illustrated example
Untitled.png (161.99 KiB) Viewed 1360 times
Expectation
.animations behaves the same as .picture, respecting the render_layer as set on the entity
Reproduction steps
Make an electric-energy-interface (unknown if specific) with a non-standard .render_layer, and specify your graphics within .animations
Place this entity and walk in front of it with your character

I have attached a minimal reproduction case, code below as well for ease of access.

Code: Select all

local icons = {{
    icon = "__base__/graphics/icons/wooden-chest.png",
    icon_size = 64,
    icon_mipmaps = 4
}}
local picture = {
    layers =
    {
      {
        filename = "__base__/graphics/entity/wooden-chest/wooden-chest.png",
        priority = "extra-high",
        width = 32,
        height = 36,
        shift = util.by_pixel(0.5, -2),
        hr_version =
        {
          filename = "__base__/graphics/entity/wooden-chest/hr-wooden-chest.png",
          priority = "extra-high",
          width = 62,
          height = 72,
          shift = util.by_pixel(0.5, -2),
          scale = 0.5
        }
      },
      {
        filename = "__base__/graphics/entity/wooden-chest/wooden-chest-shadow.png",
        priority = "extra-high",
        width = 52,
        height = 20,
        shift = util.by_pixel(10, 6.5),
        draw_as_shadow = true,
        hr_version =
        {
          filename = "__base__/graphics/entity/wooden-chest/hr-wooden-chest-shadow.png",
          priority = "extra-high",
          width = 104,
          height = 40,
          shift = util.by_pixel(10, 6.5),
          draw_as_shadow = true,
          scale = 0.5
        }
      }
    }
}
local energy_source = {
    type = 'electric',
    usage_priority = 'primary-output'
}
data:extend{
    {
        name = 'draw-below-entity-animation',
        type = 'electric-energy-interface',
        render_layer = 'building-smoke',
        energy_source = energy_source,
        icons = icons,
        animations = picture
    },
    {
        name = 'draw-above-entity-animation',
        type = 'electric-energy-interface',
        render_layer = 'entity-info-icon',
        energy_source = energy_source,
        icons = icons,
        animations = picture
    },
    {
        name = 'draw-below-entity-picture',
        type = 'electric-energy-interface',
        render_layer = 'building-smoke',
        energy_source = energy_source,
        icons = icons,
        picture = picture
    },
    {
        name = 'draw-above-entity-picture',
        type = 'electric-energy-interface',
        render_layer = 'entity-info-icon',
        energy_source = energy_source,
        icons = icons,
        picture = picture
    }
}

Re: [1.1.76] .animations ignores render_layer

Posted: Mon Jan 23, 2023 8:00 pm
by Rseding91
Thanks for the report. It's now fixed for the next release.