Pumpjacks with two outputs

Place to get help with not working mods / modding interface.
alficles
Burner Inserter
Burner Inserter
Posts: 18
Joined: Mon Jun 13, 2016 7:44 pm
Contact:

Pumpjacks with two outputs

Post by alficles »

I'm playing with the idea of producing additional resources directly at a pumpjack (or similar extractor). I've got a resource defined to produce two things. This appears to work:

Code: Select all

      results =
      {
        {
          type = "fluid",
          name = "thing-a",
          amount_min = 1,
          amount_max = 1,
          probability = 1
        },
        {
          type = "fluid",
          name = "thing-b",
          amount_min = 1,
          amount_max = 1,
          probability = 1
        }
      }
It gives me a resource patch that I can put an ordinary pumpjack on. When I do, I see that it produces two things, in equal measure.

But the pumpjack has only a single output, so there's only room for one thing to be output, so only one thing is.

So I modify the pumpjack (really, a new item, mostly copy-pasted) so that the fluidbox looks like this:

Code: Select all

    fluid_box =
    {
      base_area = 1,
      base_level = 1,
      pipe_covers = pipecoverspictures(),
      pipe_connections =
      {
        {
          positions = { {-1, -2}, {2, 1}, {1, 2}, {-2, -1} }
        },
        {
          positions = { {1, -2}, {2, -1}, {-1, 2}, {-2, 1} }
        }
      },
    },
This produces an entity with two output arrows. However, when I attach tanks to each, only one gets filled. Any idea why this doesn't work? Am I missing something?
Attachments
Two Arrows on a Pumpjack
Two Arrows on a Pumpjack
20160629203811_1.jpg (192.84 KiB) Viewed 1359 times
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Pumpjacks with two outputs

Post by bobingabout »

That's still just one fluid box, to do what you want would need 2 fluid boxes, like the tag on assembling machines, the chemical plant, etc.
The problem with this though is that the mining-drill entity that a pumpjack uses for it's entity type probably isn't set up internally to handle this.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
alficles
Burner Inserter
Burner Inserter
Posts: 18
Joined: Mon Jun 13, 2016 7:44 pm
Contact:

Re: Pumpjacks with two outputs

Post by alficles »

Hrm. That's problematic.

I saw the tag on assembly-machines and such is “fluid_boxes” and takes an array. This is just “fluid_box”, and it won't take an array.

The other thing I considered was installing a separator. But I don't want long-range pumping to be feasible. (Short range is fine, a feature even.) I might try messing with the viscosity to see if theres a number that drops throughput to below reasonable in a few tiles. Then I could use a separator assembler to pull them apart.
Post Reply

Return to “Modding help”