Page 1 of 1

[boskid][2.0.62] generator: fluid_box.pipe_picture not recognized

Posted: Sun Aug 03, 2025 12:30 am
by snouz
Hello, I noticed that fluid_box.pipe_picture isn't rendered on generator prototypes.

I tried using assembling-machine-3's code: doesn't render (only the pipe covers)

I tried putting my own pictures as cover: it renders correctly

I tried making my pics transparent to be sure it's not rendered under

I tried adding that code in data-final-fixes

Code: Select all

fluid_box =
    {
      volume = 200,
      pipe_picture = {
        north =
        {
          filename = entity .. "timeshift_energy_roots/timeshift_energy_roots-pipe-N.png",
          priority = "extra-high",
          width = 128,
          height = 128,
          shift = util.by_pixel(0, 32),
          scale = 0.5
        },
        east =
        {
          filename = entity .. "timeshift_energy_roots/timeshift_energy_roots-pipe-E.png",
          priority = "extra-high",
          width = 128,
          height = 128,
          shift = util.by_pixel(-32, 0),
          scale = 0.5
        },
        south =
        {
          filename = entity .. "timeshift_energy_roots/timeshift_energy_roots-pipe-S.png",
          priority = "extra-high",
          width = 128,
          height = 128,
          shift = util.by_pixel(0, -32),
          scale = 0.5
        },
        west =
        {
          filename = entity .. "timeshift_energy_roots/timeshift_energy_roots-pipe-W.png",
          priority = "extra-high",
          width = 128,
          height = 128,
          shift = util.by_pixel(32, 0),
          scale = 0.5
        }
      },
      pipe_connections =
      {
        { flow_direction = "input", direction = defines.direction.north, position = {0, -1} },
        { flow_direction = "input", direction = defines.direction.east, position = {1, 0} },
        { flow_direction = "input", direction = defines.direction.south, position = {0, 1} },
        { flow_direction = "input", direction = defines.direction.west, position = {-1, 0} },
      },
      production_type = "input",
      filter = "timeshift_nutrients_slurry",
      minimum_temperature = 0,
    },
On a side note, my goal would be to have the pipe picture display ONLY when the pipe is connected, but I can't find a boolean in fluidbox to do that (but that might be more of a feature request)

Re: [boskid][2.0.62] generator: fluid_box.pipe_picture not recognized

Posted: Mon Aug 18, 2025 5:23 pm
by boskid
Thanks for the report. This is now fixed for 2.0.65.

It looks like there were quite a lot of entities that did fluid box drawing in a partial way of only drawing pipe covers but not drawing pipe pictures. Those entities were: Boiler, FluidTurret, FusionGenerator, FusionReactor, Generator, MiningDrill, OffshorePump, PipeToGround, Pump, Thruster, Valve. All of those will now accept pipe_picture in a fluid box and will draw related sprites.

This change may become a visually breaking change for some mods, even base mod and space age were affected because electric mining drill (base) and big mining drill (space age) had pipe pictures set based on assembling machine 2, and with the changes they started rendering so i had to remove pipe pictures from those entities. If entities from other mods would show incorrectly with pipe pictures that were previously not drawing, they will have to be adjusted to stop providing pipe pictures if they did not want to.