[Genhis][2.0.41] Missed tint property on blood particle

This subforum contains all the issues which we already resolved.
Veden
Filter Inserter
Filter Inserter
Posts: 295
Joined: Wed Jul 13, 2016 3:54 pm
Contact:

[Genhis][2.0.41] Missed tint property on blood particle

Post by Veden »

factorio/data/base/prototypes/particles.lua

Code: Select all

 
  make_particle
  {
    name = "blood-particle",
    life_time = 180,
    pictures = particle_animations.get_blood_particle_pictures({ tint = bloodtint(), scale = 0.75}),
    shadows = particle_animations.get_blood_particle_pictures({ tint = shadowtint(), shift = util.by_pixel (1,0), scale = 0.75}),
    draw_shadow_when_on_ground = false,
    ended_in_water_trigger_effect = false,
    movement_modifier_when_on_ground = 0,
    render_layer = "higher-object-under"
  },
Uses `get_blood_particle_pictures` with the `tint` option, but the `get_blood_particle_pictures` doesn't use the `tint`.


factorio/data/base/prototypes/particle-animations.lua

Code: Select all

particle_animations.get_blood_particle_pictures = function(options)
  local options = options or {}
  return
  {
    sheet =
    {
      filename = "__base__/graphics/particle/blood-particle/blood-particle.png",
      line_length = 12,
      width = 32,
      height = 24,
      frame_count = 12,
      variation_count = 7,
      scale = 0.5 * options.scale,
      shift = util.add_shift(util.by_pixel(0,0.5), options.shift)
    }
  }
end
Wanted to reuse as much code from factorio as possible instead of re-implementing logic in a mod. Was hoping to be able to use the particle-animation `get_blood_particle_pictures` within a mod.
Genhis
Factorio Staff
Factorio Staff
Posts: 792
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Genhis][2.0.41] Missed tint property on blood particle

Post by Genhis »

Thanks for the report, this is fixed for 2.0.46.
Post Reply

Return to “Resolved Problems and Bugs”