[1.1.76] .animations ignores render_layer

This subforum contains all the issues which we already resolved.
Post Reply
lyvgbfh
Fast Inserter
Fast Inserter
Posts: 165
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

[1.1.76] .animations ignores render_layer

Post 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 1323 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
    }
}
Attachments
factorio-current.log
log of relevant test run
(6.03 KiB) Downloaded 46 times
testmod.zip
mod with example entities
(909 Bytes) Downloaded 44 times
layer-bugreport.zip
save, requires example mod also attached
(196.05 KiB) Downloaded 44 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13173
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.76] .animations ignores render_layer

Post by Rseding91 »

Thanks for the report. It's now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”